|
1 | | -# Billingo PHP SDK |
| 1 | +# OpenAPIClient-php |
2 | 2 |
|
3 | | -## Installation |
| 3 | +This is a Billingo API v3 documentation. Our API based on REST software architectural style. API has resource-oriented URLs, accepts JSON-encoded request bodies and returns JSON-encoded responses. To use this API you have to generate a new API key on our [site](https://app.billingo.hu/api-key). After that, you can test your API key on this page. |
| 4 | + |
| 5 | +For more information, please visit [https://www.billingo.hu/kapcsolat](https://www.billingo.hu/kapcsolat). |
| 6 | + |
| 7 | +## Installation & Usage |
4 | 8 |
|
5 | 9 | ### Requirements |
6 | 10 |
|
7 | | -PHP 8.1 or later. |
| 11 | +PHP 8.1 and later. |
| 12 | + |
| 13 | +### Composer |
| 14 | + |
| 15 | +To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`: |
| 16 | + |
| 17 | +```json |
| 18 | +{ |
| 19 | + "repositories": [ |
| 20 | + { |
| 21 | + "type": "vcs", |
| 22 | + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" |
| 23 | + } |
| 24 | + ], |
| 25 | + "require": { |
| 26 | + "GIT_USER_ID/GIT_REPO_ID": "*@dev" |
| 27 | + } |
| 28 | +} |
| 29 | +``` |
| 30 | + |
| 31 | +Then run `composer install` |
| 32 | + |
| 33 | +### Manual Installation |
| 34 | + |
| 35 | +Download the files and include `autoload.php`: |
8 | 36 |
|
9 | | -## Usage |
| 37 | +```php |
| 38 | +<?php |
| 39 | +require_once('/path/to/OpenAPIClient-php/vendor/autoload.php'); |
| 40 | +``` |
| 41 | + |
| 42 | +## Getting Started |
| 43 | + |
| 44 | +Please follow the [installation procedure](#installation--usage) and then run the following: |
10 | 45 |
|
11 | 46 | ```php |
12 | | -$client = new Cone\Billingo\Billingo('API_KEY'); |
| 47 | +<?php |
| 48 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 49 | + |
13 | 50 |
|
14 | | -// Configuration |
15 | | -$client->config(); |
16 | 51 |
|
17 | | -// Bank accounts |
18 | | -$client->bankAccounts(); |
| 52 | +// Configure API key authorization: api_key |
| 53 | +$config = Cone\Billingo\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY'); |
| 54 | +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 55 | +// $config = Cone\Billingo\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer'); |
| 56 | + |
| 57 | + |
| 58 | +$apiInstance = new Cone\Billingo\Api\BankAccountApi( |
| 59 | + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. |
| 60 | + // This is optional, `GuzzleHttp\Client` will be used as default. |
| 61 | + new GuzzleHttp\Client(), |
| 62 | + $config |
| 63 | +); |
| 64 | +$bankAccount = new \Cone\Billingo\Model\BankAccount(); // \Cone\Billingo\Model\BankAccount | BankAccount object that you would like to store. |
| 65 | + |
| 66 | +try { |
| 67 | + $result = $apiInstance->createBankAccount($bankAccount); |
| 68 | + print_r($result); |
| 69 | +} catch (Exception $e) { |
| 70 | + echo 'Exception when calling BankAccountApi->createBankAccount: ', $e->getMessage(), PHP_EOL; |
| 71 | +} |
19 | 72 |
|
20 | | -//... |
21 | 73 | ``` |
| 74 | + |
| 75 | +## API Endpoints |
| 76 | + |
| 77 | +All URIs are relative to *https://api.billingo.hu/v3* |
| 78 | + |
| 79 | +Class | Method | HTTP request | Description |
| 80 | +------------ | ------------- | ------------- | ------------- |
| 81 | +*BankAccountApi* | [**createBankAccount**](docs/Api/BankAccountApi.md#createbankaccount) | **POST** /bank-accounts | Create a bank account |
| 82 | +*BankAccountApi* | [**deleteBankAccount**](docs/Api/BankAccountApi.md#deletebankaccount) | **DELETE** /bank-accounts/{id} | Delete a bank account |
| 83 | +*BankAccountApi* | [**getBankAccount**](docs/Api/BankAccountApi.md#getbankaccount) | **GET** /bank-accounts/{id} | Retrieve a bank account |
| 84 | +*BankAccountApi* | [**listBankAccount**](docs/Api/BankAccountApi.md#listbankaccount) | **GET** /bank-accounts | List all bank account |
| 85 | +*BankAccountApi* | [**updateBankAccount**](docs/Api/BankAccountApi.md#updatebankaccount) | **PUT** /bank-accounts/{id} | Update a bank account |
| 86 | +*CurrencyApi* | [**getConversionRate**](docs/Api/CurrencyApi.md#getconversionrate) | **GET** /currencies | Get currencies exchange rate. |
| 87 | +*DocumentApi* | [**archiveDocument**](docs/Api/DocumentApi.md#archivedocument) | **PUT** /documents/{id}/archive | Archive a proforma document. |
| 88 | +*DocumentApi* | [**cancelDocument**](docs/Api/DocumentApi.md#canceldocument) | **POST** /documents/{id}/cancel | Cancel a document |
| 89 | +*DocumentApi* | [**createDocument**](docs/Api/DocumentApi.md#createdocument) | **POST** /documents | Create a document |
| 90 | +*DocumentApi* | [**createDocumentFromDraft**](docs/Api/DocumentApi.md#createdocumentfromdraft) | **PUT** /documents/{id} | Converts a draft to an invoice. |
| 91 | +*DocumentApi* | [**createDocumentFromProforma**](docs/Api/DocumentApi.md#createdocumentfromproforma) | **POST** /documents/{id}/create-from-proforma | Create a document from proforma. |
| 92 | +*DocumentApi* | [**createModificationDocument**](docs/Api/DocumentApi.md#createmodificationdocument) | **POST** /documents/{id}/create-modification-document | Create a modification document. |
| 93 | +*DocumentApi* | [**createReceipt**](docs/Api/DocumentApi.md#createreceipt) | **POST** /documents/receipt | Create a receipt |
| 94 | +*DocumentApi* | [**createReceiptFromDraft**](docs/Api/DocumentApi.md#createreceiptfromdraft) | **PUT** /documents/receipt/{id} | Converts a draft to a receipt. |
| 95 | +*DocumentApi* | [**deleteDocument**](docs/Api/DocumentApi.md#deletedocument) | **DELETE** /documents/{id} | Delete a draft. |
| 96 | +*DocumentApi* | [**deletePayment**](docs/Api/DocumentApi.md#deletepayment) | **DELETE** /documents/{id}/payments | Delete all payment history on document |
| 97 | +*DocumentApi* | [**documentCopy**](docs/Api/DocumentApi.md#documentcopy) | **POST** /documents/{id}/copy | Copy a document |
| 98 | +*DocumentApi* | [**downloadDocument**](docs/Api/DocumentApi.md#downloaddocument) | **GET** /documents/{id}/download | Download a document in PDF format. |
| 99 | +*DocumentApi* | [**getDocument**](docs/Api/DocumentApi.md#getdocument) | **GET** /documents/{id} | Retrieve a document |
| 100 | +*DocumentApi* | [**getDocumentByVendorId**](docs/Api/DocumentApi.md#getdocumentbyvendorid) | **GET** /documents/vendor/{vendor_id} | Retrieve a document by vendor id |
| 101 | +*DocumentApi* | [**getOnlineSzamlaStatus**](docs/Api/DocumentApi.md#getonlineszamlastatus) | **GET** /documents/{id}/online-szamla | Retrieve a document Online Számla status |
| 102 | +*DocumentApi* | [**getPayment**](docs/Api/DocumentApi.md#getpayment) | **GET** /documents/{id}/payments | Retrieve a payment histroy |
| 103 | +*DocumentApi* | [**getPublicUrl**](docs/Api/DocumentApi.md#getpublicurl) | **GET** /documents/{id}/public-url | Retrieve a document download public url. |
| 104 | +*DocumentApi* | [**listDocument**](docs/Api/DocumentApi.md#listdocument) | **GET** /documents | List all documents |
| 105 | +*DocumentApi* | [**posPrint**](docs/Api/DocumentApi.md#posprint) | **GET** /documents/{id}/print/pos | Returns a printable POS PDF |
| 106 | +*DocumentApi* | [**sendDocument**](docs/Api/DocumentApi.md#senddocument) | **POST** /documents/{id}/send | Send invoice to given email adresses. |
| 107 | +*DocumentApi* | [**updatePayment**](docs/Api/DocumentApi.md#updatepayment) | **PUT** /documents/{id}/payments | Update payment history |
| 108 | +*DocumentBlockApi* | [**listDocumentBlock**](docs/Api/DocumentBlockApi.md#listdocumentblock) | **GET** /document-blocks | List all document blocks |
| 109 | +*DocumentExportApi* | [**create**](docs/Api/DocumentExportApi.md#create) | **POST** /document-export | Create document export. |
| 110 | +*DocumentExportApi* | [**download**](docs/Api/DocumentExportApi.md#download) | **GET** /document-export/{id}/download | Return exported binary file. |
| 111 | +*DocumentExportApi* | [**poll**](docs/Api/DocumentExportApi.md#poll) | **GET** /document-export/{id}/poll | Retrieve export state. |
| 112 | +*OrganizationApi* | [**getOrganizationData**](docs/Api/OrganizationApi.md#getorganizationdata) | **GET** /organization | Retrieve a organization data. |
| 113 | +*PartnerApi* | [**createPartner**](docs/Api/PartnerApi.md#createpartner) | **POST** /partners | Create a partner |
| 114 | +*PartnerApi* | [**deletePartner**](docs/Api/PartnerApi.md#deletepartner) | **DELETE** /partners/{id} | Delete a partner |
| 115 | +*PartnerApi* | [**getPartner**](docs/Api/PartnerApi.md#getpartner) | **GET** /partners/{id} | Retrieve a partner |
| 116 | +*PartnerApi* | [**listPartner**](docs/Api/PartnerApi.md#listpartner) | **GET** /partners | List all partners |
| 117 | +*PartnerApi* | [**updatePartner**](docs/Api/PartnerApi.md#updatepartner) | **PUT** /partners/{id} | Update a partner |
| 118 | +*ProductApi* | [**createProduct**](docs/Api/ProductApi.md#createproduct) | **POST** /products | Create a product |
| 119 | +*ProductApi* | [**deleteProduct**](docs/Api/ProductApi.md#deleteproduct) | **DELETE** /products/{id} | Delete a product |
| 120 | +*ProductApi* | [**getProduct**](docs/Api/ProductApi.md#getproduct) | **GET** /products/{id} | Retrieve a product |
| 121 | +*ProductApi* | [**listProduct**](docs/Api/ProductApi.md#listproduct) | **GET** /products | List all product |
| 122 | +*ProductApi* | [**updateProduct**](docs/Api/ProductApi.md#updateproduct) | **PUT** /products/{id} | Update a product |
| 123 | +*SpendingApi* | [**spendingDelete**](docs/Api/SpendingApi.md#spendingdelete) | **DELETE** /spendings/{id} | Deletes a spending. |
| 124 | +*SpendingApi* | [**spendingList**](docs/Api/SpendingApi.md#spendinglist) | **GET** /spendings | Lists all spending |
| 125 | +*SpendingApi* | [**spendingSave**](docs/Api/SpendingApi.md#spendingsave) | **POST** /spendings | Creates a new spending. |
| 126 | +*SpendingApi* | [**spendingShow**](docs/Api/SpendingApi.md#spendingshow) | **GET** /spendings/{id} | Retrieves one specific spending. |
| 127 | +*SpendingApi* | [**spendingUpdate**](docs/Api/SpendingApi.md#spendingupdate) | **PUT** /spendings/{id} | Updates a spending item. |
| 128 | +*UtilApi* | [**checkTaxNumber**](docs/Api/UtilApi.md#checktaxnumber) | **GET** /utils/check-tax-number/{tax_number} | Check tax number. |
| 129 | +*UtilApi* | [**getId**](docs/Api/UtilApi.md#getid) | **GET** /utils/convert-legacy-id/{id} | Convert legacy ID to v3 ID. |
| 130 | +*UtilApi* | [**getServerTime**](docs/Api/UtilApi.md#getservertime) | **GET** /utils/time | Get the server time |
| 131 | + |
| 132 | +## Models |
| 133 | + |
| 134 | +- [Address](docs/Model/Address.md) |
| 135 | +- [BankAccount](docs/Model/BankAccount.md) |
| 136 | +- [BankAccountList](docs/Model/BankAccountList.md) |
| 137 | +- [Category](docs/Model/Category.md) |
| 138 | +- [CheckTaxNumberMessage](docs/Model/CheckTaxNumberMessage.md) |
| 139 | +- [ClientError](docs/Model/ClientError.md) |
| 140 | +- [ClientErrorResponse](docs/Model/ClientErrorResponse.md) |
| 141 | +- [ConversationRate](docs/Model/ConversationRate.md) |
| 142 | +- [CorrectionType](docs/Model/CorrectionType.md) |
| 143 | +- [Country](docs/Model/Country.md) |
| 144 | +- [CreateDocumentExport](docs/Model/CreateDocumentExport.md) |
| 145 | +- [Currency](docs/Model/Currency.md) |
| 146 | +- [DateType](docs/Model/DateType.md) |
| 147 | +- [Discount](docs/Model/Discount.md) |
| 148 | +- [DiscountType](docs/Model/DiscountType.md) |
| 149 | +- [Document](docs/Model/Document.md) |
| 150 | +- [DocumentAncestor](docs/Model/DocumentAncestor.md) |
| 151 | +- [DocumentBankAccount](docs/Model/DocumentBankAccount.md) |
| 152 | +- [DocumentBlock](docs/Model/DocumentBlock.md) |
| 153 | +- [DocumentBlockList](docs/Model/DocumentBlockList.md) |
| 154 | +- [DocumentBlockType](docs/Model/DocumentBlockType.md) |
| 155 | +- [DocumentCancellation](docs/Model/DocumentCancellation.md) |
| 156 | +- [DocumentExportFilterExtra](docs/Model/DocumentExportFilterExtra.md) |
| 157 | +- [DocumentExportId](docs/Model/DocumentExportId.md) |
| 158 | +- [DocumentExportOtherOptions](docs/Model/DocumentExportOtherOptions.md) |
| 159 | +- [DocumentExportQueryType](docs/Model/DocumentExportQueryType.md) |
| 160 | +- [DocumentExportSortBy](docs/Model/DocumentExportSortBy.md) |
| 161 | +- [DocumentExportStatus](docs/Model/DocumentExportStatus.md) |
| 162 | +- [DocumentExportStatusState](docs/Model/DocumentExportStatusState.md) |
| 163 | +- [DocumentExportType](docs/Model/DocumentExportType.md) |
| 164 | +- [DocumentForm](docs/Model/DocumentForm.md) |
| 165 | +- [DocumentFormat](docs/Model/DocumentFormat.md) |
| 166 | +- [DocumentInsert](docs/Model/DocumentInsert.md) |
| 167 | +- [DocumentInsertItemsInner](docs/Model/DocumentInsertItemsInner.md) |
| 168 | +- [DocumentInsertType](docs/Model/DocumentInsertType.md) |
| 169 | +- [DocumentItem](docs/Model/DocumentItem.md) |
| 170 | +- [DocumentItemData](docs/Model/DocumentItemData.md) |
| 171 | +- [DocumentLanguage](docs/Model/DocumentLanguage.md) |
| 172 | +- [DocumentList](docs/Model/DocumentList.md) |
| 173 | +- [DocumentNotificationStatus](docs/Model/DocumentNotificationStatus.md) |
| 174 | +- [DocumentOrganization](docs/Model/DocumentOrganization.md) |
| 175 | +- [DocumentPartner](docs/Model/DocumentPartner.md) |
| 176 | +- [DocumentProductData](docs/Model/DocumentProductData.md) |
| 177 | +- [DocumentPublicUrl](docs/Model/DocumentPublicUrl.md) |
| 178 | +- [DocumentSettings](docs/Model/DocumentSettings.md) |
| 179 | +- [DocumentSummary](docs/Model/DocumentSummary.md) |
| 180 | +- [DocumentType](docs/Model/DocumentType.md) |
| 181 | +- [DocumentVatRateSummary](docs/Model/DocumentVatRateSummary.md) |
| 182 | +- [Entitlement](docs/Model/Entitlement.md) |
| 183 | +- [Feature](docs/Model/Feature.md) |
| 184 | +- [Id](docs/Model/Id.md) |
| 185 | +- [InvoiceSettings](docs/Model/InvoiceSettings.md) |
| 186 | +- [LedgerNumberInformation](docs/Model/LedgerNumberInformation.md) |
| 187 | +- [ModificationDocumentInsert](docs/Model/ModificationDocumentInsert.md) |
| 188 | +- [OnlinePayment](docs/Model/OnlinePayment.md) |
| 189 | +- [OnlineSzamlaStatus](docs/Model/OnlineSzamlaStatus.md) |
| 190 | +- [OnlineSzamlaStatusEnum](docs/Model/OnlineSzamlaStatusEnum.md) |
| 191 | +- [OnlineSzamlaStatusMessage](docs/Model/OnlineSzamlaStatusMessage.md) |
| 192 | +- [OrganizationData](docs/Model/OrganizationData.md) |
| 193 | +- [Partner](docs/Model/Partner.md) |
| 194 | +- [PartnerCustomBillingSettings](docs/Model/PartnerCustomBillingSettings.md) |
| 195 | +- [PartnerList](docs/Model/PartnerList.md) |
| 196 | +- [PartnerTaxType](docs/Model/PartnerTaxType.md) |
| 197 | +- [PaymentHistory](docs/Model/PaymentHistory.md) |
| 198 | +- [PaymentMethod](docs/Model/PaymentMethod.md) |
| 199 | +- [PaymentStatus](docs/Model/PaymentStatus.md) |
| 200 | +- [PaymentStatusSpending](docs/Model/PaymentStatusSpending.md) |
| 201 | +- [Product](docs/Model/Product.md) |
| 202 | +- [ProductList](docs/Model/ProductList.md) |
| 203 | +- [ReceiptInsert](docs/Model/ReceiptInsert.md) |
| 204 | +- [ReceiptInsertItemsInner](docs/Model/ReceiptInsertItemsInner.md) |
| 205 | +- [ReceiptItemData](docs/Model/ReceiptItemData.md) |
| 206 | +- [ReceiptProductData](docs/Model/ReceiptProductData.md) |
| 207 | +- [Round](docs/Model/Round.md) |
| 208 | +- [SendDocument](docs/Model/SendDocument.md) |
| 209 | +- [ServerError](docs/Model/ServerError.md) |
| 210 | +- [ServerErrorResponse](docs/Model/ServerErrorResponse.md) |
| 211 | +- [ServerTime](docs/Model/ServerTime.md) |
| 212 | +- [Source](docs/Model/Source.md) |
| 213 | +- [Spending](docs/Model/Spending.md) |
| 214 | +- [SpendingList](docs/Model/SpendingList.md) |
| 215 | +- [SpendingListItem](docs/Model/SpendingListItem.md) |
| 216 | +- [SpendingPartner](docs/Model/SpendingPartner.md) |
| 217 | +- [SpendingPaymentMethod](docs/Model/SpendingPaymentMethod.md) |
| 218 | +- [SpendingSave](docs/Model/SpendingSave.md) |
| 219 | +- [Subscription](docs/Model/Subscription.md) |
| 220 | +- [SubscriptionErrorResponse](docs/Model/SubscriptionErrorResponse.md) |
| 221 | +- [TaxNumber](docs/Model/TaxNumber.md) |
| 222 | +- [TooManyRequestsResponse](docs/Model/TooManyRequestsResponse.md) |
| 223 | +- [UnitPriceType](docs/Model/UnitPriceType.md) |
| 224 | +- [ValidationError](docs/Model/ValidationError.md) |
| 225 | +- [ValidationErrorResponse](docs/Model/ValidationErrorResponse.md) |
| 226 | +- [Vat](docs/Model/Vat.md) |
| 227 | + |
| 228 | +## Authorization |
| 229 | + |
| 230 | +### api_key |
| 231 | + |
| 232 | +- **Type**: API key |
| 233 | +- **API key parameter name**: X-API-KEY |
| 234 | +- **Location**: HTTP header |
| 235 | + |
| 236 | + |
| 237 | +## Tests |
| 238 | + |
| 239 | +To run the tests, use: |
| 240 | + |
| 241 | +```bash |
| 242 | +composer install |
| 243 | +vendor/bin/phpunit |
| 244 | +``` |
| 245 | + |
| 246 | +## Author |
| 247 | + |
| 248 | + |
| 249 | + |
| 250 | +## About this package |
| 251 | + |
| 252 | +This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: |
| 253 | + |
| 254 | +- API version: `3.0.14` |
| 255 | + - Generator version: `7.17.0` |
| 256 | +- Build package: `org.openapitools.codegen.languages.PhpNextgenClientCodegen` |
0 commit comments