Skip to content

Latest commit

 

History

History
244 lines (181 loc) · 9.52 KB

DocumentPaymentApi.md

File metadata and controls

244 lines (181 loc) · 9.52 KB

Swagger\Client\DocumentPaymentApi

All URIs are relative to https://api.easybill.de/rest/v1

Method HTTP request Description
documentPaymentsGet GET /document-payments Fetch document payments list
documentPaymentsIdDelete DELETE /document-payments/{id} Delete document payment
documentPaymentsIdGet GET /document-payments/{id} Fetch document payment
documentPaymentsPost POST /document-payments Create document payment

documentPaymentsGet

\Swagger\Client\Model\DocumentPayments documentPaymentsGet($limit, $page, $document_id, $payment_at, $reference)

Fetch document payments list

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Bearer
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Swagger\Client\Api\DocumentPaymentApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$limit = 56; // int | Limited the result. Default is 100. Maximum can be 1000.
$page = 56; // int | Set current Page. Default is 1.
$document_id = "document_id_example"; // string | Filter payments by document_id. You can add multiple ids separate by comma like id,id,id.
$payment_at = "payment_at_example"; // string | Filter payments by payment_at. You can filter one date with payment_at=2014-12-10 or between like 2015-01-01,2015-12-31.
$reference = "reference_example"; // string | Filter payments by reference. You can add multiple references separate by comma like id,id,id.

try {
    $result = $apiInstance->documentPaymentsGet($limit, $page, $document_id, $payment_at, $reference);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentPaymentApi->documentPaymentsGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
limit int Limited the result. Default is 100. Maximum can be 1000. [optional]
page int Set current Page. Default is 1. [optional]
document_id string Filter payments by document_id. You can add multiple ids separate by comma like id,id,id. [optional]
payment_at string Filter payments by payment_at. You can filter one date with payment_at=2014-12-10 or between like 2015-01-01,2015-12-31. [optional]
reference string Filter payments by reference. You can add multiple references separate by comma like id,id,id. [optional]

Return type

\Swagger\Client\Model\DocumentPayments

Authorization

Bearer, basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

documentPaymentsIdDelete

documentPaymentsIdDelete($id)

Delete document payment

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Bearer
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Swagger\Client\Api\DocumentPaymentApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 789; // int | ID of document payment

try {
    $apiInstance->documentPaymentsIdDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling DocumentPaymentApi->documentPaymentsIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int ID of document payment

Return type

void (empty response body)

Authorization

Bearer, basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

documentPaymentsIdGet

\Swagger\Client\Model\DocumentPayment documentPaymentsIdGet($id)

Fetch document payment

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Bearer
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Swagger\Client\Api\DocumentPaymentApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 789; // int | ID of document payment

try {
    $result = $apiInstance->documentPaymentsIdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentPaymentApi->documentPaymentsIdGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int ID of document payment

Return type

\Swagger\Client\Model\DocumentPayment

Authorization

Bearer, basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

documentPaymentsPost

\Swagger\Client\Model\DocumentPayment documentPaymentsPost($body, $paid)

Create document payment

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Bearer
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Swagger\Client\Api\DocumentPaymentApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$body = new \Swagger\Client\Model\DocumentPayment(); // \Swagger\Client\Model\DocumentPayment | 
$paid = true; // bool | Mark document as paid when amount less then payment amount.

try {
    $result = $apiInstance->documentPaymentsPost($body, $paid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentPaymentApi->documentPaymentsPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Swagger\Client\Model\DocumentPayment
paid bool Mark document as paid when amount less then payment amount. [optional]

Return type

\Swagger\Client\Model\DocumentPayment

Authorization

Bearer, basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]