From ea04c2083e7fde63ddfeb8b377fa2e2cae7465c9 Mon Sep 17 00:00:00 2001 From: Jonathan Wenger Date: Fri, 20 Dec 2024 09:49:29 -0800 Subject: [PATCH 1/7] Updates for 24.12.10 --- README.md | 164 +- docs/EInvoicing/BatchSearch.md | 15 + docs/EInvoicing/BatchSearchListResponse.md | 11 + docs/EInvoicing/ConditionalForField.md | 2 +- docs/EInvoicing/DataInputField.md | 10 +- docs/EInvoicing/DataInputFieldsResponse.md | 4 +- docs/EInvoicing/DirectorySearchResponse.md | 11 + .../DirectorySearchResponseValueInner.md | 15 + ...ySearchResponseValueInnerAddressesInner.md | 13 + ...earchResponseValueInnerIdentifiersInner.md | 10 + ...seValueInnerSupportedDocumentTypesInner.md | 12 + docs/EInvoicing/DocumentFetch.md | 11 + docs/EInvoicing/DocumentListResponse.md | 4 +- docs/EInvoicing/DocumentStatusResponse.md | 4 +- docs/EInvoicing/DocumentSummary.md | 16 +- docs/EInvoicing/ErrorResponse.md | 12 + docs/EInvoicing/FetchDocumentsRequest.md | 10 + .../FetchDocumentsRequestDataInner.md | 10 + .../FetchDocumentsRequestMetadata.md | 13 + docs/EInvoicing/InputDataFormats.md | 2 +- docs/EInvoicing/Mandate.md | 8 +- docs/EInvoicing/MandateDataInputField.md | 22 + .../MandateDataInputFieldNamespace.md | 10 + docs/EInvoicing/MandatesResponse.md | 4 +- docs/EInvoicing/StatusEvent.md | 2 + docs/EInvoicing/SubmitDocumentMetadata.md | 2 +- .../SubmitInteropDocument202Response.md | 10 + docs/EInvoicing/V1/DataInputFieldsApi.md | 18 +- docs/EInvoicing/V1/DocumentsApi.md | 128 +- docs/EInvoicing/V1/InteropApi.md | 79 + docs/EInvoicing/V1/MandatesApi.md | 84 +- docs/EInvoicing/V1/TradingPartnersApi.md | 368 +++ lib/API/EInvoicing/V1/DataInputFieldsApi.php | 60 +- lib/API/EInvoicing/V1/DocumentsApi.php | 566 +++- lib/API/EInvoicing/V1/InteropApi.php | 632 ++++ lib/API/EInvoicing/V1/MandatesApi.php | 558 +++- lib/API/EInvoicing/V1/TradingPartnersApi.php | 2529 +++++++++++++++++ .../EInvoicing/V1/BadDownloadRequest.php | 12 +- lib/Model/EInvoicing/V1/BadRequest.php | 12 +- lib/Model/EInvoicing/V1/BatchSearch.php | 551 ++++ .../EInvoicing/V1/BatchSearchListResponse.php | 394 +++ .../EInvoicing/V1/ConditionalForField.php | 18 +- lib/Model/EInvoicing/V1/DataInputField.php | 62 +- .../V1/DataInputFieldNotUsedFor.php | 12 +- .../V1/DataInputFieldOptionalFor.php | 12 +- .../V1/DataInputFieldRequiredFor.php | 12 +- .../EInvoicing/V1/DataInputFieldsResponse.php | 44 +- .../EInvoicing/V1/DirectorySearchResponse.php | 394 +++ .../V1/DirectorySearchResponseValueInner.php | 513 ++++ ...SearchResponseValueInnerAddressesInner.php | 453 +++ ...archResponseValueInnerIdentifiersInner.php | 363 +++ ...eValueInnerSupportedDocumentTypesInner.php | 423 +++ lib/Model/EInvoicing/V1/DocumentFetch.php | 393 +++ .../EInvoicing/V1/DocumentListResponse.php | 44 +- .../EInvoicing/V1/DocumentStatusResponse.php | 20 +- .../EInvoicing/V1/DocumentSubmissionError.php | 12 +- .../EInvoicing/V1/DocumentSubmitResponse.php | 12 +- lib/Model/EInvoicing/V1/DocumentSummary.php | 86 +- lib/Model/EInvoicing/V1/ErrorResponse.php | 423 +++ .../EInvoicing/V1/FetchDocumentsRequest.php | 363 +++ .../V1/FetchDocumentsRequestDataInner.php | 369 +++ .../V1/FetchDocumentsRequestMetadata.php | 468 +++ lib/Model/EInvoicing/V1/ForbiddenError.php | 12 +- lib/Model/EInvoicing/V1/InputDataFormats.php | 16 +- .../EInvoicing/V1/InternalServerError.php | 12 +- lib/Model/EInvoicing/V1/Mandate.php | 28 +- .../EInvoicing/V1/MandateDataInputField.php | 724 +++++ .../V1/MandateDataInputFieldNamespace.php | 364 +++ lib/Model/EInvoicing/V1/MandatesResponse.php | 44 +- lib/Model/EInvoicing/V1/ModelInterface.php | 8 +- lib/Model/EInvoicing/V1/NotFoundError.php | 12 +- lib/Model/EInvoicing/V1/NotUsedForField.php | 12 +- lib/Model/EInvoicing/V1/RequiredWhenField.php | 12 +- lib/Model/EInvoicing/V1/StatusEvent.php | 82 +- .../EInvoicing/V1/SubmitDocumentMetadata.php | 16 +- .../V1/SubmitInteropDocument202Response.php | 363 +++ lib/Model/EInvoicing/V1/WorkflowIds.php | 12 +- 77 files changed, 12118 insertions(+), 493 deletions(-) create mode 100644 docs/EInvoicing/BatchSearch.md create mode 100644 docs/EInvoicing/BatchSearchListResponse.md create mode 100644 docs/EInvoicing/DirectorySearchResponse.md create mode 100644 docs/EInvoicing/DirectorySearchResponseValueInner.md create mode 100644 docs/EInvoicing/DirectorySearchResponseValueInnerAddressesInner.md create mode 100644 docs/EInvoicing/DirectorySearchResponseValueInnerIdentifiersInner.md create mode 100644 docs/EInvoicing/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md create mode 100644 docs/EInvoicing/DocumentFetch.md create mode 100644 docs/EInvoicing/ErrorResponse.md create mode 100644 docs/EInvoicing/FetchDocumentsRequest.md create mode 100644 docs/EInvoicing/FetchDocumentsRequestDataInner.md create mode 100644 docs/EInvoicing/FetchDocumentsRequestMetadata.md create mode 100644 docs/EInvoicing/MandateDataInputField.md create mode 100644 docs/EInvoicing/MandateDataInputFieldNamespace.md create mode 100644 docs/EInvoicing/SubmitInteropDocument202Response.md create mode 100644 docs/EInvoicing/V1/InteropApi.md create mode 100644 docs/EInvoicing/V1/TradingPartnersApi.md create mode 100644 lib/API/EInvoicing/V1/InteropApi.php create mode 100644 lib/API/EInvoicing/V1/TradingPartnersApi.php create mode 100644 lib/Model/EInvoicing/V1/BatchSearch.php create mode 100644 lib/Model/EInvoicing/V1/BatchSearchListResponse.php create mode 100644 lib/Model/EInvoicing/V1/DirectorySearchResponse.php create mode 100644 lib/Model/EInvoicing/V1/DirectorySearchResponseValueInner.php create mode 100644 lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.php create mode 100644 lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.php create mode 100644 lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.php create mode 100644 lib/Model/EInvoicing/V1/DocumentFetch.php create mode 100644 lib/Model/EInvoicing/V1/ErrorResponse.php create mode 100644 lib/Model/EInvoicing/V1/FetchDocumentsRequest.php create mode 100644 lib/Model/EInvoicing/V1/FetchDocumentsRequestDataInner.php create mode 100644 lib/Model/EInvoicing/V1/FetchDocumentsRequestMetadata.php create mode 100644 lib/Model/EInvoicing/V1/MandateDataInputField.php create mode 100644 lib/Model/EInvoicing/V1/MandateDataInputFieldNamespace.php create mode 100644 lib/Model/EInvoicing/V1/SubmitInteropDocument202Response.php diff --git a/README.md b/README.md index 2c93221..d6b7343 100644 --- a/README.md +++ b/README.md @@ -204,38 +204,150 @@ Class | Method | HTTP request | Description *DataInputFieldsApi* | [**getDataInputFields**](docs/EInvoicing/V1/DataInputFieldsApi.md#getdatainputfields) | **GET** /data-input-fields | Returns the mandatory and conditional invoice or creditnote input fields for different country mandates *DocumentsApi* | [**downloadDocument**](docs/EInvoicing/V1/DocumentsApi.md#downloaddocument) | **GET** /documents/{documentId}/$download | Returns a copy of the document *DocumentsApi* | [**getDocumentList**](docs/EInvoicing/V1/DocumentsApi.md#getdocumentlist) | **GET** /documents | Returns a summary of documents for a date range -*DocumentsApi* | [**getDocumentStatus**](docs/EInvoicing/V1/DocumentsApi.md#getdocumentstatus) | **GET** /document/{documentId}/status | Checks the status of a document +*DocumentsApi* | [**getDocumentStatus**](docs/EInvoicing/V1/DocumentsApi.md#getdocumentstatus) | **GET** /documents/{documentId}/status | Checks the status of a document *DocumentsApi* | [**submitDocument**](docs/EInvoicing/V1/DocumentsApi.md#submitdocument) | **POST** /documents | Submits a document to Avalara E-Invoicing API *MandatesApi* | [**getMandates**](docs/EInvoicing/V1/MandatesApi.md#getmandates) | **GET** /mandates | List country mandates that are supported by the Avalara E-Invoicing platform + +### EInvoicing V1 API Documentation + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DataInputFieldsApi* | [**getDataInputFields**](docs/EInvoicing/V1/DataInputFieldsApi.md#getdatainputfields) | **GET** /data-input-fields | Returns the optionality of document fields for different country mandates +*DocumentsApi* | [**downloadDocument**](docs/EInvoicing/V1/DocumentsApi.md#downloaddocument) | **GET** /documents/{documentId}/$download | Returns a copy of the document +*DocumentsApi* | [**fetchDocuments**](docs/EInvoicing/V1/DocumentsApi.md#fetchdocuments) | **POST** /documents/$fetch | Fetch the inbound document from a tax authority +*DocumentsApi* | [**getDocumentList**](docs/EInvoicing/V1/DocumentsApi.md#getdocumentlist) | **GET** /documents | Returns a summary of documents for a date range +*DocumentsApi* | [**getDocumentStatus**](docs/EInvoicing/V1/DocumentsApi.md#getdocumentstatus) | **GET** /documents/{documentId}/status | Checks the status of a document +*DocumentsApi* | [**submitDocument**](docs/EInvoicing/V1/DocumentsApi.md#submitdocument) | **POST** /documents | Submits a document to Avalara E-Invoicing API +*MandatesApi* | [**getMandateDataInputFields**](docs/EInvoicing/V1/MandatesApi.md#getmandatedatainputfields) | **GET** /mandates/{mandateId}/data-input-fields | Returns document field information for a country mandate, a selected document type, and its version +*MandatesApi* | [**getMandates**](docs/EInvoicing/V1/MandatesApi.md#getmandates) | **GET** /mandates | List country mandates that are supported by the Avalara E-Invoicing platform + + +### EInvoicing V1 API Documentation + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DataInputFieldsApi* | [**getDataInputFields**](docs/EInvoicing/V1/DataInputFieldsApi.md#getdatainputfields) | **GET** /data-input-fields | Returns the optionality of document fields for different country mandates +*DocumentsApi* | [**downloadDocument**](docs/EInvoicing/V1/DocumentsApi.md#downloaddocument) | **GET** /documents/{documentId}/$download | Returns a copy of the document +*DocumentsApi* | [**fetchDocuments**](docs/EInvoicing/V1/DocumentsApi.md#fetchdocuments) | **POST** /documents/$fetch | Fetch the inbound document from a tax authority +*DocumentsApi* | [**getDocumentList**](docs/EInvoicing/V1/DocumentsApi.md#getdocumentlist) | **GET** /documents | Returns a summary of documents for a date range +*DocumentsApi* | [**getDocumentStatus**](docs/EInvoicing/V1/DocumentsApi.md#getdocumentstatus) | **GET** /documents/{documentId}/status | Checks the status of a document +*DocumentsApi* | [**submitDocument**](docs/EInvoicing/V1/DocumentsApi.md#submitdocument) | **POST** /documents | Submits a document to Avalara E-Invoicing API +*InteropApi* | [**submitInteropDocument**](docs/EInvoicing/V1/InteropApi.md#submitinteropdocument) | **POST** /interop/documents | Submit a document +*MandatesApi* | [**getMandateDataInputFields**](docs/EInvoicing/V1/MandatesApi.md#getmandatedatainputfields) | **GET** /mandates/{mandateId}/data-input-fields | Returns document field information for a country mandate, a selected document type, and its version +*MandatesApi* | [**getMandates**](docs/EInvoicing/V1/MandatesApi.md#getmandates) | **GET** /mandates | List country mandates that are supported by the Avalara E-Invoicing platform +*TradingPartnersApi* | [**batchSearchParticipants**](docs/EInvoicing/V1/TradingPartnersApi.md#batchsearchparticipants) | **POST** /trading-partners/batch-searches | Creates a batch search and performs a batch search in the directory for participants in the background. +*TradingPartnersApi* | [**downloadBatchSearchReport**](docs/EInvoicing/V1/TradingPartnersApi.md#downloadbatchsearchreport) | **GET** /trading-partners/batch-searches/{id}/$download-results | Download batch search results in a csv file. +*TradingPartnersApi* | [**getBatchSearchDetail**](docs/EInvoicing/V1/TradingPartnersApi.md#getbatchsearchdetail) | **GET** /trading-partners/batch-searches/{id} | Get the batch search details for a given id. +*TradingPartnersApi* | [**listBatchSearches**](docs/EInvoicing/V1/TradingPartnersApi.md#listbatchsearches) | **GET** /trading-partners/batch-searches | List all batch searches that were previously submitted. +*TradingPartnersApi* | [**searchParticipants**](docs/EInvoicing/V1/TradingPartnersApi.md#searchparticipants) | **GET** /trading-partners | Returns a list of participants matching the input query. + ## Documentation for Models ### EInvoicing V1 Model Documentation - - [Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) - - [Avalara\SDK\Model\EInvoicing\V1\BadRequest](docs/EInvoicing/V1/BadRequest.md) - - [Avalara\SDK\Model\EInvoicing\V1\ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) - - [Avalara\SDK\Model\EInvoicing\V1\DataInputField](docs/EInvoicing/V1/DataInputField.md) - - [Avalara\SDK\Model\EInvoicing\V1\DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) - - [Avalara\SDK\Model\EInvoicing\V1\DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) - - [Avalara\SDK\Model\EInvoicing\V1\DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) - - [Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) - - [Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) - - [Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) - - [Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) - - [Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) - - [Avalara\SDK\Model\EInvoicing\V1\DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) - - [Avalara\SDK\Model\EInvoicing\V1\ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) - - [Avalara\SDK\Model\EInvoicing\V1\InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) - - [Avalara\SDK\Model\EInvoicing\V1\InternalServerError](docs/EInvoicing/V1/InternalServerError.md) - - [Avalara\SDK\Model\EInvoicing\V1\Mandate](docs/EInvoicing/V1/Mandate.md) - - [Avalara\SDK\Model\EInvoicing\V1\MandatesResponse](docs/EInvoicing/V1/MandatesResponse.md) - - [Avalara\SDK\Model\EInvoicing\V1\NotFoundError](docs/EInvoicing/V1/NotFoundError.md) - - [Avalara\SDK\Model\EInvoicing\V1\NotUsedForField](docs/EInvoicing/V1/NotUsedForField.md) - - [Avalara\SDK\Model\EInvoicing\V1\RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) - - [Avalara\SDK\Model\EInvoicing\V1\StatusEvent](docs/EInvoicing/V1/StatusEvent.md) - - [Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentData](docs/EInvoicing/V1/SubmitDocumentData.md) - - [Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata](docs/EInvoicing/V1/SubmitDocumentMetadata.md) - - [Avalara\SDK\Model\EInvoicing\V1\WorkflowIds](docs/EInvoicing/V1/WorkflowIds.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest](docs/EInvoicing/V1/BadRequest.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputField](docs/EInvoicing/V1/DataInputField.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError](docs/EInvoicing/V1/InternalServerError.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\Mandate](docs/EInvoicing/V1/Mandate.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse](docs/EInvoicing/V1/MandatesResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError](docs/EInvoicing/V1/NotFoundError.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\NotUsedForField](docs/EInvoicing/V1/NotUsedForField.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\StatusEvent](docs/EInvoicing/V1/StatusEvent.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata](docs/EInvoicing/V1/SubmitDocumentMetadata.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\WorkflowIds](docs/EInvoicing/V1/WorkflowIds.md) + + + +### EInvoicing V1 Model Documentation + + - [Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest](docs/EInvoicing/V1/BadRequest.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputField](docs/EInvoicing/V1/DataInputField.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch](docs/EInvoicing/V1/DocumentFetch.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequest](docs/EInvoicing/V1/FetchDocumentsRequest.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestDataInner](docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestMetadata](docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError](docs/EInvoicing/V1/InternalServerError.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\Mandate](docs/EInvoicing/V1/Mandate.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField](docs/EInvoicing/V1/MandateDataInputField.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputFieldNamespace](docs/EInvoicing/V1/MandateDataInputFieldNamespace.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse](docs/EInvoicing/V1/MandatesResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError](docs/EInvoicing/V1/NotFoundError.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\NotUsedForField](docs/EInvoicing/V1/NotUsedForField.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\StatusEvent](docs/EInvoicing/V1/StatusEvent.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata](docs/EInvoicing/V1/SubmitDocumentMetadata.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\WorkflowIds](docs/EInvoicing/V1/WorkflowIds.md) + + + +### EInvoicing V1 Model Documentation + + - [Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest](docs/EInvoicing/V1/BadRequest.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch](docs/EInvoicing/V1/BatchSearch.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse](docs/EInvoicing/V1/BatchSearchListResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputField](docs/EInvoicing/V1/DataInputField.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse](docs/EInvoicing/V1/DirectorySearchResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInner](docs/EInvoicing/V1/DirectorySearchResponseValueInner.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerAddressesInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerIdentifiersInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch](docs/EInvoicing/V1/DocumentFetch.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse](docs/EInvoicing/V1/ErrorResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequest](docs/EInvoicing/V1/FetchDocumentsRequest.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestDataInner](docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestMetadata](docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError](docs/EInvoicing/V1/InternalServerError.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\Mandate](docs/EInvoicing/V1/Mandate.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField](docs/EInvoicing/V1/MandateDataInputField.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputFieldNamespace](docs/EInvoicing/V1/MandateDataInputFieldNamespace.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse](docs/EInvoicing/V1/MandatesResponse.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError](docs/EInvoicing/V1/NotFoundError.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\NotUsedForField](docs/EInvoicing/V1/NotUsedForField.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\StatusEvent](docs/EInvoicing/V1/StatusEvent.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata](docs/EInvoicing/V1/SubmitDocumentMetadata.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response](docs/EInvoicing/V1/SubmitInteropDocument202Response.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\WorkflowIds](docs/EInvoicing/V1/WorkflowIds.md) diff --git a/docs/EInvoicing/BatchSearch.md b/docs/EInvoicing/BatchSearch.md new file mode 100644 index 0000000..9cc57df --- /dev/null +++ b/docs/EInvoicing/BatchSearch.md @@ -0,0 +1,15 @@ +# # BatchSearch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | ID of the batch search | [optional] +**name** | **string** | Name of the batch report | [optional] +**created_by** | **string** | Email of the user who created the batch search | [optional] +**created** | **\DateTime** | Timestamp when the batch search was created | [optional] +**last_modified** | **\DateTime** | Timestamp when the batch search was created | [optional] +**status** | **string** | Status of the batch search | [optional] +**error** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse**](ErrorResponse.md) | | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/BatchSearchListResponse.md b/docs/EInvoicing/BatchSearchListResponse.md new file mode 100644 index 0000000..a462acd --- /dev/null +++ b/docs/EInvoicing/BatchSearchListResponse.md @@ -0,0 +1,11 @@ +# # BatchSearchListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**at_record_set_count** | **int** | The count of records in the result set | [optional] +**at_next_link** | **string** | Next Link | [optional] +**value** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch[]**](BatchSearch.md) | | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/ConditionalForField.md b/docs/EInvoicing/ConditionalForField.md index d1dd310..03a5376 100644 --- a/docs/EInvoicing/ConditionalForField.md +++ b/docs/EInvoicing/ConditionalForField.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **country_mandate** | **string** | | [optional] -**required_when** | [**\Avalara\SDK\Model\EInvoicing\V1\RequiredWhenField[]**](RequiredWhenField.md) | Array of scenarios which describe when a particular field is conditional for a country mandate | [optional] +**required_when** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\RequiredWhenField[]**](RequiredWhenField.md) | Array of scenarios which describe when a particular field is conditional for a country mandate | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DataInputField.md b/docs/EInvoicing/DataInputField.md index 8c0616d..23f10f5 100644 --- a/docs/EInvoicing/DataInputField.md +++ b/docs/EInvoicing/DataInputField.md @@ -8,16 +8,16 @@ Name | Type | Description | Notes **field_id** | **string** | Field ID | [optional] **applicable_document_roots** | **object[]** | | [optional] **path** | **string** | Path to this field | [optional] -**name_space** | **string** | Namespace of this field | [optional] +**namespace** | **string** | Namespace of this field | [optional] **field_name** | **string** | Field name | [optional] **example_or_fixed_value** | **string** | An example of the content for this field | [optional] **accepted_values** | **object** | An object representing the acceptable values for this field | [optional] **documentation_link** | **string** | An example of the content for this field | [optional] **description** | **string** | A description of this field | [optional] **is_segment** | **bool** | Is this a segment of the schema | [optional] -**required_for** | [**\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldRequiredFor**](DataInputFieldRequiredFor.md) | | [optional] -**conditional_for** | [**\Avalara\SDK\Model\EInvoicing\V1\ConditionalForField[]**](ConditionalForField.md) | | [optional] -**not_used_for** | [**\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldNotUsedFor**](DataInputFieldNotUsedFor.md) | | [optional] -**optional_for** | [**\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldOptionalFor**](DataInputFieldOptionalFor.md) | | [optional] +**required_for** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldRequiredFor**](DataInputFieldRequiredFor.md) | | [optional] +**conditional_for** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\ConditionalForField[]**](ConditionalForField.md) | | [optional] +**not_used_for** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldNotUsedFor**](DataInputFieldNotUsedFor.md) | | [optional] +**optional_for** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldOptionalFor**](DataInputFieldOptionalFor.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DataInputFieldsResponse.md b/docs/EInvoicing/DataInputFieldsResponse.md index ab063b0..974906f 100644 --- a/docs/EInvoicing/DataInputFieldsResponse.md +++ b/docs/EInvoicing/DataInputFieldsResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**at_record_set_count** | **float** | Total count of results | [optional] +**at_recordset_count** | **float** | Total count of results | [optional] **at_next_link** | **string** | | [optional] -**value** | [**\Avalara\SDK\Model\EInvoicing\V1\DataInputField[]**](DataInputField.md) | Array of Data Input Fields | [optional] +**value** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputField[]**](DataInputField.md) | Array of Data Input Fields | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DirectorySearchResponse.md b/docs/EInvoicing/DirectorySearchResponse.md new file mode 100644 index 0000000..08169b4 --- /dev/null +++ b/docs/EInvoicing/DirectorySearchResponse.md @@ -0,0 +1,11 @@ +# # DirectorySearchResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**at_record_set_count** | **int** | The count of records in the result set | [optional] +**at_next_link** | **string** | The next page link to get the next set of results. | [optional] +**value** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInner[]**](DirectorySearchResponseValueInner.md) | | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DirectorySearchResponseValueInner.md b/docs/EInvoicing/DirectorySearchResponseValueInner.md new file mode 100644 index 0000000..a0967f8 --- /dev/null +++ b/docs/EInvoicing/DirectorySearchResponseValueInner.md @@ -0,0 +1,15 @@ +# # DirectorySearchResponseValueInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Avalara unique ID of the participant in the directory. | [optional] +**name** | **string** | Name of the participant (typically, the name of the business entity). | [optional] +**network** | **string** | The network where the participant is present. | [optional] +**registration_date** | **\DateTime** | Registration date of the participant if available | [optional] +**identifiers** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerIdentifiersInner[]**](DirectorySearchResponseValueInnerIdentifiersInner.md) | | [optional] +**addresses** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerAddressesInner[]**](DirectorySearchResponseValueInnerAddressesInner.md) | | [optional] +**supported_document_types** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner[]**](DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md) | | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DirectorySearchResponseValueInnerAddressesInner.md b/docs/EInvoicing/DirectorySearchResponseValueInnerAddressesInner.md new file mode 100644 index 0000000..61066ac --- /dev/null +++ b/docs/EInvoicing/DirectorySearchResponseValueInnerAddressesInner.md @@ -0,0 +1,13 @@ +# # DirectorySearchResponseValueInnerAddressesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**line1** | **string** | Address line 1 | [optional] +**line2** | **string** | Address line 2 | [optional] +**city** | **string** | City | [optional] +**state** | **string** | State | [optional] +**country** | **string** | Country | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DirectorySearchResponseValueInnerIdentifiersInner.md b/docs/EInvoicing/DirectorySearchResponseValueInnerIdentifiersInner.md new file mode 100644 index 0000000..2de42e8 --- /dev/null +++ b/docs/EInvoicing/DirectorySearchResponseValueInnerIdentifiersInner.md @@ -0,0 +1,10 @@ +# # DirectorySearchResponseValueInnerIdentifiersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Peppol Participant ID if the participant is in Peppol network | [optional] +**value** | **string** | Value of the identifier | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md b/docs/EInvoicing/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md new file mode 100644 index 0000000..bdb224c --- /dev/null +++ b/docs/EInvoicing/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md @@ -0,0 +1,12 @@ +# # DirectorySearchResponseValueInnerSupportedDocumentTypesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Document type name. | [optional] +**value** | **string** | Document type identifier. | [optional] +**supported_by_trading_partner** | **bool** | Does trading partner support receiving this document type | [optional] +**supported_by_avalara** | **bool** | Does avalara support exchanging this document type | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DocumentFetch.md b/docs/EInvoicing/DocumentFetch.md new file mode 100644 index 0000000..2200dc0 --- /dev/null +++ b/docs/EInvoicing/DocumentFetch.md @@ -0,0 +1,11 @@ +# # DocumentFetch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique ID for this document that can be used for status checking and file downloads. This is a UID created by the Avalara E-Invoicing platform. | [optional] +**status** | **string** | Status of the document | [optional] +**event_date_time** | **string** | The date and time when the inbound document was accepted by the Avalara E-Invoicing Platform | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DocumentListResponse.md b/docs/EInvoicing/DocumentListResponse.md index faf551f..5b944ad 100644 --- a/docs/EInvoicing/DocumentListResponse.md +++ b/docs/EInvoicing/DocumentListResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**at_record_set_count** | **string** | Count of collections for the given date range | [optional] +**at_recordset_count** | **string** | Count of collections for the given date range | [optional] **at_next_link** | **string** | | [optional] -**value** | [**\Avalara\SDK\Model\EInvoicing\V1\DocumentSummary[]**](DocumentSummary.md) | Array of invoices matching query parameters | +**value** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSummary[]**](DocumentSummary.md) | Array of documents matching query parameters | [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DocumentStatusResponse.md b/docs/EInvoicing/DocumentStatusResponse.md index 0972000..3a8db64 100644 --- a/docs/EInvoicing/DocumentStatusResponse.md +++ b/docs/EInvoicing/DocumentStatusResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | The unique ID for this document | [optional] -**status** | **string** | Status of the transaction: <br> 'Pending' <br> 'Failed' <br> 'Complete' | [optional] -**events** | [**\Avalara\SDK\Model\EInvoicing\V1\StatusEvent[]**](StatusEvent.md) | | [optional] +**status** | **string** | Status of the document | [optional] +**events** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\StatusEvent[]**](StatusEvent.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DocumentSummary.md b/docs/EInvoicing/DocumentSummary.md index 3fe9dd2..a64013f 100644 --- a/docs/EInvoicing/DocumentSummary.md +++ b/docs/EInvoicing/DocumentSummary.md @@ -6,15 +6,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | The unique ID for this document | [optional] **process_date_time** | **string** | The date and time when the document was processed, displayed in the format YYYY-MM-DDThh:mm:ss | [optional] -**status** | **string** | The transaction status: <br> 'Pending' <br> 'Failed' <br> 'Complete' | [optional] +**status** | **string** | The Document status | [optional] **supplier_name** | **string** | The name of the supplier in the transaction | [optional] **customer_name** | **string** | The name of the customer in the transaction | [optional] -**document_number** | **string** | The invoice document number | [optional] -**document_date** | **string** | The invoice issue date | [optional] -**flow** | **string** | The invoice direction, where issued = `out` and received = `in` | [optional] -**country_code** | **string** | The two-letter ISO-3166 country code for the country where the e-invoice is being submitted | [optional] +**document_type** | **string** | The document type | [optional] +**document_version** | **string** | The document version | [optional] +**document_number** | **string** | The document number | [optional] +**document_date** | **string** | The document issue date | [optional] +**flow** | **string** | The document direction, where issued = `out` and received = `in` | [optional] +**country_code** | **string** | The two-letter ISO-3166 country code for the country where the document is being submitted | [optional] **country_mandate** | **string** | The e-invoicing mandate for the specified country | [optional] -**interface** | **string** | The interface where the invoice data is sent | [optional] -**receiver** | **string** | The invoice recipient based on the interface | [optional] +**interface** | **string** | The interface where the document is sent | [optional] +**receiver** | **string** | The document recipient based on the interface | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/ErrorResponse.md b/docs/EInvoicing/ErrorResponse.md new file mode 100644 index 0000000..cba8438 --- /dev/null +++ b/docs/EInvoicing/ErrorResponse.md @@ -0,0 +1,12 @@ +# # ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **string** | | [optional] +**status** | **string** | | [optional] +**detail** | **string** | | [optional] +**instance** | **string** | | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/FetchDocumentsRequest.md b/docs/EInvoicing/FetchDocumentsRequest.md new file mode 100644 index 0000000..22c8102 --- /dev/null +++ b/docs/EInvoicing/FetchDocumentsRequest.md @@ -0,0 +1,10 @@ +# # FetchDocumentsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestDataInner[]**](FetchDocumentsRequestDataInner.md) | Array of key-value pairs used to retrieve inbound documents from the Tax Authority | [optional] +**metadata** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestMetadata**](FetchDocumentsRequestMetadata.md) | | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/FetchDocumentsRequestDataInner.md b/docs/EInvoicing/FetchDocumentsRequestDataInner.md new file mode 100644 index 0000000..094b42c --- /dev/null +++ b/docs/EInvoicing/FetchDocumentsRequestDataInner.md @@ -0,0 +1,10 @@ +# # FetchDocumentsRequestDataInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **string** | Descriptor of the identifier | +**value** | **string** | Value of the identifier | + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/FetchDocumentsRequestMetadata.md b/docs/EInvoicing/FetchDocumentsRequestMetadata.md new file mode 100644 index 0000000..c3dea8f --- /dev/null +++ b/docs/EInvoicing/FetchDocumentsRequestMetadata.md @@ -0,0 +1,13 @@ +# # FetchDocumentsRequestMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**workflow_id** | **string** | Specifies a unique ID for this workflow. | +**data_format** | **string** | Specifies the data format for this workflow | +**data_format_version** | **float** | Specifies the data format version number | +**country_code** | **string** | The two-letter ISO-3166 country code for the country for which document is being retrieved | +**country_mandate** | **string** | The e-invoicing mandate for the specified country | + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/InputDataFormats.md b/docs/EInvoicing/InputDataFormats.md index 7875618..2375c8d 100644 --- a/docs/EInvoicing/InputDataFormats.md +++ b/docs/EInvoicing/InputDataFormats.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**format** | **string** | Invoice format | [optional] +**format** | **string** | Document format | [optional] **versions** | **string[]** | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/Mandate.md b/docs/EInvoicing/Mandate.md index 81a3e75..b3309aa 100644 --- a/docs/EInvoicing/Mandate.md +++ b/docs/EInvoicing/Mandate.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mandate_id** | **string** | Mandate UUID | [optional] -**country_mandate** | **string** | Country mandate name | [optional] +**mandate_id** | **string** | The `mandateId` is comprised of the country code, mandate type, and the network or regulation type (for example, AU-B2G-PEPPOL). Keep in mind the following when specifying a `mandateId`. - A country can have multiple mandate types (B2C, B2B, B2G). - A entity/company can opt in for multiple mandates. - A `mandateId` is the combination of country + mandate type + network/regulation. | [optional] +**country_mandate** | **string** | **[LEGACY]** This field is retained for backward compatibility. It is recommended to use `mandateId` instead. The `countryMandate` similar to the `mandateId` is comprised of the country code, mandate type, and the network or regulation type (for example, AU-B2G-PEPPOL). | [optional] **country_code** | **string** | Country code | [optional] **description** | **string** | Mandate description | [optional] **supported_by_partner_api** | **bool** | Indicates whether this mandate supported by the partner API | [optional] **mandate_format** | **string** | Mandate format | [optional] -**input_data_formats** | [**\Avalara\SDK\Model\EInvoicing\V1\InputDataFormats[]**](InputDataFormats.md) | Format and version used when inputting the data | [optional] -**workflow_ids** | [**\Avalara\SDK\Model\EInvoicing\V1\WorkflowIds[]**](WorkflowIds.md) | Workflow ID list | [optional] +**input_data_formats** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\InputDataFormats[]**](InputDataFormats.md) | Format and version used when inputting the data | [optional] +**workflow_ids** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\WorkflowIds[]**](WorkflowIds.md) | Workflow ID list | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/MandateDataInputField.md b/docs/EInvoicing/MandateDataInputField.md new file mode 100644 index 0000000..917a130 --- /dev/null +++ b/docs/EInvoicing/MandateDataInputField.md @@ -0,0 +1,22 @@ +# # MandateDataInputField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field_id** | **string** | Field ID | [optional] +**document_type** | **string** | The document type | [optional] +**document_version** | **string** | The document version | [optional] +**path** | **string** | Path to this field | [optional] +**path_type** | **string** | The type of path | [optional] +**field_name** | **string** | Field name | [optional] +**namespace** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputFieldNamespace**](MandateDataInputFieldNamespace.md) | | [optional] +**example_or_fixed_value** | **string** | An example of the content for this field | [optional] +**accepted_values** | **string[]** | An Array representing the acceptable values for this field | [optional] +**documentation_link** | **string** | An example of the content for this field | [optional] +**data_type** | **string** | The data type of this field. | [optional] +**description** | **string** | A description of this field | [optional] +**optionality** | **string** | Determines if the field if Required/Conditional/Optional or not required. | [optional] +**cardinality** | **string** | Represents the number of times an element can appear within the document | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/MandateDataInputFieldNamespace.md b/docs/EInvoicing/MandateDataInputFieldNamespace.md new file mode 100644 index 0000000..89a2ea9 --- /dev/null +++ b/docs/EInvoicing/MandateDataInputFieldNamespace.md @@ -0,0 +1,10 @@ +# # MandateDataInputFieldNamespace + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**prefix** | **string** | The namespace prefix for the UBL Element | [optional] +**value** | **string** | | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/MandatesResponse.md b/docs/EInvoicing/MandatesResponse.md index 456a79f..d8e1ee8 100644 --- a/docs/EInvoicing/MandatesResponse.md +++ b/docs/EInvoicing/MandatesResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**at_record_set_count** | **float** | Total count of results | [optional] +**at_recordset_count** | **float** | Total count of results | [optional] **at_next_link** | **string** | | [optional] -**value** | [**\Avalara\SDK\Model\EInvoicing\V1\Mandate[]**](Mandate.md) | Mandates schema | [optional] +**value** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\Mandate[]**](Mandate.md) | Mandates schema | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/StatusEvent.md b/docs/EInvoicing/StatusEvent.md index 98e6364..5dbd110 100644 --- a/docs/EInvoicing/StatusEvent.md +++ b/docs/EInvoicing/StatusEvent.md @@ -6,5 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **event_date_time** | **string** | The date and time when the status event occured, displayed in the format YYYY-MM-DDThh:mm:ss | [optional] **message** | **string** | A message describing the status event | [optional] +**response_key** | **string** | The type of number or acknowledgement returned by the tax authority (if applicable). For example, it could be an identification key, acknowledgement code, or any other relevant identifier. | [optional] +**response_value** | **string** | The corresponding value associated with the response key. This value is provided by the tax authority in response to the event. | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/SubmitDocumentMetadata.md b/docs/EInvoicing/SubmitDocumentMetadata.md index c1273d0..2193ba5 100644 --- a/docs/EInvoicing/SubmitDocumentMetadata.md +++ b/docs/EInvoicing/SubmitDocumentMetadata.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **workflow_id** | **string** | Specifies a unique ID for this workflow. | **data_format** | **string** | Specifies the data format for this workflow. | **data_format_version** | **string** | Specifies the data format version number. | -**country_code** | **string** | The two-letter ISO-3166 country code for the country where the e-invoice is being submitted | +**country_code** | **string** | The two-letter ISO-3166 country code for the country where the document is being submitted | **country_mandate** | **string** | The e-invoicing mandate for the specified country. | [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/SubmitInteropDocument202Response.md b/docs/EInvoicing/SubmitInteropDocument202Response.md new file mode 100644 index 0000000..347d372 --- /dev/null +++ b/docs/EInvoicing/SubmitInteropDocument202Response.md @@ -0,0 +1,10 @@ +# # SubmitInteropDocument202Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interchange_id** | **string** | The unique interchange ID for this submission. | [optional] +**message** | **string** | A message indicating that the document has been accepted. | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/V1/DataInputFieldsApi.md b/docs/EInvoicing/V1/DataInputFieldsApi.md index ba3bf88..ec19e61 100644 --- a/docs/EInvoicing/V1/DataInputFieldsApi.md +++ b/docs/EInvoicing/V1/DataInputFieldsApi.md @@ -1,19 +1,19 @@ -# Avalara\SDK\DataInputFieldsApi +# Avalara\\SDK\DataInputFieldsApi All URIs are relative to https://api.sbx.avalara.com/einvoicing. Method | HTTP request | Description ------------- | ------------- | ------------- -[**getDataInputFields()**](DataInputFieldsApi.md#getDataInputFields) | **GET** /data-input-fields | Returns the mandatory and conditional invoice or creditnote input fields for different country mandates +[**getDataInputFields()**](DataInputFieldsApi.md#getDataInputFields) | **GET** /data-input-fields | Returns the optionality of document fields for different country mandates ## `getDataInputFields()` ```php -getDataInputFields($avalara_version, $x_avalara_client, $filter, $top, $skip, $count, $count_only): \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse +getDataInputFields($avalara_version, $x_avalara_client, $filter, $top, $skip, $count, $count_only): \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse ``` -Returns the mandatory and conditional invoice or creditnote input fields for different country mandates +Returns the optionality of document fields for different country mandates This endpoint provides a list of required, conditional, and optional fields for each country mandate. You can use the mandates endpoint to retrieve all available country mandates. You can use the $filter query parameter to retrieve fields for a particular mandate @@ -33,10 +33,10 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\SDK\Api\DataInputFieldsApi($client); +$apiInstance = new Avalara\\SDK\Api\DataInputFieldsApi($client); -$avalara_version = 1.0; // string | The HTTP Header meant to specify the version of the API intended to be used -$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" +$avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used +$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. $filter = requiredFor/countryMandate eq AU-B2G-PEPPOL; // string | Filter by field name and value. This filter only supports eq and contains. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. $top = 10; // float | If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. $skip = 10; // float | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. @@ -56,7 +56,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | - **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] **filter** | **string**| Filter by field name and value. This filter only supports <code>eq</code> and <code>contains</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. | [optional] **top** | **float**| If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. | [optional] **skip** | **float**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] @@ -65,7 +65,7 @@ Name | Type | Description | Notes ### Return type -[**\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse**](../Model/DataInputFieldsResponse.md) +[**\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse**](../Model/DataInputFieldsResponse.md) ### Authorization diff --git a/docs/EInvoicing/V1/DocumentsApi.md b/docs/EInvoicing/V1/DocumentsApi.md index 16ada8e..84d458e 100644 --- a/docs/EInvoicing/V1/DocumentsApi.md +++ b/docs/EInvoicing/V1/DocumentsApi.md @@ -1,12 +1,13 @@ -# Avalara\SDK\DocumentsApi +# Avalara\\SDK\DocumentsApi All URIs are relative to https://api.sbx.avalara.com/einvoicing. Method | HTTP request | Description ------------- | ------------- | ------------- [**downloadDocument()**](DocumentsApi.md#downloadDocument) | **GET** /documents/{documentId}/$download | Returns a copy of the document +[**fetchDocuments()**](DocumentsApi.md#fetchDocuments) | **POST** /documents/$fetch | Fetch the inbound document from a tax authority [**getDocumentList()**](DocumentsApi.md#getDocumentList) | **GET** /documents | Returns a summary of documents for a date range -[**getDocumentStatus()**](DocumentsApi.md#getDocumentStatus) | **GET** /document/{documentId}/status | Checks the status of a document +[**getDocumentStatus()**](DocumentsApi.md#getDocumentStatus) | **GET** /documents/{documentId}/status | Checks the status of a document [**submitDocument()**](DocumentsApi.md#submitDocument) | **POST** /documents | Submits a document to Avalara E-Invoicing API @@ -18,7 +19,7 @@ downloadDocument($avalara_version, $accept, $document_id, $x_avalara_client): \S Returns a copy of the document -When the document is available, use this endpoint to download it as text, XML, or PDF. The output format needs to be specified in the Accept header and it will vary depending on the mandate. If the file has not yet been created, then status code 404 (not found) is returned. +When the document is available, use this endpoint to download it as text, XML, or PDF. The output format needs to be specified in the Accept header, and it will vary depending on the mandate. If the file has not yet been created, then status code 404 (not found) is returned. ### Example @@ -36,12 +37,12 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\SDK\Api\DocumentsApi($client); +$apiInstance = new Avalara\\SDK\Api\DocumentsApi($client); -$avalara_version = 1.0; // string | The HTTP Header meant to specify the version of the API intended to be used +$avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used $accept = application/pdf; // string | This header indicates the MIME type of the document $document_id = 'document_id_example'; // string | The unique ID for this document that was returned in the POST /einvoicing/document response body -$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" +$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. try { $result = $apiInstance->downloadDocument($avalara_version, $accept, $document_id, $x_avalara_client); @@ -58,7 +59,7 @@ Name | Type | Description | Notes **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | **accept** | **string**| This header indicates the MIME type of the document | **document_id** | **string**| The unique ID for this document that was returned in the POST /einvoicing/document response body | - **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] ### Return type @@ -77,10 +78,75 @@ Name | Type | Description | Notes [[Back to Model list]](../../../README.md#models) [[Back to README]](../../../README.md) +## `fetchDocuments()` + +```php +fetchDocuments($avalara_version, $fetch_documents_request, $x_avalara_client): \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch +``` + +Fetch the inbound document from a tax authority + +This API allows you to retrieve an inbound document. Pass key-value pairs as parameters in the request, such as the confirmation number, supplier number, and buyer VAT number. + +### Example + +```php +setBearerToken('YOUR_JWT_ACCESS_TOKEN') + ->setAppName('YOUR_APP_NAME') + ->setEnvironment('sandbox') + ->setMachineName('YOUR_MACHINE_NAME') + ->setAppVersion('YOUR_APP_VERSION'); + +$client = new \Avalara\SDK\ApiClient($config); + +$apiInstance = new Avalara\\SDK\Api\DocumentsApi($client); + +$avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used +$fetch_documents_request = new \Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequest(); // \Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequest +$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. + +try { + $result = $apiInstance->fetchDocuments($avalara_version, $fetch_documents_request, $x_avalara_client); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling DocumentsApi->fetchDocuments: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | + **fetch_documents_request** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequest**](../Model/FetchDocumentsRequest.md)| | + **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] + +### Return type + +[**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch**](../Model/DocumentFetch.md) + +### Authorization + +[Bearer](../../../README.md#Bearer) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../../README.md#endpoints) +[[Back to Model list]](../../../README.md#models) +[[Back to README]](../../../README.md) + ## `getDocumentList()` ```php -getDocumentList($avalara_version, $x_avalara_client, $start_date, $end_date, $flow, $count, $count_only, $filter, $top, $skip): \Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse +getDocumentList($avalara_version, $x_avalara_client, $start_date, $end_date, $flow, $count, $count_only, $filter, $top, $skip): \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse ``` Returns a summary of documents for a date range @@ -103,16 +169,16 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\SDK\Api\DocumentsApi($client); +$apiInstance = new Avalara\\SDK\Api\DocumentsApi($client); -$avalara_version = 1.0; // string | The HTTP Header meant to specify the version of the API intended to be used -$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" +$avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used +$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. $start_date = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Start date of documents to return. This defaults to the previous month. $end_date = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | End date of documents to return. This defaults to the current date. $flow = out; // string | Optionally filter by document direction, where issued = `out` and received = `in` $count = true; // string | When set to true, the count of the collection is also returned in the response body $count_only = false; // string | When set to true, only the count of the collection is returned -$filter = id eq 2023-02-000016; // string | Filter by field name and value. This filter only supports eq . Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided startDate and endDate. If no startDate or endDate is provided, defaults will be assumed. +$filter = id eq 52f60401-44d0-4667-ad47-4afe519abb53; // string | Filter by field name and value. This filter only supports eq . Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided startDate and endDate. If no startDate or endDate is provided, defaults will be assumed. $top = 10; // float | If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. $skip = 10; // string | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. @@ -129,7 +195,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | - **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] **start_date** | **\DateTime**| Start date of documents to return. This defaults to the previous month. | [optional] **end_date** | **\DateTime**| End date of documents to return. This defaults to the current date. | [optional] **flow** | **string**| Optionally filter by document direction, where issued = `out` and received = `in` | [optional] @@ -141,7 +207,7 @@ Name | Type | Description | Notes ### Return type -[**\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse**](../Model/DocumentListResponse.md) +[**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse**](../Model/DocumentListResponse.md) ### Authorization @@ -159,7 +225,7 @@ Name | Type | Description | Notes ## `getDocumentStatus()` ```php -getDocumentStatus($avalara_version, $document_id, $x_avalara_client): \Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse +getDocumentStatus($avalara_version, $document_id, $x_avalara_client): \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse ``` Checks the status of a document @@ -182,11 +248,11 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\SDK\Api\DocumentsApi($client); +$apiInstance = new Avalara\\SDK\Api\DocumentsApi($client); -$avalara_version = 1.0; // string | The HTTP Header meant to specify the version of the API intended to be used +$avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used $document_id = 'document_id_example'; // string | The unique ID for this document that was returned in the POST /einvoicing/documents response body -$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" +$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. try { $result = $apiInstance->getDocumentStatus($avalara_version, $document_id, $x_avalara_client); @@ -202,11 +268,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | **document_id** | **string**| The unique ID for this document that was returned in the POST /einvoicing/documents response body | - **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] ### Return type -[**\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse**](../Model/DocumentStatusResponse.md) +[**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse**](../Model/DocumentStatusResponse.md) ### Authorization @@ -224,12 +290,12 @@ Name | Type | Description | Notes ## `submitDocument()` ```php -submitDocument($avalara_version, $metadata, $data, $x_avalara_client): \Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse +submitDocument($avalara_version, $metadata, $data, $x_avalara_client): \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse ``` Submits a document to Avalara E-Invoicing API -For both e-invoices and credit notes, when a document is sent to this endpoint, it generates an invoice or credit note in the required format as mandated by the specified country. Additionally, it initiates the workflow to transmit the generated document to the relevant tax authority, if necessary.

The response from the endpoint contains a unique document ID, which can be used to request the status of the document and verify if it was successfully accepted at the destination.

Furthermore, the unique ID enables the download of a copy of the e-invoice or credit note for reference purposes. +When a UBL document is sent to this endpoint, it generates a document in the required format as mandated by the specified country. Additionally, it initiates the workflow to transmit the generated document to the relevant tax authority, if necessary.

The response from the endpoint contains a unique document ID, which can be used to request the status of the document and verify if it was successfully accepted at the destination.

Furthermore, the unique ID enables the download of a copy of the generated document for reference purposes. ### Example @@ -247,12 +313,12 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\SDK\Api\DocumentsApi($client); +$apiInstance = new Avalara\\SDK\Api\DocumentsApi($client); -$avalara_version = 1.0; // string | The HTTP Header meant to specify the version of the API intended to be used -$metadata = new \Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata(); // \Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata -$data = new \Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentData(); // \Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentData -$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" +$avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used +$metadata = new \Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata(); // \Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata +$data = array('key' => new \stdClass); // object | The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' +$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. try { $result = $apiInstance->submitDocument($avalara_version, $metadata, $data, $x_avalara_client); @@ -267,13 +333,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | - **metadata** | [**\Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata**](../Model/SubmitDocumentMetadata.md)| | - **data** | [**\Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentData**](../Model/SubmitDocumentData.md)| | - **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **metadata** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata**](../Model/SubmitDocumentMetadata.md)| | + **data** | [**object**](../Model/object.md)| The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' | + **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] ### Return type -[**\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse**](../Model/DocumentSubmitResponse.md) +[**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse**](../Model/DocumentSubmitResponse.md) ### Authorization diff --git a/docs/EInvoicing/V1/InteropApi.md b/docs/EInvoicing/V1/InteropApi.md new file mode 100644 index 0000000..65759f8 --- /dev/null +++ b/docs/EInvoicing/V1/InteropApi.md @@ -0,0 +1,79 @@ +# Avalara\\SDK\InteropApi + +All URIs are relative to https://api.sbx.avalara.com/einvoicing. + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**submitInteropDocument()**](InteropApi.md#submitInteropDocument) | **POST** /interop/documents | Submit a document + + +## `submitInteropDocument()` + +```php +submitInteropDocument($document_type, $interchange_type, $avalara_version, $x_avalara_client, $x_correlation_id, $file_name): \Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response +``` + +Submit a document + +This API used by the interoperability partners to submit a document to their trading partners in Avalara on behalf of their customers. + +### Example + +```php +setBearerToken('YOUR_JWT_ACCESS_TOKEN') + ->setAppName('YOUR_APP_NAME') + ->setEnvironment('sandbox') + ->setMachineName('YOUR_MACHINE_NAME') + ->setAppVersion('YOUR_APP_VERSION'); + +$client = new \Avalara\SDK\ApiClient($config); + +$apiInstance = new Avalara\\SDK\Api\InteropApi($client); + +$document_type = 'document_type_example'; // string | Type of the document being uploaded. Partners will be configured in Avalara system to send only certain types of documents. +$interchange_type = 'interchange_type_example'; // string | Type of interchange (codes in Avalara system that uniquely identifies a type of interchange). Partners will be configured in Avalara system to send documents belonging to certain types of interchanges. +$avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used +$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" +$x_correlation_id = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. +$file_name = "/path/to/file.txt"; // \SplFileObject | The file to be uploaded (e.g., UBL XML, CII XML). + +try { + $result = $apiInstance->submitInteropDocument($document_type, $interchange_type, $avalara_version, $x_avalara_client, $x_correlation_id, $file_name); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling InteropApi->submitInteropDocument: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **document_type** | **string**| Type of the document being uploaded. Partners will be configured in Avalara system to send only certain types of documents. | + **interchange_type** | **string**| Type of interchange (codes in Avalara system that uniquely identifies a type of interchange). Partners will be configured in Avalara system to send documents belonging to certain types of interchanges. | + **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | + **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **x_correlation_id** | **string**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + **file_name** | **\SplFileObject****\SplFileObject**| The file to be uploaded (e.g., UBL XML, CII XML). | [optional] + +### Return type + +[**\Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response**](../Model/SubmitInteropDocument202Response.md) + +### Authorization + +[Bearer](../../../README.md#Bearer) + +### HTTP request headers + +- **Content-Type**: `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../../README.md#endpoints) +[[Back to Model list]](../../../README.md#models) +[[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/V1/MandatesApi.md b/docs/EInvoicing/V1/MandatesApi.md index 7c06e73..f58378a 100644 --- a/docs/EInvoicing/V1/MandatesApi.md +++ b/docs/EInvoicing/V1/MandatesApi.md @@ -1,16 +1,86 @@ -# Avalara\SDK\MandatesApi +# Avalara\\SDK\MandatesApi All URIs are relative to https://api.sbx.avalara.com/einvoicing. Method | HTTP request | Description ------------- | ------------- | ------------- +[**getMandateDataInputFields()**](MandatesApi.md#getMandateDataInputFields) | **GET** /mandates/{mandateId}/data-input-fields | Returns document field information for a country mandate, a selected document type, and its version [**getMandates()**](MandatesApi.md#getMandates) | **GET** /mandates | List country mandates that are supported by the Avalara E-Invoicing platform +## `getMandateDataInputFields()` + +```php +getMandateDataInputFields($avalara_version, $mandate_id, $document_type, $document_version, $x_avalara_client): \Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[] +``` + +Returns document field information for a country mandate, a selected document type, and its version + +This endpoint provides document field details and the optionality of fields (required, conditional, optional) of different documents supported by the country mandate. Use the GET /mandates endpoint to retrieve all available country mandates, their supported document types and supported versions. You can use the `documentType` and `documentVersion` query parameters to retrieve the input fields for a particular document type and document version. + +### Example + +```php +setBearerToken('YOUR_JWT_ACCESS_TOKEN') + ->setAppName('YOUR_APP_NAME') + ->setEnvironment('sandbox') + ->setMachineName('YOUR_MACHINE_NAME') + ->setAppVersion('YOUR_APP_VERSION'); + +$client = new \Avalara\SDK\ApiClient($config); + +$apiInstance = new Avalara\\SDK\Api\MandatesApi($client); + +$avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used +$mandate_id = AD-B2G-PEPPOL; // string | The unique ID for the mandate that was returned in the GET /einvoicing/mandates response body +$document_type = ubl-invoice; // string | Select the documentType for which you wish to view the data-input-fields (You may obtain the supported documentTypes from the GET /mandates endpoint) +$document_version = 2.1; // string | Select the document version of the documentType (You may obtain the supported documentVersion from the GET /mandates endpoint) +$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. + +try { + $result = $apiInstance->getMandateDataInputFields($avalara_version, $mandate_id, $document_type, $document_version, $x_avalara_client); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MandatesApi->getMandateDataInputFields: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | + **mandate_id** | **string**| The unique ID for the mandate that was returned in the GET /einvoicing/mandates response body | + **document_type** | **string**| Select the documentType for which you wish to view the data-input-fields (You may obtain the supported documentTypes from the GET /mandates endpoint) | + **document_version** | **string**| Select the document version of the documentType (You may obtain the supported documentVersion from the GET /mandates endpoint) | + **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] + +### Return type + +[**\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]**](../Model/MandateDataInputField.md) + +### Authorization + +[Bearer](../../../README.md#Bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../../README.md#endpoints) +[[Back to Model list]](../../../README.md#models) +[[Back to README]](../../../README.md) + ## `getMandates()` ```php -getMandates($avalara_version, $x_avalara_client, $filter, $top, $skip, $count, $count_only): \Avalara\SDK\Model\EInvoicing\V1\MandatesResponse +getMandates($avalara_version, $x_avalara_client, $filter, $top, $skip, $count, $count_only): \Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse ``` List country mandates that are supported by the Avalara E-Invoicing platform @@ -33,10 +103,10 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\SDK\Api\MandatesApi($client); +$apiInstance = new Avalara\\SDK\Api\MandatesApi($client); -$avalara_version = 1.0; // string | The HTTP Header meant to specify the version of the API intended to be used -$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" +$avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used +$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. $filter = countryMandate eq DE-B2G-PEPPOL; // string | Filter by field name and value. This filter only supports eq and contains. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. $top = 10; // float | If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. $skip = 10; // float | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. @@ -56,7 +126,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | - **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] **filter** | **string**| Filter by field name and value. This filter only supports <code>eq</code> and <code>contains</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. | [optional] **top** | **float**| If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. | [optional] **skip** | **float**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] @@ -65,7 +135,7 @@ Name | Type | Description | Notes ### Return type -[**\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse**](../Model/MandatesResponse.md) +[**\Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse**](../Model/MandatesResponse.md) ### Authorization diff --git a/docs/EInvoicing/V1/TradingPartnersApi.md b/docs/EInvoicing/V1/TradingPartnersApi.md new file mode 100644 index 0000000..fc9a47f --- /dev/null +++ b/docs/EInvoicing/V1/TradingPartnersApi.md @@ -0,0 +1,368 @@ +# Avalara\\SDK\TradingPartnersApi + +All URIs are relative to https://api.sbx.avalara.com/einvoicing. + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**batchSearchParticipants()**](TradingPartnersApi.md#batchSearchParticipants) | **POST** /trading-partners/batch-searches | Creates a batch search and performs a batch search in the directory for participants in the background. +[**downloadBatchSearchReport()**](TradingPartnersApi.md#downloadBatchSearchReport) | **GET** /trading-partners/batch-searches/{id}/$download-results | Download batch search results in a csv file. +[**getBatchSearchDetail()**](TradingPartnersApi.md#getBatchSearchDetail) | **GET** /trading-partners/batch-searches/{id} | Get the batch search details for a given id. +[**listBatchSearches()**](TradingPartnersApi.md#listBatchSearches) | **GET** /trading-partners/batch-searches | List all batch searches that were previously submitted. +[**searchParticipants()**](TradingPartnersApi.md#searchParticipants) | **GET** /trading-partners | Returns a list of participants matching the input query. + + +## `batchSearchParticipants()` + +```php +batchSearchParticipants($avalara_version, $name, $notification_email, $file, $x_avalara_client, $x_correlation_id) +``` + +Creates a batch search and performs a batch search in the directory for participants in the background. + +Handles batch search requests by uploading a file containing search parameters. + +### Example + +```php +setBearerToken('YOUR_JWT_ACCESS_TOKEN') + ->setAppName('YOUR_APP_NAME') + ->setEnvironment('sandbox') + ->setMachineName('YOUR_MACHINE_NAME') + ->setAppVersion('YOUR_APP_VERSION'); + +$client = new \Avalara\SDK\ApiClient($config); + +$apiInstance = new Avalara\\SDK\Api\TradingPartnersApi($client); + +$avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used +$name = Automotive Companies in London Search; // string | The human readable name given to this batch search. +$notification_email = user@example.com; // string | The email address of the user to whom the batch search completion notification must go to. +$file = "/path/to/file.txt"; // \SplFileObject | CSV file containing search parameters. +$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" +$x_correlation_id = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. + +try { + $apiInstance->batchSearchParticipants($avalara_version, $name, $notification_email, $file, $x_avalara_client, $x_correlation_id); +} catch (Exception $e) { + echo 'Exception when calling TradingPartnersApi->batchSearchParticipants: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | + **name** | **string**| The human readable name given to this batch search. | + **notification_email** | **string**| The email address of the user to whom the batch search completion notification must go to. | + **file** | **\SplFileObject****\SplFileObject**| CSV file containing search parameters. | + **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **x_correlation_id** | **string**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../../../README.md#Bearer) + +### HTTP request headers + +- **Content-Type**: `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../../README.md#endpoints) +[[Back to Model list]](../../../README.md#models) +[[Back to README]](../../../README.md) + +## `downloadBatchSearchReport()` + +```php +downloadBatchSearchReport($avalara_version, $id, $x_avalara_client, $x_correlation_id): \SplFileObject +``` + +Download batch search results in a csv file. + +Downloads the report for a specific batch search using the batch search ID. + +### Example + +```php +setBearerToken('YOUR_JWT_ACCESS_TOKEN') + ->setAppName('YOUR_APP_NAME') + ->setEnvironment('sandbox') + ->setMachineName('YOUR_MACHINE_NAME') + ->setAppVersion('YOUR_APP_VERSION'); + +$client = new \Avalara\SDK\ApiClient($config); + +$apiInstance = new Avalara\\SDK\Api\TradingPartnersApi($client); + +$avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used +$id = 2f5ea4b5-4dae-445a-b3e4-9f65a61eaa99; // string | The ID of the batch search whose report is to be downloaded. +$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" +$x_correlation_id = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. + +try { + $result = $apiInstance->downloadBatchSearchReport($avalara_version, $id, $x_avalara_client, $x_correlation_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TradingPartnersApi->downloadBatchSearchReport: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | + **id** | **string**| The ID of the batch search whose report is to be downloaded. | + **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **x_correlation_id** | **string**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +**\SplFileObject** + +### Authorization + +[Bearer](../../../README.md#Bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `text/csv`, `application/json` + +[[Back to top]](#) [[Back to API list]](../../../README.md#endpoints) +[[Back to Model list]](../../../README.md#models) +[[Back to README]](../../../README.md) + +## `getBatchSearchDetail()` + +```php +getBatchSearchDetail($avalara_version, $id, $x_avalara_client, $x_correlation_id): \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch +``` + +Get the batch search details for a given id. + +Get the batch search details for a given id. + +### Example + +```php +setBearerToken('YOUR_JWT_ACCESS_TOKEN') + ->setAppName('YOUR_APP_NAME') + ->setEnvironment('sandbox') + ->setMachineName('YOUR_MACHINE_NAME') + ->setAppVersion('YOUR_APP_VERSION'); + +$client = new \Avalara\SDK\ApiClient($config); + +$apiInstance = new Avalara\\SDK\Api\TradingPartnersApi($client); + +$avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used +$id = 2f5ea4b5-4dae-445a-b3e4-9f65a61eaa99; // string | The ID of the batch search that was submitted earlier. +$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" +$x_correlation_id = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. + +try { + $result = $apiInstance->getBatchSearchDetail($avalara_version, $id, $x_avalara_client, $x_correlation_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TradingPartnersApi->getBatchSearchDetail: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | + **id** | **string**| The ID of the batch search that was submitted earlier. | + **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **x_correlation_id** | **string**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +[**\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch**](../Model/BatchSearch.md) + +### Authorization + +[Bearer](../../../README.md#Bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../../README.md#endpoints) +[[Back to Model list]](../../../README.md#models) +[[Back to README]](../../../README.md) + +## `listBatchSearches()` + +```php +listBatchSearches($avalara_version, $x_avalara_client, $filter, $count, $top, $skip, $order_by, $x_correlation_id): \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse +``` + +List all batch searches that were previously submitted. + +Retrieves all batch searches performed by the user. + +### Example + +```php +setBearerToken('YOUR_JWT_ACCESS_TOKEN') + ->setAppName('YOUR_APP_NAME') + ->setEnvironment('sandbox') + ->setMachineName('YOUR_MACHINE_NAME') + ->setAppVersion('YOUR_APP_VERSION'); + +$client = new \Avalara\SDK\ApiClient($config); + +$apiInstance = new Avalara\\SDK\Api\TradingPartnersApi($client); + +$avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used +$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" +$filter = name eq 'Batch_Search_Import_V4'; // string | Filter by field name and value. This filter only supports eq .The parameters supported is name. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. +$count = true; // bool | When set to true, the count of the collection is included as @recordSetCount in the response body. +$top = 10; // string | If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. +$skip = 10; // string | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. +$order_by = name desc; // string | The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. +$x_correlation_id = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. + +try { + $result = $apiInstance->listBatchSearches($avalara_version, $x_avalara_client, $filter, $count, $top, $skip, $order_by, $x_correlation_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TradingPartnersApi->listBatchSearches: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | + **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **filter** | **string**| Filter by field name and value. This filter only supports <code>eq</code> .The parameters supported is <code>name</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. | [optional] + **count** | **bool**| When set to true, the count of the collection is included as @recordSetCount in the response body. | [optional] + **top** | **string**| If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. | [optional] + **skip** | **string**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] + **order_by** | **string**| The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. | [optional] + **x_correlation_id** | **string**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +[**\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse**](../Model/BatchSearchListResponse.md) + +### Authorization + +[Bearer](../../../README.md#Bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../../README.md#endpoints) +[[Back to Model list]](../../../README.md#models) +[[Back to README]](../../../README.md) + +## `searchParticipants()` + +```php +searchParticipants($avalara_version, $search, $x_avalara_client, $count, $filter, $top, $skip, $order_by, $x_correlation_id): \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse +``` + +Returns a list of participants matching the input query. + +Returns a list of participants matching the input query. + +### Example + +```php +setBearerToken('YOUR_JWT_ACCESS_TOKEN') + ->setAppName('YOUR_APP_NAME') + ->setEnvironment('sandbox') + ->setMachineName('YOUR_MACHINE_NAME') + ->setAppVersion('YOUR_APP_VERSION'); + +$client = new \Avalara\SDK\ApiClient($config); + +$apiInstance = new Avalara\\SDK\Api\TradingPartnersApi($client); + +$avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used +$search = Acme and 7726627177 or BMW; // string | Search by value supports logical AND and OR. Refer to [https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search) for more information on search. Search will be done over name and identifier parameters only. +$x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" +$count = true; // bool | When set to true, the count of the collection is included as @recordSetCount in the response body. +$filter = network eq 'Peppol' and country eq 'Australia'; // string | Filter by field name and value. This filter only supports eq .The parameters supported are network, country, documentType, idType. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. +$top = 10; // string | If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. +$skip = 10; // string | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. +$order_by = name desc; // string | The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. +$x_correlation_id = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. + +try { + $result = $apiInstance->searchParticipants($avalara_version, $search, $x_avalara_client, $count, $filter, $top, $skip, $order_by, $x_correlation_id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TradingPartnersApi->searchParticipants: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | + **search** | **string**| Search by value supports logical AND and OR. Refer to [https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search) for more information on search. Search will be done over <code>name</code> and <code>identifier</code> parameters only. | + **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **count** | **bool**| When set to true, the count of the collection is included as @recordSetCount in the response body. | [optional] + **filter** | **string**| Filter by field name and value. This filter only supports <code>eq</code> .The parameters supported are <code>network</code>, <code>country</code>, <code>documentType</code>, <code>idType</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. | [optional] + **top** | **string**| If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. | [optional] + **skip** | **string**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] + **order_by** | **string**| The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. | [optional] + **x_correlation_id** | **string**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +[**\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse**](../Model/DirectorySearchResponse.md) + +### Authorization + +[Bearer](../../../README.md#Bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../../README.md#endpoints) +[[Back to Model list]](../../../README.md#models) +[[Back to README]](../../../README.md) diff --git a/lib/API/EInvoicing/V1/DataInputFieldsApi.php b/lib/API/EInvoicing/V1/DataInputFieldsApi.php index da2e654..cd00936 100644 --- a/lib/API/EInvoicing/V1/DataInputFieldsApi.php +++ b/lib/API/EInvoicing/V1/DataInputFieldsApi.php @@ -19,7 +19,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -31,7 +31,7 @@ -namespace Avalara\SDK\API\EInvoicing\V1; +namespace Avalara\\SDK\API\\EInvoicing\\V1; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; @@ -40,12 +40,12 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; -use Avalara\SDK\ApiClient; -use Avalara\SDK\ApiException; -use Avalara\SDK\Configuration; -use Avalara\SDK\HeaderSelector; -use Avalara\SDK\ObjectSerializer; -use Avalara\SDK\Utils\LogObject; +use Avalara\\SDK\ApiClient; +use Avalara\\SDK\ApiException; +use Avalara\\SDK\Configuration; +use Avalara\\SDK\HeaderSelector; +use Avalara\\SDK\ObjectSerializer; +use Avalara\\SDK\Utils\LogObject; class DataInputFieldsApi { @@ -119,13 +119,13 @@ public function getConfig() /** * Operation getDataInputFields * - * Returns the mandatory and conditional invoice or creditnote input fields for different country mandates + * Returns the optionality of document fields for different country mandates * * @param GetDataInputFieldsRequest The request parameters for the API call. * - * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \Avalara\\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError */ public function getDataInputFields($request_parameters) { @@ -136,13 +136,13 @@ public function getDataInputFields($request_parameters) /** * Operation getDataInputFieldsWithHttpInfo * - * Returns the mandatory and conditional invoice or creditnote input fields for different country mandates + * Returns the optionality of document fields for different country mandates * * @param GetDataInputFieldsRequest The request parameters for the API call. * - * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \Avalara\\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) */ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = false) { @@ -198,7 +198,7 @@ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = f switch($statusCode) { case 200: - if ('\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -206,12 +206,12 @@ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = f $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -219,12 +219,12 @@ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = f $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), $response->getStatusCode(), $response->getHeaders() ]; case 500: - if ('\Avalara\SDK\Model\EInvoicing\V1\InternalServerError' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -232,13 +232,13 @@ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = f $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse'; + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -257,7 +257,7 @@ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = f case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse', + '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -265,7 +265,7 @@ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = f case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', + '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -273,7 +273,7 @@ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = f case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', + '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -286,7 +286,7 @@ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = f /** * Operation getDataInputFieldsAsync * - * Returns the mandatory and conditional invoice or creditnote input fields for different country mandates + * Returns the optionality of document fields for different country mandates * * @param GetDataInputFieldsRequest The request parameters for the API call. * @@ -306,7 +306,7 @@ function ($response) { /** * Operation getDataInputFieldsAsyncWithHttpInfo * - * Returns the mandatory and conditional invoice or creditnote input fields for different country mandates + * Returns the optionality of document fields for different country mandates * * @param GetDataInputFieldsRequest The request parameters for the API call. * @@ -316,7 +316,7 @@ function ($response) { public function getDataInputFieldsAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse'; + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse'; $request = $this->getDataInputFieldsRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -458,12 +458,12 @@ public function getDataInputFieldsRequest($request_parameters) } // header params - $headerParams['avalara-version'] = '1.0'; + $headerParams['avalara-version'] = '1.2'; if ($avalara_version !== null) { $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); } // header params - $headerParams['avalara-version'] = '1.0'; + $headerParams['avalara-version'] = '1.2'; if ($x_avalara_client !== null) { $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); } @@ -533,7 +533,7 @@ public function getDataInputFieldsRequest($request_parameters) * Represents the Request object for the GetDataInputFields API * * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) * @param string $filter Filter by field name and value. This filter only supports <code>eq</code> and <code>contains</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. (optional) * @param float $top If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. (optional) * @param float $skip If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. (optional) diff --git a/lib/API/EInvoicing/V1/DocumentsApi.php b/lib/API/EInvoicing/V1/DocumentsApi.php index 245478c..4faaee3 100644 --- a/lib/API/EInvoicing/V1/DocumentsApi.php +++ b/lib/API/EInvoicing/V1/DocumentsApi.php @@ -19,7 +19,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -31,7 +31,7 @@ -namespace Avalara\SDK\API\EInvoicing\V1; +namespace Avalara\\SDK\API\\EInvoicing\\V1; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; @@ -40,12 +40,12 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; -use Avalara\SDK\ApiClient; -use Avalara\SDK\ApiException; -use Avalara\SDK\Configuration; -use Avalara\SDK\HeaderSelector; -use Avalara\SDK\ObjectSerializer; -use Avalara\SDK\Utils\LogObject; +use Avalara\\SDK\ApiClient; +use Avalara\\SDK\ApiException; +use Avalara\\SDK\Configuration; +use Avalara\\SDK\HeaderSelector; +use Avalara\\SDK\ObjectSerializer; +use Avalara\\SDK\Utils\LogObject; class DocumentsApi { @@ -123,9 +123,9 @@ public function getConfig() * * @param DownloadDocumentRequest The request parameters for the API call. * - * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \Avalara\\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \SplFileObject|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest + * @return \SplFileObject|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError|\Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest */ public function downloadDocument($request_parameters) { @@ -140,9 +140,9 @@ public function downloadDocument($request_parameters) * * @param DownloadDocumentRequest The request parameters for the API call. * - * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \Avalara\\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \SplFileObject|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest, HTTP status code, HTTP response headers (array of strings) + * @return array of \SplFileObject|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError|\Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest, HTTP status code, HTTP response headers (array of strings) */ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = false) { @@ -211,7 +211,7 @@ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = fal $response->getHeaders() ]; case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -219,12 +219,12 @@ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = fal $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), $response->getStatusCode(), $response->getHeaders() ]; case 404: - if ('\Avalara\SDK\Model\EInvoicing\V1\NotFoundError' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -232,12 +232,12 @@ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = fal $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', []), $response->getStatusCode(), $response->getHeaders() ]; case 406: - if ('\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -245,7 +245,7 @@ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = fal $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -278,7 +278,7 @@ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = fal case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', + '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -286,7 +286,7 @@ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = fal case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', + '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -294,7 +294,7 @@ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = fal case 406: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest', + '\Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -433,17 +433,17 @@ public function downloadDocumentRequest($request_parameters) // header params - $headerParams['avalara-version'] = '1.0'; + $headerParams['avalara-version'] = '1.2'; if ($avalara_version !== null) { $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); } // header params - $headerParams['avalara-version'] = '1.0'; + $headerParams['avalara-version'] = '1.2'; if ($accept !== null) { $headerParams['Accept'] = ObjectSerializer::toHeaderValue($accept); } // header params - $headerParams['avalara-version'] = '1.0'; + $headerParams['avalara-version'] = '1.2'; if ($x_avalara_client !== null) { $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); } @@ -516,6 +516,371 @@ public function downloadDocumentRequest($request_parameters) ); } + /** + * Operation fetchDocuments + * + * Fetch the inbound document from a tax authority + * + * @param FetchDocumentsRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError + */ + public function fetchDocuments($request_parameters) + { + list($response) = $this->fetchDocumentsWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation fetchDocumentsWithHttpInfo + * + * Fetch the inbound document from a tax authority + * + * @param FetchDocumentsRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) + */ + public function fetchDocumentsWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->fetchDocumentsRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->fetchDocumentsWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation fetchDocumentsAsync + * + * Fetch the inbound document from a tax authority + * + * @param FetchDocumentsRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function fetchDocumentsAsync($request_parameters) + { + return $this->fetchDocumentsAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation fetchDocumentsAsyncWithHttpInfo + * + * Fetch the inbound document from a tax authority + * + * @param FetchDocumentsRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function fetchDocumentsAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch'; + $request = $this->fetchDocumentsRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->fetchDocumentsAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'fetchDocuments' + * + * @param FetchDocumentsRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function fetchDocumentsRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $fetch_documents_request = $request_parameters->getFetchDocumentsRequest(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling fetchDocuments' + ); + } + // verify the required parameter 'fetch_documents_request' is set + if ($fetch_documents_request === null || (is_array($fetch_documents_request) && count($fetch_documents_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $fetch_documents_request when calling fetchDocuments' + ); + } + + $resourcePath = '/einvoicing/documents/$fetch'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + $headerParams['avalara-version'] = '1.2'; + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + $headerParams['avalara-version'] = '1.2'; + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (isset($fetch_documents_request)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($fetch_documents_request)); + } else { + $httpBody = $fetch_documents_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->client->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation getDocumentList * @@ -523,9 +888,9 @@ public function downloadDocumentRequest($request_parameters) * * @param GetDocumentListRequest The request parameters for the API call. * - * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \Avalara\\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse|\Avalara\SDK\Model\EInvoicing\V1\BadRequest|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError */ public function getDocumentList($request_parameters) { @@ -540,9 +905,9 @@ public function getDocumentList($request_parameters) * * @param GetDocumentListRequest The request parameters for the API call. * - * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \Avalara\\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse|\Avalara\SDK\Model\EInvoicing\V1\BadRequest|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError, HTTP status code, HTTP response headers (array of strings) */ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = false) { @@ -598,7 +963,7 @@ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = fals switch($statusCode) { case 200: - if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -606,12 +971,12 @@ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = fals $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 400: - if ('\Avalara\SDK\Model\EInvoicing\V1\BadRequest' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -619,12 +984,12 @@ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = fals $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BadRequest', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -632,13 +997,13 @@ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = fals $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse'; + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -657,7 +1022,7 @@ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = fals case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse', + '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -665,7 +1030,7 @@ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = fals case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\BadRequest', + '\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -673,7 +1038,7 @@ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = fals case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', + '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -716,7 +1081,7 @@ function ($response) { public function getDocumentListAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse'; + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse'; $request = $this->getDocumentListRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -894,12 +1259,12 @@ public function getDocumentListRequest($request_parameters) } // header params - $headerParams['avalara-version'] = '1.0'; + $headerParams['avalara-version'] = '1.2'; if ($avalara_version !== null) { $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); } // header params - $headerParams['avalara-version'] = '1.0'; + $headerParams['avalara-version'] = '1.2'; if ($x_avalara_client !== null) { $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); } @@ -971,9 +1336,9 @@ public function getDocumentListRequest($request_parameters) * * @param GetDocumentStatusRequest The request parameters for the API call. * - * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \Avalara\\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError */ public function getDocumentStatus($request_parameters) { @@ -988,9 +1353,9 @@ public function getDocumentStatus($request_parameters) * * @param GetDocumentStatusRequest The request parameters for the API call. * - * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \Avalara\\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError, HTTP status code, HTTP response headers (array of strings) */ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = false) { @@ -1046,7 +1411,7 @@ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = fa switch($statusCode) { case 200: - if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1054,12 +1419,12 @@ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = fa $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1067,12 +1432,12 @@ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = fa $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), $response->getStatusCode(), $response->getHeaders() ]; case 404: - if ('\Avalara\SDK\Model\EInvoicing\V1\NotFoundError' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1080,13 +1445,13 @@ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = fa $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse'; + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1105,7 +1470,7 @@ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = fa case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse', + '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1113,7 +1478,7 @@ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = fa case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', + '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1121,7 +1486,7 @@ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = fa case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', + '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1164,7 +1529,7 @@ function ($response) { public function getDocumentStatusAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse'; + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse'; $request = $this->getDocumentStatusRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -1244,7 +1609,7 @@ public function getDocumentStatusRequest($request_parameters) ); } - $resourcePath = '/einvoicing/document/{documentId}/status'; + $resourcePath = '/einvoicing/documents/{documentId}/status'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1253,12 +1618,12 @@ public function getDocumentStatusRequest($request_parameters) // header params - $headerParams['avalara-version'] = '1.0'; + $headerParams['avalara-version'] = '1.2'; if ($avalara_version !== null) { $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); } // header params - $headerParams['avalara-version'] = '1.0'; + $headerParams['avalara-version'] = '1.2'; if ($x_avalara_client !== null) { $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); } @@ -1338,9 +1703,9 @@ public function getDocumentStatusRequest($request_parameters) * * @param SubmitDocumentRequest The request parameters for the API call. * - * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \Avalara\\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse|\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError */ public function submitDocument($request_parameters) { @@ -1355,9 +1720,9 @@ public function submitDocument($request_parameters) * * @param SubmitDocumentRequest The request parameters for the API call. * - * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \Avalara\\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse|\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError, HTTP status code, HTTP response headers (array of strings) */ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false) { @@ -1413,7 +1778,7 @@ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false switch($statusCode) { case 201: - if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1421,12 +1786,12 @@ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 400: - if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1434,12 +1799,12 @@ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1447,13 +1812,13 @@ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse'; + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1472,7 +1837,7 @@ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse', + '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1480,7 +1845,7 @@ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError', + '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1488,7 +1853,7 @@ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', + '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1531,7 +1896,7 @@ function ($response) { public function submitDocumentAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse'; + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse'; $request = $this->submitDocumentRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -1627,12 +1992,12 @@ public function submitDocumentRequest($request_parameters) // header params - $headerParams['avalara-version'] = '1.0'; + $headerParams['avalara-version'] = '1.2'; if ($avalara_version !== null) { $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); } // header params - $headerParams['avalara-version'] = '1.0'; + $headerParams['avalara-version'] = '1.2'; if ($x_avalara_client !== null) { $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); } @@ -1712,7 +2077,7 @@ public function submitDocumentRequest($request_parameters) * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) * @param string $accept This header indicates the MIME type of the document (required) * @param string $document_id The unique ID for this document that was returned in the POST /einvoicing/document response body (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) */ class DownloadDocumentRequest { private $avalara_version; @@ -1747,6 +2112,43 @@ public function getXAvalaraClient() { return $this->x_avalara_client; } + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } +} + + /** + * Represents the Request object for the FetchDocuments API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequest $fetch_documents_request fetch_documents_request (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) + */ +class FetchDocumentsRequest { + private $avalara_version; + private $fetch_documents_request; + private $x_avalara_client; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getFetchDocumentsRequest() { + return $this->fetch_documents_request; + } + + public function setFetchDocumentsRequest($fetch_documents_request) { + $this->fetch_documents_request = $fetch_documents_request; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + public function setXAvalaraClient($x_avalara_client) { $this->x_avalara_client = $x_avalara_client; } @@ -1756,7 +2158,7 @@ public function setXAvalaraClient($x_avalara_client) { * Represents the Request object for the GetDocumentList API * * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) * @param \DateTime $start_date Start date of documents to return. This defaults to the previous month. (optional) * @param \DateTime $end_date End date of documents to return. This defaults to the current date. (optional) * @param string $flow Optionally filter by document direction, where issued = `out` and received = `in` (optional) @@ -1857,7 +2259,7 @@ public function setSkip($skip) { * * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) * @param string $document_id The unique ID for this document that was returned in the POST /einvoicing/documents response body (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) */ class GetDocumentStatusRequest { private $avalara_version; @@ -1893,9 +2295,9 @@ public function setXAvalaraClient($x_avalara_client) { * Represents the Request object for the SubmitDocument API * * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param \Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata $metadata metadata (required) - * @param \Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentData $data data (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata $metadata metadata (required) + * @param object $data The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) */ class SubmitDocumentRequest { private $avalara_version; diff --git a/lib/API/EInvoicing/V1/InteropApi.php b/lib/API/EInvoicing/V1/InteropApi.php new file mode 100644 index 0000000..5f29355 --- /dev/null +++ b/lib/API/EInvoicing/V1/InteropApi.php @@ -0,0 +1,632 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + + + +namespace Avalara\\SDK\API\\EInvoicing\\V1; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Exception\RequestException; +use GuzzleHttp\Exception\ConnectException; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Avalara\\SDK\ApiClient; +use Avalara\\SDK\ApiException; +use Avalara\\SDK\Configuration; +use Avalara\\SDK\HeaderSelector; +use Avalara\\SDK\ObjectSerializer; +use Avalara\\SDK\Utils\LogObject; + +class InteropApi +{ + /** + * @var ApiClient + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @param ApiClient $client + */ + public function __construct(ApiClient $client ) + { + $this->setConfiguration($client); + } + + /** + * Set APIClient Configuration + * + * @param APIClient $client + */ + private function setConfiguration($client): void + { + $this->verifyAPIClient($client); + $client->setSdkVersion(""); + $this->headerSelector = new HeaderSelector(); + $this->client = $client; + } + + /** + * Verify APIClient object + * + * @param int $client + */ + private function verifyAPIClient($client): void + { + if (is_null($client)){ + throw new ApiException("APIClient not defined"); + } + } + + + /** + * Set the HeaderSelector + * + * @param HeaderSelector $selector (required) + */ + public function setHeaderSelector($selector): void + { + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->client->config; + } + + /** + * Operation submitInteropDocument + * + * Submit a document + * + * @param SubmitInteropDocumentRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse + */ + public function submitInteropDocument($request_parameters) + { + list($response) = $this->submitInteropDocumentWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation submitInteropDocumentWithHttpInfo + * + * Submit a document + * + * @param SubmitInteropDocumentRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function submitInteropDocumentWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->submitInteropDocumentRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->submitInteropDocumentWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 202: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation submitInteropDocumentAsync + * + * Submit a document + * + * @param SubmitInteropDocumentRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function submitInteropDocumentAsync($request_parameters) + { + return $this->submitInteropDocumentAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation submitInteropDocumentAsyncWithHttpInfo + * + * Submit a document + * + * @param SubmitInteropDocumentRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function submitInteropDocumentAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response'; + $request = $this->submitInteropDocumentRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->submitInteropDocumentAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'submitInteropDocument' + * + * @param SubmitInteropDocumentRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function submitInteropDocumentRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $document_type = $request_parameters->getDocumentType(); + $interchange_type = $request_parameters->getInterchangeType(); + $avalara_version = $request_parameters->getAvalaraVersion(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + $file_name = $request_parameters->getFileName(); + + // verify the required parameter 'document_type' is set + if ($document_type === null || (is_array($document_type) && count($document_type) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $document_type when calling submitInteropDocument' + ); + } + // verify the required parameter 'interchange_type' is set + if ($interchange_type === null || (is_array($interchange_type) && count($interchange_type) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $interchange_type when calling submitInteropDocument' + ); + } + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling submitInteropDocument' + ); + } + + $resourcePath = '/einvoicing/interop/documents'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($document_type !== null) { + if('form' === 'form' && is_array($document_type)) { + foreach($document_type as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['documentType'] = $document_type; + } + } + // query params + if ($interchange_type !== null) { + if('form' === 'form' && is_array($interchange_type)) { + foreach($interchange_type as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['interchangeType'] = $interchange_type; + } + } + + // header params + $headerParams['avalara-version'] = '1.2'; + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + $headerParams['avalara-version'] = '1.2'; + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + $headerParams['avalara-version'] = '1.2'; + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + + // form params + if ($file_name !== null) { + $multipart = true; + $formParams['fileName'] = []; + $paramFiles = is_array($file_name) ? $file_name : [$file_name]; + foreach ($paramFiles as $paramFile) { + $formParams['fileName'][] = \GuzzleHttp\Psr7\Utils::tryFopen( + ObjectSerializer::toFormValue($paramFile), + 'rb' + ); + } + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->client->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + +} + /** + * Represents the Request object for the SubmitInteropDocument API + * + * @param string $document_type Type of the document being uploaded. Partners will be configured in Avalara system to send only certain types of documents. (required) + * @param string $interchange_type Type of interchange (codes in Avalara system that uniquely identifies a type of interchange). Partners will be configured in Avalara system to send documents belonging to certain types of interchanges. (required) + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + * @param \SplFileObject $file_name The file to be uploaded (e.g., UBL XML, CII XML). (optional) + */ +class SubmitInteropDocumentRequest { + private $document_type; + private $interchange_type; + private $avalara_version; + private $x_avalara_client; + private $x_correlation_id; + private $file_name; + + public function __construct() { + } + public function getDocumentType() { + return $this->document_type; + } + + public function setDocumentType($document_type) { + $this->document_type = $document_type; + } + public function getInterchangeType() { + return $this->interchange_type; + } + + public function setInterchangeType($interchange_type) { + $this->interchange_type = $interchange_type; + } + public function getAvalaraVersion() { + return $this->avalara_version; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } + public function getFileName() { + return $this->file_name; + } + + public function setFileName($file_name) { + $this->file_name = $file_name; + } +} + diff --git a/lib/API/EInvoicing/V1/MandatesApi.php b/lib/API/EInvoicing/V1/MandatesApi.php index 0ad17a7..a1309ec 100644 --- a/lib/API/EInvoicing/V1/MandatesApi.php +++ b/lib/API/EInvoicing/V1/MandatesApi.php @@ -19,7 +19,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -31,7 +31,7 @@ -namespace Avalara\SDK\API\EInvoicing\V1; +namespace Avalara\\SDK\API\\EInvoicing\\V1; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; @@ -40,12 +40,12 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; -use Avalara\SDK\ApiClient; -use Avalara\SDK\ApiException; -use Avalara\SDK\Configuration; -use Avalara\SDK\HeaderSelector; -use Avalara\SDK\ObjectSerializer; -use Avalara\SDK\Utils\LogObject; +use Avalara\\SDK\ApiClient; +use Avalara\\SDK\ApiException; +use Avalara\\SDK\Configuration; +use Avalara\\SDK\HeaderSelector; +use Avalara\\SDK\ObjectSerializer; +use Avalara\\SDK\Utils\LogObject; class MandatesApi { @@ -116,6 +116,451 @@ public function getConfig() return $this->client->config; } + /** + * Operation getMandateDataInputFields + * + * Returns document field information for a country mandate, a selected document type, and its version + * + * @param GetMandateDataInputFieldsRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]|\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError + */ + public function getMandateDataInputFields($request_parameters) + { + list($response) = $this->getMandateDataInputFieldsWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation getMandateDataInputFieldsWithHttpInfo + * + * Returns document field information for a country mandate, a selected document type, and its version + * + * @param GetMandateDataInputFieldsRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]|\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) + */ + public function getMandateDataInputFieldsWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->getMandateDataInputFieldsRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->getMandateDataInputFieldsWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getMandateDataInputFieldsAsync + * + * Returns document field information for a country mandate, a selected document type, and its version + * + * @param GetMandateDataInputFieldsRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getMandateDataInputFieldsAsync($request_parameters) + { + return $this->getMandateDataInputFieldsAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getMandateDataInputFieldsAsyncWithHttpInfo + * + * Returns document field information for a country mandate, a selected document type, and its version + * + * @param GetMandateDataInputFieldsRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getMandateDataInputFieldsAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]'; + $request = $this->getMandateDataInputFieldsRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->getMandateDataInputFieldsAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getMandateDataInputFields' + * + * @param GetMandateDataInputFieldsRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getMandateDataInputFieldsRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $mandate_id = $request_parameters->getMandateId(); + $document_type = $request_parameters->getDocumentType(); + $document_version = $request_parameters->getDocumentVersion(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling getMandateDataInputFields' + ); + } + // verify the required parameter 'mandate_id' is set + if ($mandate_id === null || (is_array($mandate_id) && count($mandate_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $mandate_id when calling getMandateDataInputFields' + ); + } + // verify the required parameter 'document_type' is set + if ($document_type === null || (is_array($document_type) && count($document_type) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $document_type when calling getMandateDataInputFields' + ); + } + // verify the required parameter 'document_version' is set + if ($document_version === null || (is_array($document_version) && count($document_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $document_version when calling getMandateDataInputFields' + ); + } + + $resourcePath = '/einvoicing/mandates/{mandateId}/data-input-fields'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($document_type !== null) { + if('form' === 'form' && is_array($document_type)) { + foreach($document_type as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['documentType'] = $document_type; + } + } + // query params + if ($document_version !== null) { + if('form' === 'form' && is_array($document_version)) { + foreach($document_version as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['documentVersion'] = $document_version; + } + } + + // header params + $headerParams['avalara-version'] = '1.2'; + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + $headerParams['avalara-version'] = '1.2'; + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + + // path params + if ($mandate_id !== null) { + $resourcePath = str_replace( + '{' . 'mandateId' . '}', + ObjectSerializer::toPathValue($mandate_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->client->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation getMandates * @@ -123,9 +568,9 @@ public function getConfig() * * @param GetMandatesRequest The request parameters for the API call. * - * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \Avalara\\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\MandatesResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError */ public function getMandates($request_parameters) { @@ -140,9 +585,9 @@ public function getMandates($request_parameters) * * @param GetMandatesRequest The request parameters for the API call. * - * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \Avalara\\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\MandatesResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) */ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) { @@ -198,7 +643,7 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) switch($statusCode) { case 200: - if ('\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -206,12 +651,12 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -219,12 +664,12 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), $response->getStatusCode(), $response->getHeaders() ]; case 404: - if ('\Avalara\SDK\Model\EInvoicing\V1\NotFoundError' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -232,12 +677,12 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', []), $response->getStatusCode(), $response->getHeaders() ]; case 500: - if ('\Avalara\SDK\Model\EInvoicing\V1\InternalServerError' === '\SplFileObject') { + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -245,13 +690,13 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', []), + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse'; + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -270,7 +715,7 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse', + '\Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -278,7 +723,7 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', + '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -286,7 +731,7 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', + '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -294,7 +739,7 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', + '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -337,7 +782,7 @@ function ($response) { public function getMandatesAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse'; + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse'; $request = $this->getMandatesRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -479,12 +924,12 @@ public function getMandatesRequest($request_parameters) } // header params - $headerParams['avalara-version'] = '1.0'; + $headerParams['avalara-version'] = '1.2'; if ($avalara_version !== null) { $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); } // header params - $headerParams['avalara-version'] = '1.0'; + $headerParams['avalara-version'] = '1.2'; if ($x_avalara_client !== null) { $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); } @@ -550,11 +995,66 @@ public function getMandatesRequest($request_parameters) } } + /** + * Represents the Request object for the GetMandateDataInputFields API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param string $mandate_id The unique ID for the mandate that was returned in the GET /einvoicing/mandates response body (required) + * @param string $document_type Select the documentType for which you wish to view the data-input-fields (You may obtain the supported documentTypes from the GET /mandates endpoint) (required) + * @param string $document_version Select the document version of the documentType (You may obtain the supported documentVersion from the GET /mandates endpoint) (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) + */ +class GetMandateDataInputFieldsRequest { + private $avalara_version; + private $mandate_id; + private $document_type; + private $document_version; + private $x_avalara_client; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getMandateId() { + return $this->mandate_id; + } + + public function setMandateId($mandate_id) { + $this->mandate_id = $mandate_id; + } + public function getDocumentType() { + return $this->document_type; + } + + public function setDocumentType($document_type) { + $this->document_type = $document_type; + } + public function getDocumentVersion() { + return $this->document_version; + } + + public function setDocumentVersion($document_version) { + $this->document_version = $document_version; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } +} + /** * Represents the Request object for the GetMandates API * * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) * @param string $filter Filter by field name and value. This filter only supports <code>eq</code> and <code>contains</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. (optional) * @param float $top If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. (optional) * @param float $skip If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. (optional) diff --git a/lib/API/EInvoicing/V1/TradingPartnersApi.php b/lib/API/EInvoicing/V1/TradingPartnersApi.php new file mode 100644 index 0000000..7f43566 --- /dev/null +++ b/lib/API/EInvoicing/V1/TradingPartnersApi.php @@ -0,0 +1,2529 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + + + +namespace Avalara\\SDK\API\\EInvoicing\\V1; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Exception\RequestException; +use GuzzleHttp\Exception\ConnectException; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Avalara\\SDK\ApiClient; +use Avalara\\SDK\ApiException; +use Avalara\\SDK\Configuration; +use Avalara\\SDK\HeaderSelector; +use Avalara\\SDK\ObjectSerializer; +use Avalara\\SDK\Utils\LogObject; + +class TradingPartnersApi +{ + /** + * @var ApiClient + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @param ApiClient $client + */ + public function __construct(ApiClient $client ) + { + $this->setConfiguration($client); + } + + /** + * Set APIClient Configuration + * + * @param APIClient $client + */ + private function setConfiguration($client): void + { + $this->verifyAPIClient($client); + $client->setSdkVersion(""); + $this->headerSelector = new HeaderSelector(); + $this->client = $client; + } + + /** + * Verify APIClient object + * + * @param int $client + */ + private function verifyAPIClient($client): void + { + if (is_null($client)){ + throw new ApiException("APIClient not defined"); + } + } + + + /** + * Set the HeaderSelector + * + * @param HeaderSelector $selector (required) + */ + public function setHeaderSelector($selector): void + { + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->client->config; + } + + /** + * Operation batchSearchParticipants + * + * Creates a batch search and performs a batch search in the directory for participants in the background. + * + * @param BatchSearchParticipantsRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function batchSearchParticipants($request_parameters) + { + $this->batchSearchParticipantsWithHttpInfo($request_parameters); + } + + /** + * Operation batchSearchParticipantsWithHttpInfo + * + * Creates a batch search and performs a batch search in the directory for participants in the background. + * + * @param BatchSearchParticipantsRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function batchSearchParticipantsWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->batchSearchParticipantsRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + $this->batchSearchParticipantsWithHttpInfo($request_parameters, true); + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation batchSearchParticipantsAsync + * + * Creates a batch search and performs a batch search in the directory for participants in the background. + * + * @param BatchSearchParticipantsRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function batchSearchParticipantsAsync($request_parameters) + { + return $this->batchSearchParticipantsAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation batchSearchParticipantsAsyncWithHttpInfo + * + * Creates a batch search and performs a batch search in the directory for participants in the background. + * + * @param BatchSearchParticipantsRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function batchSearchParticipantsAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = ''; + $request = $this->batchSearchParticipantsRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + $this->client->logger->info(json_encode($logObject)); + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->batchSearchParticipantsAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'batchSearchParticipants' + * + * @param BatchSearchParticipantsRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function batchSearchParticipantsRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $name = $request_parameters->getName(); + $notification_email = $request_parameters->getNotificationEmail(); + $file = $request_parameters->getFile(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling batchSearchParticipants' + ); + } + // verify the required parameter 'name' is set + if ($name === null || (is_array($name) && count($name) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $name when calling batchSearchParticipants' + ); + } + // verify the required parameter 'notification_email' is set + if ($notification_email === null || (is_array($notification_email) && count($notification_email) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $notification_email when calling batchSearchParticipants' + ); + } + // verify the required parameter 'file' is set + if ($file === null || (is_array($file) && count($file) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $file when calling batchSearchParticipants' + ); + } + + $resourcePath = '/einvoicing/trading-partners/batch-searches'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($name !== null) { + if('form' === 'form' && is_array($name)) { + foreach($name as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['name'] = $name; + } + } + // query params + if ($notification_email !== null) { + if('form' === 'form' && is_array($notification_email)) { + foreach($notification_email as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['notificationEmail'] = $notification_email; + } + } + + // header params + $headerParams['avalara-version'] = '1.2'; + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + $headerParams['avalara-version'] = '1.2'; + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + $headerParams['avalara-version'] = '1.2'; + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + + // form params + if ($file !== null) { + $multipart = true; + $formParams['file'] = []; + $paramFiles = is_array($file) ? $file : [$file]; + foreach ($paramFiles as $paramFile) { + $formParams['file'][] = \GuzzleHttp\Psr7\Utils::tryFopen( + ObjectSerializer::toFormValue($paramFile), + 'rb' + ); + } + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->client->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation downloadBatchSearchReport + * + * Download batch search results in a csv file. + * + * @param DownloadBatchSearchReportRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \SplFileObject|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse + */ + public function downloadBatchSearchReport($request_parameters) + { + list($response) = $this->downloadBatchSearchReportWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation downloadBatchSearchReportWithHttpInfo + * + * Download batch search results in a csv file. + * + * @param DownloadBatchSearchReportRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \SplFileObject|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function downloadBatchSearchReportWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->downloadBatchSearchReportRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->downloadBatchSearchReportWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\SplFileObject' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\SplFileObject', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\SplFileObject'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SplFileObject', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation downloadBatchSearchReportAsync + * + * Download batch search results in a csv file. + * + * @param DownloadBatchSearchReportRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function downloadBatchSearchReportAsync($request_parameters) + { + return $this->downloadBatchSearchReportAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation downloadBatchSearchReportAsyncWithHttpInfo + * + * Download batch search results in a csv file. + * + * @param DownloadBatchSearchReportRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function downloadBatchSearchReportAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\SplFileObject'; + $request = $this->downloadBatchSearchReportRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->downloadBatchSearchReportAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'downloadBatchSearchReport' + * + * @param DownloadBatchSearchReportRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function downloadBatchSearchReportRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $id = $request_parameters->getId(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling downloadBatchSearchReport' + ); + } + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling downloadBatchSearchReport' + ); + } + + $resourcePath = '/einvoicing/trading-partners/batch-searches/{id}/$download-results'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + $headerParams['avalara-version'] = '1.2'; + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + $headerParams['avalara-version'] = '1.2'; + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + $headerParams['avalara-version'] = '1.2'; + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['text/csv', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['text/csv', 'application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->client->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getBatchSearchDetail + * + * Get the batch search details for a given id. + * + * @param GetBatchSearchDetailRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch|\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse + */ + public function getBatchSearchDetail($request_parameters) + { + list($response) = $this->getBatchSearchDetailWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation getBatchSearchDetailWithHttpInfo + * + * Get the batch search details for a given id. + * + * @param GetBatchSearchDetailRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch|\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getBatchSearchDetailWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->getBatchSearchDetailRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->getBatchSearchDetailWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getBatchSearchDetailAsync + * + * Get the batch search details for a given id. + * + * @param GetBatchSearchDetailRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getBatchSearchDetailAsync($request_parameters) + { + return $this->getBatchSearchDetailAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getBatchSearchDetailAsyncWithHttpInfo + * + * Get the batch search details for a given id. + * + * @param GetBatchSearchDetailRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getBatchSearchDetailAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch'; + $request = $this->getBatchSearchDetailRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->getBatchSearchDetailAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getBatchSearchDetail' + * + * @param GetBatchSearchDetailRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getBatchSearchDetailRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $id = $request_parameters->getId(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling getBatchSearchDetail' + ); + } + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling getBatchSearchDetail' + ); + } + + $resourcePath = '/einvoicing/trading-partners/batch-searches/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + $headerParams['avalara-version'] = '1.2'; + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + $headerParams['avalara-version'] = '1.2'; + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + $headerParams['avalara-version'] = '1.2'; + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->client->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listBatchSearches + * + * List all batch searches that were previously submitted. + * + * @param ListBatchSearchesRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse + */ + public function listBatchSearches($request_parameters) + { + list($response) = $this->listBatchSearchesWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation listBatchSearchesWithHttpInfo + * + * List all batch searches that were previously submitted. + * + * @param ListBatchSearchesRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listBatchSearchesWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->listBatchSearchesRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->listBatchSearchesWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation listBatchSearchesAsync + * + * List all batch searches that were previously submitted. + * + * @param ListBatchSearchesRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBatchSearchesAsync($request_parameters) + { + return $this->listBatchSearchesAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listBatchSearchesAsyncWithHttpInfo + * + * List all batch searches that were previously submitted. + * + * @param ListBatchSearchesRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBatchSearchesAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse'; + $request = $this->listBatchSearchesRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->listBatchSearchesAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listBatchSearches' + * + * @param ListBatchSearchesRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listBatchSearchesRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $filter = $request_parameters->getFilter(); + $count = $request_parameters->getCount(); + $top = $request_parameters->getTop(); + $skip = $request_parameters->getSkip(); + $order_by = $request_parameters->getOrderBy(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling listBatchSearches' + ); + } + + $resourcePath = '/einvoicing/trading-partners/batch-searches'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($filter !== null) { + if('form' === 'form' && is_array($filter)) { + foreach($filter as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$filter'] = $filter; + } + } + // query params + if ($count !== null) { + if('form' === 'form' && is_array($count)) { + foreach($count as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['count'] = $count; + } + } + // query params + if ($top !== null) { + if('form' === 'form' && is_array($top)) { + foreach($top as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$top'] = $top; + } + } + // query params + if ($skip !== null) { + if('form' === 'form' && is_array($skip)) { + foreach($skip as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$skip'] = $skip; + } + } + // query params + if ($order_by !== null) { + if('form' === 'form' && is_array($order_by)) { + foreach($order_by as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$orderBy'] = $order_by; + } + } + + // header params + $headerParams['avalara-version'] = '1.2'; + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + $headerParams['avalara-version'] = '1.2'; + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + $headerParams['avalara-version'] = '1.2'; + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->client->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation searchParticipants + * + * Returns a list of participants matching the input query. + * + * @param SearchParticipantsRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse + */ + public function searchParticipants($request_parameters) + { + list($response) = $this->searchParticipantsWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation searchParticipantsWithHttpInfo + * + * Returns a list of participants matching the input query. + * + * @param SearchParticipantsRequest The request parameters for the API call. + * + * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function searchParticipantsWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->searchParticipantsRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->searchParticipantsWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation searchParticipantsAsync + * + * Returns a list of participants matching the input query. + * + * @param SearchParticipantsRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function searchParticipantsAsync($request_parameters) + { + return $this->searchParticipantsAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation searchParticipantsAsyncWithHttpInfo + * + * Returns a list of participants matching the input query. + * + * @param SearchParticipantsRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function searchParticipantsAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse'; + $request = $this->searchParticipantsRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->searchParticipantsAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'searchParticipants' + * + * @param SearchParticipantsRequest The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function searchParticipantsRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $search = $request_parameters->getSearch(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $count = $request_parameters->getCount(); + $filter = $request_parameters->getFilter(); + $top = $request_parameters->getTop(); + $skip = $request_parameters->getSkip(); + $order_by = $request_parameters->getOrderBy(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling searchParticipants' + ); + } + // verify the required parameter 'search' is set + if ($search === null || (is_array($search) && count($search) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $search when calling searchParticipants' + ); + } + + $resourcePath = '/einvoicing/trading-partners'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($count !== null) { + if('form' === 'form' && is_array($count)) { + foreach($count as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['count'] = $count; + } + } + // query params + if ($search !== null) { + if('form' === 'form' && is_array($search)) { + foreach($search as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$search'] = $search; + } + } + // query params + if ($filter !== null) { + if('form' === 'form' && is_array($filter)) { + foreach($filter as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$filter'] = $filter; + } + } + // query params + if ($top !== null) { + if('form' === 'form' && is_array($top)) { + foreach($top as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$top'] = $top; + } + } + // query params + if ($skip !== null) { + if('form' === 'form' && is_array($skip)) { + foreach($skip as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$skip'] = $skip; + } + } + // query params + if ($order_by !== null) { + if('form' === 'form' && is_array($order_by)) { + foreach($order_by as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$orderBy'] = $order_by; + } + } + + // header params + $headerParams['avalara-version'] = '1.2'; + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + $headerParams['avalara-version'] = '1.2'; + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + $headerParams['avalara-version'] = '1.2'; + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->client->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + +} + /** + * Represents the Request object for the BatchSearchParticipants API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param string $name The human readable name given to this batch search. (required) + * @param string $notification_email The email address of the user to whom the batch search completion notification must go to. (required) + * @param \SplFileObject $file CSV file containing search parameters. (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ +class BatchSearchParticipantsRequest { + private $avalara_version; + private $name; + private $notification_email; + private $file; + private $x_avalara_client; + private $x_correlation_id; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getName() { + return $this->name; + } + + public function setName($name) { + $this->name = $name; + } + public function getNotificationEmail() { + return $this->notification_email; + } + + public function setNotificationEmail($notification_email) { + $this->notification_email = $notification_email; + } + public function getFile() { + return $this->file; + } + + public function setFile($file) { + $this->file = $file; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } +} + + /** + * Represents the Request object for the DownloadBatchSearchReport API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param string $id The ID of the batch search whose report is to be downloaded. (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ +class DownloadBatchSearchReportRequest { + private $avalara_version; + private $id; + private $x_avalara_client; + private $x_correlation_id; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getId() { + return $this->id; + } + + public function setId($id) { + $this->id = $id; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } +} + + /** + * Represents the Request object for the GetBatchSearchDetail API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param string $id The ID of the batch search that was submitted earlier. (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ +class GetBatchSearchDetailRequest { + private $avalara_version; + private $id; + private $x_avalara_client; + private $x_correlation_id; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getId() { + return $this->id; + } + + public function setId($id) { + $this->id = $id; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } +} + + /** + * Represents the Request object for the ListBatchSearches API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param string $filter Filter by field name and value. This filter only supports <code>eq</code> .The parameters supported is <code>name</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. (optional) + * @param bool $count When set to true, the count of the collection is included as @recordSetCount in the response body. (optional) + * @param string $top If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. (optional) + * @param string $skip If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. (optional) + * @param string $order_by The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ +class ListBatchSearchesRequest { + private $avalara_version; + private $x_avalara_client; + private $filter; + private $count; + private $top; + private $skip; + private $order_by; + private $x_correlation_id; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getFilter() { + return $this->filter; + } + + public function setFilter($filter) { + $this->filter = $filter; + } + public function getCount() { + return $this->count; + } + + public function setCount($count) { + $this->count = $count; + } + public function getTop() { + return $this->top; + } + + public function setTop($top) { + $this->top = $top; + } + public function getSkip() { + return $this->skip; + } + + public function setSkip($skip) { + $this->skip = $skip; + } + public function getOrderBy() { + return $this->order_by; + } + + public function setOrderBy($order_by) { + $this->order_by = $order_by; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } +} + + /** + * Represents the Request object for the SearchParticipants API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param string $search Search by value supports logical AND and OR. Refer to [https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search) for more information on search. Search will be done over <code>name</code> and <code>identifier</code> parameters only. (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param bool $count When set to true, the count of the collection is included as @recordSetCount in the response body. (optional) + * @param string $filter Filter by field name and value. This filter only supports <code>eq</code> .The parameters supported are <code>network</code>, <code>country</code>, <code>documentType</code>, <code>idType</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. (optional) + * @param string $top If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. (optional) + * @param string $skip If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. (optional) + * @param string $order_by The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ +class SearchParticipantsRequest { + private $avalara_version; + private $search; + private $x_avalara_client; + private $count; + private $filter; + private $top; + private $skip; + private $order_by; + private $x_correlation_id; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getSearch() { + return $this->search; + } + + public function setSearch($search) { + $this->search = $search; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getCount() { + return $this->count; + } + + public function setCount($count) { + $this->count = $count; + } + public function getFilter() { + return $this->filter; + } + + public function setFilter($filter) { + $this->filter = $filter; + } + public function getTop() { + return $this->top; + } + + public function setTop($top) { + $this->top = $top; + } + public function getSkip() { + return $this->skip; + } + + public function setSkip($skip) { + $this->skip = $skip; + } + public function getOrderBy() { + return $this->order_by; + } + + public function setOrderBy($order_by) { + $this->order_by = $order_by; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } +} + diff --git a/lib/Model/EInvoicing/V1/BadDownloadRequest.php b/lib/Model/EInvoicing/V1/BadDownloadRequest.php index d0f0fcb..48914c1 100644 --- a/lib/Model/EInvoicing/V1/BadDownloadRequest.php +++ b/lib/Model/EInvoicing/V1/BadDownloadRequest.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * BadDownloadRequest Class Doc Comment * * @category Class * @description Returns an HTTP status code and message for a 'bad request' - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/BadRequest.php b/lib/Model/EInvoicing/V1/BadRequest.php index b55b7df..ac62c4f 100644 --- a/lib/Model/EInvoicing/V1/BadRequest.php +++ b/lib/Model/EInvoicing/V1/BadRequest.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * BadRequest Class Doc Comment * * @category Class * @description Returns an HTTP status code and message for a 'bad request' - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/BatchSearch.php b/lib/Model/EInvoicing/V1/BatchSearch.php new file mode 100644 index 0000000..eccf437 --- /dev/null +++ b/lib/Model/EInvoicing/V1/BatchSearch.php @@ -0,0 +1,551 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * BatchSearch Class Doc Comment + * + * @category Class + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class BatchSearch implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BatchSearch'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'name' => 'string', + 'created_by' => 'string', + 'created' => '\DateTime', + 'last_modified' => '\DateTime', + 'status' => 'string', + 'error' => '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'name' => null, + 'created_by' => null, + 'created' => 'date-time', + 'last_modified' => 'date-time', + 'status' => null, + 'error' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'created_by' => 'createdBy', + 'created' => 'created', + 'last_modified' => 'lastModified', + 'status' => 'status', + 'error' => 'error' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'created_by' => 'setCreatedBy', + 'created' => 'setCreated', + 'last_modified' => 'setLastModified', + 'status' => 'setStatus', + 'error' => 'setError' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'created_by' => 'getCreatedBy', + 'created' => 'getCreated', + 'last_modified' => 'getLastModified', + 'status' => 'getStatus', + 'error' => 'getError' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const STATUS_ACCEPTED = 'Accepted'; + const STATUS_RUNNING = 'Running'; + const STATUS_COMPLETED = 'Completed'; + const STATUS_FAILED = 'Failed'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_ACCEPTED, + self::STATUS_RUNNING, + self::STATUS_COMPLETED, + self::STATUS_FAILED, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['name'] = $data['name'] ?? null; + $this->container['created_by'] = $data['created_by'] ?? null; + $this->container['created'] = $data['created'] ?? null; + $this->container['last_modified'] = $data['last_modified'] ?? null; + $this->container['status'] = $data['status'] ?? null; + $this->container['error'] = $data['error'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id ID of the batch search + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name of the batch report + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets created_by + * + * @return string|null + */ + public function getCreatedBy() + { + return $this->container['created_by']; + } + + /** + * Sets created_by + * + * @param string|null $created_by Email of the user who created the batch search + * + * @return self + */ + public function setCreatedBy($created_by) + { + $this->container['created_by'] = $created_by; + + return $this; + } + + /** + * Gets created + * + * @return \DateTime|null + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime|null $created Timestamp when the batch search was created + * + * @return self + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets last_modified + * + * @return \DateTime|null + */ + public function getLastModified() + { + return $this->container['last_modified']; + } + + /** + * Sets last_modified + * + * @param \DateTime|null $last_modified Timestamp when the batch search was created + * + * @return self + */ + public function setLastModified($last_modified) + { + $this->container['last_modified'] = $last_modified; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status Status of the batch search + * + * @return self + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($status) && !in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets error + * + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|null + */ + public function getError() + { + return $this->container['error']; + } + + /** + * Sets error + * + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|null $error error + * + * @return self + */ + public function setError($error) + { + $this->container['error'] = $error; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/BatchSearchListResponse.php b/lib/Model/EInvoicing/V1/BatchSearchListResponse.php new file mode 100644 index 0000000..ca6435b --- /dev/null +++ b/lib/Model/EInvoicing/V1/BatchSearchListResponse.php @@ -0,0 +1,394 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * BatchSearchListResponse Class Doc Comment + * + * @category Class + * @description Schema for batch search list + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class BatchSearchListResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BatchSearchListResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'at_record_set_count' => 'int', + 'at_next_link' => 'string', + 'value' => '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'at_record_set_count' => 'int32', + 'at_next_link' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'at_record_set_count' => '@recordSetCount', + 'at_next_link' => '@nextLink', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'at_record_set_count' => 'setAtRecordSetCount', + 'at_next_link' => 'setAtNextLink', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'at_record_set_count' => 'getAtRecordSetCount', + 'at_next_link' => 'getAtNextLink', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['at_record_set_count'] = $data['at_record_set_count'] ?? null; + $this->container['at_next_link'] = $data['at_next_link'] ?? null; + $this->container['value'] = $data['value'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets at_record_set_count + * + * @return int|null + */ + public function getAtRecordSetCount() + { + return $this->container['at_record_set_count']; + } + + /** + * Sets at_record_set_count + * + * @param int|null $at_record_set_count The count of records in the result set + * + * @return self + */ + public function setAtRecordSetCount($at_record_set_count) + { + $this->container['at_record_set_count'] = $at_record_set_count; + + return $this; + } + + /** + * Gets at_next_link + * + * @return string|null + */ + public function getAtNextLink() + { + return $this->container['at_next_link']; + } + + /** + * Sets at_next_link + * + * @param string|null $at_next_link Next Link + * + * @return self + */ + public function setAtNextLink($at_next_link) + { + $this->container['at_next_link'] = $at_next_link; + + return $this; + } + + /** + * Gets value + * + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch[]|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch[]|null $value value + * + * @return self + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/ConditionalForField.php b/lib/Model/EInvoicing/V1/ConditionalForField.php index d389ebc..2d5d030 100644 --- a/lib/Model/EInvoicing/V1/ConditionalForField.php +++ b/lib/Model/EInvoicing/V1/ConditionalForField.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * ConditionalForField Class Doc Comment * * @category Class * @description Mandates for which this field is conditional - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -74,7 +74,7 @@ class ConditionalForField implements ModelInterface, ArrayAccess, \JsonSerializa */ protected static $openAPITypes = [ 'country_mandate' => 'string', - 'required_when' => '\Avalara\SDK\Model\EInvoicing\V1\RequiredWhenField[]' + 'required_when' => '\Avalara\\SDK\Model\\EInvoicing\\V1\RequiredWhenField[]' ]; /** @@ -252,7 +252,7 @@ public function setCountryMandate($country_mandate) /** * Gets required_when * - * @return \Avalara\SDK\Model\EInvoicing\V1\RequiredWhenField[]|null + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\RequiredWhenField[]|null */ public function getRequiredWhen() { @@ -262,7 +262,7 @@ public function getRequiredWhen() /** * Sets required_when * - * @param \Avalara\SDK\Model\EInvoicing\V1\RequiredWhenField[]|null $required_when Array of scenarios which describe when a particular field is conditional for a country mandate + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\RequiredWhenField[]|null $required_when Array of scenarios which describe when a particular field is conditional for a country mandate * * @return self */ diff --git a/lib/Model/EInvoicing/V1/DataInputField.php b/lib/Model/EInvoicing/V1/DataInputField.php index d04b20b..b4fbe59 100644 --- a/lib/Model/EInvoicing/V1/DataInputField.php +++ b/lib/Model/EInvoicing/V1/DataInputField.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * DataInputField Class Doc Comment * * @category Class * @description The Data Input Field - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -77,17 +77,17 @@ class DataInputField implements ModelInterface, ArrayAccess, \JsonSerializable 'field_id' => 'string', 'applicable_document_roots' => 'object[]', 'path' => 'string', - 'name_space' => 'string', + 'namespace' => 'string', 'field_name' => 'string', 'example_or_fixed_value' => 'string', 'accepted_values' => 'object', 'documentation_link' => 'string', 'description' => 'string', 'is_segment' => 'bool', - 'required_for' => '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldRequiredFor', - 'conditional_for' => '\Avalara\SDK\Model\EInvoicing\V1\ConditionalForField[]', - 'not_used_for' => '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldNotUsedFor', - 'optional_for' => '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldOptionalFor' + 'required_for' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldRequiredFor', + 'conditional_for' => '\Avalara\\SDK\Model\\EInvoicing\\V1\ConditionalForField[]', + 'not_used_for' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldNotUsedFor', + 'optional_for' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldOptionalFor' ]; /** @@ -102,7 +102,7 @@ class DataInputField implements ModelInterface, ArrayAccess, \JsonSerializable 'field_id' => null, 'applicable_document_roots' => null, 'path' => null, - 'name_space' => null, + 'namespace' => null, 'field_name' => null, 'example_or_fixed_value' => null, 'accepted_values' => null, @@ -146,7 +146,7 @@ public static function openAPIFormats() 'field_id' => 'fieldId', 'applicable_document_roots' => 'applicableDocumentRoots', 'path' => 'path', - 'name_space' => 'nameSpace', + 'namespace' => 'namespace', 'field_name' => 'fieldName', 'example_or_fixed_value' => 'exampleOrFixedValue', 'accepted_values' => 'acceptedValues', @@ -169,7 +169,7 @@ public static function openAPIFormats() 'field_id' => 'setFieldId', 'applicable_document_roots' => 'setApplicableDocumentRoots', 'path' => 'setPath', - 'name_space' => 'setNameSpace', + 'namespace' => 'setNamespace', 'field_name' => 'setFieldName', 'example_or_fixed_value' => 'setExampleOrFixedValue', 'accepted_values' => 'setAcceptedValues', @@ -192,7 +192,7 @@ public static function openAPIFormats() 'field_id' => 'getFieldId', 'applicable_document_roots' => 'getApplicableDocumentRoots', 'path' => 'getPath', - 'name_space' => 'getNameSpace', + 'namespace' => 'getNamespace', 'field_name' => 'getFieldName', 'example_or_fixed_value' => 'getExampleOrFixedValue', 'accepted_values' => 'getAcceptedValues', @@ -266,7 +266,7 @@ public function __construct(array $data = null) $this->container['field_id'] = $data['field_id'] ?? null; $this->container['applicable_document_roots'] = $data['applicable_document_roots'] ?? null; $this->container['path'] = $data['path'] ?? null; - $this->container['name_space'] = $data['name_space'] ?? null; + $this->container['namespace'] = $data['namespace'] ?? null; $this->container['field_name'] = $data['field_name'] ?? null; $this->container['example_or_fixed_value'] = $data['example_or_fixed_value'] ?? null; $this->container['accepted_values'] = $data['accepted_values'] ?? null; @@ -400,25 +400,25 @@ public function setPath($path) } /** - * Gets name_space + * Gets namespace * * @return string|null */ - public function getNameSpace() + public function getNamespace() { - return $this->container['name_space']; + return $this->container['namespace']; } /** - * Sets name_space + * Sets namespace * - * @param string|null $name_space Namespace of this field + * @param string|null $namespace Namespace of this field * * @return self */ - public function setNameSpace($name_space) + public function setNamespace($namespace) { - $this->container['name_space'] = $name_space; + $this->container['namespace'] = $namespace; return $this; } @@ -570,7 +570,7 @@ public function setIsSegment($is_segment) /** * Gets required_for * - * @return \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldRequiredFor|null + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldRequiredFor|null */ public function getRequiredFor() { @@ -580,7 +580,7 @@ public function getRequiredFor() /** * Sets required_for * - * @param \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldRequiredFor|null $required_for required_for + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldRequiredFor|null $required_for required_for * * @return self */ @@ -594,7 +594,7 @@ public function setRequiredFor($required_for) /** * Gets conditional_for * - * @return \Avalara\SDK\Model\EInvoicing\V1\ConditionalForField[]|null + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\ConditionalForField[]|null */ public function getConditionalFor() { @@ -604,7 +604,7 @@ public function getConditionalFor() /** * Sets conditional_for * - * @param \Avalara\SDK\Model\EInvoicing\V1\ConditionalForField[]|null $conditional_for conditional_for + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\ConditionalForField[]|null $conditional_for conditional_for * * @return self */ @@ -618,7 +618,7 @@ public function setConditionalFor($conditional_for) /** * Gets not_used_for * - * @return \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldNotUsedFor|null + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldNotUsedFor|null */ public function getNotUsedFor() { @@ -628,7 +628,7 @@ public function getNotUsedFor() /** * Sets not_used_for * - * @param \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldNotUsedFor|null $not_used_for not_used_for + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldNotUsedFor|null $not_used_for not_used_for * * @return self */ @@ -642,7 +642,7 @@ public function setNotUsedFor($not_used_for) /** * Gets optional_for * - * @return \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldOptionalFor|null + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldOptionalFor|null */ public function getOptionalFor() { @@ -652,7 +652,7 @@ public function getOptionalFor() /** * Sets optional_for * - * @param \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldOptionalFor|null $optional_for optional_for + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldOptionalFor|null $optional_for optional_for * * @return self */ diff --git a/lib/Model/EInvoicing/V1/DataInputFieldNotUsedFor.php b/lib/Model/EInvoicing/V1/DataInputFieldNotUsedFor.php index ec227d8..faaa9dc 100644 --- a/lib/Model/EInvoicing/V1/DataInputFieldNotUsedFor.php +++ b/lib/Model/EInvoicing/V1/DataInputFieldNotUsedFor.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * DataInputFieldNotUsedFor Class Doc Comment * * @category Class * @description Array of CountryMandate names for which this field is not used. - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DataInputFieldOptionalFor.php b/lib/Model/EInvoicing/V1/DataInputFieldOptionalFor.php index ac50908..d03c56a 100644 --- a/lib/Model/EInvoicing/V1/DataInputFieldOptionalFor.php +++ b/lib/Model/EInvoicing/V1/DataInputFieldOptionalFor.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * DataInputFieldOptionalFor Class Doc Comment * * @category Class * @description Array of CountryMandate names for which this field is optional. - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DataInputFieldRequiredFor.php b/lib/Model/EInvoicing/V1/DataInputFieldRequiredFor.php index c53a42e..c8a666c 100644 --- a/lib/Model/EInvoicing/V1/DataInputFieldRequiredFor.php +++ b/lib/Model/EInvoicing/V1/DataInputFieldRequiredFor.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * DataInputFieldRequiredFor Class Doc Comment * * @category Class * @description Array of CountryMandate names for which this field is required. - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DataInputFieldsResponse.php b/lib/Model/EInvoicing/V1/DataInputFieldsResponse.php index 6264460..e50e02b 100644 --- a/lib/Model/EInvoicing/V1/DataInputFieldsResponse.php +++ b/lib/Model/EInvoicing/V1/DataInputFieldsResponse.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,16 +39,16 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * DataInputFieldsResponse Class Doc Comment * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -72,9 +72,9 @@ class DataInputFieldsResponse implements ModelInterface, ArrayAccess, \JsonSeria * @var string[] */ protected static $openAPITypes = [ - 'at_record_set_count' => 'float', + 'at_recordset_count' => 'float', 'at_next_link' => 'string', - 'value' => '\Avalara\SDK\Model\EInvoicing\V1\DataInputField[]' + 'value' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputField[]' ]; /** @@ -85,7 +85,7 @@ class DataInputFieldsResponse implements ModelInterface, ArrayAccess, \JsonSeria * @psalm-var array */ protected static $openAPIFormats = [ - 'at_record_set_count' => null, + 'at_recordset_count' => null, 'at_next_link' => null, 'value' => null ]; @@ -117,7 +117,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'at_record_set_count' => '@recordSetCount', + 'at_recordset_count' => '@recordsetCount', 'at_next_link' => '@nextLink', 'value' => 'value' ]; @@ -128,7 +128,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'at_record_set_count' => 'setAtRecordSetCount', + 'at_recordset_count' => 'setAtRecordsetCount', 'at_next_link' => 'setAtNextLink', 'value' => 'setValue' ]; @@ -139,7 +139,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'at_record_set_count' => 'getAtRecordSetCount', + 'at_recordset_count' => 'getAtRecordsetCount', 'at_next_link' => 'getAtNextLink', 'value' => 'getValue' ]; @@ -201,7 +201,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['at_record_set_count'] = $data['at_record_set_count'] ?? null; + $this->container['at_recordset_count'] = $data['at_recordset_count'] ?? null; $this->container['at_next_link'] = $data['at_next_link'] ?? null; $this->container['value'] = $data['value'] ?? null; } @@ -231,25 +231,25 @@ public function valid() /** - * Gets at_record_set_count + * Gets at_recordset_count * * @return float|null */ - public function getAtRecordSetCount() + public function getAtRecordsetCount() { - return $this->container['at_record_set_count']; + return $this->container['at_recordset_count']; } /** - * Sets at_record_set_count + * Sets at_recordset_count * - * @param float|null $at_record_set_count Total count of results + * @param float|null $at_recordset_count Total count of results * * @return self */ - public function setAtRecordSetCount($at_record_set_count) + public function setAtRecordsetCount($at_recordset_count) { - $this->container['at_record_set_count'] = $at_record_set_count; + $this->container['at_recordset_count'] = $at_recordset_count; return $this; } @@ -281,7 +281,7 @@ public function setAtNextLink($at_next_link) /** * Gets value * - * @return \Avalara\SDK\Model\EInvoicing\V1\DataInputField[]|null + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputField[]|null */ public function getValue() { @@ -291,7 +291,7 @@ public function getValue() /** * Sets value * - * @param \Avalara\SDK\Model\EInvoicing\V1\DataInputField[]|null $value Array of Data Input Fields + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputField[]|null $value Array of Data Input Fields * * @return self */ diff --git a/lib/Model/EInvoicing/V1/DirectorySearchResponse.php b/lib/Model/EInvoicing/V1/DirectorySearchResponse.php new file mode 100644 index 0000000..ee9c4b6 --- /dev/null +++ b/lib/Model/EInvoicing/V1/DirectorySearchResponse.php @@ -0,0 +1,394 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * DirectorySearchResponse Class Doc Comment + * + * @category Class + * @description Response schema for directory search results + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class DirectorySearchResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DirectorySearchResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'at_record_set_count' => 'int', + 'at_next_link' => 'string', + 'value' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'at_record_set_count' => 'int32', + 'at_next_link' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'at_record_set_count' => '@recordSetCount', + 'at_next_link' => '@nextLink', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'at_record_set_count' => 'setAtRecordSetCount', + 'at_next_link' => 'setAtNextLink', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'at_record_set_count' => 'getAtRecordSetCount', + 'at_next_link' => 'getAtNextLink', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['at_record_set_count'] = $data['at_record_set_count'] ?? null; + $this->container['at_next_link'] = $data['at_next_link'] ?? null; + $this->container['value'] = $data['value'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets at_record_set_count + * + * @return int|null + */ + public function getAtRecordSetCount() + { + return $this->container['at_record_set_count']; + } + + /** + * Sets at_record_set_count + * + * @param int|null $at_record_set_count The count of records in the result set + * + * @return self + */ + public function setAtRecordSetCount($at_record_set_count) + { + $this->container['at_record_set_count'] = $at_record_set_count; + + return $this; + } + + /** + * Gets at_next_link + * + * @return string|null + */ + public function getAtNextLink() + { + return $this->container['at_next_link']; + } + + /** + * Sets at_next_link + * + * @param string|null $at_next_link The next page link to get the next set of results. + * + * @return self + */ + public function setAtNextLink($at_next_link) + { + $this->container['at_next_link'] = $at_next_link; + + return $this; + } + + /** + * Gets value + * + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInner[]|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInner[]|null $value value + * + * @return self + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInner.php b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInner.php new file mode 100644 index 0000000..52a9456 --- /dev/null +++ b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInner.php @@ -0,0 +1,513 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * DirectorySearchResponseValueInner Class Doc Comment + * + * @category Class + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class DirectorySearchResponseValueInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DirectorySearchResponse_value_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'name' => 'string', + 'network' => 'string', + 'registration_date' => '\DateTime', + 'identifiers' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerIdentifiersInner[]', + 'addresses' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerAddressesInner[]', + 'supported_document_types' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'name' => null, + 'network' => null, + 'registration_date' => 'date', + 'identifiers' => null, + 'addresses' => null, + 'supported_document_types' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'network' => 'network', + 'registration_date' => 'registrationDate', + 'identifiers' => 'identifiers', + 'addresses' => 'addresses', + 'supported_document_types' => 'supportedDocumentTypes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'network' => 'setNetwork', + 'registration_date' => 'setRegistrationDate', + 'identifiers' => 'setIdentifiers', + 'addresses' => 'setAddresses', + 'supported_document_types' => 'setSupportedDocumentTypes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'network' => 'getNetwork', + 'registration_date' => 'getRegistrationDate', + 'identifiers' => 'getIdentifiers', + 'addresses' => 'getAddresses', + 'supported_document_types' => 'getSupportedDocumentTypes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['name'] = $data['name'] ?? null; + $this->container['network'] = $data['network'] ?? null; + $this->container['registration_date'] = $data['registration_date'] ?? null; + $this->container['identifiers'] = $data['identifiers'] ?? null; + $this->container['addresses'] = $data['addresses'] ?? null; + $this->container['supported_document_types'] = $data['supported_document_types'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Avalara unique ID of the participant in the directory. + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name of the participant (typically, the name of the business entity). + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets network + * + * @return string|null + */ + public function getNetwork() + { + return $this->container['network']; + } + + /** + * Sets network + * + * @param string|null $network The network where the participant is present. + * + * @return self + */ + public function setNetwork($network) + { + $this->container['network'] = $network; + + return $this; + } + + /** + * Gets registration_date + * + * @return \DateTime|null + */ + public function getRegistrationDate() + { + return $this->container['registration_date']; + } + + /** + * Sets registration_date + * + * @param \DateTime|null $registration_date Registration date of the participant if available + * + * @return self + */ + public function setRegistrationDate($registration_date) + { + $this->container['registration_date'] = $registration_date; + + return $this; + } + + /** + * Gets identifiers + * + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerIdentifiersInner[]|null + */ + public function getIdentifiers() + { + return $this->container['identifiers']; + } + + /** + * Sets identifiers + * + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerIdentifiersInner[]|null $identifiers identifiers + * + * @return self + */ + public function setIdentifiers($identifiers) + { + $this->container['identifiers'] = $identifiers; + + return $this; + } + + /** + * Gets addresses + * + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerAddressesInner[]|null + */ + public function getAddresses() + { + return $this->container['addresses']; + } + + /** + * Sets addresses + * + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerAddressesInner[]|null $addresses addresses + * + * @return self + */ + public function setAddresses($addresses) + { + $this->container['addresses'] = $addresses; + + return $this; + } + + /** + * Gets supported_document_types + * + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner[]|null + */ + public function getSupportedDocumentTypes() + { + return $this->container['supported_document_types']; + } + + /** + * Sets supported_document_types + * + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner[]|null $supported_document_types supported_document_types + * + * @return self + */ + public function setSupportedDocumentTypes($supported_document_types) + { + $this->container['supported_document_types'] = $supported_document_types; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.php b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.php new file mode 100644 index 0000000..21576b1 --- /dev/null +++ b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.php @@ -0,0 +1,453 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * DirectorySearchResponseValueInnerAddressesInner Class Doc Comment + * + * @category Class + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class DirectorySearchResponseValueInnerAddressesInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DirectorySearchResponse_value_inner_addresses_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'line1' => 'string', + 'line2' => 'string', + 'city' => 'string', + 'state' => 'string', + 'country' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'line1' => null, + 'line2' => null, + 'city' => null, + 'state' => null, + 'country' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'line1' => 'line1', + 'line2' => 'line2', + 'city' => 'city', + 'state' => 'state', + 'country' => 'country' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'line1' => 'setLine1', + 'line2' => 'setLine2', + 'city' => 'setCity', + 'state' => 'setState', + 'country' => 'setCountry' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'line1' => 'getLine1', + 'line2' => 'getLine2', + 'city' => 'getCity', + 'state' => 'getState', + 'country' => 'getCountry' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['line1'] = $data['line1'] ?? null; + $this->container['line2'] = $data['line2'] ?? null; + $this->container['city'] = $data['city'] ?? null; + $this->container['state'] = $data['state'] ?? null; + $this->container['country'] = $data['country'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets line1 + * + * @return string|null + */ + public function getLine1() + { + return $this->container['line1']; + } + + /** + * Sets line1 + * + * @param string|null $line1 Address line 1 + * + * @return self + */ + public function setLine1($line1) + { + $this->container['line1'] = $line1; + + return $this; + } + + /** + * Gets line2 + * + * @return string|null + */ + public function getLine2() + { + return $this->container['line2']; + } + + /** + * Sets line2 + * + * @param string|null $line2 Address line 2 + * + * @return self + */ + public function setLine2($line2) + { + $this->container['line2'] = $line2; + + return $this; + } + + /** + * Gets city + * + * @return string|null + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city City + * + * @return self + */ + public function setCity($city) + { + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets state + * + * @return string|null + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string|null $state State + * + * @return self + */ + public function setState($state) + { + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets country + * + * @return string|null + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string|null $country Country + * + * @return self + */ + public function setCountry($country) + { + $this->container['country'] = $country; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.php b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.php new file mode 100644 index 0000000..2548dd7 --- /dev/null +++ b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.php @@ -0,0 +1,363 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * DirectorySearchResponseValueInnerIdentifiersInner Class Doc Comment + * + * @category Class + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class DirectorySearchResponseValueInnerIdentifiersInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DirectorySearchResponse_value_inner_identifiers_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = $data['name'] ?? null; + $this->container['value'] = $data['value'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Peppol Participant ID if the participant is in Peppol network + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets value + * + * @return string|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string|null $value Value of the identifier + * + * @return self + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.php b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.php new file mode 100644 index 0000000..258a188 --- /dev/null +++ b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.php @@ -0,0 +1,423 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * DirectorySearchResponseValueInnerSupportedDocumentTypesInner Class Doc Comment + * + * @category Class + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class DirectorySearchResponseValueInnerSupportedDocumentTypesInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DirectorySearchResponse_value_inner_supportedDocumentTypes_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'value' => 'string', + 'supported_by_trading_partner' => 'bool', + 'supported_by_avalara' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null, + 'value' => null, + 'supported_by_trading_partner' => null, + 'supported_by_avalara' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'value' => 'value', + 'supported_by_trading_partner' => 'supportedByTradingPartner', + 'supported_by_avalara' => 'supportedByAvalara' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'value' => 'setValue', + 'supported_by_trading_partner' => 'setSupportedByTradingPartner', + 'supported_by_avalara' => 'setSupportedByAvalara' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'value' => 'getValue', + 'supported_by_trading_partner' => 'getSupportedByTradingPartner', + 'supported_by_avalara' => 'getSupportedByAvalara' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = $data['name'] ?? null; + $this->container['value'] = $data['value'] ?? null; + $this->container['supported_by_trading_partner'] = $data['supported_by_trading_partner'] ?? null; + $this->container['supported_by_avalara'] = $data['supported_by_avalara'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Document type name. + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets value + * + * @return string|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string|null $value Document type identifier. + * + * @return self + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets supported_by_trading_partner + * + * @return bool|null + */ + public function getSupportedByTradingPartner() + { + return $this->container['supported_by_trading_partner']; + } + + /** + * Sets supported_by_trading_partner + * + * @param bool|null $supported_by_trading_partner Does trading partner support receiving this document type + * + * @return self + */ + public function setSupportedByTradingPartner($supported_by_trading_partner) + { + $this->container['supported_by_trading_partner'] = $supported_by_trading_partner; + + return $this; + } + + /** + * Gets supported_by_avalara + * + * @return bool|null + */ + public function getSupportedByAvalara() + { + return $this->container['supported_by_avalara']; + } + + /** + * Sets supported_by_avalara + * + * @param bool|null $supported_by_avalara Does avalara support exchanging this document type + * + * @return self + */ + public function setSupportedByAvalara($supported_by_avalara) + { + $this->container['supported_by_avalara'] = $supported_by_avalara; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/DocumentFetch.php b/lib/Model/EInvoicing/V1/DocumentFetch.php new file mode 100644 index 0000000..8a1079e --- /dev/null +++ b/lib/Model/EInvoicing/V1/DocumentFetch.php @@ -0,0 +1,393 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * DocumentFetch Class Doc Comment + * + * @category Class + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class DocumentFetch implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'documentFetch'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'string', + 'status' => 'string', + 'event_date_time' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, + 'status' => null, + 'event_date_time' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'status' => 'status', + 'event_date_time' => 'eventDateTime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'status' => 'setStatus', + 'event_date_time' => 'setEventDateTime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'status' => 'getStatus', + 'event_date_time' => 'getEventDateTime' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['status'] = $data['status'] ?? null; + $this->container['event_date_time'] = $data['event_date_time'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique ID for this document that can be used for status checking and file downloads. This is a UID created by the Avalara E-Invoicing platform. + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status Status of the document + * + * @return self + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets event_date_time + * + * @return string|null + */ + public function getEventDateTime() + { + return $this->container['event_date_time']; + } + + /** + * Sets event_date_time + * + * @param string|null $event_date_time The date and time when the inbound document was accepted by the Avalara E-Invoicing Platform + * + * @return self + */ + public function setEventDateTime($event_date_time) + { + $this->container['event_date_time'] = $event_date_time; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/DocumentListResponse.php b/lib/Model/EInvoicing/V1/DocumentListResponse.php index 566ee17..5735b92 100644 --- a/lib/Model/EInvoicing/V1/DocumentListResponse.php +++ b/lib/Model/EInvoicing/V1/DocumentListResponse.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * DocumentListResponse Class Doc Comment * * @category Class * @description Returns the requested list of documents - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -73,9 +73,9 @@ class DocumentListResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openAPITypes = [ - 'at_record_set_count' => 'string', + 'at_recordset_count' => 'string', 'at_next_link' => 'string', - 'value' => '\Avalara\SDK\Model\EInvoicing\V1\DocumentSummary[]' + 'value' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSummary[]' ]; /** @@ -86,7 +86,7 @@ class DocumentListResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ - 'at_record_set_count' => null, + 'at_recordset_count' => null, 'at_next_link' => null, 'value' => null ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'at_record_set_count' => '@recordSetCount', + 'at_recordset_count' => '@recordsetCount', 'at_next_link' => '@nextLink', 'value' => 'value' ]; @@ -129,7 +129,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'at_record_set_count' => 'setAtRecordSetCount', + 'at_recordset_count' => 'setAtRecordsetCount', 'at_next_link' => 'setAtNextLink', 'value' => 'setValue' ]; @@ -140,7 +140,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'at_record_set_count' => 'getAtRecordSetCount', + 'at_recordset_count' => 'getAtRecordsetCount', 'at_next_link' => 'getAtNextLink', 'value' => 'getValue' ]; @@ -202,7 +202,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['at_record_set_count'] = $data['at_record_set_count'] ?? null; + $this->container['at_recordset_count'] = $data['at_recordset_count'] ?? null; $this->container['at_next_link'] = $data['at_next_link'] ?? null; $this->container['value'] = $data['value'] ?? null; } @@ -235,25 +235,25 @@ public function valid() /** - * Gets at_record_set_count + * Gets at_recordset_count * * @return string|null */ - public function getAtRecordSetCount() + public function getAtRecordsetCount() { - return $this->container['at_record_set_count']; + return $this->container['at_recordset_count']; } /** - * Sets at_record_set_count + * Sets at_recordset_count * - * @param string|null $at_record_set_count Count of collections for the given date range + * @param string|null $at_recordset_count Count of collections for the given date range * * @return self */ - public function setAtRecordSetCount($at_record_set_count) + public function setAtRecordsetCount($at_recordset_count) { - $this->container['at_record_set_count'] = $at_record_set_count; + $this->container['at_recordset_count'] = $at_recordset_count; return $this; } @@ -285,7 +285,7 @@ public function setAtNextLink($at_next_link) /** * Gets value * - * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentSummary[] + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSummary[] */ public function getValue() { @@ -295,7 +295,7 @@ public function getValue() /** * Sets value * - * @param \Avalara\SDK\Model\EInvoicing\V1\DocumentSummary[] $value Array of invoices matching query parameters + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSummary[] $value Array of documents matching query parameters * * @return self */ diff --git a/lib/Model/EInvoicing/V1/DocumentStatusResponse.php b/lib/Model/EInvoicing/V1/DocumentStatusResponse.php index f9a21cb..df15beb 100644 --- a/lib/Model/EInvoicing/V1/DocumentStatusResponse.php +++ b/lib/Model/EInvoicing/V1/DocumentStatusResponse.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * DocumentStatusResponse Class Doc Comment * * @category Class * @description Returns the current document ID and status - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -75,7 +75,7 @@ class DocumentStatusResponse implements ModelInterface, ArrayAccess, \JsonSerial protected static $openAPITypes = [ 'id' => 'string', 'status' => 'string', - 'events' => '\Avalara\SDK\Model\EInvoicing\V1\StatusEvent[]' + 'events' => '\Avalara\\SDK\Model\\EInvoicing\\V1\StatusEvent[]' ]; /** @@ -268,7 +268,7 @@ public function getStatus() /** * Sets status * - * @param string|null $status Status of the transaction:
'Pending'
'Failed'
'Complete' + * @param string|null $status Status of the document * * @return self */ @@ -282,7 +282,7 @@ public function setStatus($status) /** * Gets events * - * @return \Avalara\SDK\Model\EInvoicing\V1\StatusEvent[]|null + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\StatusEvent[]|null */ public function getEvents() { @@ -292,7 +292,7 @@ public function getEvents() /** * Sets events * - * @param \Avalara\SDK\Model\EInvoicing\V1\StatusEvent[]|null $events events + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\StatusEvent[]|null $events events * * @return self */ diff --git a/lib/Model/EInvoicing/V1/DocumentSubmissionError.php b/lib/Model/EInvoicing/V1/DocumentSubmissionError.php index a5b8606..fff3da0 100644 --- a/lib/Model/EInvoicing/V1/DocumentSubmissionError.php +++ b/lib/Model/EInvoicing/V1/DocumentSubmissionError.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * DocumentSubmissionError Class Doc Comment * * @category Class * @description Returns an HTTP status code and message for an 'exception' - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DocumentSubmitResponse.php b/lib/Model/EInvoicing/V1/DocumentSubmitResponse.php index 183280e..80d4c70 100644 --- a/lib/Model/EInvoicing/V1/DocumentSubmitResponse.php +++ b/lib/Model/EInvoicing/V1/DocumentSubmitResponse.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * DocumentSubmitResponse Class Doc Comment * * @category Class * @description Returns the unique ID of a successful document submission - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DocumentSummary.php b/lib/Model/EInvoicing/V1/DocumentSummary.php index c62838b..2f16710 100644 --- a/lib/Model/EInvoicing/V1/DocumentSummary.php +++ b/lib/Model/EInvoicing/V1/DocumentSummary.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * DocumentSummary Class Doc Comment * * @category Class * @description Displays a summary of information about the document - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -78,6 +78,8 @@ class DocumentSummary implements ModelInterface, ArrayAccess, \JsonSerializable 'status' => 'string', 'supplier_name' => 'string', 'customer_name' => 'string', + 'document_type' => 'string', + 'document_version' => 'string', 'document_number' => 'string', 'document_date' => 'string', 'flow' => 'string', @@ -100,6 +102,8 @@ class DocumentSummary implements ModelInterface, ArrayAccess, \JsonSerializable 'status' => null, 'supplier_name' => null, 'customer_name' => null, + 'document_type' => null, + 'document_version' => null, 'document_number' => null, 'document_date' => null, 'flow' => null, @@ -141,6 +145,8 @@ public static function openAPIFormats() 'status' => 'status', 'supplier_name' => 'supplierName', 'customer_name' => 'customerName', + 'document_type' => 'documentType', + 'document_version' => 'documentVersion', 'document_number' => 'documentNumber', 'document_date' => 'documentDate', 'flow' => 'flow', @@ -161,6 +167,8 @@ public static function openAPIFormats() 'status' => 'setStatus', 'supplier_name' => 'setSupplierName', 'customer_name' => 'setCustomerName', + 'document_type' => 'setDocumentType', + 'document_version' => 'setDocumentVersion', 'document_number' => 'setDocumentNumber', 'document_date' => 'setDocumentDate', 'flow' => 'setFlow', @@ -181,6 +189,8 @@ public static function openAPIFormats() 'status' => 'getStatus', 'supplier_name' => 'getSupplierName', 'customer_name' => 'getCustomerName', + 'document_type' => 'getDocumentType', + 'document_version' => 'getDocumentVersion', 'document_number' => 'getDocumentNumber', 'document_date' => 'getDocumentDate', 'flow' => 'getFlow', @@ -252,6 +262,8 @@ public function __construct(array $data = null) $this->container['status'] = $data['status'] ?? null; $this->container['supplier_name'] = $data['supplier_name'] ?? null; $this->container['customer_name'] = $data['customer_name'] ?? null; + $this->container['document_type'] = $data['document_type'] ?? null; + $this->container['document_version'] = $data['document_version'] ?? null; $this->container['document_number'] = $data['document_number'] ?? null; $this->container['document_date'] = $data['document_date'] ?? null; $this->container['flow'] = $data['flow'] ?? null; @@ -346,7 +358,7 @@ public function getStatus() /** * Sets status * - * @param string|null $status The transaction status:
'Pending'
'Failed'
'Complete' + * @param string|null $status The Document status * * @return self */ @@ -405,6 +417,54 @@ public function setCustomerName($customer_name) return $this; } + /** + * Gets document_type + * + * @return string|null + */ + public function getDocumentType() + { + return $this->container['document_type']; + } + + /** + * Sets document_type + * + * @param string|null $document_type The document type + * + * @return self + */ + public function setDocumentType($document_type) + { + $this->container['document_type'] = $document_type; + + return $this; + } + + /** + * Gets document_version + * + * @return string|null + */ + public function getDocumentVersion() + { + return $this->container['document_version']; + } + + /** + * Sets document_version + * + * @param string|null $document_version The document version + * + * @return self + */ + public function setDocumentVersion($document_version) + { + $this->container['document_version'] = $document_version; + + return $this; + } + /** * Gets document_number * @@ -418,7 +478,7 @@ public function getDocumentNumber() /** * Sets document_number * - * @param string|null $document_number The invoice document number + * @param string|null $document_number The document number * * @return self */ @@ -442,7 +502,7 @@ public function getDocumentDate() /** * Sets document_date * - * @param string|null $document_date The invoice issue date + * @param string|null $document_date The document issue date * * @return self */ @@ -466,7 +526,7 @@ public function getFlow() /** * Sets flow * - * @param string|null $flow The invoice direction, where issued = `out` and received = `in` + * @param string|null $flow The document direction, where issued = `out` and received = `in` * * @return self */ @@ -490,7 +550,7 @@ public function getCountryCode() /** * Sets country_code * - * @param string|null $country_code The two-letter ISO-3166 country code for the country where the e-invoice is being submitted + * @param string|null $country_code The two-letter ISO-3166 country code for the country where the document is being submitted * * @return self */ @@ -538,7 +598,7 @@ public function getInterface() /** * Sets interface * - * @param string|null $interface The interface where the invoice data is sent + * @param string|null $interface The interface where the document is sent * * @return self */ @@ -562,7 +622,7 @@ public function getReceiver() /** * Sets receiver * - * @param string|null $receiver The invoice recipient based on the interface + * @param string|null $receiver The document recipient based on the interface * * @return self */ diff --git a/lib/Model/EInvoicing/V1/ErrorResponse.php b/lib/Model/EInvoicing/V1/ErrorResponse.php new file mode 100644 index 0000000..91d0c01 --- /dev/null +++ b/lib/Model/EInvoicing/V1/ErrorResponse.php @@ -0,0 +1,423 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * ErrorResponse Class Doc Comment + * + * @category Class + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class ErrorResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ErrorResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'title' => 'string', + 'status' => 'string', + 'detail' => 'string', + 'instance' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'title' => null, + 'status' => null, + 'detail' => null, + 'instance' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'title' => 'title', + 'status' => 'status', + 'detail' => 'detail', + 'instance' => 'instance' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'title' => 'setTitle', + 'status' => 'setStatus', + 'detail' => 'setDetail', + 'instance' => 'setInstance' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'title' => 'getTitle', + 'status' => 'getStatus', + 'detail' => 'getDetail', + 'instance' => 'getInstance' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['title'] = $data['title'] ?? null; + $this->container['status'] = $data['status'] ?? null; + $this->container['detail'] = $data['detail'] ?? null; + $this->container['instance'] = $data['instance'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title title + * + * @return self + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status status + * + * @return self + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets detail + * + * @return string|null + */ + public function getDetail() + { + return $this->container['detail']; + } + + /** + * Sets detail + * + * @param string|null $detail detail + * + * @return self + */ + public function setDetail($detail) + { + $this->container['detail'] = $detail; + + return $this; + } + + /** + * Gets instance + * + * @return string|null + */ + public function getInstance() + { + return $this->container['instance']; + } + + /** + * Sets instance + * + * @param string|null $instance instance + * + * @return self + */ + public function setInstance($instance) + { + $this->container['instance'] = $instance; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/FetchDocumentsRequest.php b/lib/Model/EInvoicing/V1/FetchDocumentsRequest.php new file mode 100644 index 0000000..e6f2ec2 --- /dev/null +++ b/lib/Model/EInvoicing/V1/FetchDocumentsRequest.php @@ -0,0 +1,363 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * FetchDocumentsRequest Class Doc Comment + * + * @category Class + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class FetchDocumentsRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FetchDocuments_request'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestDataInner[]', + 'metadata' => '\Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestMetadata' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null, + 'metadata' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'metadata' => 'metadata' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'metadata' => 'setMetadata' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'metadata' => 'getMetadata' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + $this->container['metadata'] = $data['metadata'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestDataInner[]|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestDataInner[]|null $data Array of key-value pairs used to retrieve inbound documents from the Tax Authority + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets metadata + * + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestMetadata|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestMetadata|null $metadata metadata + * + * @return self + */ + public function setMetadata($metadata) + { + $this->container['metadata'] = $metadata; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/FetchDocumentsRequestDataInner.php b/lib/Model/EInvoicing/V1/FetchDocumentsRequestDataInner.php new file mode 100644 index 0000000..40242b6 --- /dev/null +++ b/lib/Model/EInvoicing/V1/FetchDocumentsRequestDataInner.php @@ -0,0 +1,369 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * FetchDocumentsRequestDataInner Class Doc Comment + * + * @category Class + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class FetchDocumentsRequestDataInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FetchDocuments_request_data_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'key' => 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'key' => 'string', + 'value' => 'string' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'key' => 'key', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'key' => 'setKey', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'key' => 'getKey', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['key'] = $data['key'] ?? null; + $this->container['value'] = $data['value'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['key'] === null) { + $invalidProperties[] = "'key' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets key + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key Descriptor of the identifier + * + * @return self + */ + public function setKey($key) + { + $this->container['key'] = $key; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value Value of the identifier + * + * @return self + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/FetchDocumentsRequestMetadata.php b/lib/Model/EInvoicing/V1/FetchDocumentsRequestMetadata.php new file mode 100644 index 0000000..8a82afe --- /dev/null +++ b/lib/Model/EInvoicing/V1/FetchDocumentsRequestMetadata.php @@ -0,0 +1,468 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * FetchDocumentsRequestMetadata Class Doc Comment + * + * @category Class + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class FetchDocumentsRequestMetadata implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FetchDocuments_request_metadata'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'workflow_id' => 'string', + 'data_format' => 'string', + 'data_format_version' => 'float', + 'country_code' => 'string', + 'country_mandate' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'workflow_id' => 'string', + 'data_format' => 'string', + 'data_format_version' => 'number', + 'country_code' => 'string', + 'country_mandate' => 'string' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'workflow_id' => 'workflowId', + 'data_format' => 'dataFormat', + 'data_format_version' => 'dataFormatVersion', + 'country_code' => 'countryCode', + 'country_mandate' => 'countryMandate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'workflow_id' => 'setWorkflowId', + 'data_format' => 'setDataFormat', + 'data_format_version' => 'setDataFormatVersion', + 'country_code' => 'setCountryCode', + 'country_mandate' => 'setCountryMandate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'workflow_id' => 'getWorkflowId', + 'data_format' => 'getDataFormat', + 'data_format_version' => 'getDataFormatVersion', + 'country_code' => 'getCountryCode', + 'country_mandate' => 'getCountryMandate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['workflow_id'] = $data['workflow_id'] ?? null; + $this->container['data_format'] = $data['data_format'] ?? null; + $this->container['data_format_version'] = $data['data_format_version'] ?? null; + $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['country_mandate'] = $data['country_mandate'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['workflow_id'] === null) { + $invalidProperties[] = "'workflow_id' can't be null"; + } + if ($this->container['data_format'] === null) { + $invalidProperties[] = "'data_format' can't be null"; + } + if ($this->container['data_format_version'] === null) { + $invalidProperties[] = "'data_format_version' can't be null"; + } + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; + } + if ($this->container['country_mandate'] === null) { + $invalidProperties[] = "'country_mandate' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets workflow_id + * + * @return string + */ + public function getWorkflowId() + { + return $this->container['workflow_id']; + } + + /** + * Sets workflow_id + * + * @param string $workflow_id Specifies a unique ID for this workflow. + * + * @return self + */ + public function setWorkflowId($workflow_id) + { + $this->container['workflow_id'] = $workflow_id; + + return $this; + } + + /** + * Gets data_format + * + * @return string + */ + public function getDataFormat() + { + return $this->container['data_format']; + } + + /** + * Sets data_format + * + * @param string $data_format Specifies the data format for this workflow + * + * @return self + */ + public function setDataFormat($data_format) + { + $this->container['data_format'] = $data_format; + + return $this; + } + + /** + * Gets data_format_version + * + * @return float + */ + public function getDataFormatVersion() + { + return $this->container['data_format_version']; + } + + /** + * Sets data_format_version + * + * @param float $data_format_version Specifies the data format version number + * + * @return self + */ + public function setDataFormatVersion($data_format_version) + { + $this->container['data_format_version'] = $data_format_version; + + return $this; + } + + /** + * Gets country_code + * + * @return string + */ + public function getCountryCode() + { + return $this->container['country_code']; + } + + /** + * Sets country_code + * + * @param string $country_code The two-letter ISO-3166 country code for the country for which document is being retrieved + * + * @return self + */ + public function setCountryCode($country_code) + { + $this->container['country_code'] = $country_code; + + return $this; + } + + /** + * Gets country_mandate + * + * @return string + */ + public function getCountryMandate() + { + return $this->container['country_mandate']; + } + + /** + * Sets country_mandate + * + * @param string $country_mandate The e-invoicing mandate for the specified country + * + * @return self + */ + public function setCountryMandate($country_mandate) + { + $this->container['country_mandate'] = $country_mandate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/ForbiddenError.php b/lib/Model/EInvoicing/V1/ForbiddenError.php index 852217b..627c81a 100644 --- a/lib/Model/EInvoicing/V1/ForbiddenError.php +++ b/lib/Model/EInvoicing/V1/ForbiddenError.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * ForbiddenError Class Doc Comment * * @category Class * @description Returns an optional message with a 'forbidden' response - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/InputDataFormats.php b/lib/Model/EInvoicing/V1/InputDataFormats.php index 7bdaf24..1760a0e 100644 --- a/lib/Model/EInvoicing/V1/InputDataFormats.php +++ b/lib/Model/EInvoicing/V1/InputDataFormats.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * InputDataFormats Class Doc Comment * * @category Class * @description Format and version used when inputting the data - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -65,7 +65,7 @@ class InputDataFormats implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'InputDataFormats'; + protected static $openAPIModelName = 'inputDataFormats'; /** * Array of property to type mappings. Used for (de)serialization @@ -238,7 +238,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format Invoice format + * @param string|null $format Document format * * @return self */ diff --git a/lib/Model/EInvoicing/V1/InternalServerError.php b/lib/Model/EInvoicing/V1/InternalServerError.php index b48d933..c4f20ca 100644 --- a/lib/Model/EInvoicing/V1/InternalServerError.php +++ b/lib/Model/EInvoicing/V1/InternalServerError.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * InternalServerError Class Doc Comment * * @category Class * @description Returns an optional message with a 'InternalServerError' response - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/Mandate.php b/lib/Model/EInvoicing/V1/Mandate.php index a3f20f1..e0c8453 100644 --- a/lib/Model/EInvoicing/V1/Mandate.php +++ b/lib/Model/EInvoicing/V1/Mandate.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,16 +39,16 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * Mandate Class Doc Comment * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -78,8 +78,8 @@ class Mandate implements ModelInterface, ArrayAccess, \JsonSerializable 'description' => 'string', 'supported_by_partner_api' => 'bool', 'mandate_format' => 'string', - 'input_data_formats' => '\Avalara\SDK\Model\EInvoicing\V1\InputDataFormats[]', - 'workflow_ids' => '\Avalara\SDK\Model\EInvoicing\V1\WorkflowIds[]' + 'input_data_formats' => '\Avalara\\SDK\Model\\EInvoicing\\V1\InputDataFormats[]', + 'workflow_ids' => '\Avalara\\SDK\Model\\EInvoicing\\V1\WorkflowIds[]' ]; /** @@ -273,7 +273,7 @@ public function getMandateId() /** * Sets mandate_id * - * @param string|null $mandate_id Mandate UUID + * @param string|null $mandate_id The `mandateId` is comprised of the country code, mandate type, and the network or regulation type (for example, AU-B2G-PEPPOL). Keep in mind the following when specifying a `mandateId`. - A country can have multiple mandate types (B2C, B2B, B2G). - A entity/company can opt in for multiple mandates. - A `mandateId` is the combination of country + mandate type + network/regulation. * * @return self */ @@ -297,7 +297,7 @@ public function getCountryMandate() /** * Sets country_mandate * - * @param string|null $country_mandate Country mandate name + * @param string|null $country_mandate **[LEGACY]** This field is retained for backward compatibility. It is recommended to use `mandateId` instead. The `countryMandate` similar to the `mandateId` is comprised of the country code, mandate type, and the network or regulation type (for example, AU-B2G-PEPPOL). * * @return self */ @@ -407,7 +407,7 @@ public function setMandateFormat($mandate_format) /** * Gets input_data_formats * - * @return \Avalara\SDK\Model\EInvoicing\V1\InputDataFormats[]|null + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\InputDataFormats[]|null */ public function getInputDataFormats() { @@ -417,7 +417,7 @@ public function getInputDataFormats() /** * Sets input_data_formats * - * @param \Avalara\SDK\Model\EInvoicing\V1\InputDataFormats[]|null $input_data_formats Format and version used when inputting the data + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\InputDataFormats[]|null $input_data_formats Format and version used when inputting the data * * @return self */ @@ -431,7 +431,7 @@ public function setInputDataFormats($input_data_formats) /** * Gets workflow_ids * - * @return \Avalara\SDK\Model\EInvoicing\V1\WorkflowIds[]|null + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\WorkflowIds[]|null */ public function getWorkflowIds() { @@ -441,7 +441,7 @@ public function getWorkflowIds() /** * Sets workflow_ids * - * @param \Avalara\SDK\Model\EInvoicing\V1\WorkflowIds[]|null $workflow_ids Workflow ID list + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\WorkflowIds[]|null $workflow_ids Workflow ID list * * @return self */ diff --git a/lib/Model/EInvoicing/V1/MandateDataInputField.php b/lib/Model/EInvoicing/V1/MandateDataInputField.php new file mode 100644 index 0000000..be674f4 --- /dev/null +++ b/lib/Model/EInvoicing/V1/MandateDataInputField.php @@ -0,0 +1,724 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * MandateDataInputField Class Doc Comment + * + * @category Class + * @description The Data Input Field + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class MandateDataInputField implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'MandateDataInputField'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'field_id' => 'string', + 'document_type' => 'string', + 'document_version' => 'string', + 'path' => 'string', + 'path_type' => 'string', + 'field_name' => 'string', + 'namespace' => '\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputFieldNamespace', + 'example_or_fixed_value' => 'string', + 'accepted_values' => 'string[]', + 'documentation_link' => 'string', + 'data_type' => 'string', + 'description' => 'string', + 'optionality' => 'string', + 'cardinality' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'field_id' => null, + 'document_type' => null, + 'document_version' => null, + 'path' => null, + 'path_type' => null, + 'field_name' => null, + 'namespace' => null, + 'example_or_fixed_value' => null, + 'accepted_values' => null, + 'documentation_link' => null, + 'data_type' => null, + 'description' => null, + 'optionality' => null, + 'cardinality' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'field_id' => 'fieldId', + 'document_type' => 'documentType', + 'document_version' => 'documentVersion', + 'path' => 'path', + 'path_type' => 'pathType', + 'field_name' => 'fieldName', + 'namespace' => 'namespace', + 'example_or_fixed_value' => 'exampleOrFixedValue', + 'accepted_values' => 'acceptedValues', + 'documentation_link' => 'documentationLink', + 'data_type' => 'dataType', + 'description' => 'description', + 'optionality' => 'optionality', + 'cardinality' => 'cardinality' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'field_id' => 'setFieldId', + 'document_type' => 'setDocumentType', + 'document_version' => 'setDocumentVersion', + 'path' => 'setPath', + 'path_type' => 'setPathType', + 'field_name' => 'setFieldName', + 'namespace' => 'setNamespace', + 'example_or_fixed_value' => 'setExampleOrFixedValue', + 'accepted_values' => 'setAcceptedValues', + 'documentation_link' => 'setDocumentationLink', + 'data_type' => 'setDataType', + 'description' => 'setDescription', + 'optionality' => 'setOptionality', + 'cardinality' => 'setCardinality' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'field_id' => 'getFieldId', + 'document_type' => 'getDocumentType', + 'document_version' => 'getDocumentVersion', + 'path' => 'getPath', + 'path_type' => 'getPathType', + 'field_name' => 'getFieldName', + 'namespace' => 'getNamespace', + 'example_or_fixed_value' => 'getExampleOrFixedValue', + 'accepted_values' => 'getAcceptedValues', + 'documentation_link' => 'getDocumentationLink', + 'data_type' => 'getDataType', + 'description' => 'getDescription', + 'optionality' => 'getOptionality', + 'cardinality' => 'getCardinality' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['field_id'] = $data['field_id'] ?? null; + $this->container['document_type'] = $data['document_type'] ?? null; + $this->container['document_version'] = $data['document_version'] ?? null; + $this->container['path'] = $data['path'] ?? null; + $this->container['path_type'] = $data['path_type'] ?? null; + $this->container['field_name'] = $data['field_name'] ?? null; + $this->container['namespace'] = $data['namespace'] ?? null; + $this->container['example_or_fixed_value'] = $data['example_or_fixed_value'] ?? null; + $this->container['accepted_values'] = $data['accepted_values'] ?? null; + $this->container['documentation_link'] = $data['documentation_link'] ?? null; + $this->container['data_type'] = $data['data_type'] ?? null; + $this->container['description'] = $data['description'] ?? null; + $this->container['optionality'] = $data['optionality'] ?? null; + $this->container['cardinality'] = $data['cardinality'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets field_id + * + * @return string|null + */ + public function getFieldId() + { + return $this->container['field_id']; + } + + /** + * Sets field_id + * + * @param string|null $field_id Field ID + * + * @return self + */ + public function setFieldId($field_id) + { + $this->container['field_id'] = $field_id; + + return $this; + } + + /** + * Gets document_type + * + * @return string|null + */ + public function getDocumentType() + { + return $this->container['document_type']; + } + + /** + * Sets document_type + * + * @param string|null $document_type The document type + * + * @return self + */ + public function setDocumentType($document_type) + { + $this->container['document_type'] = $document_type; + + return $this; + } + + /** + * Gets document_version + * + * @return string|null + */ + public function getDocumentVersion() + { + return $this->container['document_version']; + } + + /** + * Sets document_version + * + * @param string|null $document_version The document version + * + * @return self + */ + public function setDocumentVersion($document_version) + { + $this->container['document_version'] = $document_version; + + return $this; + } + + /** + * Gets path + * + * @return string|null + */ + public function getPath() + { + return $this->container['path']; + } + + /** + * Sets path + * + * @param string|null $path Path to this field + * + * @return self + */ + public function setPath($path) + { + $this->container['path'] = $path; + + return $this; + } + + /** + * Gets path_type + * + * @return string|null + */ + public function getPathType() + { + return $this->container['path_type']; + } + + /** + * Sets path_type + * + * @param string|null $path_type The type of path + * + * @return self + */ + public function setPathType($path_type) + { + $this->container['path_type'] = $path_type; + + return $this; + } + + /** + * Gets field_name + * + * @return string|null + */ + public function getFieldName() + { + return $this->container['field_name']; + } + + /** + * Sets field_name + * + * @param string|null $field_name Field name + * + * @return self + */ + public function setFieldName($field_name) + { + $this->container['field_name'] = $field_name; + + return $this; + } + + /** + * Gets namespace + * + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputFieldNamespace|null + */ + public function getNamespace() + { + return $this->container['namespace']; + } + + /** + * Sets namespace + * + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputFieldNamespace|null $namespace namespace + * + * @return self + */ + public function setNamespace($namespace) + { + $this->container['namespace'] = $namespace; + + return $this; + } + + /** + * Gets example_or_fixed_value + * + * @return string|null + */ + public function getExampleOrFixedValue() + { + return $this->container['example_or_fixed_value']; + } + + /** + * Sets example_or_fixed_value + * + * @param string|null $example_or_fixed_value An example of the content for this field + * + * @return self + */ + public function setExampleOrFixedValue($example_or_fixed_value) + { + $this->container['example_or_fixed_value'] = $example_or_fixed_value; + + return $this; + } + + /** + * Gets accepted_values + * + * @return string[]|null + */ + public function getAcceptedValues() + { + return $this->container['accepted_values']; + } + + /** + * Sets accepted_values + * + * @param string[]|null $accepted_values An Array representing the acceptable values for this field + * + * @return self + */ + public function setAcceptedValues($accepted_values) + { + $this->container['accepted_values'] = $accepted_values; + + return $this; + } + + /** + * Gets documentation_link + * + * @return string|null + */ + public function getDocumentationLink() + { + return $this->container['documentation_link']; + } + + /** + * Sets documentation_link + * + * @param string|null $documentation_link An example of the content for this field + * + * @return self + */ + public function setDocumentationLink($documentation_link) + { + $this->container['documentation_link'] = $documentation_link; + + return $this; + } + + /** + * Gets data_type + * + * @return string|null + */ + public function getDataType() + { + return $this->container['data_type']; + } + + /** + * Sets data_type + * + * @param string|null $data_type The data type of this field. + * + * @return self + */ + public function setDataType($data_type) + { + $this->container['data_type'] = $data_type; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description A description of this field + * + * @return self + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets optionality + * + * @return string|null + */ + public function getOptionality() + { + return $this->container['optionality']; + } + + /** + * Sets optionality + * + * @param string|null $optionality Determines if the field if Required/Conditional/Optional or not required. + * + * @return self + */ + public function setOptionality($optionality) + { + $this->container['optionality'] = $optionality; + + return $this; + } + + /** + * Gets cardinality + * + * @return string|null + */ + public function getCardinality() + { + return $this->container['cardinality']; + } + + /** + * Sets cardinality + * + * @param string|null $cardinality Represents the number of times an element can appear within the document + * + * @return self + */ + public function setCardinality($cardinality) + { + $this->container['cardinality'] = $cardinality; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/MandateDataInputFieldNamespace.php b/lib/Model/EInvoicing/V1/MandateDataInputFieldNamespace.php new file mode 100644 index 0000000..47feffa --- /dev/null +++ b/lib/Model/EInvoicing/V1/MandateDataInputFieldNamespace.php @@ -0,0 +1,364 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * MandateDataInputFieldNamespace Class Doc Comment + * + * @category Class + * @description The namespace of the UBL element + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class MandateDataInputFieldNamespace implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'MandateDataInputField_namespace'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'prefix' => 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'prefix' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'prefix' => 'prefix', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'prefix' => 'setPrefix', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'prefix' => 'getPrefix', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['prefix'] = $data['prefix'] ?? null; + $this->container['value'] = $data['value'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets prefix + * + * @return string|null + */ + public function getPrefix() + { + return $this->container['prefix']; + } + + /** + * Sets prefix + * + * @param string|null $prefix The namespace prefix for the UBL Element + * + * @return self + */ + public function setPrefix($prefix) + { + $this->container['prefix'] = $prefix; + + return $this; + } + + /** + * Gets value + * + * @return string|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string|null $value value + * + * @return self + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/MandatesResponse.php b/lib/Model/EInvoicing/V1/MandatesResponse.php index 0b99253..20b8e0a 100644 --- a/lib/Model/EInvoicing/V1/MandatesResponse.php +++ b/lib/Model/EInvoicing/V1/MandatesResponse.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * MandatesResponse Class Doc Comment * * @category Class * @description Mandate list response schema - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -73,9 +73,9 @@ class MandatesResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'at_record_set_count' => 'float', + 'at_recordset_count' => 'float', 'at_next_link' => 'string', - 'value' => '\Avalara\SDK\Model\EInvoicing\V1\Mandate[]' + 'value' => '\Avalara\\SDK\Model\\EInvoicing\\V1\Mandate[]' ]; /** @@ -86,7 +86,7 @@ class MandatesResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'at_record_set_count' => null, + 'at_recordset_count' => null, 'at_next_link' => null, 'value' => null ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'at_record_set_count' => '@recordSetCount', + 'at_recordset_count' => '@recordsetCount', 'at_next_link' => '@nextLink', 'value' => 'value' ]; @@ -129,7 +129,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'at_record_set_count' => 'setAtRecordSetCount', + 'at_recordset_count' => 'setAtRecordsetCount', 'at_next_link' => 'setAtNextLink', 'value' => 'setValue' ]; @@ -140,7 +140,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'at_record_set_count' => 'getAtRecordSetCount', + 'at_recordset_count' => 'getAtRecordsetCount', 'at_next_link' => 'getAtNextLink', 'value' => 'getValue' ]; @@ -202,7 +202,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['at_record_set_count'] = $data['at_record_set_count'] ?? null; + $this->container['at_recordset_count'] = $data['at_recordset_count'] ?? null; $this->container['at_next_link'] = $data['at_next_link'] ?? null; $this->container['value'] = $data['value'] ?? null; } @@ -232,25 +232,25 @@ public function valid() /** - * Gets at_record_set_count + * Gets at_recordset_count * * @return float|null */ - public function getAtRecordSetCount() + public function getAtRecordsetCount() { - return $this->container['at_record_set_count']; + return $this->container['at_recordset_count']; } /** - * Sets at_record_set_count + * Sets at_recordset_count * - * @param float|null $at_record_set_count Total count of results + * @param float|null $at_recordset_count Total count of results * * @return self */ - public function setAtRecordSetCount($at_record_set_count) + public function setAtRecordsetCount($at_recordset_count) { - $this->container['at_record_set_count'] = $at_record_set_count; + $this->container['at_recordset_count'] = $at_recordset_count; return $this; } @@ -282,7 +282,7 @@ public function setAtNextLink($at_next_link) /** * Gets value * - * @return \Avalara\SDK\Model\EInvoicing\V1\Mandate[]|null + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\Mandate[]|null */ public function getValue() { @@ -292,7 +292,7 @@ public function getValue() /** * Sets value * - * @param \Avalara\SDK\Model\EInvoicing\V1\Mandate[]|null $value Mandates schema + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\Mandate[]|null $value Mandates schema * * @return self */ diff --git a/lib/Model/EInvoicing/V1/ModelInterface.php b/lib/Model/EInvoicing/V1/ModelInterface.php index 44109dd..2b451a4 100644 --- a/lib/Model/EInvoicing/V1/ModelInterface.php +++ b/lib/Model/EInvoicing/V1/ModelInterface.php @@ -5,7 +5,7 @@ * PHP version 7.4 * * @category Class - * @package Avalara\SDK\Model\EInvoicing\V1 + * @package Avalara\\SDK\Model\\EInvoicing\\V1 * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,12 +39,12 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; /** * Interface abstracting model access. * - * @package Avalara\SDK\Model\EInvoicing\V1 + * @package Avalara\\SDK\Model\\EInvoicing\\V1 * @author OpenAPI Generator team */ interface ModelInterface diff --git a/lib/Model/EInvoicing/V1/NotFoundError.php b/lib/Model/EInvoicing/V1/NotFoundError.php index d6211b7..31e635b 100644 --- a/lib/Model/EInvoicing/V1/NotFoundError.php +++ b/lib/Model/EInvoicing/V1/NotFoundError.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * NotFoundError Class Doc Comment * * @category Class * @description Returns an HTTP error code and message for a 'not found' error - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/NotUsedForField.php b/lib/Model/EInvoicing/V1/NotUsedForField.php index d1d23e6..dc8fddb 100644 --- a/lib/Model/EInvoicing/V1/NotUsedForField.php +++ b/lib/Model/EInvoicing/V1/NotUsedForField.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * NotUsedForField Class Doc Comment * * @category Class * @description Mandates for which this field is not used - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/RequiredWhenField.php b/lib/Model/EInvoicing/V1/RequiredWhenField.php index abde239..bef1931 100644 --- a/lib/Model/EInvoicing/V1/RequiredWhenField.php +++ b/lib/Model/EInvoicing/V1/RequiredWhenField.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,16 +39,16 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * RequiredWhenField Class Doc Comment * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/StatusEvent.php b/lib/Model/EInvoicing/V1/StatusEvent.php index 54baaec..8f2cd0e 100644 --- a/lib/Model/EInvoicing/V1/StatusEvent.php +++ b/lib/Model/EInvoicing/V1/StatusEvent.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * StatusEvent Class Doc Comment * * @category Class * @description Displays when a status event occurred - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -74,7 +74,9 @@ class StatusEvent implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'event_date_time' => 'string', - 'message' => 'string' + 'message' => 'string', + 'response_key' => 'string', + 'response_value' => 'string' ]; /** @@ -86,7 +88,9 @@ class StatusEvent implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'event_date_time' => null, - 'message' => null + 'message' => null, + 'response_key' => null, + 'response_value' => null ]; /** @@ -117,7 +121,9 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'event_date_time' => 'eventDateTime', - 'message' => 'message' + 'message' => 'message', + 'response_key' => 'responseKey', + 'response_value' => 'responseValue' ]; /** @@ -127,7 +133,9 @@ public static function openAPIFormats() */ protected static $setters = [ 'event_date_time' => 'setEventDateTime', - 'message' => 'setMessage' + 'message' => 'setMessage', + 'response_key' => 'setResponseKey', + 'response_value' => 'setResponseValue' ]; /** @@ -137,7 +145,9 @@ public static function openAPIFormats() */ protected static $getters = [ 'event_date_time' => 'getEventDateTime', - 'message' => 'getMessage' + 'message' => 'getMessage', + 'response_key' => 'getResponseKey', + 'response_value' => 'getResponseValue' ]; /** @@ -199,6 +209,8 @@ public function __construct(array $data = null) { $this->container['event_date_time'] = $data['event_date_time'] ?? null; $this->container['message'] = $data['message'] ?? null; + $this->container['response_key'] = $data['response_key'] ?? null; + $this->container['response_value'] = $data['response_value'] ?? null; } /** @@ -272,6 +284,54 @@ public function setMessage($message) return $this; } + + /** + * Gets response_key + * + * @return string|null + */ + public function getResponseKey() + { + return $this->container['response_key']; + } + + /** + * Sets response_key + * + * @param string|null $response_key The type of number or acknowledgement returned by the tax authority (if applicable). For example, it could be an identification key, acknowledgement code, or any other relevant identifier. + * + * @return self + */ + public function setResponseKey($response_key) + { + $this->container['response_key'] = $response_key; + + return $this; + } + + /** + * Gets response_value + * + * @return string|null + */ + public function getResponseValue() + { + return $this->container['response_value']; + } + + /** + * Sets response_value + * + * @param string|null $response_value The corresponding value associated with the response key. This value is provided by the tax authority in response to the event. + * + * @return self + */ + public function setResponseValue($response_value) + { + $this->container['response_value'] = $response_value; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/EInvoicing/V1/SubmitDocumentMetadata.php b/lib/Model/EInvoicing/V1/SubmitDocumentMetadata.php index a9c692f..6418373 100644 --- a/lib/Model/EInvoicing/V1/SubmitDocumentMetadata.php +++ b/lib/Model/EInvoicing/V1/SubmitDocumentMetadata.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * SubmitDocumentMetadata Class Doc Comment * * @category Class - * @description Key value pairs of metadata for a document submission. dataFormat can be ubl-invoice or ubl-creditnote: <br><pre>{ \"workflowId\": \"partner-einvoicing\", \"dataFormat\": \"ubl-invoice\", \"dataFormatVersion\": \"2.1\", \"countryCode\": \"SA\", \"countryMandate\": \"SA-Phase1-B2B\" }</pre> <br> - * @package Avalara\SDK + * @description Key value pairs of metadata for a document submission <br><pre>{ \"workflowId\": \"partner-einvoicing\", \"dataFormat\": \"ubl-invoice\", \"dataFormatVersion\": \"2.1\", \"countryCode\": \"SA\", \"countryMandate\": \"SA-Phase1-B2B\" }</pre> <br> + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -343,7 +343,7 @@ public function getCountryCode() /** * Sets country_code * - * @param string $country_code The two-letter ISO-3166 country code for the country where the e-invoice is being submitted + * @param string $country_code The two-letter ISO-3166 country code for the country where the document is being submitted * * @return self */ diff --git a/lib/Model/EInvoicing/V1/SubmitInteropDocument202Response.php b/lib/Model/EInvoicing/V1/SubmitInteropDocument202Response.php new file mode 100644 index 0000000..1c764cd --- /dev/null +++ b/lib/Model/EInvoicing/V1/SubmitInteropDocument202Response.php @@ -0,0 +1,363 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * SubmitInteropDocument202Response Class Doc Comment + * + * @category Class + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class SubmitInteropDocument202Response implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SubmitInteropDocument_202_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'interchange_id' => 'string', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'interchange_id' => null, + 'message' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'interchange_id' => 'interchangeId', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'interchange_id' => 'setInterchangeId', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'interchange_id' => 'getInterchangeId', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['interchange_id'] = $data['interchange_id'] ?? null; + $this->container['message'] = $data['message'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets interchange_id + * + * @return string|null + */ + public function getInterchangeId() + { + return $this->container['interchange_id']; + } + + /** + * Sets interchange_id + * + * @param string|null $interchange_id The unique interchange ID for this submission. + * + * @return self + */ + public function setInterchangeId($interchange_id) + { + $this->container['interchange_id'] = $interchange_id; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message A message indicating that the document has been accepted. + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/WorkflowIds.php b/lib/Model/EInvoicing/V1/WorkflowIds.php index f1be32a..0e8b4cf 100644 --- a/lib/Model/EInvoicing/V1/WorkflowIds.php +++ b/lib/Model/EInvoicing/V1/WorkflowIds.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -23,7 +23,7 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 + * @package Avalara\\SDK\API\\EInvoicing\\V1 * @author Sachin Baijal * @author Jonathan Wenger * @copyright 2004-2022 Avalara, Inc. @@ -39,17 +39,17 @@ * Do not edit the class manually. */ -namespace Avalara\SDK\Model\EInvoicing\V1; +namespace Avalara\\SDK\Model\\EInvoicing\\V1; use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; /** * WorkflowIds Class Doc Comment * * @category Class * @description Workflow ID list - * @package Avalara\SDK + * @package Avalara\\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess From 96076074a4d187e91f355410671386d646bd2570 Mon Sep 17 00:00:00 2001 From: Jonathan Wenger Date: Fri, 20 Dec 2024 09:57:18 -0800 Subject: [PATCH 2/7] Bump PHP version --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 42f607e..3c65f03 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,7 @@ "homepage": "https://openapi-generator.tech" } ], + "version": "24.12.10", "require": { "php": "^7.3 || ^8.0", "ext-curl": "*", From 41912d2a296cff41aee35be21bf8be534a278a27 Mon Sep 17 00:00:00 2001 From: Jonathan Wenger Date: Fri, 20 Dec 2024 10:06:16 -0800 Subject: [PATCH 3/7] Remove version. --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 3c65f03..42f607e 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,6 @@ "homepage": "https://openapi-generator.tech" } ], - "version": "24.12.10", "require": { "php": "^7.3 || ^8.0", "ext-curl": "*", From 998367928d9e2a156e4b9a37f281d3e10faa4144 Mon Sep 17 00:00:00 2001 From: Jonathan Wenger Date: Fri, 20 Dec 2024 14:19:11 -0800 Subject: [PATCH 4/7] comment tests for now. --- test/Integration/DocumentsApiTest.php | 48 +++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/test/Integration/DocumentsApiTest.php b/test/Integration/DocumentsApiTest.php index 73f903d..4711a55 100644 --- a/test/Integration/DocumentsApiTest.php +++ b/test/Integration/DocumentsApiTest.php @@ -40,32 +40,32 @@ public static function setUpBeforeClass(): void public function testGetDocumentsList() { - $apiInstance = new \Avalara\SDK\API\EInvoicing\V1\DocumentsApi(self::$client); + // $apiInstance = new \Avalara\SDK\API\EInvoicing\V1\DocumentsApi(self::$client); - $request_options = new \Avalara\SDK\API\EInvoicing\V1\GetDocumentListRequest(); - $request_options->setAvalaraVersion('1.0'); + // $request_options = new \Avalara\SDK\API\EInvoicing\V1\GetDocumentListRequest(); + // $request_options->setAvalaraVersion('1.0'); - try { - $result=$apiInstance->getDocumentListAsync($request_options); - $result->then( - function($response) { - $this->assertNotNull($response); - print_r($response); - }, - function(\Exception $e){ - echo $e; - echo 'Exception : ', $e->getMessage(), PHP_EOL; - echo 'Exception Response Body: ', $e->getResponseBody(), PHP_EOL; - } - ); - // Tick the promise queue to trigger the callback - $result->wait(); - \GuzzleHttp\Promise\queue(); - } - catch (Exception $e) { - echo $e; - echo 'Exception : ', $e->getMessage(), PHP_EOL; - } + // try { + // $result=$apiInstance->getDocumentListAsync($request_options); + // $result->then( + // function($response) { + // $this->assertNotNull($response); + // print_r($response); + // }, + // function(\Exception $e){ + // echo $e; + // echo 'Exception : ', $e->getMessage(), PHP_EOL; + // echo 'Exception Response Body: ', $e->getResponseBody(), PHP_EOL; + // } + // ); + // // Tick the promise queue to trigger the callback + // $result->wait(); + // \GuzzleHttp\Promise\queue(); + // } + // catch (Exception $e) { + // echo $e; + // echo 'Exception : ', $e->getMessage(), PHP_EOL; + // } } } \ No newline at end of file From d63cac23e9b5babf75a01e44bf147bd905a2f715 Mon Sep 17 00:00:00 2001 From: Jonathan Wenger Date: Fri, 20 Dec 2024 14:22:43 -0800 Subject: [PATCH 5/7] Update per spec edits --- docs/EInvoicing/V1/DocumentsApi.md | 4 ++-- lib/API/EInvoicing/V1/DocumentsApi.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/EInvoicing/V1/DocumentsApi.md b/docs/EInvoicing/V1/DocumentsApi.md index 84d458e..99a4b3e 100644 --- a/docs/EInvoicing/V1/DocumentsApi.md +++ b/docs/EInvoicing/V1/DocumentsApi.md @@ -317,7 +317,7 @@ $apiInstance = new Avalara\\SDK\Api\DocumentsApi($client); $avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used $metadata = new \Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata(); // \Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata -$data = array('key' => new \stdClass); // object | The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' +$data = 'data_example'; // string | The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. try { @@ -334,7 +334,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | **metadata** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata**](../Model/SubmitDocumentMetadata.md)| | - **data** | [**object**](../Model/object.md)| The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' | + **data** | **string**| The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' | **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] ### Return type diff --git a/lib/API/EInvoicing/V1/DocumentsApi.php b/lib/API/EInvoicing/V1/DocumentsApi.php index 4faaee3..2d5c998 100644 --- a/lib/API/EInvoicing/V1/DocumentsApi.php +++ b/lib/API/EInvoicing/V1/DocumentsApi.php @@ -2296,7 +2296,7 @@ public function setXAvalaraClient($x_avalara_client) { * * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) * @param \Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata $metadata metadata (required) - * @param object $data The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' (required) + * @param string $data The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' (required) * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) */ class SubmitDocumentRequest { From 856c083cdcaddb740a79d12feae9e6cba961ed46 Mon Sep 17 00:00:00 2001 From: Jonathan Wenger Date: Fri, 20 Dec 2024 14:38:08 -0800 Subject: [PATCH 6/7] Fix build issue PHP --- README.md | 96 +--- docs/EInvoicing/DocumentFetchRequest.md | 10 + .../DocumentFetchRequestDataInner.md | 10 + .../DocumentFetchRequestMetadata.md | 13 + docs/EInvoicing/V1/DocumentsApi.md | 8 +- lib/API/EInvoicing/V1/DocumentsApi.php | 26 +- .../EInvoicing/V1/DocumentFetchRequest.php | 363 ++++++++++++++ .../V1/DocumentFetchRequestDataInner.php | 369 ++++++++++++++ .../V1/DocumentFetchRequestMetadata.php | 468 ++++++++++++++++++ 9 files changed, 1253 insertions(+), 110 deletions(-) create mode 100644 docs/EInvoicing/DocumentFetchRequest.md create mode 100644 docs/EInvoicing/DocumentFetchRequestDataInner.md create mode 100644 docs/EInvoicing/DocumentFetchRequestMetadata.md create mode 100644 lib/Model/EInvoicing/V1/DocumentFetchRequest.php create mode 100644 lib/Model/EInvoicing/V1/DocumentFetchRequestDataInner.php create mode 100644 lib/Model/EInvoicing/V1/DocumentFetchRequestMetadata.php diff --git a/README.md b/README.md index d6b7343..ddbb13a 100644 --- a/README.md +++ b/README.md @@ -199,32 +199,6 @@ This PHP package is automatically generated by the [OpenAPI Generator](https://o ### EInvoicing V1 API Documentation -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DataInputFieldsApi* | [**getDataInputFields**](docs/EInvoicing/V1/DataInputFieldsApi.md#getdatainputfields) | **GET** /data-input-fields | Returns the mandatory and conditional invoice or creditnote input fields for different country mandates -*DocumentsApi* | [**downloadDocument**](docs/EInvoicing/V1/DocumentsApi.md#downloaddocument) | **GET** /documents/{documentId}/$download | Returns a copy of the document -*DocumentsApi* | [**getDocumentList**](docs/EInvoicing/V1/DocumentsApi.md#getdocumentlist) | **GET** /documents | Returns a summary of documents for a date range -*DocumentsApi* | [**getDocumentStatus**](docs/EInvoicing/V1/DocumentsApi.md#getdocumentstatus) | **GET** /documents/{documentId}/status | Checks the status of a document -*DocumentsApi* | [**submitDocument**](docs/EInvoicing/V1/DocumentsApi.md#submitdocument) | **POST** /documents | Submits a document to Avalara E-Invoicing API -*MandatesApi* | [**getMandates**](docs/EInvoicing/V1/MandatesApi.md#getmandates) | **GET** /mandates | List country mandates that are supported by the Avalara E-Invoicing platform - - -### EInvoicing V1 API Documentation - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DataInputFieldsApi* | [**getDataInputFields**](docs/EInvoicing/V1/DataInputFieldsApi.md#getdatainputfields) | **GET** /data-input-fields | Returns the optionality of document fields for different country mandates -*DocumentsApi* | [**downloadDocument**](docs/EInvoicing/V1/DocumentsApi.md#downloaddocument) | **GET** /documents/{documentId}/$download | Returns a copy of the document -*DocumentsApi* | [**fetchDocuments**](docs/EInvoicing/V1/DocumentsApi.md#fetchdocuments) | **POST** /documents/$fetch | Fetch the inbound document from a tax authority -*DocumentsApi* | [**getDocumentList**](docs/EInvoicing/V1/DocumentsApi.md#getdocumentlist) | **GET** /documents | Returns a summary of documents for a date range -*DocumentsApi* | [**getDocumentStatus**](docs/EInvoicing/V1/DocumentsApi.md#getdocumentstatus) | **GET** /documents/{documentId}/status | Checks the status of a document -*DocumentsApi* | [**submitDocument**](docs/EInvoicing/V1/DocumentsApi.md#submitdocument) | **POST** /documents | Submits a document to Avalara E-Invoicing API -*MandatesApi* | [**getMandateDataInputFields**](docs/EInvoicing/V1/MandatesApi.md#getmandatedatainputfields) | **GET** /mandates/{mandateId}/data-input-fields | Returns document field information for a country mandate, a selected document type, and its version -*MandatesApi* | [**getMandates**](docs/EInvoicing/V1/MandatesApi.md#getmandates) | **GET** /mandates | List country mandates that are supported by the Avalara E-Invoicing platform - - -### EInvoicing V1 API Documentation - Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *DataInputFieldsApi* | [**getDataInputFields**](docs/EInvoicing/V1/DataInputFieldsApi.md#getdatainputfields) | **GET** /data-input-fields | Returns the optionality of document fields for different country mandates @@ -245,70 +219,6 @@ Class | Method | HTTP request | Description ## Documentation for Models - -### EInvoicing V1 Model Documentation - - - [Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest](docs/EInvoicing/V1/BadRequest.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputField](docs/EInvoicing/V1/DataInputField.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError](docs/EInvoicing/V1/InternalServerError.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\Mandate](docs/EInvoicing/V1/Mandate.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse](docs/EInvoicing/V1/MandatesResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError](docs/EInvoicing/V1/NotFoundError.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\NotUsedForField](docs/EInvoicing/V1/NotUsedForField.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\StatusEvent](docs/EInvoicing/V1/StatusEvent.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata](docs/EInvoicing/V1/SubmitDocumentMetadata.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\WorkflowIds](docs/EInvoicing/V1/WorkflowIds.md) - - - -### EInvoicing V1 Model Documentation - - - [Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest](docs/EInvoicing/V1/BadRequest.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputField](docs/EInvoicing/V1/DataInputField.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch](docs/EInvoicing/V1/DocumentFetch.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequest](docs/EInvoicing/V1/FetchDocumentsRequest.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestDataInner](docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestMetadata](docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError](docs/EInvoicing/V1/InternalServerError.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\Mandate](docs/EInvoicing/V1/Mandate.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField](docs/EInvoicing/V1/MandateDataInputField.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputFieldNamespace](docs/EInvoicing/V1/MandateDataInputFieldNamespace.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse](docs/EInvoicing/V1/MandatesResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError](docs/EInvoicing/V1/NotFoundError.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\NotUsedForField](docs/EInvoicing/V1/NotUsedForField.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\StatusEvent](docs/EInvoicing/V1/StatusEvent.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata](docs/EInvoicing/V1/SubmitDocumentMetadata.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\WorkflowIds](docs/EInvoicing/V1/WorkflowIds.md) - - ### EInvoicing V1 Model Documentation @@ -328,15 +238,15 @@ Class | Method | HTTP request | Description - [Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerIdentifiersInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.md) - [Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md) - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch](docs/EInvoicing/V1/DocumentFetch.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequest](docs/EInvoicing/V1/DocumentFetchRequest.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestDataInner](docs/EInvoicing/V1/DocumentFetchRequestDataInner.md) + - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestMetadata](docs/EInvoicing/V1/DocumentFetchRequestMetadata.md) - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) - [Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse](docs/EInvoicing/V1/ErrorResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequest](docs/EInvoicing/V1/FetchDocumentsRequest.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestDataInner](docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequestMetadata](docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md) - [Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) - [Avalara\\SDK\Model\\EInvoicing\\V1\InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) - [Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError](docs/EInvoicing/V1/InternalServerError.md) diff --git a/docs/EInvoicing/DocumentFetchRequest.md b/docs/EInvoicing/DocumentFetchRequest.md new file mode 100644 index 0000000..2910f13 --- /dev/null +++ b/docs/EInvoicing/DocumentFetchRequest.md @@ -0,0 +1,10 @@ +# # DocumentFetchRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestDataInner[]**](DocumentFetchRequestDataInner.md) | Array of key-value pairs used to retrieve inbound documents from the Tax Authority | [optional] +**metadata** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestMetadata**](DocumentFetchRequestMetadata.md) | | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DocumentFetchRequestDataInner.md b/docs/EInvoicing/DocumentFetchRequestDataInner.md new file mode 100644 index 0000000..634e1f3 --- /dev/null +++ b/docs/EInvoicing/DocumentFetchRequestDataInner.md @@ -0,0 +1,10 @@ +# # DocumentFetchRequestDataInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **string** | Descriptor of the identifier | +**value** | **string** | Value of the identifier | + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DocumentFetchRequestMetadata.md b/docs/EInvoicing/DocumentFetchRequestMetadata.md new file mode 100644 index 0000000..f9977e8 --- /dev/null +++ b/docs/EInvoicing/DocumentFetchRequestMetadata.md @@ -0,0 +1,13 @@ +# # DocumentFetchRequestMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**workflow_id** | **string** | Specifies a unique ID for this workflow. | +**data_format** | **string** | Specifies the data format for this workflow | +**data_format_version** | **float** | Specifies the data format version number | +**country_code** | **string** | The two-letter ISO-3166 country code for the country for which document is being retrieved | +**country_mandate** | **string** | The e-invoicing mandate for the specified country | + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/V1/DocumentsApi.md b/docs/EInvoicing/V1/DocumentsApi.md index 99a4b3e..faf64db 100644 --- a/docs/EInvoicing/V1/DocumentsApi.md +++ b/docs/EInvoicing/V1/DocumentsApi.md @@ -81,7 +81,7 @@ Name | Type | Description | Notes ## `fetchDocuments()` ```php -fetchDocuments($avalara_version, $fetch_documents_request, $x_avalara_client): \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch +fetchDocuments($avalara_version, $document_fetch_request, $x_avalara_client): \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch ``` Fetch the inbound document from a tax authority @@ -107,11 +107,11 @@ $client = new \Avalara\SDK\ApiClient($config); $apiInstance = new Avalara\\SDK\Api\DocumentsApi($client); $avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used -$fetch_documents_request = new \Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequest(); // \Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequest +$document_fetch_request = new \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequest(); // \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequest $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. try { - $result = $apiInstance->fetchDocuments($avalara_version, $fetch_documents_request, $x_avalara_client); + $result = $apiInstance->fetchDocuments($avalara_version, $document_fetch_request, $x_avalara_client); print_r($result); } catch (Exception $e) { echo 'Exception when calling DocumentsApi->fetchDocuments: ', $e->getMessage(), PHP_EOL; @@ -123,7 +123,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | - **fetch_documents_request** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequest**](../Model/FetchDocumentsRequest.md)| | + **document_fetch_request** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequest**](../Model/DocumentFetchRequest.md)| | **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] ### Return type diff --git a/lib/API/EInvoicing/V1/DocumentsApi.php b/lib/API/EInvoicing/V1/DocumentsApi.php index 2d5c998..887d962 100644 --- a/lib/API/EInvoicing/V1/DocumentsApi.php +++ b/lib/API/EInvoicing/V1/DocumentsApi.php @@ -780,7 +780,7 @@ public function fetchDocumentsRequest($request_parameters) $requiredScopes = ""; $avalara_version = $request_parameters->getAvalaraVersion(); - $fetch_documents_request = $request_parameters->getFetchDocumentsRequest(); + $document_fetch_request = $request_parameters->getDocumentFetchRequest(); $x_avalara_client = $request_parameters->getXAvalaraClient(); // verify the required parameter 'avalara_version' is set @@ -789,10 +789,10 @@ public function fetchDocumentsRequest($request_parameters) 'Missing the required parameter $avalara_version when calling fetchDocuments' ); } - // verify the required parameter 'fetch_documents_request' is set - if ($fetch_documents_request === null || (is_array($fetch_documents_request) && count($fetch_documents_request) === 0)) { + // verify the required parameter 'document_fetch_request' is set + if ($document_fetch_request === null || (is_array($document_fetch_request) && count($document_fetch_request) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $fetch_documents_request when calling fetchDocuments' + 'Missing the required parameter $document_fetch_request when calling fetchDocuments' ); } @@ -832,11 +832,11 @@ public function fetchDocumentsRequest($request_parameters) $headers['X-Avalara-Client']=$clientId; // for model (json/xml) - if (isset($fetch_documents_request)) { + if (isset($document_fetch_request)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($fetch_documents_request)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($document_fetch_request)); } else { - $httpBody = $fetch_documents_request; + $httpBody = $document_fetch_request; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -2121,12 +2121,12 @@ public function setXAvalaraClient($x_avalara_client) { * Represents the Request object for the FetchDocuments API * * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\FetchDocumentsRequest $fetch_documents_request fetch_documents_request (required) + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequest $document_fetch_request document_fetch_request (required) * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) */ class FetchDocumentsRequest { private $avalara_version; - private $fetch_documents_request; + private $document_fetch_request; private $x_avalara_client; public function __construct() { @@ -2138,12 +2138,12 @@ public function getAvalaraVersion() { public function setAvalaraVersion($avalara_version) { $this->avalara_version = $avalara_version; } - public function getFetchDocumentsRequest() { - return $this->fetch_documents_request; + public function getDocumentFetchRequest() { + return $this->document_fetch_request; } - public function setFetchDocumentsRequest($fetch_documents_request) { - $this->fetch_documents_request = $fetch_documents_request; + public function setDocumentFetchRequest($document_fetch_request) { + $this->document_fetch_request = $document_fetch_request; } public function getXAvalaraClient() { return $this->x_avalara_client; diff --git a/lib/Model/EInvoicing/V1/DocumentFetchRequest.php b/lib/Model/EInvoicing/V1/DocumentFetchRequest.php new file mode 100644 index 0000000..dc7400e --- /dev/null +++ b/lib/Model/EInvoicing/V1/DocumentFetchRequest.php @@ -0,0 +1,363 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * DocumentFetchRequest Class Doc Comment + * + * @category Class + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class DocumentFetchRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DocumentFetchRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestDataInner[]', + 'metadata' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestMetadata' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null, + 'metadata' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'metadata' => 'metadata' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'metadata' => 'setMetadata' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'metadata' => 'getMetadata' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + $this->container['metadata'] = $data['metadata'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestDataInner[]|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestDataInner[]|null $data Array of key-value pairs used to retrieve inbound documents from the Tax Authority + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets metadata + * + * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestMetadata|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestMetadata|null $metadata metadata + * + * @return self + */ + public function setMetadata($metadata) + { + $this->container['metadata'] = $metadata; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/DocumentFetchRequestDataInner.php b/lib/Model/EInvoicing/V1/DocumentFetchRequestDataInner.php new file mode 100644 index 0000000..4735112 --- /dev/null +++ b/lib/Model/EInvoicing/V1/DocumentFetchRequestDataInner.php @@ -0,0 +1,369 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * DocumentFetchRequestDataInner Class Doc Comment + * + * @category Class + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class DocumentFetchRequestDataInner implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DocumentFetchRequest_data_inner'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'key' => 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'key' => 'string', + 'value' => 'string' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'key' => 'key', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'key' => 'setKey', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'key' => 'getKey', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['key'] = $data['key'] ?? null; + $this->container['value'] = $data['value'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['key'] === null) { + $invalidProperties[] = "'key' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets key + * + * @return string + */ + public function getKey() + { + return $this->container['key']; + } + + /** + * Sets key + * + * @param string $key Descriptor of the identifier + * + * @return self + */ + public function setKey($key) + { + $this->container['key'] = $key; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value Value of the identifier + * + * @return self + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EInvoicing/V1/DocumentFetchRequestMetadata.php b/lib/Model/EInvoicing/V1/DocumentFetchRequestMetadata.php new file mode 100644 index 0000000..90ef141 --- /dev/null +++ b/lib/Model/EInvoicing/V1/DocumentFetchRequestMetadata.php @@ -0,0 +1,468 @@ + + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @version + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\\SDK\Model\\EInvoicing\\V1; + +use \ArrayAccess; +use \Avalara\\SDK\ObjectSerializer; +use \Avalara\\SDK\Model\ModelInterface; +/** + * DocumentFetchRequestMetadata Class Doc Comment + * + * @category Class + * @package Avalara\\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class DocumentFetchRequestMetadata implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DocumentFetchRequest_metadata'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'workflow_id' => 'string', + 'data_format' => 'string', + 'data_format_version' => 'float', + 'country_code' => 'string', + 'country_mandate' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'workflow_id' => 'string', + 'data_format' => 'string', + 'data_format_version' => 'number', + 'country_code' => 'string', + 'country_mandate' => 'string' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'workflow_id' => 'workflowId', + 'data_format' => 'dataFormat', + 'data_format_version' => 'dataFormatVersion', + 'country_code' => 'countryCode', + 'country_mandate' => 'countryMandate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'workflow_id' => 'setWorkflowId', + 'data_format' => 'setDataFormat', + 'data_format_version' => 'setDataFormatVersion', + 'country_code' => 'setCountryCode', + 'country_mandate' => 'setCountryMandate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'workflow_id' => 'getWorkflowId', + 'data_format' => 'getDataFormat', + 'data_format_version' => 'getDataFormatVersion', + 'country_code' => 'getCountryCode', + 'country_mandate' => 'getCountryMandate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['workflow_id'] = $data['workflow_id'] ?? null; + $this->container['data_format'] = $data['data_format'] ?? null; + $this->container['data_format_version'] = $data['data_format_version'] ?? null; + $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['country_mandate'] = $data['country_mandate'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['workflow_id'] === null) { + $invalidProperties[] = "'workflow_id' can't be null"; + } + if ($this->container['data_format'] === null) { + $invalidProperties[] = "'data_format' can't be null"; + } + if ($this->container['data_format_version'] === null) { + $invalidProperties[] = "'data_format_version' can't be null"; + } + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; + } + if ($this->container['country_mandate'] === null) { + $invalidProperties[] = "'country_mandate' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets workflow_id + * + * @return string + */ + public function getWorkflowId() + { + return $this->container['workflow_id']; + } + + /** + * Sets workflow_id + * + * @param string $workflow_id Specifies a unique ID for this workflow. + * + * @return self + */ + public function setWorkflowId($workflow_id) + { + $this->container['workflow_id'] = $workflow_id; + + return $this; + } + + /** + * Gets data_format + * + * @return string + */ + public function getDataFormat() + { + return $this->container['data_format']; + } + + /** + * Sets data_format + * + * @param string $data_format Specifies the data format for this workflow + * + * @return self + */ + public function setDataFormat($data_format) + { + $this->container['data_format'] = $data_format; + + return $this; + } + + /** + * Gets data_format_version + * + * @return float + */ + public function getDataFormatVersion() + { + return $this->container['data_format_version']; + } + + /** + * Sets data_format_version + * + * @param float $data_format_version Specifies the data format version number + * + * @return self + */ + public function setDataFormatVersion($data_format_version) + { + $this->container['data_format_version'] = $data_format_version; + + return $this; + } + + /** + * Gets country_code + * + * @return string + */ + public function getCountryCode() + { + return $this->container['country_code']; + } + + /** + * Sets country_code + * + * @param string $country_code The two-letter ISO-3166 country code for the country for which document is being retrieved + * + * @return self + */ + public function setCountryCode($country_code) + { + $this->container['country_code'] = $country_code; + + return $this; + } + + /** + * Gets country_mandate + * + * @return string + */ + public function getCountryMandate() + { + return $this->container['country_mandate']; + } + + /** + * Sets country_mandate + * + * @param string $country_mandate The e-invoicing mandate for the specified country + * + * @return self + */ + public function setCountryMandate($country_mandate) + { + $this->container['country_mandate'] = $country_mandate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + From f5e095a4f101aeb399f464e6165e0f81edb94a32 Mon Sep 17 00:00:00 2001 From: Jonathan Wenger Date: Fri, 3 Jan 2025 13:04:43 -0800 Subject: [PATCH 7/7] Update SDK with avalaraVersion fix --- README.md | 78 +++---- docs/EInvoicing/BatchSearch.md | 2 +- docs/EInvoicing/BatchSearchListResponse.md | 2 +- docs/EInvoicing/ConditionalForField.md | 2 +- docs/EInvoicing/DataInputField.md | 8 +- docs/EInvoicing/DataInputFieldsResponse.md | 2 +- docs/EInvoicing/DirectorySearchResponse.md | 2 +- .../DirectorySearchResponseValueInner.md | 6 +- docs/EInvoicing/DocumentFetchRequest.md | 4 +- docs/EInvoicing/DocumentListResponse.md | 2 +- docs/EInvoicing/DocumentStatusResponse.md | 2 +- docs/EInvoicing/Mandate.md | 4 +- docs/EInvoicing/MandateDataInputField.md | 2 +- docs/EInvoicing/MandatesResponse.md | 2 +- docs/EInvoicing/V1/DataInputFieldsApi.md | 8 +- docs/EInvoicing/V1/DocumentsApi.md | 36 ++-- docs/EInvoicing/V1/InteropApi.md | 8 +- docs/EInvoicing/V1/MandatesApi.md | 14 +- docs/EInvoicing/V1/TradingPartnersApi.md | 24 +-- lib/API/EInvoicing/V1/DataInputFieldsApi.php | 57 +++-- lib/API/EInvoicing/V1/DocumentsApi.php | 193 +++++++++-------- lib/API/EInvoicing/V1/InteropApi.php | 69 +++--- lib/API/EInvoicing/V1/MandatesApi.php | 109 +++++----- lib/API/EInvoicing/V1/TradingPartnersApi.php | 201 +++++++++--------- .../EInvoicing/V1/BadDownloadRequest.php | 17 +- lib/Model/EInvoicing/V1/BadRequest.php | 17 +- lib/Model/EInvoicing/V1/BatchSearch.php | 23 +- .../EInvoicing/V1/BatchSearchListResponse.php | 23 +- .../EInvoicing/V1/ConditionalForField.php | 23 +- lib/Model/EInvoicing/V1/DataInputField.php | 41 ++-- .../V1/DataInputFieldNotUsedFor.php | 17 +- .../V1/DataInputFieldOptionalFor.php | 17 +- .../V1/DataInputFieldRequiredFor.php | 17 +- .../EInvoicing/V1/DataInputFieldsResponse.php | 23 +- .../EInvoicing/V1/DirectorySearchResponse.php | 23 +- .../V1/DirectorySearchResponseValueInner.php | 35 ++- ...SearchResponseValueInnerAddressesInner.php | 17 +- ...archResponseValueInnerIdentifiersInner.php | 17 +- ...eValueInnerSupportedDocumentTypesInner.php | 17 +- lib/Model/EInvoicing/V1/DocumentFetch.php | 17 +- .../EInvoicing/V1/DocumentFetchRequest.php | 29 ++- .../V1/DocumentFetchRequestDataInner.php | 17 +- .../V1/DocumentFetchRequestMetadata.php | 17 +- .../EInvoicing/V1/DocumentListResponse.php | 23 +- .../EInvoicing/V1/DocumentStatusResponse.php | 23 +- .../EInvoicing/V1/DocumentSubmissionError.php | 17 +- .../EInvoicing/V1/DocumentSubmitResponse.php | 17 +- lib/Model/EInvoicing/V1/DocumentSummary.php | 17 +- lib/Model/EInvoicing/V1/ErrorResponse.php | 17 +- lib/Model/EInvoicing/V1/ForbiddenError.php | 17 +- lib/Model/EInvoicing/V1/InputDataFormats.php | 17 +- .../EInvoicing/V1/InternalServerError.php | 17 +- lib/Model/EInvoicing/V1/Mandate.php | 29 ++- .../EInvoicing/V1/MandateDataInputField.php | 23 +- .../V1/MandateDataInputFieldNamespace.php | 17 +- lib/Model/EInvoicing/V1/MandatesResponse.php | 23 +- lib/Model/EInvoicing/V1/ModelInterface.php | 13 +- lib/Model/EInvoicing/V1/NotFoundError.php | 17 +- lib/Model/EInvoicing/V1/NotUsedForField.php | 17 +- lib/Model/EInvoicing/V1/RequiredWhenField.php | 17 +- lib/Model/EInvoicing/V1/StatusEvent.php | 17 +- .../EInvoicing/V1/SubmitDocumentMetadata.php | 17 +- .../V1/SubmitInteropDocument202Response.php | 17 +- lib/Model/EInvoicing/V1/WorkflowIds.php | 17 +- test/Integration/DocumentsApiTest.php | 47 ++-- 65 files changed, 817 insertions(+), 863 deletions(-) diff --git a/README.md b/README.md index ddbb13a..31d5288 100644 --- a/README.md +++ b/README.md @@ -222,42 +222,42 @@ Class | Method | HTTP request | Description ### EInvoicing V1 Model Documentation - - [Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest](docs/EInvoicing/V1/BadRequest.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch](docs/EInvoicing/V1/BatchSearch.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse](docs/EInvoicing/V1/BatchSearchListResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputField](docs/EInvoicing/V1/DataInputField.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse](docs/EInvoicing/V1/DirectorySearchResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInner](docs/EInvoicing/V1/DirectorySearchResponseValueInner.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerAddressesInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerIdentifiersInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch](docs/EInvoicing/V1/DocumentFetch.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequest](docs/EInvoicing/V1/DocumentFetchRequest.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestDataInner](docs/EInvoicing/V1/DocumentFetchRequestDataInner.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestMetadata](docs/EInvoicing/V1/DocumentFetchRequestMetadata.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse](docs/EInvoicing/V1/ErrorResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError](docs/EInvoicing/V1/InternalServerError.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\Mandate](docs/EInvoicing/V1/Mandate.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField](docs/EInvoicing/V1/MandateDataInputField.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputFieldNamespace](docs/EInvoicing/V1/MandateDataInputFieldNamespace.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse](docs/EInvoicing/V1/MandatesResponse.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError](docs/EInvoicing/V1/NotFoundError.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\NotUsedForField](docs/EInvoicing/V1/NotUsedForField.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\StatusEvent](docs/EInvoicing/V1/StatusEvent.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata](docs/EInvoicing/V1/SubmitDocumentMetadata.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response](docs/EInvoicing/V1/SubmitInteropDocument202Response.md) - - [Avalara\\SDK\Model\\EInvoicing\\V1\WorkflowIds](docs/EInvoicing/V1/WorkflowIds.md) + - [Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) + - [Avalara\SDK\Model\EInvoicing\V1\BadRequest](docs/EInvoicing/V1/BadRequest.md) + - [Avalara\SDK\Model\EInvoicing\V1\BatchSearch](docs/EInvoicing/V1/BatchSearch.md) + - [Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse](docs/EInvoicing/V1/BatchSearchListResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) + - [Avalara\SDK\Model\EInvoicing\V1\DataInputField](docs/EInvoicing/V1/DataInputField.md) + - [Avalara\SDK\Model\EInvoicing\V1\DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) + - [Avalara\SDK\Model\EInvoicing\V1\DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) + - [Avalara\SDK\Model\EInvoicing\V1\DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) + - [Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponse](docs/EInvoicing/V1/DirectorySearchResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInner](docs/EInvoicing/V1/DirectorySearchResponseValueInner.md) + - [Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerAddressesInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.md) + - [Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerIdentifiersInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.md) + - [Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md) + - [Avalara\SDK\Model\EInvoicing\V1\DocumentFetch](docs/EInvoicing/V1/DocumentFetch.md) + - [Avalara\SDK\Model\EInvoicing\V1\DocumentFetchRequest](docs/EInvoicing/V1/DocumentFetchRequest.md) + - [Avalara\SDK\Model\EInvoicing\V1\DocumentFetchRequestDataInner](docs/EInvoicing/V1/DocumentFetchRequestDataInner.md) + - [Avalara\SDK\Model\EInvoicing\V1\DocumentFetchRequestMetadata](docs/EInvoicing/V1/DocumentFetchRequestMetadata.md) + - [Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) + - [Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) + - [Avalara\SDK\Model\EInvoicing\V1\ErrorResponse](docs/EInvoicing/V1/ErrorResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) + - [Avalara\SDK\Model\EInvoicing\V1\InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) + - [Avalara\SDK\Model\EInvoicing\V1\InternalServerError](docs/EInvoicing/V1/InternalServerError.md) + - [Avalara\SDK\Model\EInvoicing\V1\Mandate](docs/EInvoicing/V1/Mandate.md) + - [Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField](docs/EInvoicing/V1/MandateDataInputField.md) + - [Avalara\SDK\Model\EInvoicing\V1\MandateDataInputFieldNamespace](docs/EInvoicing/V1/MandateDataInputFieldNamespace.md) + - [Avalara\SDK\Model\EInvoicing\V1\MandatesResponse](docs/EInvoicing/V1/MandatesResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\NotFoundError](docs/EInvoicing/V1/NotFoundError.md) + - [Avalara\SDK\Model\EInvoicing\V1\NotUsedForField](docs/EInvoicing/V1/NotUsedForField.md) + - [Avalara\SDK\Model\EInvoicing\V1\RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) + - [Avalara\SDK\Model\EInvoicing\V1\StatusEvent](docs/EInvoicing/V1/StatusEvent.md) + - [Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata](docs/EInvoicing/V1/SubmitDocumentMetadata.md) + - [Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response](docs/EInvoicing/V1/SubmitInteropDocument202Response.md) + - [Avalara\SDK\Model\EInvoicing\V1\WorkflowIds](docs/EInvoicing/V1/WorkflowIds.md) diff --git a/docs/EInvoicing/BatchSearch.md b/docs/EInvoicing/BatchSearch.md index 9cc57df..be91207 100644 --- a/docs/EInvoicing/BatchSearch.md +++ b/docs/EInvoicing/BatchSearch.md @@ -10,6 +10,6 @@ Name | Type | Description | Notes **created** | **\DateTime** | Timestamp when the batch search was created | [optional] **last_modified** | **\DateTime** | Timestamp when the batch search was created | [optional] **status** | **string** | Status of the batch search | [optional] -**error** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse**](ErrorResponse.md) | | [optional] +**error** | [**\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse**](ErrorResponse.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/BatchSearchListResponse.md b/docs/EInvoicing/BatchSearchListResponse.md index a462acd..f3c297d 100644 --- a/docs/EInvoicing/BatchSearchListResponse.md +++ b/docs/EInvoicing/BatchSearchListResponse.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **at_record_set_count** | **int** | The count of records in the result set | [optional] **at_next_link** | **string** | Next Link | [optional] -**value** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch[]**](BatchSearch.md) | | [optional] +**value** | [**\Avalara\SDK\Model\EInvoicing\V1\BatchSearch[]**](BatchSearch.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/ConditionalForField.md b/docs/EInvoicing/ConditionalForField.md index 03a5376..d1dd310 100644 --- a/docs/EInvoicing/ConditionalForField.md +++ b/docs/EInvoicing/ConditionalForField.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **country_mandate** | **string** | | [optional] -**required_when** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\RequiredWhenField[]**](RequiredWhenField.md) | Array of scenarios which describe when a particular field is conditional for a country mandate | [optional] +**required_when** | [**\Avalara\SDK\Model\EInvoicing\V1\RequiredWhenField[]**](RequiredWhenField.md) | Array of scenarios which describe when a particular field is conditional for a country mandate | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DataInputField.md b/docs/EInvoicing/DataInputField.md index 23f10f5..21314f3 100644 --- a/docs/EInvoicing/DataInputField.md +++ b/docs/EInvoicing/DataInputField.md @@ -15,9 +15,9 @@ Name | Type | Description | Notes **documentation_link** | **string** | An example of the content for this field | [optional] **description** | **string** | A description of this field | [optional] **is_segment** | **bool** | Is this a segment of the schema | [optional] -**required_for** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldRequiredFor**](DataInputFieldRequiredFor.md) | | [optional] -**conditional_for** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\ConditionalForField[]**](ConditionalForField.md) | | [optional] -**not_used_for** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldNotUsedFor**](DataInputFieldNotUsedFor.md) | | [optional] -**optional_for** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldOptionalFor**](DataInputFieldOptionalFor.md) | | [optional] +**required_for** | [**\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldRequiredFor**](DataInputFieldRequiredFor.md) | | [optional] +**conditional_for** | [**\Avalara\SDK\Model\EInvoicing\V1\ConditionalForField[]**](ConditionalForField.md) | | [optional] +**not_used_for** | [**\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldNotUsedFor**](DataInputFieldNotUsedFor.md) | | [optional] +**optional_for** | [**\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldOptionalFor**](DataInputFieldOptionalFor.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DataInputFieldsResponse.md b/docs/EInvoicing/DataInputFieldsResponse.md index 974906f..3ca3622 100644 --- a/docs/EInvoicing/DataInputFieldsResponse.md +++ b/docs/EInvoicing/DataInputFieldsResponse.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **at_recordset_count** | **float** | Total count of results | [optional] **at_next_link** | **string** | | [optional] -**value** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputField[]**](DataInputField.md) | Array of Data Input Fields | [optional] +**value** | [**\Avalara\SDK\Model\EInvoicing\V1\DataInputField[]**](DataInputField.md) | Array of Data Input Fields | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DirectorySearchResponse.md b/docs/EInvoicing/DirectorySearchResponse.md index 08169b4..03dd455 100644 --- a/docs/EInvoicing/DirectorySearchResponse.md +++ b/docs/EInvoicing/DirectorySearchResponse.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **at_record_set_count** | **int** | The count of records in the result set | [optional] **at_next_link** | **string** | The next page link to get the next set of results. | [optional] -**value** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInner[]**](DirectorySearchResponseValueInner.md) | | [optional] +**value** | [**\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInner[]**](DirectorySearchResponseValueInner.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DirectorySearchResponseValueInner.md b/docs/EInvoicing/DirectorySearchResponseValueInner.md index a0967f8..9e1b549 100644 --- a/docs/EInvoicing/DirectorySearchResponseValueInner.md +++ b/docs/EInvoicing/DirectorySearchResponseValueInner.md @@ -8,8 +8,8 @@ Name | Type | Description | Notes **name** | **string** | Name of the participant (typically, the name of the business entity). | [optional] **network** | **string** | The network where the participant is present. | [optional] **registration_date** | **\DateTime** | Registration date of the participant if available | [optional] -**identifiers** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerIdentifiersInner[]**](DirectorySearchResponseValueInnerIdentifiersInner.md) | | [optional] -**addresses** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerAddressesInner[]**](DirectorySearchResponseValueInnerAddressesInner.md) | | [optional] -**supported_document_types** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner[]**](DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md) | | [optional] +**identifiers** | [**\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerIdentifiersInner[]**](DirectorySearchResponseValueInnerIdentifiersInner.md) | | [optional] +**addresses** | [**\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerAddressesInner[]**](DirectorySearchResponseValueInnerAddressesInner.md) | | [optional] +**supported_document_types** | [**\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner[]**](DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DocumentFetchRequest.md b/docs/EInvoicing/DocumentFetchRequest.md index 2910f13..6dee56c 100644 --- a/docs/EInvoicing/DocumentFetchRequest.md +++ b/docs/EInvoicing/DocumentFetchRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestDataInner[]**](DocumentFetchRequestDataInner.md) | Array of key-value pairs used to retrieve inbound documents from the Tax Authority | [optional] -**metadata** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestMetadata**](DocumentFetchRequestMetadata.md) | | [optional] +**data** | [**\Avalara\SDK\Model\EInvoicing\V1\DocumentFetchRequestDataInner[]**](DocumentFetchRequestDataInner.md) | Array of key-value pairs used to retrieve inbound documents from the Tax Authority | [optional] +**metadata** | [**\Avalara\SDK\Model\EInvoicing\V1\DocumentFetchRequestMetadata**](DocumentFetchRequestMetadata.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DocumentListResponse.md b/docs/EInvoicing/DocumentListResponse.md index 5b944ad..30b6c9f 100644 --- a/docs/EInvoicing/DocumentListResponse.md +++ b/docs/EInvoicing/DocumentListResponse.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **at_recordset_count** | **string** | Count of collections for the given date range | [optional] **at_next_link** | **string** | | [optional] -**value** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSummary[]**](DocumentSummary.md) | Array of documents matching query parameters | +**value** | [**\Avalara\SDK\Model\EInvoicing\V1\DocumentSummary[]**](DocumentSummary.md) | Array of documents matching query parameters | [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DocumentStatusResponse.md b/docs/EInvoicing/DocumentStatusResponse.md index 3a8db64..5925b83 100644 --- a/docs/EInvoicing/DocumentStatusResponse.md +++ b/docs/EInvoicing/DocumentStatusResponse.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | The unique ID for this document | [optional] **status** | **string** | Status of the document | [optional] -**events** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\StatusEvent[]**](StatusEvent.md) | | [optional] +**events** | [**\Avalara\SDK\Model\EInvoicing\V1\StatusEvent[]**](StatusEvent.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/Mandate.md b/docs/EInvoicing/Mandate.md index b3309aa..5e91bf0 100644 --- a/docs/EInvoicing/Mandate.md +++ b/docs/EInvoicing/Mandate.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **description** | **string** | Mandate description | [optional] **supported_by_partner_api** | **bool** | Indicates whether this mandate supported by the partner API | [optional] **mandate_format** | **string** | Mandate format | [optional] -**input_data_formats** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\InputDataFormats[]**](InputDataFormats.md) | Format and version used when inputting the data | [optional] -**workflow_ids** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\WorkflowIds[]**](WorkflowIds.md) | Workflow ID list | [optional] +**input_data_formats** | [**\Avalara\SDK\Model\EInvoicing\V1\InputDataFormats[]**](InputDataFormats.md) | Format and version used when inputting the data | [optional] +**workflow_ids** | [**\Avalara\SDK\Model\EInvoicing\V1\WorkflowIds[]**](WorkflowIds.md) | Workflow ID list | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/MandateDataInputField.md b/docs/EInvoicing/MandateDataInputField.md index 917a130..46303b7 100644 --- a/docs/EInvoicing/MandateDataInputField.md +++ b/docs/EInvoicing/MandateDataInputField.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **path** | **string** | Path to this field | [optional] **path_type** | **string** | The type of path | [optional] **field_name** | **string** | Field name | [optional] -**namespace** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputFieldNamespace**](MandateDataInputFieldNamespace.md) | | [optional] +**namespace** | [**\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputFieldNamespace**](MandateDataInputFieldNamespace.md) | | [optional] **example_or_fixed_value** | **string** | An example of the content for this field | [optional] **accepted_values** | **string[]** | An Array representing the acceptable values for this field | [optional] **documentation_link** | **string** | An example of the content for this field | [optional] diff --git a/docs/EInvoicing/MandatesResponse.md b/docs/EInvoicing/MandatesResponse.md index d8e1ee8..ee3efa6 100644 --- a/docs/EInvoicing/MandatesResponse.md +++ b/docs/EInvoicing/MandatesResponse.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **at_recordset_count** | **float** | Total count of results | [optional] **at_next_link** | **string** | | [optional] -**value** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\Mandate[]**](Mandate.md) | Mandates schema | [optional] +**value** | [**\Avalara\SDK\Model\EInvoicing\V1\Mandate[]**](Mandate.md) | Mandates schema | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/V1/DataInputFieldsApi.md b/docs/EInvoicing/V1/DataInputFieldsApi.md index ec19e61..7df87d4 100644 --- a/docs/EInvoicing/V1/DataInputFieldsApi.md +++ b/docs/EInvoicing/V1/DataInputFieldsApi.md @@ -1,4 +1,4 @@ -# Avalara\\SDK\DataInputFieldsApi +# Avalara\SDK\DataInputFieldsApi All URIs are relative to https://api.sbx.avalara.com/einvoicing. @@ -10,7 +10,7 @@ Method | HTTP request | Description ## `getDataInputFields()` ```php -getDataInputFields($avalara_version, $x_avalara_client, $filter, $top, $skip, $count, $count_only): \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse +getDataInputFields($avalara_version, $x_avalara_client, $filter, $top, $skip, $count, $count_only): \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse ``` Returns the optionality of document fields for different country mandates @@ -33,7 +33,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\\SDK\Api\DataInputFieldsApi($client); +$apiInstance = new Avalara\SDK\Api\DataInputFieldsApi($client); $avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. @@ -65,7 +65,7 @@ Name | Type | Description | Notes ### Return type -[**\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse**](../Model/DataInputFieldsResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse**](../Model/DataInputFieldsResponse.md) ### Authorization diff --git a/docs/EInvoicing/V1/DocumentsApi.md b/docs/EInvoicing/V1/DocumentsApi.md index faf64db..15f4bb3 100644 --- a/docs/EInvoicing/V1/DocumentsApi.md +++ b/docs/EInvoicing/V1/DocumentsApi.md @@ -1,4 +1,4 @@ -# Avalara\\SDK\DocumentsApi +# Avalara\SDK\DocumentsApi All URIs are relative to https://api.sbx.avalara.com/einvoicing. @@ -37,7 +37,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\\SDK\Api\DocumentsApi($client); +$apiInstance = new Avalara\SDK\Api\DocumentsApi($client); $avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used $accept = application/pdf; // string | This header indicates the MIME type of the document @@ -81,7 +81,7 @@ Name | Type | Description | Notes ## `fetchDocuments()` ```php -fetchDocuments($avalara_version, $document_fetch_request, $x_avalara_client): \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch +fetchDocuments($avalara_version, $document_fetch_request, $x_avalara_client): \Avalara\SDK\Model\EInvoicing\V1\DocumentFetch ``` Fetch the inbound document from a tax authority @@ -104,10 +104,10 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\\SDK\Api\DocumentsApi($client); +$apiInstance = new Avalara\SDK\Api\DocumentsApi($client); $avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used -$document_fetch_request = new \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequest(); // \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequest +$document_fetch_request = new \Avalara\SDK\Model\EInvoicing\V1\DocumentFetchRequest(); // \Avalara\SDK\Model\EInvoicing\V1\DocumentFetchRequest $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. try { @@ -123,12 +123,12 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | - **document_fetch_request** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequest**](../Model/DocumentFetchRequest.md)| | + **document_fetch_request** | [**\Avalara\SDK\Model\EInvoicing\V1\DocumentFetchRequest**](../Model/DocumentFetchRequest.md)| | **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] ### Return type -[**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch**](../Model/DocumentFetch.md) +[**\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch**](../Model/DocumentFetch.md) ### Authorization @@ -146,7 +146,7 @@ Name | Type | Description | Notes ## `getDocumentList()` ```php -getDocumentList($avalara_version, $x_avalara_client, $start_date, $end_date, $flow, $count, $count_only, $filter, $top, $skip): \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse +getDocumentList($avalara_version, $x_avalara_client, $start_date, $end_date, $flow, $count, $count_only, $filter, $top, $skip): \Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse ``` Returns a summary of documents for a date range @@ -169,7 +169,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\\SDK\Api\DocumentsApi($client); +$apiInstance = new Avalara\SDK\Api\DocumentsApi($client); $avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. @@ -207,7 +207,7 @@ Name | Type | Description | Notes ### Return type -[**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse**](../Model/DocumentListResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse**](../Model/DocumentListResponse.md) ### Authorization @@ -225,7 +225,7 @@ Name | Type | Description | Notes ## `getDocumentStatus()` ```php -getDocumentStatus($avalara_version, $document_id, $x_avalara_client): \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse +getDocumentStatus($avalara_version, $document_id, $x_avalara_client): \Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse ``` Checks the status of a document @@ -248,7 +248,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\\SDK\Api\DocumentsApi($client); +$apiInstance = new Avalara\SDK\Api\DocumentsApi($client); $avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used $document_id = 'document_id_example'; // string | The unique ID for this document that was returned in the POST /einvoicing/documents response body @@ -272,7 +272,7 @@ Name | Type | Description | Notes ### Return type -[**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse**](../Model/DocumentStatusResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse**](../Model/DocumentStatusResponse.md) ### Authorization @@ -290,7 +290,7 @@ Name | Type | Description | Notes ## `submitDocument()` ```php -submitDocument($avalara_version, $metadata, $data, $x_avalara_client): \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse +submitDocument($avalara_version, $metadata, $data, $x_avalara_client): \Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse ``` Submits a document to Avalara E-Invoicing API @@ -313,10 +313,10 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\\SDK\Api\DocumentsApi($client); +$apiInstance = new Avalara\SDK\Api\DocumentsApi($client); $avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used -$metadata = new \Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata(); // \Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata +$metadata = new \Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata(); // \Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata $data = 'data_example'; // string | The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. @@ -333,13 +333,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | - **metadata** | [**\Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata**](../Model/SubmitDocumentMetadata.md)| | + **metadata** | [**\Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata**](../Model/SubmitDocumentMetadata.md)| | **data** | **string**| The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' | **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] ### Return type -[**\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse**](../Model/DocumentSubmitResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse**](../Model/DocumentSubmitResponse.md) ### Authorization diff --git a/docs/EInvoicing/V1/InteropApi.md b/docs/EInvoicing/V1/InteropApi.md index 65759f8..3fb8ee2 100644 --- a/docs/EInvoicing/V1/InteropApi.md +++ b/docs/EInvoicing/V1/InteropApi.md @@ -1,4 +1,4 @@ -# Avalara\\SDK\InteropApi +# Avalara\SDK\InteropApi All URIs are relative to https://api.sbx.avalara.com/einvoicing. @@ -10,7 +10,7 @@ Method | HTTP request | Description ## `submitInteropDocument()` ```php -submitInteropDocument($document_type, $interchange_type, $avalara_version, $x_avalara_client, $x_correlation_id, $file_name): \Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response +submitInteropDocument($document_type, $interchange_type, $avalara_version, $x_avalara_client, $x_correlation_id, $file_name): \Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response ``` Submit a document @@ -33,7 +33,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\\SDK\Api\InteropApi($client); +$apiInstance = new Avalara\SDK\Api\InteropApi($client); $document_type = 'document_type_example'; // string | Type of the document being uploaded. Partners will be configured in Avalara system to send only certain types of documents. $interchange_type = 'interchange_type_example'; // string | Type of interchange (codes in Avalara system that uniquely identifies a type of interchange). Partners will be configured in Avalara system to send documents belonging to certain types of interchanges. @@ -63,7 +63,7 @@ Name | Type | Description | Notes ### Return type -[**\Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response**](../Model/SubmitInteropDocument202Response.md) +[**\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response**](../Model/SubmitInteropDocument202Response.md) ### Authorization diff --git a/docs/EInvoicing/V1/MandatesApi.md b/docs/EInvoicing/V1/MandatesApi.md index f58378a..67f1a35 100644 --- a/docs/EInvoicing/V1/MandatesApi.md +++ b/docs/EInvoicing/V1/MandatesApi.md @@ -1,4 +1,4 @@ -# Avalara\\SDK\MandatesApi +# Avalara\SDK\MandatesApi All URIs are relative to https://api.sbx.avalara.com/einvoicing. @@ -11,7 +11,7 @@ Method | HTTP request | Description ## `getMandateDataInputFields()` ```php -getMandateDataInputFields($avalara_version, $mandate_id, $document_type, $document_version, $x_avalara_client): \Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[] +getMandateDataInputFields($avalara_version, $mandate_id, $document_type, $document_version, $x_avalara_client): \Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[] ``` Returns document field information for a country mandate, a selected document type, and its version @@ -34,7 +34,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\\SDK\Api\MandatesApi($client); +$apiInstance = new Avalara\SDK\Api\MandatesApi($client); $avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used $mandate_id = AD-B2G-PEPPOL; // string | The unique ID for the mandate that was returned in the GET /einvoicing/mandates response body @@ -62,7 +62,7 @@ Name | Type | Description | Notes ### Return type -[**\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]**](../Model/MandateDataInputField.md) +[**\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]**](../Model/MandateDataInputField.md) ### Authorization @@ -80,7 +80,7 @@ Name | Type | Description | Notes ## `getMandates()` ```php -getMandates($avalara_version, $x_avalara_client, $filter, $top, $skip, $count, $count_only): \Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse +getMandates($avalara_version, $x_avalara_client, $filter, $top, $skip, $count, $count_only): \Avalara\SDK\Model\EInvoicing\V1\MandatesResponse ``` List country mandates that are supported by the Avalara E-Invoicing platform @@ -103,7 +103,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\\SDK\Api\MandatesApi($client); +$apiInstance = new Avalara\SDK\Api\MandatesApi($client); $avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. @@ -135,7 +135,7 @@ Name | Type | Description | Notes ### Return type -[**\Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse**](../Model/MandatesResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse**](../Model/MandatesResponse.md) ### Authorization diff --git a/docs/EInvoicing/V1/TradingPartnersApi.md b/docs/EInvoicing/V1/TradingPartnersApi.md index fc9a47f..214a6ff 100644 --- a/docs/EInvoicing/V1/TradingPartnersApi.md +++ b/docs/EInvoicing/V1/TradingPartnersApi.md @@ -1,4 +1,4 @@ -# Avalara\\SDK\TradingPartnersApi +# Avalara\SDK\TradingPartnersApi All URIs are relative to https://api.sbx.avalara.com/einvoicing. @@ -37,7 +37,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\\SDK\Api\TradingPartnersApi($client); +$apiInstance = new Avalara\SDK\Api\TradingPartnersApi($client); $avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used $name = Automotive Companies in London Search; // string | The human readable name given to this batch search. @@ -107,7 +107,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\\SDK\Api\TradingPartnersApi($client); +$apiInstance = new Avalara\SDK\Api\TradingPartnersApi($client); $avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used $id = 2f5ea4b5-4dae-445a-b3e4-9f65a61eaa99; // string | The ID of the batch search whose report is to be downloaded. @@ -151,7 +151,7 @@ Name | Type | Description | Notes ## `getBatchSearchDetail()` ```php -getBatchSearchDetail($avalara_version, $id, $x_avalara_client, $x_correlation_id): \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch +getBatchSearchDetail($avalara_version, $id, $x_avalara_client, $x_correlation_id): \Avalara\SDK\Model\EInvoicing\V1\BatchSearch ``` Get the batch search details for a given id. @@ -174,7 +174,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\\SDK\Api\TradingPartnersApi($client); +$apiInstance = new Avalara\SDK\Api\TradingPartnersApi($client); $avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used $id = 2f5ea4b5-4dae-445a-b3e4-9f65a61eaa99; // string | The ID of the batch search that was submitted earlier. @@ -200,7 +200,7 @@ Name | Type | Description | Notes ### Return type -[**\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch**](../Model/BatchSearch.md) +[**\Avalara\SDK\Model\EInvoicing\V1\BatchSearch**](../Model/BatchSearch.md) ### Authorization @@ -218,7 +218,7 @@ Name | Type | Description | Notes ## `listBatchSearches()` ```php -listBatchSearches($avalara_version, $x_avalara_client, $filter, $count, $top, $skip, $order_by, $x_correlation_id): \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse +listBatchSearches($avalara_version, $x_avalara_client, $filter, $count, $top, $skip, $order_by, $x_correlation_id): \Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse ``` List all batch searches that were previously submitted. @@ -241,7 +241,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\\SDK\Api\TradingPartnersApi($client); +$apiInstance = new Avalara\SDK\Api\TradingPartnersApi($client); $avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" @@ -275,7 +275,7 @@ Name | Type | Description | Notes ### Return type -[**\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse**](../Model/BatchSearchListResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse**](../Model/BatchSearchListResponse.md) ### Authorization @@ -293,7 +293,7 @@ Name | Type | Description | Notes ## `searchParticipants()` ```php -searchParticipants($avalara_version, $search, $x_avalara_client, $count, $filter, $top, $skip, $order_by, $x_correlation_id): \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse +searchParticipants($avalara_version, $search, $x_avalara_client, $count, $filter, $top, $skip, $order_by, $x_correlation_id): \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponse ``` Returns a list of participants matching the input query. @@ -316,7 +316,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new Avalara\\SDK\Api\TradingPartnersApi($client); +$apiInstance = new Avalara\SDK\Api\TradingPartnersApi($client); $avalara_version = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used $search = Acme and 7726627177 or BMW; // string | Search by value supports logical AND and OR. Refer to [https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search) for more information on search. Search will be done over name and identifier parameters only. @@ -352,7 +352,7 @@ Name | Type | Description | Notes ### Return type -[**\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse**](../Model/DirectorySearchResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponse**](../Model/DirectorySearchResponse.md) ### Authorization diff --git a/lib/API/EInvoicing/V1/DataInputFieldsApi.php b/lib/API/EInvoicing/V1/DataInputFieldsApi.php index cd00936..e070b69 100644 --- a/lib/API/EInvoicing/V1/DataInputFieldsApi.php +++ b/lib/API/EInvoicing/V1/DataInputFieldsApi.php @@ -9,7 +9,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,19 +19,18 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ -namespace Avalara\\SDK\API\\EInvoicing\\V1; +namespace Avalara\SDK\API\EInvoicing\V1; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; @@ -40,12 +39,12 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; -use Avalara\\SDK\ApiClient; -use Avalara\\SDK\ApiException; -use Avalara\\SDK\Configuration; -use Avalara\\SDK\HeaderSelector; -use Avalara\\SDK\ObjectSerializer; -use Avalara\\SDK\Utils\LogObject; +use Avalara\SDK\ApiClient; +use Avalara\SDK\ApiException; +use Avalara\SDK\Configuration; +use Avalara\SDK\HeaderSelector; +use Avalara\SDK\ObjectSerializer; +use Avalara\SDK\Utils\LogObject; class DataInputFieldsApi { @@ -80,7 +79,7 @@ public function __construct(ApiClient $client ) private function setConfiguration($client): void { $this->verifyAPIClient($client); - $client->setSdkVersion(""); + $client->setSdkVersion("24.12.0"); $this->headerSelector = new HeaderSelector(); $this->client = $client; } @@ -123,9 +122,9 @@ public function getConfig() * * @param GetDataInputFieldsRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError + * @return \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError */ public function getDataInputFields($request_parameters) { @@ -140,9 +139,9 @@ public function getDataInputFields($request_parameters) * * @param GetDataInputFieldsRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) */ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = false) { @@ -198,7 +197,7 @@ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = f switch($statusCode) { case 200: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -206,12 +205,12 @@ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = f $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -219,12 +218,12 @@ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = f $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), $response->getStatusCode(), $response->getHeaders() ]; case 500: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\InternalServerError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -232,13 +231,13 @@ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = f $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -257,7 +256,7 @@ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = f case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse', + '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -265,7 +264,7 @@ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = f case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -273,7 +272,7 @@ public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = f case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', + '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -316,7 +315,7 @@ function ($response) { public function getDataInputFieldsAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldsResponse'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse'; $request = $this->getDataInputFieldsRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -480,7 +479,7 @@ public function getDataInputFieldsRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 24.12.0; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -552,7 +551,7 @@ class GetDataInputFieldsRequest { public function __construct() { } public function getAvalaraVersion() { - return $this->avalara_version; + return $this->avalara_version ?? '1.2'; } public function setAvalaraVersion($avalara_version) { diff --git a/lib/API/EInvoicing/V1/DocumentsApi.php b/lib/API/EInvoicing/V1/DocumentsApi.php index 887d962..427071b 100644 --- a/lib/API/EInvoicing/V1/DocumentsApi.php +++ b/lib/API/EInvoicing/V1/DocumentsApi.php @@ -9,7 +9,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,19 +19,18 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ -namespace Avalara\\SDK\API\\EInvoicing\\V1; +namespace Avalara\SDK\API\EInvoicing\V1; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; @@ -40,12 +39,12 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; -use Avalara\\SDK\ApiClient; -use Avalara\\SDK\ApiException; -use Avalara\\SDK\Configuration; -use Avalara\\SDK\HeaderSelector; -use Avalara\\SDK\ObjectSerializer; -use Avalara\\SDK\Utils\LogObject; +use Avalara\SDK\ApiClient; +use Avalara\SDK\ApiException; +use Avalara\SDK\Configuration; +use Avalara\SDK\HeaderSelector; +use Avalara\SDK\ObjectSerializer; +use Avalara\SDK\Utils\LogObject; class DocumentsApi { @@ -80,7 +79,7 @@ public function __construct(ApiClient $client ) private function setConfiguration($client): void { $this->verifyAPIClient($client); - $client->setSdkVersion(""); + $client->setSdkVersion("24.12.0"); $this->headerSelector = new HeaderSelector(); $this->client = $client; } @@ -123,9 +122,9 @@ public function getConfig() * * @param DownloadDocumentRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \SplFileObject|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError|\Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest + * @return \SplFileObject|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest */ public function downloadDocument($request_parameters) { @@ -140,9 +139,9 @@ public function downloadDocument($request_parameters) * * @param DownloadDocumentRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \SplFileObject|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError|\Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest, HTTP status code, HTTP response headers (array of strings) + * @return array of \SplFileObject|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest, HTTP status code, HTTP response headers (array of strings) */ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = false) { @@ -211,7 +210,7 @@ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = fal $response->getHeaders() ]; case 403: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -219,12 +218,12 @@ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = fal $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), $response->getStatusCode(), $response->getHeaders() ]; case 404: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\NotFoundError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -232,12 +231,12 @@ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = fal $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', []), $response->getStatusCode(), $response->getHeaders() ]; case 406: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -245,7 +244,7 @@ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = fal $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -278,7 +277,7 @@ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = fal case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -286,7 +285,7 @@ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = fal case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', + '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -294,7 +293,7 @@ public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = fal case 406: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\BadDownloadRequest', + '\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -468,7 +467,7 @@ public function downloadDocumentRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 24.12.0; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -523,9 +522,9 @@ public function downloadDocumentRequest($request_parameters) * * @param FetchDocumentsRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError + * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentFetch|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError */ public function fetchDocuments($request_parameters) { @@ -540,9 +539,9 @@ public function fetchDocuments($request_parameters) * * @param FetchDocumentsRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\EInvoicing\V1\DocumentFetch|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) */ public function fetchDocumentsWithHttpInfo($request_parameters, $isRetry = false) { @@ -598,7 +597,7 @@ public function fetchDocumentsWithHttpInfo($request_parameters, $isRetry = false switch($statusCode) { case 200: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -606,12 +605,12 @@ public function fetchDocumentsWithHttpInfo($request_parameters, $isRetry = false $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -619,12 +618,12 @@ public function fetchDocumentsWithHttpInfo($request_parameters, $isRetry = false $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), $response->getStatusCode(), $response->getHeaders() ]; case 500: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\InternalServerError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -632,13 +631,13 @@ public function fetchDocumentsWithHttpInfo($request_parameters, $isRetry = false $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -657,7 +656,7 @@ public function fetchDocumentsWithHttpInfo($request_parameters, $isRetry = false case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch', + '\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -665,7 +664,7 @@ public function fetchDocumentsWithHttpInfo($request_parameters, $isRetry = false case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -673,7 +672,7 @@ public function fetchDocumentsWithHttpInfo($request_parameters, $isRetry = false case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', + '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -716,7 +715,7 @@ function ($response) { public function fetchDocumentsAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetch'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch'; $request = $this->fetchDocumentsRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -827,7 +826,7 @@ public function fetchDocumentsRequest($request_parameters) ['application/json'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 24.12.0; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -888,9 +887,9 @@ public function fetchDocumentsRequest($request_parameters) * * @param GetDocumentListRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError + * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse|\Avalara\SDK\Model\EInvoicing\V1\BadRequest|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError */ public function getDocumentList($request_parameters) { @@ -905,9 +904,9 @@ public function getDocumentList($request_parameters) * * @param GetDocumentListRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse|\Avalara\SDK\Model\EInvoicing\V1\BadRequest|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError, HTTP status code, HTTP response headers (array of strings) */ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = false) { @@ -963,7 +962,7 @@ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = fals switch($statusCode) { case 200: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -971,12 +970,12 @@ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = fals $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 400: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\BadRequest' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -984,12 +983,12 @@ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = fals $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BadRequest', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -997,13 +996,13 @@ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = fals $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1022,7 +1021,7 @@ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = fals case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse', + '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1030,7 +1029,7 @@ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = fals case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest', + '\Avalara\SDK\Model\EInvoicing\V1\BadRequest', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1038,7 +1037,7 @@ public function getDocumentListWithHttpInfo($request_parameters, $isRetry = fals case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1081,7 +1080,7 @@ function ($response) { public function getDocumentListAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentListResponse'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse'; $request = $this->getDocumentListRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -1281,7 +1280,7 @@ public function getDocumentListRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 24.12.0; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1336,9 +1335,9 @@ public function getDocumentListRequest($request_parameters) * * @param GetDocumentStatusRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError + * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError */ public function getDocumentStatus($request_parameters) { @@ -1353,9 +1352,9 @@ public function getDocumentStatus($request_parameters) * * @param GetDocumentStatusRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError, HTTP status code, HTTP response headers (array of strings) */ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = false) { @@ -1411,7 +1410,7 @@ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = fa switch($statusCode) { case 200: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1419,12 +1418,12 @@ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = fa $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1432,12 +1431,12 @@ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = fa $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), $response->getStatusCode(), $response->getHeaders() ]; case 404: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\NotFoundError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1445,13 +1444,13 @@ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = fa $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1470,7 +1469,7 @@ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = fa case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse', + '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1478,7 +1477,7 @@ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = fa case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1486,7 +1485,7 @@ public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = fa case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', + '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1529,7 +1528,7 @@ function ($response) { public function getDocumentStatusAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentStatusResponse'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse'; $request = $this->getDocumentStatusRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -1648,7 +1647,7 @@ public function getDocumentStatusRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 24.12.0; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1703,9 +1702,9 @@ public function getDocumentStatusRequest($request_parameters) * * @param SubmitDocumentRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError + * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse|\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError */ public function submitDocument($request_parameters) { @@ -1720,9 +1719,9 @@ public function submitDocument($request_parameters) * * @param SubmitDocumentRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse|\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError, HTTP status code, HTTP response headers (array of strings) */ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false) { @@ -1778,7 +1777,7 @@ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false switch($statusCode) { case 201: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1786,12 +1785,12 @@ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 400: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1799,12 +1798,12 @@ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1812,13 +1811,13 @@ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1837,7 +1836,7 @@ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse', + '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1845,7 +1844,7 @@ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmissionError', + '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1853,7 +1852,7 @@ public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1896,7 +1895,7 @@ function ($response) { public function submitDocumentAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSubmitResponse'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse'; $request = $this->submitDocumentRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -2022,7 +2021,7 @@ public function submitDocumentRequest($request_parameters) ['multipart/form-data'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 24.12.0; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -2088,7 +2087,7 @@ class DownloadDocumentRequest { public function __construct() { } public function getAvalaraVersion() { - return $this->avalara_version; + return $this->avalara_version ?? '1.2'; } public function setAvalaraVersion($avalara_version) { @@ -2121,7 +2120,7 @@ public function setXAvalaraClient($x_avalara_client) { * Represents the Request object for the FetchDocuments API * * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequest $document_fetch_request document_fetch_request (required) + * @param \Avalara\SDK\Model\EInvoicing\V1\DocumentFetchRequest $document_fetch_request document_fetch_request (required) * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) */ class FetchDocumentsRequest { @@ -2132,7 +2131,7 @@ class FetchDocumentsRequest { public function __construct() { } public function getAvalaraVersion() { - return $this->avalara_version; + return $this->avalara_version ?? '1.2'; } public function setAvalaraVersion($avalara_version) { @@ -2183,7 +2182,7 @@ class GetDocumentListRequest { public function __construct() { } public function getAvalaraVersion() { - return $this->avalara_version; + return $this->avalara_version ?? '1.2'; } public function setAvalaraVersion($avalara_version) { @@ -2269,7 +2268,7 @@ class GetDocumentStatusRequest { public function __construct() { } public function getAvalaraVersion() { - return $this->avalara_version; + return $this->avalara_version ?? '1.2'; } public function setAvalaraVersion($avalara_version) { @@ -2295,7 +2294,7 @@ public function setXAvalaraClient($x_avalara_client) { * Represents the Request object for the SubmitDocument API * * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\SubmitDocumentMetadata $metadata metadata (required) + * @param \Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata $metadata metadata (required) * @param string $data The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' (required) * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) */ @@ -2308,7 +2307,7 @@ class SubmitDocumentRequest { public function __construct() { } public function getAvalaraVersion() { - return $this->avalara_version; + return $this->avalara_version ?? '1.2'; } public function setAvalaraVersion($avalara_version) { diff --git a/lib/API/EInvoicing/V1/InteropApi.php b/lib/API/EInvoicing/V1/InteropApi.php index 5f29355..e172d86 100644 --- a/lib/API/EInvoicing/V1/InteropApi.php +++ b/lib/API/EInvoicing/V1/InteropApi.php @@ -9,7 +9,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,19 +19,18 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ -namespace Avalara\\SDK\API\\EInvoicing\\V1; +namespace Avalara\SDK\API\EInvoicing\V1; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; @@ -40,12 +39,12 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; -use Avalara\\SDK\ApiClient; -use Avalara\\SDK\ApiException; -use Avalara\\SDK\Configuration; -use Avalara\\SDK\HeaderSelector; -use Avalara\\SDK\ObjectSerializer; -use Avalara\\SDK\Utils\LogObject; +use Avalara\SDK\ApiClient; +use Avalara\SDK\ApiException; +use Avalara\SDK\Configuration; +use Avalara\SDK\HeaderSelector; +use Avalara\SDK\ObjectSerializer; +use Avalara\SDK\Utils\LogObject; class InteropApi { @@ -80,7 +79,7 @@ public function __construct(ApiClient $client ) private function setConfiguration($client): void { $this->verifyAPIClient($client); - $client->setSdkVersion(""); + $client->setSdkVersion("24.12.0"); $this->headerSelector = new HeaderSelector(); $this->client = $client; } @@ -123,9 +122,9 @@ public function getConfig() * * @param SubmitInteropDocumentRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse + * @return \Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse */ public function submitInteropDocument($request_parameters) { @@ -140,9 +139,9 @@ public function submitInteropDocument($request_parameters) * * @param SubmitInteropDocumentRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function submitInteropDocumentWithHttpInfo($request_parameters, $isRetry = false) { @@ -198,7 +197,7 @@ public function submitInteropDocumentWithHttpInfo($request_parameters, $isRetry switch($statusCode) { case 202: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -206,12 +205,12 @@ public function submitInteropDocumentWithHttpInfo($request_parameters, $isRetry $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response', []), $response->getStatusCode(), $response->getHeaders() ]; case 400: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -219,12 +218,12 @@ public function submitInteropDocumentWithHttpInfo($request_parameters, $isRetry $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 401: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -232,12 +231,12 @@ public function submitInteropDocumentWithHttpInfo($request_parameters, $isRetry $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -245,12 +244,12 @@ public function submitInteropDocumentWithHttpInfo($request_parameters, $isRetry $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 500: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -258,13 +257,13 @@ public function submitInteropDocumentWithHttpInfo($request_parameters, $isRetry $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -283,7 +282,7 @@ public function submitInteropDocumentWithHttpInfo($request_parameters, $isRetry case 202: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response', + '\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -291,7 +290,7 @@ public function submitInteropDocumentWithHttpInfo($request_parameters, $isRetry case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -299,7 +298,7 @@ public function submitInteropDocumentWithHttpInfo($request_parameters, $isRetry case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -307,7 +306,7 @@ public function submitInteropDocumentWithHttpInfo($request_parameters, $isRetry case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -315,7 +314,7 @@ public function submitInteropDocumentWithHttpInfo($request_parameters, $isRetry case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -358,7 +357,7 @@ function ($response) { public function submitInteropDocumentAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\SubmitInteropDocument202Response'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response'; $request = $this->submitInteropDocumentRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -517,7 +516,7 @@ public function submitInteropDocumentRequest($request_parameters) ['multipart/form-data'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 24.12.0; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -601,7 +600,7 @@ public function setInterchangeType($interchange_type) { $this->interchange_type = $interchange_type; } public function getAvalaraVersion() { - return $this->avalara_version; + return $this->avalara_version ?? '1.2'; } public function setAvalaraVersion($avalara_version) { diff --git a/lib/API/EInvoicing/V1/MandatesApi.php b/lib/API/EInvoicing/V1/MandatesApi.php index a1309ec..41f2b6f 100644 --- a/lib/API/EInvoicing/V1/MandatesApi.php +++ b/lib/API/EInvoicing/V1/MandatesApi.php @@ -9,7 +9,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,19 +19,18 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ -namespace Avalara\\SDK\API\\EInvoicing\\V1; +namespace Avalara\SDK\API\EInvoicing\V1; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; @@ -40,12 +39,12 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; -use Avalara\\SDK\ApiClient; -use Avalara\\SDK\ApiException; -use Avalara\\SDK\Configuration; -use Avalara\\SDK\HeaderSelector; -use Avalara\\SDK\ObjectSerializer; -use Avalara\\SDK\Utils\LogObject; +use Avalara\SDK\ApiClient; +use Avalara\SDK\ApiException; +use Avalara\SDK\Configuration; +use Avalara\SDK\HeaderSelector; +use Avalara\SDK\ObjectSerializer; +use Avalara\SDK\Utils\LogObject; class MandatesApi { @@ -80,7 +79,7 @@ public function __construct(ApiClient $client ) private function setConfiguration($client): void { $this->verifyAPIClient($client); - $client->setSdkVersion(""); + $client->setSdkVersion("24.12.0"); $this->headerSelector = new HeaderSelector(); $this->client = $client; } @@ -123,9 +122,9 @@ public function getConfig() * * @param GetMandateDataInputFieldsRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]|\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError + * @return \Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]|\Avalara\SDK\Model\EInvoicing\V1\BadRequest|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError */ public function getMandateDataInputFields($request_parameters) { @@ -140,9 +139,9 @@ public function getMandateDataInputFields($request_parameters) * * @param GetMandateDataInputFieldsRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]|\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]|\Avalara\SDK\Model\EInvoicing\V1\BadRequest|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) */ public function getMandateDataInputFieldsWithHttpInfo($request_parameters, $isRetry = false) { @@ -198,7 +197,7 @@ public function getMandateDataInputFieldsWithHttpInfo($request_parameters, $isRe switch($statusCode) { case 200: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -206,12 +205,12 @@ public function getMandateDataInputFieldsWithHttpInfo($request_parameters, $isRe $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]', []), $response->getStatusCode(), $response->getHeaders() ]; case 400: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\BadRequest' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -219,12 +218,12 @@ public function getMandateDataInputFieldsWithHttpInfo($request_parameters, $isRe $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BadRequest', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -232,12 +231,12 @@ public function getMandateDataInputFieldsWithHttpInfo($request_parameters, $isRe $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), $response->getStatusCode(), $response->getHeaders() ]; case 404: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\NotFoundError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -245,12 +244,12 @@ public function getMandateDataInputFieldsWithHttpInfo($request_parameters, $isRe $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', []), $response->getStatusCode(), $response->getHeaders() ]; case 500: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\InternalServerError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -258,13 +257,13 @@ public function getMandateDataInputFieldsWithHttpInfo($request_parameters, $isRe $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -283,7 +282,7 @@ public function getMandateDataInputFieldsWithHttpInfo($request_parameters, $isRe case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]', + '\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -291,7 +290,7 @@ public function getMandateDataInputFieldsWithHttpInfo($request_parameters, $isRe case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\BadRequest', + '\Avalara\SDK\Model\EInvoicing\V1\BadRequest', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -299,7 +298,7 @@ public function getMandateDataInputFieldsWithHttpInfo($request_parameters, $isRe case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -307,7 +306,7 @@ public function getMandateDataInputFieldsWithHttpInfo($request_parameters, $isRe case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', + '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -315,7 +314,7 @@ public function getMandateDataInputFieldsWithHttpInfo($request_parameters, $isRe case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', + '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -358,7 +357,7 @@ function ($response) { public function getMandateDataInputFieldsAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputField[]'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]'; $request = $this->getMandateDataInputFieldsRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -513,7 +512,7 @@ public function getMandateDataInputFieldsRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 24.12.0; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -568,9 +567,9 @@ public function getMandateDataInputFieldsRequest($request_parameters) * * @param GetMandatesRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError + * @return \Avalara\SDK\Model\EInvoicing\V1\MandatesResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError */ public function getMandates($request_parameters) { @@ -585,9 +584,9 @@ public function getMandates($request_parameters) * * @param GetMandatesRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError|\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError|\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\EInvoicing\V1\MandatesResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) */ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) { @@ -643,7 +642,7 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) switch($statusCode) { case 200: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -651,12 +650,12 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -664,12 +663,12 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), $response->getStatusCode(), $response->getHeaders() ]; case 404: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\NotFoundError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -677,12 +676,12 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', []), $response->getStatusCode(), $response->getHeaders() ]; case 500: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\InternalServerError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -690,13 +689,13 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -715,7 +714,7 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse', + '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -723,7 +722,7 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ForbiddenError', + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -731,7 +730,7 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\NotFoundError', + '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -739,7 +738,7 @@ public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\InternalServerError', + '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -782,7 +781,7 @@ function ($response) { public function getMandatesAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\MandatesResponse'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse'; $request = $this->getMandatesRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -946,7 +945,7 @@ public function getMandatesRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 24.12.0; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1014,7 +1013,7 @@ class GetMandateDataInputFieldsRequest { public function __construct() { } public function getAvalaraVersion() { - return $this->avalara_version; + return $this->avalara_version ?? '1.2'; } public function setAvalaraVersion($avalara_version) { @@ -1073,7 +1072,7 @@ class GetMandatesRequest { public function __construct() { } public function getAvalaraVersion() { - return $this->avalara_version; + return $this->avalara_version ?? '1.2'; } public function setAvalaraVersion($avalara_version) { diff --git a/lib/API/EInvoicing/V1/TradingPartnersApi.php b/lib/API/EInvoicing/V1/TradingPartnersApi.php index 7f43566..68fc48a 100644 --- a/lib/API/EInvoicing/V1/TradingPartnersApi.php +++ b/lib/API/EInvoicing/V1/TradingPartnersApi.php @@ -9,7 +9,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,19 +19,18 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ -namespace Avalara\\SDK\API\\EInvoicing\\V1; +namespace Avalara\SDK\API\EInvoicing\V1; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; @@ -40,12 +39,12 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; -use Avalara\\SDK\ApiClient; -use Avalara\\SDK\ApiException; -use Avalara\\SDK\Configuration; -use Avalara\\SDK\HeaderSelector; -use Avalara\\SDK\ObjectSerializer; -use Avalara\\SDK\Utils\LogObject; +use Avalara\SDK\ApiClient; +use Avalara\SDK\ApiException; +use Avalara\SDK\Configuration; +use Avalara\SDK\HeaderSelector; +use Avalara\SDK\ObjectSerializer; +use Avalara\SDK\Utils\LogObject; class TradingPartnersApi { @@ -80,7 +79,7 @@ public function __construct(ApiClient $client ) private function setConfiguration($client): void { $this->verifyAPIClient($client); - $client->setSdkVersion(""); + $client->setSdkVersion("24.12.0"); $this->headerSelector = new HeaderSelector(); $this->client = $client; } @@ -123,7 +122,7 @@ public function getConfig() * * @param BatchSearchParticipantsRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ @@ -139,7 +138,7 @@ public function batchSearchParticipants($request_parameters) * * @param BatchSearchParticipantsRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ @@ -201,7 +200,7 @@ public function batchSearchParticipantsWithHttpInfo($request_parameters, $isRetr case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -209,7 +208,7 @@ public function batchSearchParticipantsWithHttpInfo($request_parameters, $isRetr case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -217,7 +216,7 @@ public function batchSearchParticipantsWithHttpInfo($request_parameters, $isRetr case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -225,7 +224,7 @@ public function batchSearchParticipantsWithHttpInfo($request_parameters, $isRetr case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -423,7 +422,7 @@ public function batchSearchParticipantsRequest($request_parameters) ['multipart/form-data'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 24.12.0; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -478,9 +477,9 @@ public function batchSearchParticipantsRequest($request_parameters) * * @param DownloadBatchSearchReportRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \SplFileObject|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse + * @return \SplFileObject|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse */ public function downloadBatchSearchReport($request_parameters) { @@ -495,9 +494,9 @@ public function downloadBatchSearchReport($request_parameters) * * @param DownloadBatchSearchReportRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \SplFileObject|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \SplFileObject|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function downloadBatchSearchReportWithHttpInfo($request_parameters, $isRetry = false) { @@ -566,7 +565,7 @@ public function downloadBatchSearchReportWithHttpInfo($request_parameters, $isRe $response->getHeaders() ]; case 401: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -574,12 +573,12 @@ public function downloadBatchSearchReportWithHttpInfo($request_parameters, $isRe $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -587,12 +586,12 @@ public function downloadBatchSearchReportWithHttpInfo($request_parameters, $isRe $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 404: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -600,12 +599,12 @@ public function downloadBatchSearchReportWithHttpInfo($request_parameters, $isRe $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 500: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -613,7 +612,7 @@ public function downloadBatchSearchReportWithHttpInfo($request_parameters, $isRe $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -646,7 +645,7 @@ public function downloadBatchSearchReportWithHttpInfo($request_parameters, $isRe case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -654,7 +653,7 @@ public function downloadBatchSearchReportWithHttpInfo($request_parameters, $isRe case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -662,7 +661,7 @@ public function downloadBatchSearchReportWithHttpInfo($request_parameters, $isRe case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -670,7 +669,7 @@ public function downloadBatchSearchReportWithHttpInfo($request_parameters, $isRe case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -838,7 +837,7 @@ public function downloadBatchSearchReportRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 24.12.0; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -893,9 +892,9 @@ public function downloadBatchSearchReportRequest($request_parameters) * * @param GetBatchSearchDetailRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch|\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse + * @return \Avalara\SDK\Model\EInvoicing\V1\BatchSearch|\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse */ public function getBatchSearchDetail($request_parameters) { @@ -910,9 +909,9 @@ public function getBatchSearchDetail($request_parameters) * * @param GetBatchSearchDetailRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch|\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\EInvoicing\V1\BatchSearch|\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function getBatchSearchDetailWithHttpInfo($request_parameters, $isRetry = false) { @@ -968,7 +967,7 @@ public function getBatchSearchDetailWithHttpInfo($request_parameters, $isRetry = switch($statusCode) { case 200: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\BatchSearch' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -976,12 +975,12 @@ public function getBatchSearchDetailWithHttpInfo($request_parameters, $isRetry = $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BatchSearch', []), $response->getStatusCode(), $response->getHeaders() ]; case 401: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -989,12 +988,12 @@ public function getBatchSearchDetailWithHttpInfo($request_parameters, $isRetry = $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1002,12 +1001,12 @@ public function getBatchSearchDetailWithHttpInfo($request_parameters, $isRetry = $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 500: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1015,13 +1014,13 @@ public function getBatchSearchDetailWithHttpInfo($request_parameters, $isRetry = $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearch'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1040,7 +1039,7 @@ public function getBatchSearchDetailWithHttpInfo($request_parameters, $isRetry = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch', + '\Avalara\SDK\Model\EInvoicing\V1\BatchSearch', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1048,7 +1047,7 @@ public function getBatchSearchDetailWithHttpInfo($request_parameters, $isRetry = case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse', + '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1056,7 +1055,7 @@ public function getBatchSearchDetailWithHttpInfo($request_parameters, $isRetry = case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1064,7 +1063,7 @@ public function getBatchSearchDetailWithHttpInfo($request_parameters, $isRetry = case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1107,7 +1106,7 @@ function ($response) { public function getBatchSearchDetailAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearch'; $request = $this->getBatchSearchDetailRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -1232,7 +1231,7 @@ public function getBatchSearchDetailRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 24.12.0; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1287,9 +1286,9 @@ public function getBatchSearchDetailRequest($request_parameters) * * @param ListBatchSearchesRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse + * @return \Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse */ public function listBatchSearches($request_parameters) { @@ -1304,9 +1303,9 @@ public function listBatchSearches($request_parameters) * * @param ListBatchSearchesRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function listBatchSearchesWithHttpInfo($request_parameters, $isRetry = false) { @@ -1362,7 +1361,7 @@ public function listBatchSearchesWithHttpInfo($request_parameters, $isRetry = fa switch($statusCode) { case 200: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1370,12 +1369,12 @@ public function listBatchSearchesWithHttpInfo($request_parameters, $isRetry = fa $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 401: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1383,12 +1382,12 @@ public function listBatchSearchesWithHttpInfo($request_parameters, $isRetry = fa $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1396,12 +1395,12 @@ public function listBatchSearchesWithHttpInfo($request_parameters, $isRetry = fa $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 500: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1409,13 +1408,13 @@ public function listBatchSearchesWithHttpInfo($request_parameters, $isRetry = fa $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1434,7 +1433,7 @@ public function listBatchSearchesWithHttpInfo($request_parameters, $isRetry = fa case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse', + '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1442,7 +1441,7 @@ public function listBatchSearchesWithHttpInfo($request_parameters, $isRetry = fa case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse', + '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1450,7 +1449,7 @@ public function listBatchSearchesWithHttpInfo($request_parameters, $isRetry = fa case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1458,7 +1457,7 @@ public function listBatchSearchesWithHttpInfo($request_parameters, $isRetry = fa case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1501,7 +1500,7 @@ function ($response) { public function listBatchSearchesAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearchListResponse'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse'; $request = $this->listBatchSearchesRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -1671,7 +1670,7 @@ public function listBatchSearchesRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 24.12.0; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1726,9 +1725,9 @@ public function listBatchSearchesRequest($request_parameters) * * @param SearchParticipantsRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse + * @return \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse */ public function searchParticipants($request_parameters) { @@ -1743,9 +1742,9 @@ public function searchParticipants($request_parameters) * * @param SearchParticipantsRequest The request parameters for the API call. * - * @throws \Avalara\\SDK\ApiException on non-2xx response + * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function searchParticipantsWithHttpInfo($request_parameters, $isRetry = false) { @@ -1801,7 +1800,7 @@ public function searchParticipantsWithHttpInfo($request_parameters, $isRetry = f switch($statusCode) { case 200: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1809,12 +1808,12 @@ public function searchParticipantsWithHttpInfo($request_parameters, $isRetry = f $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 400: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1822,12 +1821,12 @@ public function searchParticipantsWithHttpInfo($request_parameters, $isRetry = f $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 401: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1835,12 +1834,12 @@ public function searchParticipantsWithHttpInfo($request_parameters, $isRetry = f $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 403: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1848,12 +1847,12 @@ public function searchParticipantsWithHttpInfo($request_parameters, $isRetry = f $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 500: - if ('\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1861,13 +1860,13 @@ public function searchParticipantsWithHttpInfo($request_parameters, $isRetry = f $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1886,7 +1885,7 @@ public function searchParticipantsWithHttpInfo($request_parameters, $isRetry = f case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse', + '\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1894,7 +1893,7 @@ public function searchParticipantsWithHttpInfo($request_parameters, $isRetry = f case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1902,7 +1901,7 @@ public function searchParticipantsWithHttpInfo($request_parameters, $isRetry = f case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1910,7 +1909,7 @@ public function searchParticipantsWithHttpInfo($request_parameters, $isRetry = f case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1918,7 +1917,7 @@ public function searchParticipantsWithHttpInfo($request_parameters, $isRetry = f case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse', + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1961,7 +1960,7 @@ function ($response) { public function searchParticipantsAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponse'; + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponse'; $request = $this->searchParticipantsRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -2149,7 +2148,7 @@ public function searchParticipantsRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; ; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 24.12.0; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -2219,7 +2218,7 @@ class BatchSearchParticipantsRequest { public function __construct() { } public function getAvalaraVersion() { - return $this->avalara_version; + return $this->avalara_version ?? '1.2'; } public function setAvalaraVersion($avalara_version) { @@ -2279,7 +2278,7 @@ class DownloadBatchSearchReportRequest { public function __construct() { } public function getAvalaraVersion() { - return $this->avalara_version; + return $this->avalara_version ?? '1.2'; } public function setAvalaraVersion($avalara_version) { @@ -2325,7 +2324,7 @@ class GetBatchSearchDetailRequest { public function __construct() { } public function getAvalaraVersion() { - return $this->avalara_version; + return $this->avalara_version ?? '1.2'; } public function setAvalaraVersion($avalara_version) { @@ -2379,7 +2378,7 @@ class ListBatchSearchesRequest { public function __construct() { } public function getAvalaraVersion() { - return $this->avalara_version; + return $this->avalara_version ?? '1.2'; } public function setAvalaraVersion($avalara_version) { @@ -2463,7 +2462,7 @@ class SearchParticipantsRequest { public function __construct() { } public function getAvalaraVersion() { - return $this->avalara_version; + return $this->avalara_version ?? '1.2'; } public function setAvalaraVersion($avalara_version) { diff --git a/lib/Model/EInvoicing/V1/BadDownloadRequest.php b/lib/Model/EInvoicing/V1/BadDownloadRequest.php index 48914c1..9460bcf 100644 --- a/lib/Model/EInvoicing/V1/BadDownloadRequest.php +++ b/lib/Model/EInvoicing/V1/BadDownloadRequest.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * BadDownloadRequest Class Doc Comment * * @category Class * @description Returns an HTTP status code and message for a 'bad request' - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/BadRequest.php b/lib/Model/EInvoicing/V1/BadRequest.php index ac62c4f..7a1b43f 100644 --- a/lib/Model/EInvoicing/V1/BadRequest.php +++ b/lib/Model/EInvoicing/V1/BadRequest.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * BadRequest Class Doc Comment * * @category Class * @description Returns an HTTP status code and message for a 'bad request' - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/BatchSearch.php b/lib/Model/EInvoicing/V1/BatchSearch.php index eccf437..6f3eb20 100644 --- a/lib/Model/EInvoicing/V1/BatchSearch.php +++ b/lib/Model/EInvoicing/V1/BatchSearch.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,16 +38,16 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * BatchSearch Class Doc Comment * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -78,7 +77,7 @@ class BatchSearch implements ModelInterface, ArrayAccess, \JsonSerializable 'created' => '\DateTime', 'last_modified' => '\DateTime', 'status' => 'string', - 'error' => '\Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse' + 'error' => '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' ]; /** @@ -439,7 +438,7 @@ public function setStatus($status) /** * Gets error * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|null + * @return \Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|null */ public function getError() { @@ -449,7 +448,7 @@ public function getError() /** * Sets error * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\ErrorResponse|null $error error + * @param \Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|null $error error * * @return self */ diff --git a/lib/Model/EInvoicing/V1/BatchSearchListResponse.php b/lib/Model/EInvoicing/V1/BatchSearchListResponse.php index ca6435b..ae471c5 100644 --- a/lib/Model/EInvoicing/V1/BatchSearchListResponse.php +++ b/lib/Model/EInvoicing/V1/BatchSearchListResponse.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * BatchSearchListResponse Class Doc Comment * * @category Class * @description Schema for batch search list - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -75,7 +74,7 @@ class BatchSearchListResponse implements ModelInterface, ArrayAccess, \JsonSeria protected static $openAPITypes = [ 'at_record_set_count' => 'int', 'at_next_link' => 'string', - 'value' => '\Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch[]' + 'value' => '\Avalara\SDK\Model\EInvoicing\V1\BatchSearch[]' ]; /** @@ -282,7 +281,7 @@ public function setAtNextLink($at_next_link) /** * Gets value * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch[]|null + * @return \Avalara\SDK\Model\EInvoicing\V1\BatchSearch[]|null */ public function getValue() { @@ -292,7 +291,7 @@ public function getValue() /** * Sets value * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\BatchSearch[]|null $value value + * @param \Avalara\SDK\Model\EInvoicing\V1\BatchSearch[]|null $value value * * @return self */ diff --git a/lib/Model/EInvoicing/V1/ConditionalForField.php b/lib/Model/EInvoicing/V1/ConditionalForField.php index 2d5d030..ad4ca75 100644 --- a/lib/Model/EInvoicing/V1/ConditionalForField.php +++ b/lib/Model/EInvoicing/V1/ConditionalForField.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * ConditionalForField Class Doc Comment * * @category Class * @description Mandates for which this field is conditional - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -74,7 +73,7 @@ class ConditionalForField implements ModelInterface, ArrayAccess, \JsonSerializa */ protected static $openAPITypes = [ 'country_mandate' => 'string', - 'required_when' => '\Avalara\\SDK\Model\\EInvoicing\\V1\RequiredWhenField[]' + 'required_when' => '\Avalara\SDK\Model\EInvoicing\V1\RequiredWhenField[]' ]; /** @@ -252,7 +251,7 @@ public function setCountryMandate($country_mandate) /** * Gets required_when * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\RequiredWhenField[]|null + * @return \Avalara\SDK\Model\EInvoicing\V1\RequiredWhenField[]|null */ public function getRequiredWhen() { @@ -262,7 +261,7 @@ public function getRequiredWhen() /** * Sets required_when * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\RequiredWhenField[]|null $required_when Array of scenarios which describe when a particular field is conditional for a country mandate + * @param \Avalara\SDK\Model\EInvoicing\V1\RequiredWhenField[]|null $required_when Array of scenarios which describe when a particular field is conditional for a country mandate * * @return self */ diff --git a/lib/Model/EInvoicing/V1/DataInputField.php b/lib/Model/EInvoicing/V1/DataInputField.php index b4fbe59..382e00d 100644 --- a/lib/Model/EInvoicing/V1/DataInputField.php +++ b/lib/Model/EInvoicing/V1/DataInputField.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DataInputField Class Doc Comment * * @category Class * @description The Data Input Field - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -84,10 +83,10 @@ class DataInputField implements ModelInterface, ArrayAccess, \JsonSerializable 'documentation_link' => 'string', 'description' => 'string', 'is_segment' => 'bool', - 'required_for' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldRequiredFor', - 'conditional_for' => '\Avalara\\SDK\Model\\EInvoicing\\V1\ConditionalForField[]', - 'not_used_for' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldNotUsedFor', - 'optional_for' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldOptionalFor' + 'required_for' => '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldRequiredFor', + 'conditional_for' => '\Avalara\SDK\Model\EInvoicing\V1\ConditionalForField[]', + 'not_used_for' => '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldNotUsedFor', + 'optional_for' => '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldOptionalFor' ]; /** @@ -570,7 +569,7 @@ public function setIsSegment($is_segment) /** * Gets required_for * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldRequiredFor|null + * @return \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldRequiredFor|null */ public function getRequiredFor() { @@ -580,7 +579,7 @@ public function getRequiredFor() /** * Sets required_for * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldRequiredFor|null $required_for required_for + * @param \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldRequiredFor|null $required_for required_for * * @return self */ @@ -594,7 +593,7 @@ public function setRequiredFor($required_for) /** * Gets conditional_for * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\ConditionalForField[]|null + * @return \Avalara\SDK\Model\EInvoicing\V1\ConditionalForField[]|null */ public function getConditionalFor() { @@ -604,7 +603,7 @@ public function getConditionalFor() /** * Sets conditional_for * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\ConditionalForField[]|null $conditional_for conditional_for + * @param \Avalara\SDK\Model\EInvoicing\V1\ConditionalForField[]|null $conditional_for conditional_for * * @return self */ @@ -618,7 +617,7 @@ public function setConditionalFor($conditional_for) /** * Gets not_used_for * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldNotUsedFor|null + * @return \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldNotUsedFor|null */ public function getNotUsedFor() { @@ -628,7 +627,7 @@ public function getNotUsedFor() /** * Sets not_used_for * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldNotUsedFor|null $not_used_for not_used_for + * @param \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldNotUsedFor|null $not_used_for not_used_for * * @return self */ @@ -642,7 +641,7 @@ public function setNotUsedFor($not_used_for) /** * Gets optional_for * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldOptionalFor|null + * @return \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldOptionalFor|null */ public function getOptionalFor() { @@ -652,7 +651,7 @@ public function getOptionalFor() /** * Sets optional_for * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputFieldOptionalFor|null $optional_for optional_for + * @param \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldOptionalFor|null $optional_for optional_for * * @return self */ diff --git a/lib/Model/EInvoicing/V1/DataInputFieldNotUsedFor.php b/lib/Model/EInvoicing/V1/DataInputFieldNotUsedFor.php index faaa9dc..b578c19 100644 --- a/lib/Model/EInvoicing/V1/DataInputFieldNotUsedFor.php +++ b/lib/Model/EInvoicing/V1/DataInputFieldNotUsedFor.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DataInputFieldNotUsedFor Class Doc Comment * * @category Class * @description Array of CountryMandate names for which this field is not used. - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DataInputFieldOptionalFor.php b/lib/Model/EInvoicing/V1/DataInputFieldOptionalFor.php index d03c56a..4c169cd 100644 --- a/lib/Model/EInvoicing/V1/DataInputFieldOptionalFor.php +++ b/lib/Model/EInvoicing/V1/DataInputFieldOptionalFor.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DataInputFieldOptionalFor Class Doc Comment * * @category Class * @description Array of CountryMandate names for which this field is optional. - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DataInputFieldRequiredFor.php b/lib/Model/EInvoicing/V1/DataInputFieldRequiredFor.php index c8a666c..c6b239c 100644 --- a/lib/Model/EInvoicing/V1/DataInputFieldRequiredFor.php +++ b/lib/Model/EInvoicing/V1/DataInputFieldRequiredFor.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DataInputFieldRequiredFor Class Doc Comment * * @category Class * @description Array of CountryMandate names for which this field is required. - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DataInputFieldsResponse.php b/lib/Model/EInvoicing/V1/DataInputFieldsResponse.php index e50e02b..f4cec87 100644 --- a/lib/Model/EInvoicing/V1/DataInputFieldsResponse.php +++ b/lib/Model/EInvoicing/V1/DataInputFieldsResponse.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,16 +38,16 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DataInputFieldsResponse Class Doc Comment * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -74,7 +73,7 @@ class DataInputFieldsResponse implements ModelInterface, ArrayAccess, \JsonSeria protected static $openAPITypes = [ 'at_recordset_count' => 'float', 'at_next_link' => 'string', - 'value' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DataInputField[]' + 'value' => '\Avalara\SDK\Model\EInvoicing\V1\DataInputField[]' ]; /** @@ -281,7 +280,7 @@ public function setAtNextLink($at_next_link) /** * Gets value * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputField[]|null + * @return \Avalara\SDK\Model\EInvoicing\V1\DataInputField[]|null */ public function getValue() { @@ -291,7 +290,7 @@ public function getValue() /** * Sets value * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DataInputField[]|null $value Array of Data Input Fields + * @param \Avalara\SDK\Model\EInvoicing\V1\DataInputField[]|null $value Array of Data Input Fields * * @return self */ diff --git a/lib/Model/EInvoicing/V1/DirectorySearchResponse.php b/lib/Model/EInvoicing/V1/DirectorySearchResponse.php index ee9c4b6..d7b9444 100644 --- a/lib/Model/EInvoicing/V1/DirectorySearchResponse.php +++ b/lib/Model/EInvoicing/V1/DirectorySearchResponse.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DirectorySearchResponse Class Doc Comment * * @category Class * @description Response schema for directory search results - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -75,7 +74,7 @@ class DirectorySearchResponse implements ModelInterface, ArrayAccess, \JsonSeria protected static $openAPITypes = [ 'at_record_set_count' => 'int', 'at_next_link' => 'string', - 'value' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInner[]' + 'value' => '\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInner[]' ]; /** @@ -282,7 +281,7 @@ public function setAtNextLink($at_next_link) /** * Gets value * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInner[]|null + * @return \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInner[]|null */ public function getValue() { @@ -292,7 +291,7 @@ public function getValue() /** * Sets value * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInner[]|null $value value + * @param \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInner[]|null $value value * * @return self */ diff --git a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInner.php b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInner.php index 52a9456..dc6668a 100644 --- a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInner.php +++ b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInner.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,16 +38,16 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DirectorySearchResponseValueInner Class Doc Comment * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -76,9 +75,9 @@ class DirectorySearchResponseValueInner implements ModelInterface, ArrayAccess, 'name' => 'string', 'network' => 'string', 'registration_date' => '\DateTime', - 'identifiers' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerIdentifiersInner[]', - 'addresses' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerAddressesInner[]', - 'supported_document_types' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner[]' + 'identifiers' => '\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerIdentifiersInner[]', + 'addresses' => '\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerAddressesInner[]', + 'supported_document_types' => '\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner[]' ]; /** @@ -353,7 +352,7 @@ public function setRegistrationDate($registration_date) /** * Gets identifiers * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerIdentifiersInner[]|null + * @return \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerIdentifiersInner[]|null */ public function getIdentifiers() { @@ -363,7 +362,7 @@ public function getIdentifiers() /** * Sets identifiers * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerIdentifiersInner[]|null $identifiers identifiers + * @param \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerIdentifiersInner[]|null $identifiers identifiers * * @return self */ @@ -377,7 +376,7 @@ public function setIdentifiers($identifiers) /** * Gets addresses * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerAddressesInner[]|null + * @return \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerAddressesInner[]|null */ public function getAddresses() { @@ -387,7 +386,7 @@ public function getAddresses() /** * Sets addresses * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerAddressesInner[]|null $addresses addresses + * @param \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerAddressesInner[]|null $addresses addresses * * @return self */ @@ -401,7 +400,7 @@ public function setAddresses($addresses) /** * Gets supported_document_types * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner[]|null + * @return \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner[]|null */ public function getSupportedDocumentTypes() { @@ -411,7 +410,7 @@ public function getSupportedDocumentTypes() /** * Sets supported_document_types * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner[]|null $supported_document_types supported_document_types + * @param \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner[]|null $supported_document_types supported_document_types * * @return self */ diff --git a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.php b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.php index 21576b1..ea03468 100644 --- a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.php +++ b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,16 +38,16 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DirectorySearchResponseValueInnerAddressesInner Class Doc Comment * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.php b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.php index 2548dd7..583be5c 100644 --- a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.php +++ b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,16 +38,16 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DirectorySearchResponseValueInnerIdentifiersInner Class Doc Comment * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.php b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.php index 258a188..2ebe172 100644 --- a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.php +++ b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,16 +38,16 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DirectorySearchResponseValueInnerSupportedDocumentTypesInner Class Doc Comment * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DocumentFetch.php b/lib/Model/EInvoicing/V1/DocumentFetch.php index 8a1079e..103c8d0 100644 --- a/lib/Model/EInvoicing/V1/DocumentFetch.php +++ b/lib/Model/EInvoicing/V1/DocumentFetch.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,16 +38,16 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DocumentFetch Class Doc Comment * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DocumentFetchRequest.php b/lib/Model/EInvoicing/V1/DocumentFetchRequest.php index dc7400e..859ae77 100644 --- a/lib/Model/EInvoicing/V1/DocumentFetchRequest.php +++ b/lib/Model/EInvoicing/V1/DocumentFetchRequest.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,16 +38,16 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DocumentFetchRequest Class Doc Comment * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -72,8 +71,8 @@ class DocumentFetchRequest implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openAPITypes = [ - 'data' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestDataInner[]', - 'metadata' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestMetadata' + 'data' => '\Avalara\SDK\Model\EInvoicing\V1\DocumentFetchRequestDataInner[]', + 'metadata' => '\Avalara\SDK\Model\EInvoicing\V1\DocumentFetchRequestMetadata' ]; /** @@ -227,7 +226,7 @@ public function valid() /** * Gets data * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestDataInner[]|null + * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentFetchRequestDataInner[]|null */ public function getData() { @@ -237,7 +236,7 @@ public function getData() /** * Sets data * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestDataInner[]|null $data Array of key-value pairs used to retrieve inbound documents from the Tax Authority + * @param \Avalara\SDK\Model\EInvoicing\V1\DocumentFetchRequestDataInner[]|null $data Array of key-value pairs used to retrieve inbound documents from the Tax Authority * * @return self */ @@ -251,7 +250,7 @@ public function setData($data) /** * Gets metadata * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestMetadata|null + * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentFetchRequestMetadata|null */ public function getMetadata() { @@ -261,7 +260,7 @@ public function getMetadata() /** * Sets metadata * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentFetchRequestMetadata|null $metadata metadata + * @param \Avalara\SDK\Model\EInvoicing\V1\DocumentFetchRequestMetadata|null $metadata metadata * * @return self */ diff --git a/lib/Model/EInvoicing/V1/DocumentFetchRequestDataInner.php b/lib/Model/EInvoicing/V1/DocumentFetchRequestDataInner.php index 4735112..82c1ce1 100644 --- a/lib/Model/EInvoicing/V1/DocumentFetchRequestDataInner.php +++ b/lib/Model/EInvoicing/V1/DocumentFetchRequestDataInner.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,16 +38,16 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DocumentFetchRequestDataInner Class Doc Comment * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DocumentFetchRequestMetadata.php b/lib/Model/EInvoicing/V1/DocumentFetchRequestMetadata.php index 90ef141..81267a5 100644 --- a/lib/Model/EInvoicing/V1/DocumentFetchRequestMetadata.php +++ b/lib/Model/EInvoicing/V1/DocumentFetchRequestMetadata.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,16 +38,16 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DocumentFetchRequestMetadata Class Doc Comment * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DocumentListResponse.php b/lib/Model/EInvoicing/V1/DocumentListResponse.php index 5735b92..8a0255b 100644 --- a/lib/Model/EInvoicing/V1/DocumentListResponse.php +++ b/lib/Model/EInvoicing/V1/DocumentListResponse.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DocumentListResponse Class Doc Comment * * @category Class * @description Returns the requested list of documents - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -75,7 +74,7 @@ class DocumentListResponse implements ModelInterface, ArrayAccess, \JsonSerializ protected static $openAPITypes = [ 'at_recordset_count' => 'string', 'at_next_link' => 'string', - 'value' => '\Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSummary[]' + 'value' => '\Avalara\SDK\Model\EInvoicing\V1\DocumentSummary[]' ]; /** @@ -285,7 +284,7 @@ public function setAtNextLink($at_next_link) /** * Gets value * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSummary[] + * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentSummary[] */ public function getValue() { @@ -295,7 +294,7 @@ public function getValue() /** * Sets value * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\DocumentSummary[] $value Array of documents matching query parameters + * @param \Avalara\SDK\Model\EInvoicing\V1\DocumentSummary[] $value Array of documents matching query parameters * * @return self */ diff --git a/lib/Model/EInvoicing/V1/DocumentStatusResponse.php b/lib/Model/EInvoicing/V1/DocumentStatusResponse.php index df15beb..b7ba7c3 100644 --- a/lib/Model/EInvoicing/V1/DocumentStatusResponse.php +++ b/lib/Model/EInvoicing/V1/DocumentStatusResponse.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DocumentStatusResponse Class Doc Comment * * @category Class * @description Returns the current document ID and status - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -75,7 +74,7 @@ class DocumentStatusResponse implements ModelInterface, ArrayAccess, \JsonSerial protected static $openAPITypes = [ 'id' => 'string', 'status' => 'string', - 'events' => '\Avalara\\SDK\Model\\EInvoicing\\V1\StatusEvent[]' + 'events' => '\Avalara\SDK\Model\EInvoicing\V1\StatusEvent[]' ]; /** @@ -282,7 +281,7 @@ public function setStatus($status) /** * Gets events * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\StatusEvent[]|null + * @return \Avalara\SDK\Model\EInvoicing\V1\StatusEvent[]|null */ public function getEvents() { @@ -292,7 +291,7 @@ public function getEvents() /** * Sets events * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\StatusEvent[]|null $events events + * @param \Avalara\SDK\Model\EInvoicing\V1\StatusEvent[]|null $events events * * @return self */ diff --git a/lib/Model/EInvoicing/V1/DocumentSubmissionError.php b/lib/Model/EInvoicing/V1/DocumentSubmissionError.php index fff3da0..27755bf 100644 --- a/lib/Model/EInvoicing/V1/DocumentSubmissionError.php +++ b/lib/Model/EInvoicing/V1/DocumentSubmissionError.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DocumentSubmissionError Class Doc Comment * * @category Class * @description Returns an HTTP status code and message for an 'exception' - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DocumentSubmitResponse.php b/lib/Model/EInvoicing/V1/DocumentSubmitResponse.php index 80d4c70..fb25b58 100644 --- a/lib/Model/EInvoicing/V1/DocumentSubmitResponse.php +++ b/lib/Model/EInvoicing/V1/DocumentSubmitResponse.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DocumentSubmitResponse Class Doc Comment * * @category Class * @description Returns the unique ID of a successful document submission - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/DocumentSummary.php b/lib/Model/EInvoicing/V1/DocumentSummary.php index 2f16710..c5459f8 100644 --- a/lib/Model/EInvoicing/V1/DocumentSummary.php +++ b/lib/Model/EInvoicing/V1/DocumentSummary.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * DocumentSummary Class Doc Comment * * @category Class * @description Displays a summary of information about the document - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/ErrorResponse.php b/lib/Model/EInvoicing/V1/ErrorResponse.php index 91d0c01..7f07c5c 100644 --- a/lib/Model/EInvoicing/V1/ErrorResponse.php +++ b/lib/Model/EInvoicing/V1/ErrorResponse.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,16 +38,16 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * ErrorResponse Class Doc Comment * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/ForbiddenError.php b/lib/Model/EInvoicing/V1/ForbiddenError.php index 627c81a..be517db 100644 --- a/lib/Model/EInvoicing/V1/ForbiddenError.php +++ b/lib/Model/EInvoicing/V1/ForbiddenError.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * ForbiddenError Class Doc Comment * * @category Class * @description Returns an optional message with a 'forbidden' response - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/InputDataFormats.php b/lib/Model/EInvoicing/V1/InputDataFormats.php index 1760a0e..4dd023d 100644 --- a/lib/Model/EInvoicing/V1/InputDataFormats.php +++ b/lib/Model/EInvoicing/V1/InputDataFormats.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * InputDataFormats Class Doc Comment * * @category Class * @description Format and version used when inputting the data - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/InternalServerError.php b/lib/Model/EInvoicing/V1/InternalServerError.php index c4f20ca..ec758b9 100644 --- a/lib/Model/EInvoicing/V1/InternalServerError.php +++ b/lib/Model/EInvoicing/V1/InternalServerError.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * InternalServerError Class Doc Comment * * @category Class * @description Returns an optional message with a 'InternalServerError' response - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/Mandate.php b/lib/Model/EInvoicing/V1/Mandate.php index e0c8453..0fbdde7 100644 --- a/lib/Model/EInvoicing/V1/Mandate.php +++ b/lib/Model/EInvoicing/V1/Mandate.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,16 +38,16 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * Mandate Class Doc Comment * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -78,8 +77,8 @@ class Mandate implements ModelInterface, ArrayAccess, \JsonSerializable 'description' => 'string', 'supported_by_partner_api' => 'bool', 'mandate_format' => 'string', - 'input_data_formats' => '\Avalara\\SDK\Model\\EInvoicing\\V1\InputDataFormats[]', - 'workflow_ids' => '\Avalara\\SDK\Model\\EInvoicing\\V1\WorkflowIds[]' + 'input_data_formats' => '\Avalara\SDK\Model\EInvoicing\V1\InputDataFormats[]', + 'workflow_ids' => '\Avalara\SDK\Model\EInvoicing\V1\WorkflowIds[]' ]; /** @@ -407,7 +406,7 @@ public function setMandateFormat($mandate_format) /** * Gets input_data_formats * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\InputDataFormats[]|null + * @return \Avalara\SDK\Model\EInvoicing\V1\InputDataFormats[]|null */ public function getInputDataFormats() { @@ -417,7 +416,7 @@ public function getInputDataFormats() /** * Sets input_data_formats * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\InputDataFormats[]|null $input_data_formats Format and version used when inputting the data + * @param \Avalara\SDK\Model\EInvoicing\V1\InputDataFormats[]|null $input_data_formats Format and version used when inputting the data * * @return self */ @@ -431,7 +430,7 @@ public function setInputDataFormats($input_data_formats) /** * Gets workflow_ids * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\WorkflowIds[]|null + * @return \Avalara\SDK\Model\EInvoicing\V1\WorkflowIds[]|null */ public function getWorkflowIds() { @@ -441,7 +440,7 @@ public function getWorkflowIds() /** * Sets workflow_ids * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\WorkflowIds[]|null $workflow_ids Workflow ID list + * @param \Avalara\SDK\Model\EInvoicing\V1\WorkflowIds[]|null $workflow_ids Workflow ID list * * @return self */ diff --git a/lib/Model/EInvoicing/V1/MandateDataInputField.php b/lib/Model/EInvoicing/V1/MandateDataInputField.php index be674f4..b480c97 100644 --- a/lib/Model/EInvoicing/V1/MandateDataInputField.php +++ b/lib/Model/EInvoicing/V1/MandateDataInputField.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * MandateDataInputField Class Doc Comment * * @category Class * @description The Data Input Field - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -79,7 +78,7 @@ class MandateDataInputField implements ModelInterface, ArrayAccess, \JsonSeriali 'path' => 'string', 'path_type' => 'string', 'field_name' => 'string', - 'namespace' => '\Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputFieldNamespace', + 'namespace' => '\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputFieldNamespace', 'example_or_fixed_value' => 'string', 'accepted_values' => 'string[]', 'documentation_link' => 'string', @@ -444,7 +443,7 @@ public function setFieldName($field_name) /** * Gets namespace * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputFieldNamespace|null + * @return \Avalara\SDK\Model\EInvoicing\V1\MandateDataInputFieldNamespace|null */ public function getNamespace() { @@ -454,7 +453,7 @@ public function getNamespace() /** * Sets namespace * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\MandateDataInputFieldNamespace|null $namespace namespace + * @param \Avalara\SDK\Model\EInvoicing\V1\MandateDataInputFieldNamespace|null $namespace namespace * * @return self */ diff --git a/lib/Model/EInvoicing/V1/MandateDataInputFieldNamespace.php b/lib/Model/EInvoicing/V1/MandateDataInputFieldNamespace.php index 47feffa..afa9f08 100644 --- a/lib/Model/EInvoicing/V1/MandateDataInputFieldNamespace.php +++ b/lib/Model/EInvoicing/V1/MandateDataInputFieldNamespace.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * MandateDataInputFieldNamespace Class Doc Comment * * @category Class * @description The namespace of the UBL element - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/MandatesResponse.php b/lib/Model/EInvoicing/V1/MandatesResponse.php index 20b8e0a..4ba33e1 100644 --- a/lib/Model/EInvoicing/V1/MandatesResponse.php +++ b/lib/Model/EInvoicing/V1/MandatesResponse.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * MandatesResponse Class Doc Comment * * @category Class * @description Mandate list response schema - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess @@ -75,7 +74,7 @@ class MandatesResponse implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'at_recordset_count' => 'float', 'at_next_link' => 'string', - 'value' => '\Avalara\\SDK\Model\\EInvoicing\\V1\Mandate[]' + 'value' => '\Avalara\SDK\Model\EInvoicing\V1\Mandate[]' ]; /** @@ -282,7 +281,7 @@ public function setAtNextLink($at_next_link) /** * Gets value * - * @return \Avalara\\SDK\Model\\EInvoicing\\V1\Mandate[]|null + * @return \Avalara\SDK\Model\EInvoicing\V1\Mandate[]|null */ public function getValue() { @@ -292,7 +291,7 @@ public function getValue() /** * Sets value * - * @param \Avalara\\SDK\Model\\EInvoicing\\V1\Mandate[]|null $value Mandates schema + * @param \Avalara\SDK\Model\EInvoicing\V1\Mandate[]|null $value Mandates schema * * @return self */ diff --git a/lib/Model/EInvoicing/V1/ModelInterface.php b/lib/Model/EInvoicing/V1/ModelInterface.php index 2b451a4..b138ddd 100644 --- a/lib/Model/EInvoicing/V1/ModelInterface.php +++ b/lib/Model/EInvoicing/V1/ModelInterface.php @@ -5,7 +5,7 @@ * PHP version 7.4 * * @category Class - * @package Avalara\\SDK\Model\\EInvoicing\\V1 + * @package Avalara\SDK\Model\EInvoicing\V1 * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,12 +38,12 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; /** * Interface abstracting model access. * - * @package Avalara\\SDK\Model\\EInvoicing\\V1 + * @package Avalara\SDK\Model\EInvoicing\V1 * @author OpenAPI Generator team */ interface ModelInterface diff --git a/lib/Model/EInvoicing/V1/NotFoundError.php b/lib/Model/EInvoicing/V1/NotFoundError.php index 31e635b..4bf9d14 100644 --- a/lib/Model/EInvoicing/V1/NotFoundError.php +++ b/lib/Model/EInvoicing/V1/NotFoundError.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * NotFoundError Class Doc Comment * * @category Class * @description Returns an HTTP error code and message for a 'not found' error - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/NotUsedForField.php b/lib/Model/EInvoicing/V1/NotUsedForField.php index dc8fddb..24d0286 100644 --- a/lib/Model/EInvoicing/V1/NotUsedForField.php +++ b/lib/Model/EInvoicing/V1/NotUsedForField.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * NotUsedForField Class Doc Comment * * @category Class * @description Mandates for which this field is not used - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/RequiredWhenField.php b/lib/Model/EInvoicing/V1/RequiredWhenField.php index bef1931..b75ddc1 100644 --- a/lib/Model/EInvoicing/V1/RequiredWhenField.php +++ b/lib/Model/EInvoicing/V1/RequiredWhenField.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,16 +38,16 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * RequiredWhenField Class Doc Comment * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/StatusEvent.php b/lib/Model/EInvoicing/V1/StatusEvent.php index 8f2cd0e..e193406 100644 --- a/lib/Model/EInvoicing/V1/StatusEvent.php +++ b/lib/Model/EInvoicing/V1/StatusEvent.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * StatusEvent Class Doc Comment * * @category Class * @description Displays when a status event occurred - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/SubmitDocumentMetadata.php b/lib/Model/EInvoicing/V1/SubmitDocumentMetadata.php index 6418373..65ad754 100644 --- a/lib/Model/EInvoicing/V1/SubmitDocumentMetadata.php +++ b/lib/Model/EInvoicing/V1/SubmitDocumentMetadata.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * SubmitDocumentMetadata Class Doc Comment * * @category Class * @description Key value pairs of metadata for a document submission <br><pre>{ \"workflowId\": \"partner-einvoicing\", \"dataFormat\": \"ubl-invoice\", \"dataFormatVersion\": \"2.1\", \"countryCode\": \"SA\", \"countryMandate\": \"SA-Phase1-B2B\" }</pre> <br> - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/SubmitInteropDocument202Response.php b/lib/Model/EInvoicing/V1/SubmitInteropDocument202Response.php index 1c764cd..e3a3c53 100644 --- a/lib/Model/EInvoicing/V1/SubmitInteropDocument202Response.php +++ b/lib/Model/EInvoicing/V1/SubmitInteropDocument202Response.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,16 +38,16 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * SubmitInteropDocument202Response Class Doc Comment * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/lib/Model/EInvoicing/V1/WorkflowIds.php b/lib/Model/EInvoicing/V1/WorkflowIds.php index 0e8b4cf..369d05a 100644 --- a/lib/Model/EInvoicing/V1/WorkflowIds.php +++ b/lib/Model/EInvoicing/V1/WorkflowIds.php @@ -5,7 +5,7 @@ * PHP version 7.3 * * @category Class - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -13,7 +13,7 @@ /* * AvaTax Software Development Kit for PHP * - * (c) 2004-2022 Avalara, Inc. + * (c) 2004-2025 Avalara, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,11 @@ * An API that supports sending data for an E-Invoicing compliance use-case. * * @category Avalara client libraries - * @package Avalara\\SDK\API\\EInvoicing\\V1 + * @package Avalara\SDK\API\EInvoicing\V1 * @author Sachin Baijal * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. + * @copyright 2004-2025 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK */ @@ -39,17 +38,17 @@ * Do not edit the class manually. */ -namespace Avalara\\SDK\Model\\EInvoicing\\V1; +namespace Avalara\SDK\Model\EInvoicing\V1; use \ArrayAccess; -use \Avalara\\SDK\ObjectSerializer; -use \Avalara\\SDK\Model\ModelInterface; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; /** * WorkflowIds Class Doc Comment * * @category Class * @description Workflow ID list - * @package Avalara\\SDK + * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements \ArrayAccess diff --git a/test/Integration/DocumentsApiTest.php b/test/Integration/DocumentsApiTest.php index 4711a55..86fa23b 100644 --- a/test/Integration/DocumentsApiTest.php +++ b/test/Integration/DocumentsApiTest.php @@ -40,32 +40,31 @@ public static function setUpBeforeClass(): void public function testGetDocumentsList() { - // $apiInstance = new \Avalara\SDK\API\EInvoicing\V1\DocumentsApi(self::$client); + $apiInstance = new \Avalara\SDK\API\EInvoicing\V1\DocumentsApi(self::$client); - // $request_options = new \Avalara\SDK\API\EInvoicing\V1\GetDocumentListRequest(); - // $request_options->setAvalaraVersion('1.0'); + $request_options = new \Avalara\SDK\API\EInvoicing\V1\GetDocumentListRequest(); - // try { - // $result=$apiInstance->getDocumentListAsync($request_options); - // $result->then( - // function($response) { - // $this->assertNotNull($response); - // print_r($response); - // }, - // function(\Exception $e){ - // echo $e; - // echo 'Exception : ', $e->getMessage(), PHP_EOL; - // echo 'Exception Response Body: ', $e->getResponseBody(), PHP_EOL; - // } - // ); - // // Tick the promise queue to trigger the callback - // $result->wait(); - // \GuzzleHttp\Promise\queue(); - // } - // catch (Exception $e) { - // echo $e; - // echo 'Exception : ', $e->getMessage(), PHP_EOL; - // } + try { + $result=$apiInstance->getDocumentListAsync($request_options); + $result->then( + function($response) { + $this->assertNotNull($response); + print_r($response); + }, + function(\Exception $e){ + echo $e; + echo 'Exception : ', $e->getMessage(), PHP_EOL; + echo 'Exception Response Body: ', $e->getResponseBody(), PHP_EOL; + } + ); + // Tick the promise queue to trigger the callback + $result->wait(); + \GuzzleHttp\Promise\queue(); + } + catch (Exception $e) { + echo $e; + echo 'Exception : ', $e->getMessage(), PHP_EOL; + } } } \ No newline at end of file