# Rust API client for p7m-billing

# API for managing billing of customers

The purpose of this API is to manage customers, articles, recurring billing, and payments.

The caller has to be authenticated with the system and provide a JWT token in the Authorization header of
the HTTP request. When using the API you typically get this token by authenticating first with OAuth 2.0.

When you are trying this API using the Swagger interface, you need to click the `Authorize` button and then again
the Authorize button in the pop-up that gets opened.


## Overview

This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.  By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.

- API version: 0.1.1
- Package version: 0.1.1
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`

## Installation

Put the package under your project folder in a directory named `p7m-billing` and add the following to `Cargo.toml` under `[dependencies]`:

```
p7m-billing = { path = "./p7m-billing" }
```

## Documentation for API Endpoints

All URIs are relative to *https://billing.api.p7m.de/v1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BankAccountApi* | [**get_bank_accounts**](docs/BankAccountApi.md#get_bank_accounts) | **GET** /bankaccounts | Get a list of all bank accounts
*BankAccountApi* | [**post_bank_accounts**](docs/BankAccountApi.md#post_bank_accounts) | **POST** /bankaccounts | Create a new bank account
*CustomerApi* | [**get_customers**](docs/CustomerApi.md#get_customers) | **GET** /customers | Get a list of all customers
*CustomerApi* | [**get_customers_id**](docs/CustomerApi.md#get_customers_id) | **GET** /customers/{customer_id} | Request a single customer by its ID
*CustomerApi* | [**post_customers**](docs/CustomerApi.md#post_customers) | **POST** /customers | Create a new customer
*CustomerApi* | [**pub_customers_id**](docs/CustomerApi.md#pub_customers_id) | **PUT** /customers/{customer_id} | Update an existing customer
*InvoiceApi* | [**get_currencies**](docs/InvoiceApi.md#get_currencies) | **GET** /currencies | Get a list of all (available) currencies
*InvoiceApi* | [**get_invoices**](docs/InvoiceApi.md#get_invoices) | **GET** /invoices | Get a list of all invoices
*InvoiceApi* | [**get_invoices_id**](docs/InvoiceApi.md#get_invoices_id) | **GET** /invoices/{invoice_id} | Get a single invoice by its ID
*InvoiceApi* | [**post_invoices**](docs/InvoiceApi.md#post_invoices) | **POST** /invoices | Create a new invoice
*InvoiceApi* | [**post_invoices_invoice_id**](docs/InvoiceApi.md#post_invoices_invoice_id) | **POST** /invoices/{invoice_id} | Create a new invoice position


## Documentation For Models

 - [BankAccount](docs/BankAccount.md)
 - [BankAccountData](docs/BankAccountData.md)
 - [Currency](docs/Currency.md)
 - [CurrencyData](docs/CurrencyData.md)
 - [Customer](docs/Customer.md)
 - [CustomerData](docs/CustomerData.md)
 - [DetailedInvoice](docs/DetailedInvoice.md)
 - [Invoice](docs/Invoice.md)
 - [InvoiceData](docs/InvoiceData.md)
 - [InvoicePosition](docs/InvoicePosition.md)
 - [NewBankAccount](docs/NewBankAccount.md)
 - [NewCustomer](docs/NewCustomer.md)
 - [NewInvoice](docs/NewInvoice.md)
 - [NewInvoicePosition](docs/NewInvoicePosition.md)
 - [Salutation](docs/Salutation.md)


To get access to the crate's generated documentation, use:

```
cargo doc --open
```

## Author

tech@p7m.de