Skip to content

Commit

Permalink
fix: added get xml method
Browse files Browse the repository at this point in the history
  • Loading branch information
fattureincloud-bot authored Jan 24, 2022
1 parent 9f02773 commit 314a12d
Show file tree
Hide file tree
Showing 246 changed files with 2,147 additions and 886 deletions.
10 changes: 3 additions & 7 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ docs/Model/CompanyInfoPlanInfoFunctions.md
docs/Model/CompanyInfoPlanInfoFunctionsStatus.md
docs/Model/CompanyInfoPlanInfoLimits.md
docs/Model/CompanyType.md
docs/Model/ControlledCompany.md
docs/Model/CreateArchiveDocumentRequest.md
docs/Model/CreateArchiveDocumentResponse.md
docs/Model/CreateCashbookEntryRequest.md
Expand Down Expand Up @@ -267,6 +268,7 @@ lib/Model/CompanyInfoPlanInfoFunctions.php
lib/Model/CompanyInfoPlanInfoFunctionsStatus.php
lib/Model/CompanyInfoPlanInfoLimits.php
lib/Model/CompanyType.php
lib/Model/ControlledCompany.php
lib/Model/CreateArchiveDocumentRequest.php
lib/Model/CreateArchiveDocumentResponse.php
lib/Model/CreateCashbookEntryRequest.php
Expand Down Expand Up @@ -458,10 +460,4 @@ lib/Model/VerifyEInvoiceXmlResponse.php
lib/Model/VerifyEInvoiceXmlResponseData.php
lib/ObjectSerializer.php
phpunit.xml.dist
test/Model/AttachmentDataTest.php
test/Model/CreateVatTypeRequestTest.php
test/Model/CreateVatTypeResponseTest.php
test/Model/GetVatTypeResponseTest.php
test/Model/ModifyVatTypeRequestTest.php
test/Model/ModifyVatTypeResponseTest.php
test/Model/VerifyEInvoiceXmlResponseDataTest.php
test/Model/ControlledCompanyTest.php
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Class | Method | HTTP request | Description
*IssuedDocumentsApi* | [**modifyIssuedDocument**](docs/Api/IssuedDocumentsApi.md#modifyissueddocument) | **PUT** /c/{company_id}/issued_documents/{document_id} | Modify Issued Document
*IssuedDocumentsApi* | [**scheduleEmail**](docs/Api/IssuedDocumentsApi.md#scheduleemail) | **POST** /c/{company_id}/issued_documents/{document_id}/email | Schedule Email
*IssuedDocumentsApi* | [**uploadIssuedDocumentAttachment**](docs/Api/IssuedDocumentsApi.md#uploadissueddocumentattachment) | **POST** /c/{company_id}/issued_documents/attachment | Upload Issued Document Attachment
*IssuedEInvoicesApi* | [**getEInvoiceXml**](docs/Api/IssuedEInvoicesApi.md#geteinvoicexml) | **GET** /c/{company_id}/issued_documents/{document_id}/e_invoice/xml | Get e-invoice XML
*IssuedEInvoicesApi* | [**sendEInvoice**](docs/Api/IssuedEInvoicesApi.md#sendeinvoice) | **POST** /c/{company_id}/issued_documents/{document_id}/e_invoice/send | Send the e-invoice
*IssuedEInvoicesApi* | [**verifyEInvoiceXml**](docs/Api/IssuedEInvoicesApi.md#verifyeinvoicexml) | **GET** /c/{company_id}/issued_documents/{document_id}/e_invoice/xml_verify | Verify e-invoice xml
*ProductsApi* | [**createProduct**](docs/Api/ProductsApi.md#createproduct) | **POST** /c/{company_id}/products | Create Product
Expand Down Expand Up @@ -188,6 +189,7 @@ Class | Method | HTTP request | Description
- [CompanyInfoPlanInfoFunctionsStatus](docs/Model/CompanyInfoPlanInfoFunctionsStatus.md)
- [CompanyInfoPlanInfoLimits](docs/Model/CompanyInfoPlanInfoLimits.md)
- [CompanyType](docs/Model/CompanyType.md)
- [ControlledCompany](docs/Model/ControlledCompany.md)
- [CreateArchiveDocumentRequest](docs/Model/CreateArchiveDocumentRequest.md)
- [CreateArchiveDocumentResponse](docs/Model/CreateArchiveDocumentResponse.md)
- [CreateCashbookEntryRequest](docs/Model/CreateCashbookEntryRequest.md)
Expand Down Expand Up @@ -438,5 +440,5 @@ [email protected]

This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: `2.0.8`
- API version: `2.0.9`
- Build package: `org.openapitools.codegen.languages.PhpClientCodegen`
65 changes: 65 additions & 0 deletions docs/Api/IssuedEInvoicesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,75 @@ All URIs are relative to https://api-v2.fattureincloud.it.

Method | HTTP request | Description
------------- | ------------- | -------------
[**getEInvoiceXml()**](IssuedEInvoicesApi.md#getEInvoiceXml) | **GET** /c/{company_id}/issued_documents/{document_id}/e_invoice/xml | Get e-invoice XML
[**sendEInvoice()**](IssuedEInvoicesApi.md#sendEInvoice) | **POST** /c/{company_id}/issued_documents/{document_id}/e_invoice/send | Send the e-invoice
[**verifyEInvoiceXml()**](IssuedEInvoicesApi.md#verifyEInvoiceXml) | **GET** /c/{company_id}/issued_documents/{document_id}/e_invoice/xml_verify | Verify e-invoice xml


## `getEInvoiceXml()`

```php
getEInvoiceXml($company_id, $document_id, $include_attachment): string
```

Get e-invoice XML

Downloads the e-invoice in XML format.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
$config = FattureInCloud\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new FattureInCloud\Api\IssuedEInvoicesApi(
// 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
);
$company_id = 12345; // int | The ID of the company.
$document_id = 56; // int | The ID of the document.
$include_attachment = True; // bool | Include the attachment to the XML e-invoice.

try {
$result = $apiInstance->getEInvoiceXml($company_id, $document_id, $include_attachment);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling IssuedEInvoicesApi->getEInvoiceXml: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**company_id** | **int**| The ID of the company. |
**document_id** | **int**| The ID of the document. |
**include_attachment** | **bool**| Include the attachment to the XML e-invoice. | [optional]

### Return type

**string**

### Authorization

[OAuth2AuthenticationCodeFlow](../../README.md#OAuth2AuthenticationCodeFlow)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `text/xml`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `sendEInvoice()`

```php
Expand Down
4 changes: 2 additions & 2 deletions docs/Model/Company.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Name | Type | Description | Notes
**name** | **string** | Company name. | [optional]
**type** | [**\FattureInCloud\Model\CompanyType**](CompanyType.md) | | [optional]
**access_token** | **string** | CompanyAuthentication token for this company. [Only if type&#x3D;company] | [optional]
**controlled_companies** | [**\FattureInCloud\Model\Company[]**](Company.md) | List of controlled companies. [Only if type&#x3D;accountant] | [optional]
**connection_id** | **float** | Company connection id. | [optional]
**controlled_companies** | [**\FattureInCloud\Model\ControlledCompany[]**](ControlledCompany.md) | List of controlled companies. [Only if type&#x3D;accountant] | [optional]
**connection_id** | **int** | Company connection id. | [optional]
**tax_code** | **string** | Tax code. | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
14 changes: 14 additions & 0 deletions docs/Model/ControlledCompany.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# # ControlledCompany

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | Company unique identifier. | [optional]
**name** | **string** | Company name. | [optional]
**type** | [**\FattureInCloud\Model\CompanyType**](CompanyType.md) | | [optional]
**access_token** | **string** | CompanyAuthentication token for this company. [Only if type&#x3D;company] | [optional]
**connection_id** | **float** | Company connection id. | [optional]
**tax_code** | **string** | Tax code. | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
2 changes: 1 addition & 1 deletion docs/Model/EmailSchedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sender_id** | **float** | Sender id. Required if &#x60;sender_email&#x60; is not specified | [optional]
**sender_id** | **int** | Sender id. Required if &#x60;sender_email&#x60; is not specified | [optional]
**sender_email** | **string** | Sender email. Required if &#x60;sender_id&#x60; is not specified | [optional]
**recipient_email** | **string** | One or more comma separated recipient emails |
**subject** | **string** | Email subject |
Expand Down
48 changes: 26 additions & 22 deletions docs/Model/IssuedDocument.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**number** | **int** | Number of the document [If not specified, next number is used] | [optional]
**numeration** | **string** | Numeration of the document [Not available if type&#x3D;delivery_note] | [optional]
**date** | **\DateTime** | Date of the document [If not specified, today date is used] | [optional]
**year** | **int** | Invoice year. | [optional]
**currency** | [**\FattureInCloud\Model\Currency**](Currency.md) | | [optional]
**language** | [**\FattureInCloud\Model\Language**](Language.md) | | [optional]
**subject** | **string** | Issued document subject. | [optional]
Expand All @@ -18,27 +19,42 @@ Name | Type | Description | Notes
**notes** | **string** | Issued document extra notes. | [optional]
**rivalsa** | **float** | \&quot;Rivalsa INPS\&quot; percentual value | [optional]
**cassa** | **float** | \&quot;Cassa previdenziale\&quot; percentual value | [optional]
**amount_cassa** | **float** | [Read Only] Cassa amount. | [optional] [readonly]
**cassa_taxable** | **float** | Cassa taxable percentage | [optional]
**amount_cassa_taxable** | **float** | [Can be set only if cassa_taxable is NULL] Cassa2 taxable amount | [optional]
**cassa2** | **float** | \&quot;Cassa previdenziale 2\&quot; percentual value | [optional]
**amount_cassa2** | **float** | [Read Only] Cassa amount. | [optional] [readonly]
**cassa2_taxable** | **float** | Cassa2 taxable percentage | [optional]
**amount_cassa2_taxable** | **float** | [Can be set only if cassa2_taxable is NULL] Cassa2 taxable amount | [optional]
**global_cassa_taxable** | **float** | Global cassa taxable percentage | [optional]
**amount_global_cassa_taxable** | **float** | [Can be set only if global_cassa_taxable is NULL] Global cassa taxable amount | [optional]
**withholding_tax** | **float** | Withholding tax (ritenuta d&#39;acconto) percentual value | [optional]
**withholding_tax_taxable** | **float** | Withholding tax taxable (imponibile) percentual value | [optional]
**other_withholding_tax** | **float** | Other withholding tax (altra ritenuta) percentual value | [optional]
**stamp_duty** | **float** | Stamp duty value [0 if not present] | [optional]
**payment_method** | [**\FattureInCloud\Model\PaymentMethod**](PaymentMethod.md) | | [optional]
**use_split_payment** | **bool** | | [optional] [default to false]
**use_gross_prices** | **bool** | | [optional] [default to false]
**use_split_payment** | **bool** | Use split payment | [optional] [default to false]
**use_gross_prices** | **bool** | Use gross prices | [optional] [default to false]
**e_invoice** | **bool** | Indicates if this is an e-invoice. | [optional] [default to false]
**ei_data** | [**\FattureInCloud\Model\IssuedDocumentEiData**](IssuedDocumentEiData.md) | | [optional]
**ei_cassa_type** | **string** | Einvoice cassa type | [optional]
**ei_cassa2_type** | **string** | Einvoice cassa2 type | [optional]
**ei_withholding_tax_causal** | **string** | Einvoice withholding tax causal | [optional]
**ei_other_withholding_tax_type** | **string** | Einvoice other withholding tax type | [optional]
**ei_other_withholding_tax_causal** | **string** | Einvoice other withholding tax causal | [optional]
**items_list** | [**\FattureInCloud\Model\IssuedDocumentItemsList[]**](IssuedDocumentItemsList.md) | | [optional]
**payments_list** | [**\FattureInCloud\Model\IssuedDocumentPaymentsList[]**](IssuedDocumentPaymentsList.md) | | [optional]
**template** | [**\FattureInCloud\Model\DocumentTemplate**](DocumentTemplate.md) | | [optional]
**delivery_note_template** | [**\FattureInCloud\Model\DocumentTemplate**](DocumentTemplate.md) | | [optional]
**acc_inv_template** | [**\FattureInCloud\Model\DocumentTemplate**](DocumentTemplate.md) | | [optional]
**h_margins** | **int** | Horizontal margins. | [optional]
**v_margins** | **int** | Vertical margins. | [optional]
**show_payments** | **bool** | Shows the expiration dates of the payments on the document. | [optional]
**show_payment_method** | **bool** | Show the payment method details on the document. | [optional]
**show_totals** | [**\FattureInCloud\Model\ShowTotalsMode**](ShowTotalsMode.md) | | [optional]
**v_margins** | **int** | Vertical margins. | [optional]
**show_paypal_button** | **bool** | | [optional] [default to false]
**show_notification_button** | **bool** | | [optional] [default to false]
**show_paypal_button** | **bool** | Show paypal button | [optional] [default to false]
**show_notification_button** | **bool** | Show notification button | [optional] [default to false]
**show_tspay_button** | **bool** | Show ts pay button. | [optional]
**delivery_note** | **bool** | | [optional]
**accompanying_invoice** | **bool** | Attach an accompanying invoice. | [optional] [default to false]
**dn_number** | **int** | Number (for the attached delivery note). | [optional]
Expand All @@ -54,32 +70,20 @@ Name | Type | Description | Notes
**amount_net** | **float** | [Read Only] Total net amount (competenze). | [optional] [readonly]
**amount_vat** | **float** | [Read Only] Total vat amount (IVA). | [optional] [readonly]
**amount_gross** | **float** | [Read Only] Total gross amount (totale documento). | [optional] [readonly]
**amount_due_discount** | **float** | Amount due discount | [optional]
**amount_rivalsa** | **float** | [Read Only] Rivalsa amount. | [optional] [readonly]
**amount_cassa** | **float** | [Read Only] Cassa amount. | [optional] [readonly]
**amount_rivalsa_taxable** | **float** | Taxable rivalsa amount | [optional]
**amount_withholding_tax** | **float** | [Read Only] Withholding tax amount (ritenuta d&#39;acconto). | [optional] [readonly]
**amount_withholding_tax_taxable** | **float** | Taxable withholding tax amount | [optional]
**amount_other_withholding_tax** | **float** | [Read Only] Other withholding tax amount (altra ritenuta). | [optional] [readonly]
**amount_other_withholding_tax_taxable** | **float** | Taxable other withholding tax amount | [optional]
**amount_enasarco_taxable** | **float** | Taxable enasarco amount | [optional]
**extra_data** | [**\FattureInCloud\Model\IssuedDocumentExtraData**](IssuedDocumentExtraData.md) | | [optional]
**seen_date** | **\DateTime** | Date when the client/supplier has seen the document. | [optional]
**next_due_date** | **\DateTime** | Date of the next not paid payment. | [optional]
**url** | **string** | Public url of the document PDF file. | [optional]
**attachment_url** | **string** | [Read Only] Public url of the attached file. Authomatically set if a valid attachment token is passed via POST /issued_documents or PUT /issued_documents/{documentId}. | [optional] [readonly]
**attachment_token** | **string** | [Write Only] Attachment token returned by POST /issued_documents/attachment. Used to attach the file already uploaded. | [optional]
**ei_raw** | **object** | Advanced raw attributes for e-invoices. | [optional]
**show_tspay_button** | **bool** | Show ts pay button. | [optional]
**year** | **int** | Invoice year. | [optional]
**amount_rivalsa_taxable** | **float** | | [optional]
**amount_global_cassa_taxable** | **float** | | [optional]
**amount_cassa_taxable** | **float** | | [optional]
**amount_cassa2** | **float** | | [optional]
**amount_cassa2_taxable** | **float** | | [optional]
**amount_withholding_tax_taxable** | **float** | | [optional]
**amount_enasarco_taxable** | **float** | | [optional]
**amount_other_withholding_tax_taxable** | **float** | | [optional]
**ei_cassa_type** | **string** | | [optional]
**ei_cassa2_type** | **string** | | [optional]
**ei_withholding_tax_causal** | **string** | | [optional]
**ei_other_withholding_tax_type** | **string** | | [optional]
**ei_other_withholding_tax_causal** | **string** | | [optional]
**amount_due_discount** | **float** | | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
1 change: 1 addition & 0 deletions docs/Model/IssuedDocumentItemsList.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
**product_id** | **int** | Unique identifier of the product. | [optional]
**code** | **string** | Product code. | [optional]
**name** | **string** | Product name. | [optional]
**category** | **string** | Product category | [optional]
**description** | **string** | Product description. | [optional]
**qty** | **float** | Items quantity, | [optional]
**measure** | **string** | Item measure. | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/Model/ReceiptItemsListItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **float** | Item unique identifier. | [optional]
**id** | **int** | Item unique identifier. | [optional]
**amount_net** | **float** | Item total net amount. | [optional]
**amount_gross** | **float** | Item total gross amount. | [optional]
**category** | **string** | Item category. | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/Model/ReceivedDocumentInfoItemsDefaultValues.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**vat** | **int** | Default vat value. | [optional]
**vat** | **float** | Default vat value. | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
2 changes: 1 addition & 1 deletion docs/Model/ReceivedDocumentPaymentTerms.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**days** | **float** | Number of days. | [optional]
**days** | **int** | Number of days. | [optional]
**type** | **string** | | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
2 changes: 1 addition & 1 deletion lib/Api/ArchiveApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 400.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol.
*
* The version of the OpenAPI document: 2.0.8
* The version of the OpenAPI document: 2.0.9
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.3.1
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/CashbookApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 400.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol.
*
* The version of the OpenAPI document: 2.0.8
* The version of the OpenAPI document: 2.0.9
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.3.1
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/ClientsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 400.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol.
*
* The version of the OpenAPI document: 2.0.8
* The version of the OpenAPI document: 2.0.9
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.3.1
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/CompaniesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 400.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol.
*
* The version of the OpenAPI document: 2.0.8
* The version of the OpenAPI document: 2.0.9
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.3.1
Expand Down
2 changes: 1 addition & 1 deletion lib/Api/InfoApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 400.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol.
*
* The version of the OpenAPI document: 2.0.8
* The version of the OpenAPI document: 2.0.9
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 5.3.1
Expand Down
Loading

0 comments on commit 314a12d

Please sign in to comment.