p24-cli

command module
v0.0.0-...-ee67b27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2022 License: MIT Imports: 7 Imported by: 0

README

p24

p24 is command line interface for communication with privat24 marchant information api.

Note: before using p24 you need to register merchant in privat24 system.

Features

  • getting merchant card balance

  • getting merchant statements list for intervals greater than 90 days

  • piping

  • loading progress bar

  • rate limiting and retrying

  • export merchant statements list to a xml|xlsx encoding

  • export only needed fields by --format options

Installation

go
go install github.com/dimboknv/p24-cli@latest
p24-cli version
build from source
git clone https://github.com/dimboknv/p24-cli.git && cd p24-cli
make build
./bin/p24 version
docker image
git clone https://github.com/dimboknv/p24-cli.git && cd p24-cli
make docker 
docker run -it --rm p24 p24 version

Usage

Usage:
  p24 [OPTIONS] statements [statements-OPTIONS]

Application Options:
      --debug                   Is debug mode?

Help Options:
  -h, --help                    Show this help message

[statements command options]
          --id=                 Merchant id
          --pass=               Merchant password
          --card=               Merchant card number
          --timeout=            http request timeout (default: 90s)
          --sd=                 Start date of statements date range with "dd.mm.yyyy" layout
          --ed=                 End date of statements date range with "dd.mm.yyyy" layout
      -f, --format=             Export format todo (default:
                                Card|Appcode|TranDate|Amount|CardAmount|Rest|Terminal|Description|,)
      -e, --encoding=[xml|xlsx] Export encoding (default: xml)
      -o, --out=                Export statements list to a file with specified extname encoding. If
                                empty export to stdout with '-e' encoding

Piping

You can use p24 in pipeline:

p24 statements --id="id" --pass="pass" --card="card" --sd="01.01.2022" --ed="01.02.2022" --timeout=10s --encoding=xml | dasel -p xml

Docker

docker run --rm -it -v ${PWD}:/p24 p24 p24 statements --id="id" --pass="pass" --card="card" --sd="01.01.2022" --ed="01.02.2022" --timeout=10s --out=out.xlsx

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL