Skip to content

Latest commit

 

History

History
82 lines (53 loc) · 1.77 KB

File metadata and controls

82 lines (53 loc) · 1.77 KB

invoice command line tool

invoice lets you quickly and intuitively exchange invoice file(s) with the Italian Servizio di Interscambio (SDI) from the command line. It leverages the Invoicetronic API.

You don't need to learn the Invoicetronic API or any programming language to send and receive invoices (SDKs for common programming languages are also available).

At a glance

Sending an invoice can be as simple as issuing this command:

invoice send file1.xml

Say you have many files to upload, you can use wildcards:

invoice send *.xml --delete
invoice send file1.xml file2.xml file3.xml

In the first line above, we're also deleting files from the disk once successfully uploaded.

Receiving files is also super simple:

invoice receive --unread

The above will download all new invoices and store them in the current directory.

Installation

See the Installation guide.

Quickstart

Quickstart and context available at the Invoicetronic website.

Contributing

Prerequisites

Build

go build

Test

go test ./...

Run with the race detector:

go test -race ./...

Tests use the standard library only (testing + net/http/httptest), with no external dependencies. API calls are mocked via httptest.NewServer; filesystem tests use t.TempDir().

Cross-compile

Requires PACKAGE_VERSION to be set:

PACKAGE_VERSION=1.0.0 make all

Target a single platform with make windows, make linux, or make macos.