From 201b6601e30205acda349801203d7544256d5a3d Mon Sep 17 00:00:00 2001 From: Jonathan Wenger Date: Fri, 20 Dec 2024 09:48:44 -0800 Subject: [PATCH 1/4] Updates for 24.12.10 --- README.md | 116 +- docs/EInvoicing/V1/BatchSearch.md | 16 + docs/EInvoicing/V1/BatchSearchListResponse.md | 13 + docs/EInvoicing/V1/DataInputField.md | 2 +- docs/EInvoicing/V1/DataInputFieldsApi.md | 12 +- docs/EInvoicing/V1/DataInputFieldsResponse.md | 2 +- docs/EInvoicing/V1/DirectorySearchResponse.md | 13 + .../V1/DirectorySearchResponseValueInner.md | 16 + ...ySearchResponseValueInnerAddressesInner.md | 14 + ...earchResponseValueInnerIdentifiersInner.md | 11 + ...seValueInnerSupportedDocumentTypesInner.md | 13 + docs/EInvoicing/V1/DocumentFetch.md | 12 + docs/EInvoicing/V1/DocumentListResponse.md | 4 +- docs/EInvoicing/V1/DocumentStatusResponse.md | 2 +- docs/EInvoicing/V1/DocumentSummary.md | 16 +- docs/EInvoicing/V1/DocumentsApi.md | 121 +- docs/EInvoicing/V1/ErrorResponse.md | 13 + docs/EInvoicing/V1/FetchDocumentsRequest.md | 11 + .../V1/FetchDocumentsRequestDataInner.md | 11 + .../V1/FetchDocumentsRequestMetadata.md | 14 + docs/EInvoicing/V1/InputDataFormats.md | 2 +- docs/EInvoicing/V1/InteropApi.md | 100 ++ docs/EInvoicing/V1/Mandate.md | 4 +- docs/EInvoicing/V1/MandateDataInputField.md | 24 + .../V1/MandateDataInputFieldNamespace.md | 12 + docs/EInvoicing/V1/MandatesApi.md | 97 +- docs/EInvoicing/V1/MandatesResponse.md | 2 +- docs/EInvoicing/V1/StatusEvent.md | 2 + docs/EInvoicing/V1/SubmitDocumentMetadata.md | 4 +- .../V1/SubmitInteropDocument202Response.md | 11 + docs/EInvoicing/V1/TradingPartnersApi.md | 467 +++++++ .../Api/EInvoicing/V1/DataInputFieldsApi.cs | 18 +- .../Api/EInvoicing/V1/DocumentsApi.cs | 242 +++- .../Api/EInvoicing/V1/InteropApi.cs | 330 +++++ .../Api/EInvoicing/V1/MandatesApi.cs | 218 ++- .../Api/EInvoicing/V1/TradingPartnersApi.cs | 1222 +++++++++++++++++ .../Model/EInvoicing/V1/BadDownloadRequest.cs | 83 +- .../Model/EInvoicing/V1/BadRequest.cs | 73 +- .../Model/EInvoicing/V1/BatchSearch.cs | 191 +++ .../EInvoicing/V1/BatchSearchListResponse.cs | 115 ++ .../EInvoicing/V1/ConditionalForField.cs | 73 +- .../Model/EInvoicing/V1/DataInputField.cs | 209 +-- .../EInvoicing/V1/DataInputFieldNotUsedFor.cs | 62 +- .../V1/DataInputFieldOptionalFor.cs | 62 +- .../V1/DataInputFieldRequiredFor.cs | 62 +- .../EInvoicing/V1/DataInputFieldsResponse.cs | 93 +- .../EInvoicing/V1/DirectorySearchResponse.cs | 115 ++ .../V1/DirectorySearchResponseValueInner.cs | 155 +++ ...ySearchResponseValueInnerAddressesInner.cs | 134 ++ ...earchResponseValueInnerIdentifiersInner.cs | 106 ++ ...seValueInnerSupportedDocumentTypesInner.cs | 128 ++ .../Model/EInvoicing/V1/DocumentFetch.cs | 117 ++ .../EInvoicing/V1/DocumentListResponse.cs | 107 +- .../EInvoicing/V1/DocumentStatusResponse.cs | 89 +- .../EInvoicing/V1/DocumentSubmissionError.cs | 73 +- .../EInvoicing/V1/DocumentSubmitResponse.cs | 63 +- .../Model/EInvoicing/V1/DocumentSummary.cs | 245 ++-- .../Model/EInvoicing/V1/ErrorResponse.cs | 124 ++ .../EInvoicing/V1/FetchDocumentsRequest.cs | 104 ++ .../V1/FetchDocumentsRequestDataInner.cs | 119 ++ .../V1/FetchDocumentsRequestMetadata.cs | 164 +++ .../Model/EInvoicing/V1/ForbiddenError.cs | 63 +- .../Model/EInvoicing/V1/InputDataFormats.cs | 79 +- .../EInvoicing/V1/InternalServerError.cs | 73 +- .../Model/EInvoicing/V1/Mandate.cs | 145 +- .../EInvoicing/V1/MandateDataInputField.cs | 235 ++++ .../V1/MandateDataInputFieldNamespace.cs | 105 ++ .../Model/EInvoicing/V1/MandatesResponse.cs | 93 +- .../Model/EInvoicing/V1/NotFoundError.cs | 73 +- .../Model/EInvoicing/V1/NotUsedForField.cs | 62 +- .../Model/EInvoicing/V1/RequiredWhenField.cs | 62 +- .../Model/EInvoicing/V1/StatusEvent.cs | 97 +- .../EInvoicing/V1/SubmitDocumentMetadata.cs | 151 +- .../V1/SubmitInteropDocument202Response.cs | 106 ++ .../Model/EInvoicing/V1/WorkflowIds.cs | 73 +- 75 files changed, 5685 insertions(+), 1785 deletions(-) create mode 100644 docs/EInvoicing/V1/BatchSearch.md create mode 100644 docs/EInvoicing/V1/BatchSearchListResponse.md create mode 100644 docs/EInvoicing/V1/DirectorySearchResponse.md create mode 100644 docs/EInvoicing/V1/DirectorySearchResponseValueInner.md create mode 100644 docs/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.md create mode 100644 docs/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.md create mode 100644 docs/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md create mode 100644 docs/EInvoicing/V1/DocumentFetch.md create mode 100644 docs/EInvoicing/V1/ErrorResponse.md create mode 100644 docs/EInvoicing/V1/FetchDocumentsRequest.md create mode 100644 docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md create mode 100644 docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md create mode 100644 docs/EInvoicing/V1/InteropApi.md create mode 100644 docs/EInvoicing/V1/MandateDataInputField.md create mode 100644 docs/EInvoicing/V1/MandateDataInputFieldNamespace.md create mode 100644 docs/EInvoicing/V1/SubmitInteropDocument202Response.md create mode 100644 docs/EInvoicing/V1/TradingPartnersApi.md create mode 100644 src/Avalara.SDK/Api/EInvoicing/V1/InteropApi.cs create mode 100644 src/Avalara.SDK/Api/EInvoicing/V1/TradingPartnersApi.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/BatchSearch.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/BatchSearchListResponse.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponse.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInner.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetch.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/ErrorResponse.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/FetchDocumentsRequest.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/FetchDocumentsRequestDataInner.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/FetchDocumentsRequestMetadata.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/MandateDataInputField.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/MandateDataInputFieldNamespace.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/SubmitInteropDocument202Response.cs diff --git a/README.md b/README.md index 4f9f3a7..eb10c9a 100644 --- a/README.md +++ b/README.md @@ -222,10 +222,44 @@ 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 @@ -254,6 +288,84 @@ Class | Method | HTTP request | Description - [Model.EInvoicing.V1.NotUsedForField](docs/EInvoicing/V1/NotUsedForField.md) - [Model.EInvoicing.V1.RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) - [Model.EInvoicing.V1.StatusEvent](docs/EInvoicing/V1/StatusEvent.md) - - [Model.EInvoicing.V1.SubmitDocumentData](docs/EInvoicing/V1/SubmitDocumentData.md) - [Model.EInvoicing.V1.SubmitDocumentMetadata](docs/EInvoicing/V1/SubmitDocumentMetadata.md) - [Model.EInvoicing.V1.WorkflowIds](docs/EInvoicing/V1/WorkflowIds.md) + + + +### EInvoicing V1 Model Documentation + + - [Model.EInvoicing.V1.BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) + - [Model.EInvoicing.V1.BadRequest](docs/EInvoicing/V1/BadRequest.md) + - [Model.EInvoicing.V1.ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) + - [Model.EInvoicing.V1.DataInputField](docs/EInvoicing/V1/DataInputField.md) + - [Model.EInvoicing.V1.DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) + - [Model.EInvoicing.V1.DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) + - [Model.EInvoicing.V1.DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) + - [Model.EInvoicing.V1.DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) + - [Model.EInvoicing.V1.DocumentFetch](docs/EInvoicing/V1/DocumentFetch.md) + - [Model.EInvoicing.V1.DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) + - [Model.EInvoicing.V1.DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) + - [Model.EInvoicing.V1.DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) + - [Model.EInvoicing.V1.DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) + - [Model.EInvoicing.V1.DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) + - [Model.EInvoicing.V1.FetchDocumentsRequest](docs/EInvoicing/V1/FetchDocumentsRequest.md) + - [Model.EInvoicing.V1.FetchDocumentsRequestDataInner](docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md) + - [Model.EInvoicing.V1.FetchDocumentsRequestMetadata](docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md) + - [Model.EInvoicing.V1.ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) + - [Model.EInvoicing.V1.InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) + - [Model.EInvoicing.V1.InternalServerError](docs/EInvoicing/V1/InternalServerError.md) + - [Model.EInvoicing.V1.Mandate](docs/EInvoicing/V1/Mandate.md) + - [Model.EInvoicing.V1.MandateDataInputField](docs/EInvoicing/V1/MandateDataInputField.md) + - [Model.EInvoicing.V1.MandateDataInputFieldNamespace](docs/EInvoicing/V1/MandateDataInputFieldNamespace.md) + - [Model.EInvoicing.V1.MandatesResponse](docs/EInvoicing/V1/MandatesResponse.md) + - [Model.EInvoicing.V1.NotFoundError](docs/EInvoicing/V1/NotFoundError.md) + - [Model.EInvoicing.V1.NotUsedForField](docs/EInvoicing/V1/NotUsedForField.md) + - [Model.EInvoicing.V1.RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) + - [Model.EInvoicing.V1.StatusEvent](docs/EInvoicing/V1/StatusEvent.md) + - [Model.EInvoicing.V1.SubmitDocumentMetadata](docs/EInvoicing/V1/SubmitDocumentMetadata.md) + - [Model.EInvoicing.V1.WorkflowIds](docs/EInvoicing/V1/WorkflowIds.md) + + + +### EInvoicing V1 Model Documentation + + - [Model.EInvoicing.V1.BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) + - [Model.EInvoicing.V1.BadRequest](docs/EInvoicing/V1/BadRequest.md) + - [Model.EInvoicing.V1.BatchSearch](docs/EInvoicing/V1/BatchSearch.md) + - [Model.EInvoicing.V1.BatchSearchListResponse](docs/EInvoicing/V1/BatchSearchListResponse.md) + - [Model.EInvoicing.V1.ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) + - [Model.EInvoicing.V1.DataInputField](docs/EInvoicing/V1/DataInputField.md) + - [Model.EInvoicing.V1.DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) + - [Model.EInvoicing.V1.DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) + - [Model.EInvoicing.V1.DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) + - [Model.EInvoicing.V1.DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) + - [Model.EInvoicing.V1.DirectorySearchResponse](docs/EInvoicing/V1/DirectorySearchResponse.md) + - [Model.EInvoicing.V1.DirectorySearchResponseValueInner](docs/EInvoicing/V1/DirectorySearchResponseValueInner.md) + - [Model.EInvoicing.V1.DirectorySearchResponseValueInnerAddressesInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.md) + - [Model.EInvoicing.V1.DirectorySearchResponseValueInnerIdentifiersInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.md) + - [Model.EInvoicing.V1.DirectorySearchResponseValueInnerSupportedDocumentTypesInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md) + - [Model.EInvoicing.V1.DocumentFetch](docs/EInvoicing/V1/DocumentFetch.md) + - [Model.EInvoicing.V1.DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) + - [Model.EInvoicing.V1.DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) + - [Model.EInvoicing.V1.DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) + - [Model.EInvoicing.V1.DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) + - [Model.EInvoicing.V1.DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) + - [Model.EInvoicing.V1.ErrorResponse](docs/EInvoicing/V1/ErrorResponse.md) + - [Model.EInvoicing.V1.FetchDocumentsRequest](docs/EInvoicing/V1/FetchDocumentsRequest.md) + - [Model.EInvoicing.V1.FetchDocumentsRequestDataInner](docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md) + - [Model.EInvoicing.V1.FetchDocumentsRequestMetadata](docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md) + - [Model.EInvoicing.V1.ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) + - [Model.EInvoicing.V1.InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) + - [Model.EInvoicing.V1.InternalServerError](docs/EInvoicing/V1/InternalServerError.md) + - [Model.EInvoicing.V1.Mandate](docs/EInvoicing/V1/Mandate.md) + - [Model.EInvoicing.V1.MandateDataInputField](docs/EInvoicing/V1/MandateDataInputField.md) + - [Model.EInvoicing.V1.MandateDataInputFieldNamespace](docs/EInvoicing/V1/MandateDataInputFieldNamespace.md) + - [Model.EInvoicing.V1.MandatesResponse](docs/EInvoicing/V1/MandatesResponse.md) + - [Model.EInvoicing.V1.NotFoundError](docs/EInvoicing/V1/NotFoundError.md) + - [Model.EInvoicing.V1.NotUsedForField](docs/EInvoicing/V1/NotUsedForField.md) + - [Model.EInvoicing.V1.RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) + - [Model.EInvoicing.V1.StatusEvent](docs/EInvoicing/V1/StatusEvent.md) + - [Model.EInvoicing.V1.SubmitDocumentMetadata](docs/EInvoicing/V1/SubmitDocumentMetadata.md) + - [Model.EInvoicing.V1.SubmitInteropDocument202Response](docs/EInvoicing/V1/SubmitInteropDocument202Response.md) + - [Model.EInvoicing.V1.WorkflowIds](docs/EInvoicing/V1/WorkflowIds.md) diff --git a/docs/EInvoicing/V1/BatchSearch.md b/docs/EInvoicing/V1/BatchSearch.md new file mode 100644 index 0000000..1f380f1 --- /dev/null +++ b/docs/EInvoicing/V1/BatchSearch.md @@ -0,0 +1,16 @@ +# Avalara.SDK.Model.EInvoicing.V1.BatchSearch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID of the batch search | [optional] +**Name** | **string** | Name of the batch report | [optional] +**CreatedBy** | **string** | Email of the user who created the batch search | [optional] +**Created** | **DateTime** | Timestamp when the batch search was created | [optional] +**LastModified** | **DateTime** | Timestamp when the batch search was created | [optional] +**Status** | **string** | Status of the batch search | [optional] +**Error** | [**ErrorResponse**](ErrorResponse.md) | | [optional] + +[[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/BatchSearchListResponse.md b/docs/EInvoicing/V1/BatchSearchListResponse.md new file mode 100644 index 0000000..68c3899 --- /dev/null +++ b/docs/EInvoicing/V1/BatchSearchListResponse.md @@ -0,0 +1,13 @@ +# Avalara.SDK.Model.EInvoicing.V1.BatchSearchListResponse +Schema for batch search list + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RecordSetCount** | **int** | The count of records in the result set | [optional] +**NextLink** | **string** | Next Link | [optional] +**Value** | [**List<BatchSearch>**](BatchSearch.md) | | [optional] + +[[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/DataInputField.md b/docs/EInvoicing/V1/DataInputField.md index 4245d5c..f6d8b8e 100644 --- a/docs/EInvoicing/V1/DataInputField.md +++ b/docs/EInvoicing/V1/DataInputField.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **FieldId** | **string** | Field ID | [optional] **ApplicableDocumentRoots** | **List<Object>** | | [optional] **Path** | **string** | Path to this field | [optional] -**VarNameSpace** | **string** | Namespace of this field | [optional] +**Namespace** | **string** | Namespace of this field | [optional] **FieldName** | **string** | Field name | [optional] **ExampleOrFixedValue** | **string** | An example of the content for this field | [optional] **AcceptedValues** | **Object** | An object representing the acceptable values for this field | [optional] diff --git a/docs/EInvoicing/V1/DataInputFieldsApi.md b/docs/EInvoicing/V1/DataInputFieldsApi.md index e057362..7573616 100644 --- a/docs/EInvoicing/V1/DataInputFieldsApi.md +++ b/docs/EInvoicing/V1/DataInputFieldsApi.md @@ -4,14 +4,14 @@ 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** > DataInputFieldsResponse GetDataInputFields (GetDataInputFieldsRequest requestParameters) -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 @@ -38,8 +38,8 @@ namespace Example var apiInstance = new DataInputFieldsApi(apiClient); var requestParameters = new GetDataInputFieldsRequest(); - requestParameters.AvalaraVersion = 1.0; // string | The HTTP Header meant to specify the version of the API intended to be used - requestParameters.XAvalaraClient = 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\" (optional) + requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used + requestParameters.XAvalaraClient = 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. (optional) requestParameters.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. (optional) requestParameters.Top = 10; // decimal? | 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. (optional) requestParameters.Skip = 10; // decimal? | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. (optional) @@ -48,7 +48,7 @@ namespace Example try { - // Returns the mandatory and conditional invoice or creditnote input fields for different country mandates + // Returns the optionality of document fields for different country mandates DataInputFieldsResponse result = apiInstance.GetDataInputFields(requestParameters); Debug.WriteLine(result); } @@ -68,7 +68,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **AvalaraVersion** | **string**| The HTTP Header meant to specify the version of the API intended to be used | - **XAvalaraClient** | **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] + **XAvalaraClient** | **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** | **decimal?**| 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** | **decimal?**| 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/docs/EInvoicing/V1/DataInputFieldsResponse.md b/docs/EInvoicing/V1/DataInputFieldsResponse.md index 17fec5c..a80c452 100644 --- a/docs/EInvoicing/V1/DataInputFieldsResponse.md +++ b/docs/EInvoicing/V1/DataInputFieldsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**RecordSetCount** | **decimal** | Total count of results | [optional] +**RecordsetCount** | **decimal** | Total count of results | [optional] **NextLink** | **string** | | [optional] **Value** | [**List<DataInputField>**](DataInputField.md) | Array of Data Input Fields | [optional] diff --git a/docs/EInvoicing/V1/DirectorySearchResponse.md b/docs/EInvoicing/V1/DirectorySearchResponse.md new file mode 100644 index 0000000..b97f007 --- /dev/null +++ b/docs/EInvoicing/V1/DirectorySearchResponse.md @@ -0,0 +1,13 @@ +# Avalara.SDK.Model.EInvoicing.V1.DirectorySearchResponse +Response schema for directory search results + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RecordSetCount** | **int** | The count of records in the result set | [optional] +**NextLink** | **string** | The next page link to get the next set of results. | [optional] +**Value** | [**List<DirectorySearchResponseValueInner>**](DirectorySearchResponseValueInner.md) | | [optional] + +[[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/DirectorySearchResponseValueInner.md b/docs/EInvoicing/V1/DirectorySearchResponseValueInner.md new file mode 100644 index 0000000..df1d2de --- /dev/null +++ b/docs/EInvoicing/V1/DirectorySearchResponseValueInner.md @@ -0,0 +1,16 @@ +# Avalara.SDK.Model.EInvoicing.V1.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] +**RegistrationDate** | **DateTime** | Registration date of the participant if available | [optional] +**Identifiers** | [**List<DirectorySearchResponseValueInnerIdentifiersInner>**](DirectorySearchResponseValueInnerIdentifiersInner.md) | | [optional] +**Addresses** | [**List<DirectorySearchResponseValueInnerAddressesInner>**](DirectorySearchResponseValueInnerAddressesInner.md) | | [optional] +**SupportedDocumentTypes** | [**List<DirectorySearchResponseValueInnerSupportedDocumentTypesInner>**](DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md) | | [optional] + +[[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.md b/docs/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.md new file mode 100644 index 0000000..146f341 --- /dev/null +++ b/docs/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.md @@ -0,0 +1,14 @@ +# Avalara.SDK.Model.EInvoicing.V1.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#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.md b/docs/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.md new file mode 100644 index 0000000..ba9d824 --- /dev/null +++ b/docs/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.md @@ -0,0 +1,11 @@ +# Avalara.SDK.Model.EInvoicing.V1.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#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md b/docs/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md new file mode 100644 index 0000000..4257b77 --- /dev/null +++ b/docs/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md @@ -0,0 +1,13 @@ +# Avalara.SDK.Model.EInvoicing.V1.DirectorySearchResponseValueInnerSupportedDocumentTypesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Document type name. | [optional] +**Value** | **string** | Document type identifier. | [optional] +**SupportedByTradingPartner** | **bool** | Does trading partner support receiving this document type | [optional] +**SupportedByAvalara** | **bool** | Does avalara support exchanging this document type | [optional] + +[[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/DocumentFetch.md b/docs/EInvoicing/V1/DocumentFetch.md new file mode 100644 index 0000000..d3d3760 --- /dev/null +++ b/docs/EInvoicing/V1/DocumentFetch.md @@ -0,0 +1,12 @@ +# Avalara.SDK.Model.EInvoicing.V1.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] +**EventDateTime** | **string** | The date and time when the inbound document was accepted by the Avalara E-Invoicing Platform | [optional] + +[[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/DocumentListResponse.md b/docs/EInvoicing/V1/DocumentListResponse.md index 834dafd..5eaa2b0 100644 --- a/docs/EInvoicing/V1/DocumentListResponse.md +++ b/docs/EInvoicing/V1/DocumentListResponse.md @@ -5,9 +5,9 @@ Returns the requested list of documents Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**RecordSetCount** | **string** | Count of collections for the given date range | [optional] +**RecordsetCount** | **string** | Count of collections for the given date range | [optional] **NextLink** | **string** | | [optional] -**Value** | [**List<DocumentSummary>**](DocumentSummary.md) | Array of invoices matching query parameters | +**Value** | [**List<DocumentSummary>**](DocumentSummary.md) | Array of documents matching query parameters | [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/V1/DocumentStatusResponse.md b/docs/EInvoicing/V1/DocumentStatusResponse.md index 11f6d4d..9c6262d 100644 --- a/docs/EInvoicing/V1/DocumentStatusResponse.md +++ b/docs/EInvoicing/V1/DocumentStatusResponse.md @@ -6,7 +6,7 @@ Returns the current document ID and status 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] +**Status** | **string** | Status of the document | [optional] **Events** | [**List<StatusEvent>**](StatusEvent.md) | | [optional] [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/V1/DocumentSummary.md b/docs/EInvoicing/V1/DocumentSummary.md index 7623006..5c4f63e 100644 --- a/docs/EInvoicing/V1/DocumentSummary.md +++ b/docs/EInvoicing/V1/DocumentSummary.md @@ -7,16 +7,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **string** | The unique ID for this document | [optional] **ProcessDateTime** | **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] **SupplierName** | **string** | The name of the supplier in the transaction | [optional] **CustomerName** | **string** | The name of the customer in the transaction | [optional] -**DocumentNumber** | **string** | The invoice document number | [optional] -**DocumentDate** | **string** | The invoice issue date | [optional] -**Flow** | **string** | The invoice direction, where issued = `out` and received = `in` | [optional] -**CountryCode** | **string** | The two-letter ISO-3166 country code for the country where the e-invoice is being submitted | [optional] +**DocumentType** | **string** | The document type | [optional] +**DocumentVersion** | **string** | The document version | [optional] +**DocumentNumber** | **string** | The document number | [optional] +**DocumentDate** | **string** | The document issue date | [optional] +**Flow** | **string** | The document direction, where issued = `out` and received = `in` | [optional] +**CountryCode** | **string** | The two-letter ISO-3166 country code for the country where the document is being submitted | [optional] **CountryMandate** | **string** | The e-invoicing mandate for the specified country | [optional] -**VarInterface** | **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#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/V1/DocumentsApi.md b/docs/EInvoicing/V1/DocumentsApi.md index 357bf9a..657f8aa 100644 --- a/docs/EInvoicing/V1/DocumentsApi.md +++ b/docs/EInvoicing/V1/DocumentsApi.md @@ -5,8 +5,9 @@ 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 @@ -16,7 +17,7 @@ Method | HTTP request | Description 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 ```csharp @@ -41,10 +42,10 @@ namespace Example var apiInstance = new DocumentsApi(apiClient); var requestParameters = new DownloadDocumentRequest(); - requestParameters.AvalaraVersion = 1.0; // string | The HTTP Header meant to specify the version of the API intended to be used + requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used requestParameters.Accept = application/pdf; // string | This header indicates the MIME type of the document requestParameters.DocumentId = "documentId_example"; // string | The unique ID for this document that was returned in the POST /einvoicing/document response body - requestParameters.XAvalaraClient = 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\" (optional) + requestParameters.XAvalaraClient = 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. (optional) try { @@ -70,7 +71,7 @@ Name | Type | Description | Notes **AvalaraVersion** | **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 | **DocumentId** | **string**| The unique ID for this document that was returned in the POST /einvoicing/document response body | - **XAvalaraClient** | **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] + **XAvalaraClient** | **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 @@ -97,6 +98,90 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **FetchDocuments** +> DocumentFetch FetchDocuments (FetchDocumentsRequest requestParameters) + +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 +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using System.Net.Http; +using Avalara.SDK.Api.EInvoicing.V1; +using Avalara.SDK.Client; +using Avalara.SDK.Model.EInvoicing.V1; + +namespace Example +{ + public class FetchDocumentsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.Environment = AvalaraEnvironment.Sandbox; + config.BearerToken = ""; + + ApiClient apiClient= new ApiClient(config); + + var apiInstance = new DocumentsApi(apiClient); + var requestParameters = new FetchDocumentsRequest(); + requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used + requestParameters.FetchDocumentsRequest = new FetchDocumentsRequest(); // FetchDocumentsRequest | + requestParameters.XAvalaraClient = 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. (optional) + + try + { + // Fetch the inbound document from a tax authority + DocumentFetch result = apiInstance.FetchDocuments(requestParameters); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DocumentsApi.FetchDocuments: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Request Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AvalaraVersion** | **string**| The HTTP Header meant to specify the version of the API intended to be used | + **FetchDocumentsRequest** | [**FetchDocumentsRequest**](FetchDocumentsRequest.md)| | + **XAvalaraClient** | **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 + +[**DocumentFetch**](DocumentFetch.md) + +### Authorization + +[Bearer](../../../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Accepted DocumentFetch Request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + # **GetDocumentList** > DocumentListResponse GetDocumentList (GetDocumentListRequest requestParameters) @@ -128,14 +213,14 @@ namespace Example var apiInstance = new DocumentsApi(apiClient); var requestParameters = new GetDocumentListRequest(); - requestParameters.AvalaraVersion = 1.0; // string | The HTTP Header meant to specify the version of the API intended to be used - requestParameters.XAvalaraClient = 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\" (optional) + requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used + requestParameters.XAvalaraClient = 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. (optional) requestParameters.StartDate = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Start date of documents to return. This defaults to the previous month. (optional) requestParameters.EndDate = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | End date of documents to return. This defaults to the current date. (optional) requestParameters.Flow = out; // string | Optionally filter by document direction, where issued = `out` and received = `in` (optional) requestParameters.Count = true; // string | When set to true, the count of the collection is also returned in the response body (optional) requestParameters.CountOnly = false; // string | When set to true, only the count of the collection is returned (optional) - requestParameters.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. (optional) + requestParameters.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. (optional) requestParameters.Top = 10; // decimal? | 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. (optional) requestParameters.Skip = 10; // string | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. (optional) @@ -161,7 +246,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **AvalaraVersion** | **string**| The HTTP Header meant to specify the version of the API intended to be used | - **XAvalaraClient** | **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] + **XAvalaraClient** | **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] **StartDate** | **DateTime?**| Start date of documents to return. This defaults to the previous month. | [optional] **EndDate** | **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] @@ -226,9 +311,9 @@ namespace Example var apiInstance = new DocumentsApi(apiClient); var requestParameters = new GetDocumentStatusRequest(); - requestParameters.AvalaraVersion = 1.0; // string | The HTTP Header meant to specify the version of the API intended to be used + requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used requestParameters.DocumentId = "documentId_example"; // string | The unique ID for this document that was returned in the POST /einvoicing/documents response body - requestParameters.XAvalaraClient = 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\" (optional) + requestParameters.XAvalaraClient = 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. (optional) try { @@ -253,7 +338,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **AvalaraVersion** | **string**| The HTTP Header meant to specify the version of the API intended to be used | **DocumentId** | **string**| The unique ID for this document that was returned in the POST /einvoicing/documents response body | - **XAvalaraClient** | **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] + **XAvalaraClient** | **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 @@ -285,7 +370,7 @@ Name | Type | Description | Notes 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 ```csharp @@ -310,10 +395,10 @@ namespace Example var apiInstance = new DocumentsApi(apiClient); var requestParameters = new SubmitDocumentRequest(); - requestParameters.AvalaraVersion = 1.0; // string | The HTTP Header meant to specify the version of the API intended to be used + requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used requestParameters.Metadata = new SubmitDocumentMetadata(); // SubmitDocumentMetadata | - requestParameters.Data = new SubmitDocumentData(); // SubmitDocumentData | - requestParameters.XAvalaraClient = 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\" (optional) + requestParameters.Data = new Object(); // Object | The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' + requestParameters.XAvalaraClient = 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. (optional) try { @@ -338,8 +423,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **AvalaraVersion** | **string**| The HTTP Header meant to specify the version of the API intended to be used | **Metadata** | [**SubmitDocumentMetadata**](SubmitDocumentMetadata.md)| | - **Data** | [**SubmitDocumentData**](SubmitDocumentData.md)| | - **XAvalaraClient** | **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] + **Data** | [**Object**](Object.md)| The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' | + **XAvalaraClient** | **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/docs/EInvoicing/V1/ErrorResponse.md b/docs/EInvoicing/V1/ErrorResponse.md new file mode 100644 index 0000000..02d779a --- /dev/null +++ b/docs/EInvoicing/V1/ErrorResponse.md @@ -0,0 +1,13 @@ +# Avalara.SDK.Model.EInvoicing.V1.ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | | [optional] +**Status** | **string** | | [optional] +**Detail** | **string** | | [optional] +**Instance** | **string** | | [optional] + +[[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/FetchDocumentsRequest.md b/docs/EInvoicing/V1/FetchDocumentsRequest.md new file mode 100644 index 0000000..bf6eb4e --- /dev/null +++ b/docs/EInvoicing/V1/FetchDocumentsRequest.md @@ -0,0 +1,11 @@ +# Avalara.SDK.Model.EInvoicing.V1.FetchDocumentsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<FetchDocumentsRequestDataInner>**](FetchDocumentsRequestDataInner.md) | Array of key-value pairs used to retrieve inbound documents from the Tax Authority | [optional] +**Metadata** | [**FetchDocumentsRequestMetadata**](FetchDocumentsRequestMetadata.md) | | [optional] + +[[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md b/docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md new file mode 100644 index 0000000..7802da9 --- /dev/null +++ b/docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md @@ -0,0 +1,11 @@ +# Avalara.SDK.Model.EInvoicing.V1.FetchDocumentsRequestDataInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | Descriptor of the identifier | +**Value** | **string** | Value of the identifier | + +[[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md b/docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md new file mode 100644 index 0000000..0026791 --- /dev/null +++ b/docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md @@ -0,0 +1,14 @@ +# Avalara.SDK.Model.EInvoicing.V1.FetchDocumentsRequestMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WorkflowId** | **string** | Specifies a unique ID for this workflow. | +**DataFormat** | **string** | Specifies the data format for this workflow | +**DataFormatVersion** | **decimal** | Specifies the data format version number | +**CountryCode** | **string** | The two-letter ISO-3166 country code for the country for which document is being retrieved | +**CountryMandate** | **string** | The e-invoicing mandate for the specified country | + +[[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/InputDataFormats.md b/docs/EInvoicing/V1/InputDataFormats.md index d4e90d3..d4fe650 100644 --- a/docs/EInvoicing/V1/InputDataFormats.md +++ b/docs/EInvoicing/V1/InputDataFormats.md @@ -5,7 +5,7 @@ Format and version used when inputting the data Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Format** | **string** | Invoice format | [optional] +**Format** | **string** | Document format | [optional] **Versions** | **List<string>** | | [optional] [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/V1/InteropApi.md b/docs/EInvoicing/V1/InteropApi.md new file mode 100644 index 0000000..7ce578d --- /dev/null +++ b/docs/EInvoicing/V1/InteropApi.md @@ -0,0 +1,100 @@ +# Avalara.SDK.Api.EInvoicing.V1.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** +> SubmitInteropDocument202Response SubmitInteropDocument (SubmitInteropDocumentRequest requestParameters) + +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 +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using System.Net.Http; +using Avalara.SDK.Api.EInvoicing.V1; +using Avalara.SDK.Client; +using Avalara.SDK.Model.EInvoicing.V1; + +namespace Example +{ + public class SubmitInteropDocumentExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.Environment = AvalaraEnvironment.Sandbox; + config.BearerToken = ""; + + ApiClient apiClient= new ApiClient(config); + + var apiInstance = new InteropApi(apiClient); + var requestParameters = new SubmitInteropDocumentRequest(); + requestParameters.DocumentType = "ubl-invoice-2.1"; // string | Type of the document being uploaded. Partners will be configured in Avalara system to send only certain types of documents. + requestParameters.InterchangeType = "FI-B2B"; // 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. + requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used + requestParameters.XAvalaraClient = 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\" (optional) + requestParameters.XCorrelationID = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + requestParameters.FileName = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // FileParameter | The file to be uploaded (e.g., UBL XML, CII XML). (optional) + + try + { + // Submit a document + SubmitInteropDocument202Response result = apiInstance.SubmitInteropDocument(requestParameters); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling InteropApi.SubmitInteropDocument: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Request Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **DocumentType** | **string**| Type of the document being uploaded. Partners will be configured in Avalara system to send only certain types of documents. | + **InterchangeType** | **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. | + **AvalaraVersion** | **string**| The HTTP Header meant to specify the version of the API intended to be used | + **XAvalaraClient** | **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] + **XCorrelationID** | **string**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + **FileName** | **FileParameter****FileParameter**| The file to be uploaded (e.g., UBL XML, CII XML). | [optional] + +### Return type + +[**SubmitInteropDocument202Response**](SubmitInteropDocument202Response.md) + +### Authorization + +[Bearer](../../../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Document Accepted. This doesn't mean it is processed. This is just a transport ack. | * X-Correlation-ID -
| +| **400** | Bad/Invalid Request. | * X-Correlation-Id -
| +| **401** | Unauthorized | * X-Correlation-Id -
| +| **403** | Forbidden | * X-Correlation-Id -
| +| **500** | Internal server error | * X-Correlation-Id -
| + +[[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/Mandate.md b/docs/EInvoicing/V1/Mandate.md index 4b7236b..10b28cb 100644 --- a/docs/EInvoicing/V1/Mandate.md +++ b/docs/EInvoicing/V1/Mandate.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MandateId** | **string** | Mandate UUID | [optional] -**CountryMandate** | **string** | Country mandate name | [optional] +**MandateId** | **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] +**CountryMandate** | **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] **CountryCode** | **string** | Country code | [optional] **Description** | **string** | Mandate description | [optional] **SupportedByPartnerAPI** | **bool** | Indicates whether this mandate supported by the partner API | [optional] diff --git a/docs/EInvoicing/V1/MandateDataInputField.md b/docs/EInvoicing/V1/MandateDataInputField.md new file mode 100644 index 0000000..e7ed9f7 --- /dev/null +++ b/docs/EInvoicing/V1/MandateDataInputField.md @@ -0,0 +1,24 @@ +# Avalara.SDK.Model.EInvoicing.V1.MandateDataInputField +The Data Input Field + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldId** | **string** | Field ID | [optional] +**DocumentType** | **string** | The document type | [optional] +**DocumentVersion** | **string** | The document version | [optional] +**Path** | **string** | Path to this field | [optional] +**PathType** | **string** | The type of path | [optional] +**FieldName** | **string** | Field name | [optional] +**Namespace** | [**MandateDataInputFieldNamespace**](MandateDataInputFieldNamespace.md) | | [optional] +**ExampleOrFixedValue** | **string** | An example of the content for this field | [optional] +**AcceptedValues** | **List<string>** | An Array representing the acceptable values for this field | [optional] +**DocumentationLink** | **string** | An example of the content for this field | [optional] +**DataType** | **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#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/MandateDataInputFieldNamespace.md b/docs/EInvoicing/V1/MandateDataInputFieldNamespace.md new file mode 100644 index 0000000..92463cd --- /dev/null +++ b/docs/EInvoicing/V1/MandateDataInputFieldNamespace.md @@ -0,0 +1,12 @@ +# Avalara.SDK.Model.EInvoicing.V1.MandateDataInputFieldNamespace +The namespace of the UBL element + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prefix** | **string** | The namespace prefix for the UBL Element | [optional] +**Value** | **string** | | [optional] + +[[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/MandatesApi.md b/docs/EInvoicing/V1/MandatesApi.md index 3695bf9..3272887 100644 --- a/docs/EInvoicing/V1/MandatesApi.md +++ b/docs/EInvoicing/V1/MandatesApi.md @@ -4,9 +4,100 @@ 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** +> List<MandateDataInputField> GetMandateDataInputFields (GetMandateDataInputFieldsRequest requestParameters) + +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 +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using System.Net.Http; +using Avalara.SDK.Api.EInvoicing.V1; +using Avalara.SDK.Client; +using Avalara.SDK.Model.EInvoicing.V1; + +namespace Example +{ + public class GetMandateDataInputFieldsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.Environment = AvalaraEnvironment.Sandbox; + config.BearerToken = ""; + + ApiClient apiClient= new ApiClient(config); + + var apiInstance = new MandatesApi(apiClient); + var requestParameters = new GetMandateDataInputFieldsRequest(); + requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used + requestParameters.MandateId = AD-B2G-PEPPOL; // string | The unique ID for the mandate that was returned in the GET /einvoicing/mandates response body + requestParameters.DocumentType = 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) + requestParameters.DocumentVersion = 2.1; // string | Select the document version of the documentType (You may obtain the supported documentVersion from the GET /mandates endpoint) + requestParameters.XAvalaraClient = 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. (optional) + + try + { + // Returns document field information for a country mandate, a selected document type, and its version + List result = apiInstance.GetMandateDataInputFields(requestParameters); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling MandatesApi.GetMandateDataInputFields: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Request Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AvalaraVersion** | **string**| The HTTP Header meant to specify the version of the API intended to be used | + **MandateId** | **string**| The unique ID for the mandate that was returned in the GET /einvoicing/mandates response body | + **DocumentType** | **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) | + **DocumentVersion** | **string**| Select the document version of the documentType (You may obtain the supported documentVersion from the GET /mandates endpoint) | + **XAvalaraClient** | **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 + +[**List<MandateDataInputField>**](MandateDataInputField.md) + +### Authorization + +[Bearer](../../../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Resource not found | - | +| **500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + # **GetMandates** > MandatesResponse GetMandates (GetMandatesRequest requestParameters) @@ -38,8 +129,8 @@ namespace Example var apiInstance = new MandatesApi(apiClient); var requestParameters = new GetMandatesRequest(); - requestParameters.AvalaraVersion = 1.0; // string | The HTTP Header meant to specify the version of the API intended to be used - requestParameters.XAvalaraClient = 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\" (optional) + requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used + requestParameters.XAvalaraClient = 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. (optional) requestParameters.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. (optional) requestParameters.Top = 10; // decimal? | 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. (optional) requestParameters.Skip = 10; // decimal? | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. (optional) @@ -68,7 +159,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **AvalaraVersion** | **string**| The HTTP Header meant to specify the version of the API intended to be used | - **XAvalaraClient** | **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] + **XAvalaraClient** | **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** | **decimal?**| 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** | **decimal?**| 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/docs/EInvoicing/V1/MandatesResponse.md b/docs/EInvoicing/V1/MandatesResponse.md index 48662ce..5440535 100644 --- a/docs/EInvoicing/V1/MandatesResponse.md +++ b/docs/EInvoicing/V1/MandatesResponse.md @@ -5,7 +5,7 @@ Mandate list response schema Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**RecordSetCount** | **decimal** | Total count of results | [optional] +**RecordsetCount** | **decimal** | Total count of results | [optional] **NextLink** | **string** | | [optional] **Value** | [**List<Mandate>**](Mandate.md) | Mandates schema | [optional] diff --git a/docs/EInvoicing/V1/StatusEvent.md b/docs/EInvoicing/V1/StatusEvent.md index e817bb1..012ef5b 100644 --- a/docs/EInvoicing/V1/StatusEvent.md +++ b/docs/EInvoicing/V1/StatusEvent.md @@ -7,6 +7,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EventDateTime** | **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] +**ResponseKey** | **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] +**ResponseValue** | **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#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/V1/SubmitDocumentMetadata.md b/docs/EInvoicing/V1/SubmitDocumentMetadata.md index 9dc8ea5..01bc591 100644 --- a/docs/EInvoicing/V1/SubmitDocumentMetadata.md +++ b/docs/EInvoicing/V1/SubmitDocumentMetadata.md @@ -1,5 +1,5 @@ # Avalara.SDK.Model.EInvoicing.V1.SubmitDocumentMetadata -Key value pairs of metadata for a document submission. dataFormat can be ubl-invoice or ubl-creditnote:
{  \"workflowId\": \"partner-einvoicing\", \"dataFormat\": \"ubl-invoice\", \"dataFormatVersion\": \"2.1\", \"countryCode\": \"SA\", \"countryMandate\": \"SA-Phase1-B2B\" }

+Key value pairs of metadata for a document submission
{  \"workflowId\": \"partner-einvoicing\", \"dataFormat\": \"ubl-invoice\", \"dataFormatVersion\": \"2.1\", \"countryCode\": \"SA\", \"countryMandate\": \"SA-Phase1-B2B\" }

## Properties @@ -8,7 +8,7 @@ Name | Type | Description | Notes **WorkflowId** | **string** | Specifies a unique ID for this workflow. | **DataFormat** | **string** | Specifies the data format for this workflow. | **DataFormatVersion** | **string** | Specifies the data format version number. | -**CountryCode** | **string** | The two-letter ISO-3166 country code for the country where the e-invoice is being submitted | +**CountryCode** | **string** | The two-letter ISO-3166 country code for the country where the document is being submitted | **CountryMandate** | **string** | The e-invoicing mandate for the specified country. | [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/V1/SubmitInteropDocument202Response.md b/docs/EInvoicing/V1/SubmitInteropDocument202Response.md new file mode 100644 index 0000000..ff1c0cb --- /dev/null +++ b/docs/EInvoicing/V1/SubmitInteropDocument202Response.md @@ -0,0 +1,11 @@ +# Avalara.SDK.Model.EInvoicing.V1.SubmitInteropDocument202Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InterchangeId** | **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#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/TradingPartnersApi.md b/docs/EInvoicing/V1/TradingPartnersApi.md new file mode 100644 index 0000000..127e0b8 --- /dev/null +++ b/docs/EInvoicing/V1/TradingPartnersApi.md @@ -0,0 +1,467 @@ +# Avalara.SDK.Api.EInvoicing.V1.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** +> void BatchSearchParticipants (BatchSearchParticipantsRequest requestParameters) + +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 +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using System.Net.Http; +using Avalara.SDK.Api.EInvoicing.V1; +using Avalara.SDK.Client; +using Avalara.SDK.Model.EInvoicing.V1; + +namespace Example +{ + public class BatchSearchParticipantsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.Environment = AvalaraEnvironment.Sandbox; + config.BearerToken = ""; + + ApiClient apiClient= new ApiClient(config); + + var apiInstance = new TradingPartnersApi(apiClient); + var requestParameters = new BatchSearchParticipantsRequest(); + requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used + requestParameters.Name = Automotive Companies in London Search; // string | The human readable name given to this batch search. + requestParameters.NotificationEmail = user@example.com; // string | The email address of the user to whom the batch search completion notification must go to. + requestParameters.File = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // FileParameter | CSV file containing search parameters. + requestParameters.XAvalaraClient = 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\" (optional) + requestParameters.XCorrelationID = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + + try + { + // Creates a batch search and performs a batch search in the directory for participants in the background. + apiInstance.BatchSearchParticipants(requestParameters); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TradingPartnersApi.BatchSearchParticipants: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Request Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AvalaraVersion** | **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. | + **NotificationEmail** | **string**| The email address of the user to whom the batch search completion notification must go to. | + **File** | **FileParameter****FileParameter**| CSV file containing search parameters. | + **XAvalaraClient** | **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] + **XCorrelationID** | **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 + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Batch search file accepted for processing the search. | * X-Correlation-Id -
| +| **400** | Invalid request | * X-Correlation-Id -
| +| **401** | Unauthorized | * X-Correlation-Id -
| +| **403** | Forbidden | * X-Correlation-Id -
| +| **500** | Internal server error | * X-Correlation-Id -
| + +[[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + + +# **DownloadBatchSearchReport** +> FileParameter DownloadBatchSearchReport (DownloadBatchSearchReportRequest requestParameters) + +Download batch search results in a csv file. + +Downloads the report for a specific batch search using the batch search ID. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using System.Net.Http; +using Avalara.SDK.Api.EInvoicing.V1; +using Avalara.SDK.Client; +using Avalara.SDK.Model.EInvoicing.V1; + +namespace Example +{ + public class DownloadBatchSearchReportExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.Environment = AvalaraEnvironment.Sandbox; + config.BearerToken = ""; + + ApiClient apiClient= new ApiClient(config); + + var apiInstance = new TradingPartnersApi(apiClient); + var requestParameters = new DownloadBatchSearchReportRequest(); + requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used + requestParameters.Id = 2f5ea4b5-4dae-445a-b3e4-9f65a61eaa99; // string | The ID of the batch search whose report is to be downloaded. + requestParameters.XAvalaraClient = 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\" (optional) + requestParameters.XCorrelationID = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + + try + { + // Download batch search results in a csv file. + FileParameter result = apiInstance.DownloadBatchSearchReport(requestParameters); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TradingPartnersApi.DownloadBatchSearchReport: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Request Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AvalaraVersion** | **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. | + **XAvalaraClient** | **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] + **XCorrelationID** | **string**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +[**FileParameter**](FileParameter.md) + +### Authorization + +[Bearer](../../../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/csv, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful report download | * X-Correlation-Id -
| +| **401** | Unauthorized | * X-Correlation-Id -
| +| **403** | Forbidden | * X-Correlation-Id -
| +| **404** | Report not found | * X-Correlation-Id -
| +| **500** | Internal server error | * X-Correlation-Id -
| + +[[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + + +# **GetBatchSearchDetail** +> BatchSearch GetBatchSearchDetail (GetBatchSearchDetailRequest requestParameters) + +Get the batch search details for a given id. + +Get the batch search details for a given id. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using System.Net.Http; +using Avalara.SDK.Api.EInvoicing.V1; +using Avalara.SDK.Client; +using Avalara.SDK.Model.EInvoicing.V1; + +namespace Example +{ + public class GetBatchSearchDetailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.Environment = AvalaraEnvironment.Sandbox; + config.BearerToken = ""; + + ApiClient apiClient= new ApiClient(config); + + var apiInstance = new TradingPartnersApi(apiClient); + var requestParameters = new GetBatchSearchDetailRequest(); + requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used + requestParameters.Id = 2f5ea4b5-4dae-445a-b3e4-9f65a61eaa99; // string | The ID of the batch search that was submitted earlier. + requestParameters.XAvalaraClient = 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\" (optional) + requestParameters.XCorrelationID = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + + try + { + // Get the batch search details for a given id. + BatchSearch result = apiInstance.GetBatchSearchDetail(requestParameters); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TradingPartnersApi.GetBatchSearchDetail: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Request Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AvalaraVersion** | **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. | + **XAvalaraClient** | **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] + **XCorrelationID** | **string**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +[**BatchSearch**](BatchSearch.md) + +### Authorization + +[Bearer](../../../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Get the batch search details for a given id. | * X-Correlation-Id -
| +| **401** | Unauthorized | * X-Correlation-Id -
| +| **403** | Forbidden | * X-Correlation-Id -
| +| **500** | Internal server error | * X-Correlation-Id -
| + +[[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + + +# **ListBatchSearches** +> BatchSearchListResponse ListBatchSearches (ListBatchSearchesRequest requestParameters) + +List all batch searches that were previously submitted. + +Retrieves all batch searches performed by the user. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using System.Net.Http; +using Avalara.SDK.Api.EInvoicing.V1; +using Avalara.SDK.Client; +using Avalara.SDK.Model.EInvoicing.V1; + +namespace Example +{ + public class ListBatchSearchesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.Environment = AvalaraEnvironment.Sandbox; + config.BearerToken = ""; + + ApiClient apiClient= new ApiClient(config); + + var apiInstance = new TradingPartnersApi(apiClient); + var requestParameters = new ListBatchSearchesRequest(); + requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used + requestParameters.XAvalaraClient = 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\" (optional) + requestParameters.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. (optional) + requestParameters.Count = true; // bool? | When set to true, the count of the collection is included as @recordSetCount in the response body. (optional) + requestParameters.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. (optional) + requestParameters.Skip = 10; // string | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. (optional) + requestParameters.OrderBy = 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. (optional) + requestParameters.XCorrelationID = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + + try + { + // List all batch searches that were previously submitted. + BatchSearchListResponse result = apiInstance.ListBatchSearches(requestParameters); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TradingPartnersApi.ListBatchSearches: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Request Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AvalaraVersion** | **string**| The HTTP Header meant to specify the version of the API intended to be used | + **XAvalaraClient** | **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] + **OrderBy** | **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] + **XCorrelationID** | **string**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +[**BatchSearchListResponse**](BatchSearchListResponse.md) + +### Authorization + +[Bearer](../../../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | List of batch searches | * X-Correlation-Id -
| +| **401** | Unauthorized | * X-Correlation-Id -
| +| **403** | Forbidden | * X-Correlation-Id -
| +| **500** | Internal server error | * X-Correlation-Id -
| + +[[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + + +# **SearchParticipants** +> DirectorySearchResponse SearchParticipants (SearchParticipantsRequest requestParameters) + +Returns a list of participants matching the input query. + +Returns a list of participants matching the input query. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using System.Net.Http; +using Avalara.SDK.Api.EInvoicing.V1; +using Avalara.SDK.Client; +using Avalara.SDK.Model.EInvoicing.V1; + +namespace Example +{ + public class SearchParticipantsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.Environment = AvalaraEnvironment.Sandbox; + config.BearerToken = ""; + + ApiClient apiClient= new ApiClient(config); + + var apiInstance = new TradingPartnersApi(apiClient); + var requestParameters = new SearchParticipantsRequest(); + requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used + requestParameters.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. + requestParameters.XAvalaraClient = 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\" (optional) + requestParameters.Count = true; // bool? | When set to true, the count of the collection is included as @recordSetCount in the response body. (optional) + requestParameters.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. (optional) + requestParameters.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. (optional) + requestParameters.Skip = 10; // string | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. (optional) + requestParameters.OrderBy = 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. (optional) + requestParameters.XCorrelationID = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + + try + { + // Returns a list of participants matching the input query. + DirectorySearchResponse result = apiInstance.SearchParticipants(requestParameters); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TradingPartnersApi.SearchParticipants: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Request Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AvalaraVersion** | **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. | + **XAvalaraClient** | **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] + **OrderBy** | **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] + **XCorrelationID** | **string**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +[**DirectorySearchResponse**](DirectorySearchResponse.md) + +### Authorization + +[Bearer](../../../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | * X-Correlation-Id -
| +| **400** | Bad request | * X-Correlation-Id -
| +| **401** | Unauthorized | * X-Correlation-Id -
| +| **403** | Forbidden | * X-Correlation-Id -
| +| **500** | Internal server error | * X-Correlation-Id -
| + +[[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + diff --git a/src/Avalara.SDK/Api/EInvoicing/V1/DataInputFieldsApi.cs b/src/Avalara.SDK/Api/EInvoicing/V1/DataInputFieldsApi.cs index afcce17..ca6e8cf 100644 --- a/src/Avalara.SDK/Api/EInvoicing/V1/DataInputFieldsApi.cs +++ b/src/Avalara.SDK/Api/EInvoicing/V1/DataInputFieldsApi.cs @@ -44,7 +44,7 @@ public GetDataInputFieldsRequest () { /// public string AvalaraVersion { get; set; } /// - /// 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\" + /// 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. /// public string XAvalaraClient { get; set; } /// @@ -77,7 +77,7 @@ public interface IDataInputFieldsApiSync { #region Synchronous Operations /// - /// 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 <code>mandates</code> endpoint to retrieve all available country mandates. You can use the $filter query parameter to retrieve fields for a particular mandate @@ -97,7 +97,7 @@ public interface IDataInputFieldsApiAsync { #region Asynchronous Operations /// - /// 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 <code>mandates</code> endpoint to retrieve all available country mandates. You can use the $filter query parameter to retrieve fields for a particular mandate @@ -151,7 +151,7 @@ private Avalara.SDK.Client.ExceptionFactory ExceptionFactory } /// - /// Returns the mandatory and conditional invoice or creditnote input fields for different country mandates This endpoint provides a list of required, conditional, and optional fields for each country mandate. You can use the <code>mandates</code> endpoint to retrieve all available country mandates. You can use the $filter query parameter to retrieve fields for a particular mandate + /// 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 <code>mandates</code> endpoint to retrieve all available country mandates. You can use the $filter query parameter to retrieve fields for a particular mandate /// /// Thrown when fails to make API call /// Request Object for the API @@ -163,7 +163,7 @@ public DataInputFieldsResponse GetDataInputFields(GetDataInputFieldsRequest requ } /// - /// Returns the mandatory and conditional invoice or creditnote input fields for different country mandates This endpoint provides a list of required, conditional, and optional fields for each country mandate. You can use the <code>mandates</code> endpoint to retrieve all available country mandates. You can use the $filter query parameter to retrieve fields for a particular mandate + /// 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 <code>mandates</code> endpoint to retrieve all available country mandates. You can use the $filter query parameter to retrieve fields for a particular mandate /// /// Thrown when fails to make API call /// Request Object for the API @@ -192,7 +192,7 @@ private Avalara.SDK.Client.ApiResponse GetDataInputFiel var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.0"); + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); if (requestParameters.Filter != null) { @@ -233,7 +233,7 @@ private Avalara.SDK.Client.ApiResponse GetDataInputFiel } /// - /// Returns the mandatory and conditional invoice or creditnote input fields for different country mandates This endpoint provides a list of required, conditional, and optional fields for each country mandate. You can use the <code>mandates</code> endpoint to retrieve all available country mandates. You can use the $filter query parameter to retrieve fields for a particular mandate + /// 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 <code>mandates</code> endpoint to retrieve all available country mandates. You can use the $filter query parameter to retrieve fields for a particular mandate /// /// Thrown when fails to make API call /// Request Object for the API @@ -246,7 +246,7 @@ private Avalara.SDK.Client.ApiResponse GetDataInputFiel } /// - /// Returns the mandatory and conditional invoice or creditnote input fields for different country mandates This endpoint provides a list of required, conditional, and optional fields for each country mandate. You can use the <code>mandates</code> endpoint to retrieve all available country mandates. You can use the $filter query parameter to retrieve fields for a particular mandate + /// 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 <code>mandates</code> endpoint to retrieve all available country mandates. You can use the $filter query parameter to retrieve fields for a particular mandate /// /// Thrown when fails to make API call /// Request Object for the API @@ -278,7 +278,7 @@ private Avalara.SDK.Client.ApiResponse GetDataInputFiel var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.0"); + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); if (requestParameters.Filter != null) { diff --git a/src/Avalara.SDK/Api/EInvoicing/V1/DocumentsApi.cs b/src/Avalara.SDK/Api/EInvoicing/V1/DocumentsApi.cs index 0d59430..6d98373 100644 --- a/src/Avalara.SDK/Api/EInvoicing/V1/DocumentsApi.cs +++ b/src/Avalara.SDK/Api/EInvoicing/V1/DocumentsApi.cs @@ -52,7 +52,30 @@ public DownloadDocumentRequest () { /// public string DocumentId { get; set; } /// - /// 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\" + /// 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. + /// + public string XAvalaraClient { get; set; } + } + + /// + /// Represents the Request object for the FetchDocuments API + /// + public class FetchDocumentsRequest { + /// + /// Constructor for the Request object + /// + public FetchDocumentsRequest () { + } + /// + /// The HTTP Header meant to specify the version of the API intended to be used + /// + public string AvalaraVersion { get; set; } + /// + /// + /// + public FetchDocumentsRequest FetchDocumentsRequest { get; set; } + /// + /// 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. /// public string XAvalaraClient { get; set; } } @@ -71,7 +94,7 @@ public GetDocumentListRequest () { /// public string AvalaraVersion { get; set; } /// - /// 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\" + /// 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. /// public string XAvalaraClient { get; set; } /// @@ -126,7 +149,7 @@ public GetDocumentStatusRequest () { /// public string DocumentId { get; set; } /// - /// 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\" + /// 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. /// public string XAvalaraClient { get; set; } } @@ -149,11 +172,11 @@ public SubmitDocumentRequest () { /// public SubmitDocumentMetadata Metadata { get; set; } /// - /// + /// The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' /// - public SubmitDocumentData Data { get; set; } + public Object Data { get; set; } /// - /// 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\" + /// 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. /// public string XAvalaraClient { get; set; } } @@ -169,13 +192,24 @@ public interface IDocumentsApiSync /// 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. /// /// Thrown when fails to make API call /// Request Object for the API /// FileParameter FileParameter DownloadDocument(DownloadDocumentRequest requestParameters); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// DocumentFetch + DocumentFetch FetchDocuments(FetchDocumentsRequest requestParameters); + /// /// Returns a summary of documents for a date range /// @@ -202,7 +236,7 @@ public interface IDocumentsApiSync /// 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.<br><br>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.<br><br>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.<br><br>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.<br><br>Furthermore, the unique ID enables the download of a copy of the generated document for reference purposes. /// /// Thrown when fails to make API call /// Request Object for the API @@ -222,7 +256,7 @@ public interface IDocumentsApiAsync /// 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. /// /// Thrown when fails to make API call /// Request Object for the API @@ -230,6 +264,18 @@ public interface IDocumentsApiAsync /// Task of FileParameter System.Threading.Tasks.Task DownloadDocumentAsync(DownloadDocumentRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of DocumentFetch + System.Threading.Tasks.Task FetchDocumentsAsync(FetchDocumentsRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Returns a summary of documents for a date range /// @@ -258,7 +304,7 @@ public interface IDocumentsApiAsync /// 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.<br><br>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.<br><br>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.<br><br>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.<br><br>Furthermore, the unique ID enables the download of a copy of the generated document for reference purposes. /// /// Thrown when fails to make API call /// Request Object for the API @@ -309,7 +355,7 @@ private Avalara.SDK.Client.ExceptionFactory ExceptionFactory } /// - /// 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. + /// 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. /// /// Thrown when fails to make API call /// Request Object for the API @@ -321,7 +367,7 @@ public FileParameter DownloadDocument(DownloadDocumentRequest requestParameters) } /// - /// 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. + /// 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. /// /// Thrown when fails to make API call /// Request Object for the API @@ -360,7 +406,7 @@ private Avalara.SDK.Client.ApiResponse DownloadDocumentWithHttpIn var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.0"); + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); localVarRequestOptions.PathParameters.Add("documentId", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.DocumentId)); // path parameter localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter @@ -383,7 +429,7 @@ private Avalara.SDK.Client.ApiResponse DownloadDocumentWithHttpIn } /// - /// 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. + /// 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. /// /// Thrown when fails to make API call /// Request Object for the API @@ -396,7 +442,7 @@ private Avalara.SDK.Client.ApiResponse DownloadDocumentWithHttpIn } /// - /// 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. + /// 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. /// /// Thrown when fails to make API call /// Request Object for the API @@ -438,7 +484,7 @@ private Avalara.SDK.Client.ApiResponse DownloadDocumentWithHttpIn var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.0"); + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); localVarRequestOptions.PathParameters.Add("documentId", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.DocumentId)); // path parameter localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter @@ -460,6 +506,146 @@ private Avalara.SDK.Client.ApiResponse DownloadDocumentWithHttpIn return localVarResponse; } + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// DocumentFetch + public DocumentFetch FetchDocuments(FetchDocumentsRequest requestParameters) + { + Avalara.SDK.Client.ApiResponse localVarResponse = FetchDocumentsWithHttpInfo(requestParameters); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// ApiResponse of DocumentFetch + private Avalara.SDK.Client.ApiResponse FetchDocumentsWithHttpInfo(FetchDocumentsRequest requestParameters) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling DocumentsApi->FetchDocuments"); + + // verify the required parameter 'FetchDocumentsRequest' is set + if (requestParameters.FetchDocumentsRequest == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.FetchDocumentsRequest' when calling DocumentsApi->FetchDocuments"); + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + localVarRequestOptions.Data = requestParameters.FetchDocumentsRequest; + + // make the HTTP request + var localVarResponse = this.Client.Post("/einvoicing/documents/$fetch", localVarRequestOptions, requiredScopes); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FetchDocuments", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of DocumentFetch + public async System.Threading.Tasks.Task FetchDocumentsAsync(FetchDocumentsRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Avalara.SDK.Client.ApiResponse localVarResponse = await FetchDocumentsWithHttpInfoAsync(requestParameters, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DocumentFetch) + private async System.Threading.Tasks.Task> FetchDocumentsWithHttpInfoAsync(FetchDocumentsRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'requestParameters.AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling DocumentsApi->FetchDocuments"); + + // verify the required parameter 'requestParameters.FetchDocumentsRequest' is set + if (requestParameters.FetchDocumentsRequest == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.FetchDocumentsRequest' when calling DocumentsApi->FetchDocuments"); + + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + localVarRequestOptions.Data = requestParameters.FetchDocumentsRequest; + + // make the HTTP request + var localVarResponse = await this.Client.PostAsync("/einvoicing/documents/$fetch", localVarRequestOptions, cancellationToken, requiredScopes).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("FetchDocuments", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + /// /// Returns a summary of documents for a date range Get a list of documents on the Avalara E-Invoicing platform that have a processing date within the specified date range. /// @@ -502,7 +688,7 @@ private Avalara.SDK.Client.ApiResponse GetDocumentListWith var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.0"); + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); if (requestParameters.StartDate != null) { @@ -600,7 +786,7 @@ private Avalara.SDK.Client.ApiResponse GetDocumentListWith var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.0"); + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); if (requestParameters.StartDate != null) { @@ -698,7 +884,7 @@ private Avalara.SDK.Client.ApiResponse GetDocumentStatus var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.0"); + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); localVarRequestOptions.PathParameters.Add("documentId", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.DocumentId)); // path parameter localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter @@ -708,7 +894,7 @@ private Avalara.SDK.Client.ApiResponse GetDocumentStatus } // make the HTTP request - var localVarResponse = this.Client.Get("/einvoicing/document/{documentId}/status", localVarRequestOptions, requiredScopes); + var localVarResponse = this.Client.Get("/einvoicing/documents/{documentId}/status", localVarRequestOptions, requiredScopes); if (this.ExceptionFactory != null) { @@ -769,7 +955,7 @@ private Avalara.SDK.Client.ApiResponse GetDocumentStatus var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.0"); + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); localVarRequestOptions.PathParameters.Add("documentId", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.DocumentId)); // path parameter localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter @@ -779,7 +965,7 @@ private Avalara.SDK.Client.ApiResponse GetDocumentStatus } // make the HTTP request - var localVarResponse = await this.Client.GetAsync("/einvoicing/document/{documentId}/status", localVarRequestOptions, cancellationToken, requiredScopes).ConfigureAwait(false); + var localVarResponse = await this.Client.GetAsync("/einvoicing/documents/{documentId}/status", localVarRequestOptions, cancellationToken, requiredScopes).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -791,7 +977,7 @@ private Avalara.SDK.Client.ApiResponse GetDocumentStatus } /// - /// 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.<br><br>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.<br><br>Furthermore, the unique ID enables the download of a copy of the e-invoice or credit note for reference purposes. + /// Submits a document to Avalara E-Invoicing API 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.<br><br>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.<br><br>Furthermore, the unique ID enables the download of a copy of the generated document for reference purposes. /// /// Thrown when fails to make API call /// Request Object for the API @@ -803,7 +989,7 @@ public DocumentSubmitResponse SubmitDocument(SubmitDocumentRequest requestParame } /// - /// 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.<br><br>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.<br><br>Furthermore, the unique ID enables the download of a copy of the e-invoice or credit note for reference purposes. + /// Submits a document to Avalara E-Invoicing API 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.<br><br>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.<br><br>Furthermore, the unique ID enables the download of a copy of the generated document for reference purposes. /// /// Thrown when fails to make API call /// Request Object for the API @@ -842,7 +1028,7 @@ private Avalara.SDK.Client.ApiResponse SubmitDocumentWit var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.0"); + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter if (requestParameters.XAvalaraClient != null) @@ -865,7 +1051,7 @@ private Avalara.SDK.Client.ApiResponse SubmitDocumentWit } /// - /// 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.<br><br>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.<br><br>Furthermore, the unique ID enables the download of a copy of the e-invoice or credit note for reference purposes. + /// Submits a document to Avalara E-Invoicing API 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.<br><br>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.<br><br>Furthermore, the unique ID enables the download of a copy of the generated document for reference purposes. /// /// Thrown when fails to make API call /// Request Object for the API @@ -878,7 +1064,7 @@ private Avalara.SDK.Client.ApiResponse SubmitDocumentWit } /// - /// 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.<br><br>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.<br><br>Furthermore, the unique ID enables the download of a copy of the e-invoice or credit note for reference purposes. + /// Submits a document to Avalara E-Invoicing API 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.<br><br>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.<br><br>Furthermore, the unique ID enables the download of a copy of the generated document for reference purposes. /// /// Thrown when fails to make API call /// Request Object for the API @@ -920,7 +1106,7 @@ private Avalara.SDK.Client.ApiResponse SubmitDocumentWit var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.0"); + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter if (requestParameters.XAvalaraClient != null) diff --git a/src/Avalara.SDK/Api/EInvoicing/V1/InteropApi.cs b/src/Avalara.SDK/Api/EInvoicing/V1/InteropApi.cs new file mode 100644 index 0000000..15080ce --- /dev/null +++ b/src/Avalara.SDK/Api/EInvoicing/V1/InteropApi.cs @@ -0,0 +1,330 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Avalara.SDK.Client; +using Avalara.SDK.Model.EInvoicing.V1; + +namespace Avalara.SDK.Api.EInvoicing.V1 +{ + /// + /// Represents the Request object for the SubmitInteropDocument API + /// + public class SubmitInteropDocumentRequest { + /// + /// Constructor for the Request object + /// + public SubmitInteropDocumentRequest () { + } + /// + /// Type of the document being uploaded. Partners will be configured in Avalara system to send only certain types of documents. + /// + public string DocumentType { get; set; } + /// + /// 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. + /// + public string InterchangeType { get; set; } + /// + /// The HTTP Header meant to specify the version of the API intended to be used + /// + public string AvalaraVersion { get; set; } + /// + /// 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\" + /// + public string XAvalaraClient { get; set; } + /// + /// The caller can use this as an identifier to use as a correlation id to trace the call. + /// + public string XCorrelationID { get; set; } + /// + /// The file to be uploaded (e.g., UBL XML, CII XML). + /// + public FileParameter FileName { get; set; } + } + + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IInteropApiSync + { + #region Synchronous Operations + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// SubmitInteropDocument202Response + SubmitInteropDocument202Response SubmitInteropDocument(SubmitInteropDocumentRequest requestParameters); + + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IInteropApiAsync + { + #region Asynchronous Operations + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of SubmitInteropDocument202Response + System.Threading.Tasks.Task SubmitInteropDocumentAsync(SubmitInteropDocumentRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class InteropApi : IInteropApiSync, IInteropApiAsync + { + private Avalara.SDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// The client interface for API access. + /// + public InteropApi(Avalara.SDK.Client.IApiClient client) + { + SetConfiguration(client); + this.ExceptionFactory = Avalara.SDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API. + /// + private Avalara.SDK.Client.IInternalApiClient Client { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + private Avalara.SDK.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// SubmitInteropDocument202Response + public SubmitInteropDocument202Response SubmitInteropDocument(SubmitInteropDocumentRequest requestParameters) + { + Avalara.SDK.Client.ApiResponse localVarResponse = SubmitInteropDocumentWithHttpInfo(requestParameters); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// ApiResponse of SubmitInteropDocument202Response + private Avalara.SDK.Client.ApiResponse SubmitInteropDocumentWithHttpInfo(SubmitInteropDocumentRequest requestParameters) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'DocumentType' is set + if (requestParameters.DocumentType == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.DocumentType' when calling InteropApi->SubmitInteropDocument"); + + // verify the required parameter 'InterchangeType' is set + if (requestParameters.InterchangeType == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.InterchangeType' when calling InteropApi->SubmitInteropDocument"); + + // verify the required parameter 'AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling InteropApi->SubmitInteropDocument"); + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "multipart/form-data" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "documentType", requestParameters.DocumentType)); + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "interchangeType", requestParameters.InterchangeType)); + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + if (requestParameters.XCorrelationID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Correlation-ID", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XCorrelationID)); // header parameter + } + if (requestParameters.FileName != null) + { + localVarRequestOptions.FileParameters.Add("fileName", requestParameters.FileName); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/einvoicing/interop/documents", localVarRequestOptions, requiredScopes); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SubmitInteropDocument", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of SubmitInteropDocument202Response + public async System.Threading.Tasks.Task SubmitInteropDocumentAsync(SubmitInteropDocumentRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Avalara.SDK.Client.ApiResponse localVarResponse = await SubmitInteropDocumentWithHttpInfoAsync(requestParameters, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (SubmitInteropDocument202Response) + private async System.Threading.Tasks.Task> SubmitInteropDocumentWithHttpInfoAsync(SubmitInteropDocumentRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'requestParameters.DocumentType' is set + if (requestParameters.DocumentType == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.DocumentType' when calling InteropApi->SubmitInteropDocument"); + + // verify the required parameter 'requestParameters.InterchangeType' is set + if (requestParameters.InterchangeType == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.InterchangeType' when calling InteropApi->SubmitInteropDocument"); + + // verify the required parameter 'requestParameters.AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling InteropApi->SubmitInteropDocument"); + + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "multipart/form-data" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "documentType", requestParameters.DocumentType)); + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "interchangeType", requestParameters.InterchangeType)); + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + if (requestParameters.XCorrelationID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Correlation-ID", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XCorrelationID)); // header parameter + } + if (requestParameters.FileName != null) + { + localVarRequestOptions.FileParameters.Add("fileName", requestParameters.FileName); + } + + // make the HTTP request + var localVarResponse = await this.Client.PostAsync("/einvoicing/interop/documents", localVarRequestOptions, cancellationToken, requiredScopes).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SubmitInteropDocument", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Set the configuration object in APIClient + /// + private void SetConfiguration(IApiClient client) + { + if (client == null) throw new ArgumentNullException("ApiClient"); + if (client.Configuration == null) throw new ArgumentNullException("ApiClient.Configuration"); + + this.Client = (IInternalApiClient)client; + this.Client.SdkVersion = ""; + } + + } + + +} diff --git a/src/Avalara.SDK/Api/EInvoicing/V1/MandatesApi.cs b/src/Avalara.SDK/Api/EInvoicing/V1/MandatesApi.cs index b315164..81d205a 100644 --- a/src/Avalara.SDK/Api/EInvoicing/V1/MandatesApi.cs +++ b/src/Avalara.SDK/Api/EInvoicing/V1/MandatesApi.cs @@ -30,6 +30,37 @@ namespace Avalara.SDK.Api.EInvoicing.V1 { + /// + /// Represents the Request object for the GetMandateDataInputFields API + /// + public class GetMandateDataInputFieldsRequest { + /// + /// Constructor for the Request object + /// + public GetMandateDataInputFieldsRequest () { + } + /// + /// The HTTP Header meant to specify the version of the API intended to be used + /// + public string AvalaraVersion { get; set; } + /// + /// The unique ID for the mandate that was returned in the GET /einvoicing/mandates response body + /// + public string MandateId { get; set; } + /// + /// Select the documentType for which you wish to view the data-input-fields (You may obtain the supported documentTypes from the GET /mandates endpoint) + /// + public string DocumentType { get; set; } + /// + /// Select the document version of the documentType (You may obtain the supported documentVersion from the GET /mandates endpoint) + /// + public string DocumentVersion { get; set; } + /// + /// 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. + /// + public string XAvalaraClient { get; set; } + } + /// /// Represents the Request object for the GetMandates API /// @@ -44,7 +75,7 @@ public GetMandatesRequest () { /// public string AvalaraVersion { get; set; } /// - /// 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\" + /// 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. /// public string XAvalaraClient { get; set; } /// @@ -76,6 +107,17 @@ public GetMandatesRequest () { public interface IMandatesApiSync { #region Synchronous Operations + /// + /// 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 <code>/mandates</code> 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// List<MandateDataInputField> + List GetMandateDataInputFields(GetMandateDataInputFieldsRequest requestParameters); + /// /// List country mandates that are supported by the Avalara E-Invoicing platform /// @@ -96,6 +138,18 @@ public interface IMandatesApiSync public interface IMandatesApiAsync { #region Asynchronous Operations + /// + /// 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 <code>/mandates</code> 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of List<MandateDataInputField> + System.Threading.Tasks.Task> GetMandateDataInputFieldsAsync(GetMandateDataInputFieldsRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// List country mandates that are supported by the Avalara E-Invoicing platform /// @@ -150,6 +204,164 @@ private Avalara.SDK.Client.ExceptionFactory ExceptionFactory set { _exceptionFactory = value; } } + /// + /// 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 <code>/mandates</code> 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// List<MandateDataInputField> + public List GetMandateDataInputFields(GetMandateDataInputFieldsRequest requestParameters) + { + Avalara.SDK.Client.ApiResponse> localVarResponse = GetMandateDataInputFieldsWithHttpInfo(requestParameters); + return localVarResponse.Data; + } + + /// + /// 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 <code>/mandates</code> 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// ApiResponse of List<MandateDataInputField> + private Avalara.SDK.Client.ApiResponse> GetMandateDataInputFieldsWithHttpInfo(GetMandateDataInputFieldsRequest requestParameters) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling MandatesApi->GetMandateDataInputFields"); + + // verify the required parameter 'MandateId' is set + if (requestParameters.MandateId == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.MandateId' when calling MandatesApi->GetMandateDataInputFields"); + + // verify the required parameter 'DocumentType' is set + if (requestParameters.DocumentType == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.DocumentType' when calling MandatesApi->GetMandateDataInputFields"); + + // verify the required parameter 'DocumentVersion' is set + if (requestParameters.DocumentVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.DocumentVersion' when calling MandatesApi->GetMandateDataInputFields"); + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + localVarRequestOptions.PathParameters.Add("mandateId", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.MandateId)); // path parameter + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "documentType", requestParameters.DocumentType)); + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "documentVersion", requestParameters.DocumentVersion)); + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/einvoicing/mandates/{mandateId}/data-input-fields", localVarRequestOptions, requiredScopes); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetMandateDataInputFields", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// 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 <code>/mandates</code> 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of List<MandateDataInputField> + public async System.Threading.Tasks.Task> GetMandateDataInputFieldsAsync(GetMandateDataInputFieldsRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Avalara.SDK.Client.ApiResponse> localVarResponse = await GetMandateDataInputFieldsWithHttpInfoAsync(requestParameters, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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 <code>/mandates</code> 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<MandateDataInputField>) + private async System.Threading.Tasks.Task>> GetMandateDataInputFieldsWithHttpInfoAsync(GetMandateDataInputFieldsRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'requestParameters.AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling MandatesApi->GetMandateDataInputFields"); + + // verify the required parameter 'requestParameters.MandateId' is set + if (requestParameters.MandateId == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.MandateId' when calling MandatesApi->GetMandateDataInputFields"); + + // verify the required parameter 'requestParameters.DocumentType' is set + if (requestParameters.DocumentType == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.DocumentType' when calling MandatesApi->GetMandateDataInputFields"); + + // verify the required parameter 'requestParameters.DocumentVersion' is set + if (requestParameters.DocumentVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.DocumentVersion' when calling MandatesApi->GetMandateDataInputFields"); + + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + localVarRequestOptions.PathParameters.Add("mandateId", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.MandateId)); // path parameter + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "documentType", requestParameters.DocumentType)); + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "documentVersion", requestParameters.DocumentVersion)); + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + + // make the HTTP request + var localVarResponse = await this.Client.GetAsync>("/einvoicing/mandates/{mandateId}/data-input-fields", localVarRequestOptions, cancellationToken, requiredScopes).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetMandateDataInputFields", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + /// /// List country mandates that are supported by the Avalara E-Invoicing platform This endpoint offers a list of country mandates supported by the Avalara E-Invoicing API. /// @@ -192,7 +404,7 @@ private Avalara.SDK.Client.ApiResponse GetMandatesWithHttpInfo var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.0"); + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); if (requestParameters.Filter != null) { @@ -278,7 +490,7 @@ private Avalara.SDK.Client.ApiResponse GetMandatesWithHttpInfo var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.0"); + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); if (requestParameters.Filter != null) { diff --git a/src/Avalara.SDK/Api/EInvoicing/V1/TradingPartnersApi.cs b/src/Avalara.SDK/Api/EInvoicing/V1/TradingPartnersApi.cs new file mode 100644 index 0000000..adab477 --- /dev/null +++ b/src/Avalara.SDK/Api/EInvoicing/V1/TradingPartnersApi.cs @@ -0,0 +1,1222 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Avalara.SDK.Client; +using Avalara.SDK.Model.EInvoicing.V1; + +namespace Avalara.SDK.Api.EInvoicing.V1 +{ + /// + /// Represents the Request object for the BatchSearchParticipants API + /// + public class BatchSearchParticipantsRequest { + /// + /// Constructor for the Request object + /// + public BatchSearchParticipantsRequest () { + } + /// + /// The HTTP Header meant to specify the version of the API intended to be used + /// + public string AvalaraVersion { get; set; } + /// + /// The human readable name given to this batch search. + /// + public string Name { get; set; } + /// + /// The email address of the user to whom the batch search completion notification must go to. + /// + public string NotificationEmail { get; set; } + /// + /// CSV file containing search parameters. + /// + public FileParameter File { get; set; } + /// + /// 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\" + /// + public string XAvalaraClient { get; set; } + /// + /// The caller can use this as an identifier to use as a correlation id to trace the call. + /// + public string XCorrelationID { get; set; } + } + + /// + /// Represents the Request object for the DownloadBatchSearchReport API + /// + public class DownloadBatchSearchReportRequest { + /// + /// Constructor for the Request object + /// + public DownloadBatchSearchReportRequest () { + } + /// + /// The HTTP Header meant to specify the version of the API intended to be used + /// + public string AvalaraVersion { get; set; } + /// + /// The ID of the batch search whose report is to be downloaded. + /// + public string Id { get; set; } + /// + /// 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\" + /// + public string XAvalaraClient { get; set; } + /// + /// The caller can use this as an identifier to use as a correlation id to trace the call. + /// + public string XCorrelationID { get; set; } + } + + /// + /// Represents the Request object for the GetBatchSearchDetail API + /// + public class GetBatchSearchDetailRequest { + /// + /// Constructor for the Request object + /// + public GetBatchSearchDetailRequest () { + } + /// + /// The HTTP Header meant to specify the version of the API intended to be used + /// + public string AvalaraVersion { get; set; } + /// + /// The ID of the batch search that was submitted earlier. + /// + public string Id { get; set; } + /// + /// 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\" + /// + public string XAvalaraClient { get; set; } + /// + /// The caller can use this as an identifier to use as a correlation id to trace the call. + /// + public string XCorrelationID { get; set; } + } + + /// + /// Represents the Request object for the ListBatchSearches API + /// + public class ListBatchSearchesRequest { + /// + /// Constructor for the Request object + /// + public ListBatchSearchesRequest () { + } + /// + /// The HTTP Header meant to specify the version of the API intended to be used + /// + public string AvalaraVersion { get; set; } + /// + /// 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\" + /// + public string XAvalaraClient { get; set; } + /// + /// 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. + /// + public string Filter { get; set; } + /// + /// When set to true, the count of the collection is included as @recordSetCount in the response body. + /// + public bool? Count { get; set; } + /// + /// 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. + /// + public string Top { get; set; } + /// + /// If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. + /// + public string Skip { get; set; } + /// + /// 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. + /// + public string OrderBy { get; set; } + /// + /// The caller can use this as an identifier to use as a correlation id to trace the call. + /// + public string XCorrelationID { get; set; } + } + + /// + /// Represents the Request object for the SearchParticipants API + /// + public class SearchParticipantsRequest { + /// + /// Constructor for the Request object + /// + public SearchParticipantsRequest () { + } + /// + /// The HTTP Header meant to specify the version of the API intended to be used + /// + public string AvalaraVersion { get; set; } + /// + /// 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. + /// + public string Search { get; set; } + /// + /// 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\" + /// + public string XAvalaraClient { get; set; } + /// + /// When set to true, the count of the collection is included as @recordSetCount in the response body. + /// + public bool? Count { get; set; } + /// + /// 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. + /// + public string Filter { get; set; } + /// + /// 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. + /// + public string Top { get; set; } + /// + /// If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. + /// + public string Skip { get; set; } + /// + /// 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. + /// + public string OrderBy { get; set; } + /// + /// The caller can use this as an identifier to use as a correlation id to trace the call. + /// + public string XCorrelationID { get; set; } + } + + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITradingPartnersApiSync + { + #region Synchronous Operations + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// + void BatchSearchParticipants(BatchSearchParticipantsRequest requestParameters); + + /// + /// Download batch search results in a csv file. + /// + /// + /// Downloads the report for a specific batch search using the batch search ID. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// FileParameter + FileParameter DownloadBatchSearchReport(DownloadBatchSearchReportRequest requestParameters); + + /// + /// Get the batch search details for a given id. + /// + /// + /// Get the batch search details for a given id. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// BatchSearch + BatchSearch GetBatchSearchDetail(GetBatchSearchDetailRequest requestParameters); + + /// + /// List all batch searches that were previously submitted. + /// + /// + /// Retrieves all batch searches performed by the user. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// BatchSearchListResponse + BatchSearchListResponse ListBatchSearches(ListBatchSearchesRequest requestParameters); + + /// + /// Returns a list of participants matching the input query. + /// + /// + /// Returns a list of participants matching the input query. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// DirectorySearchResponse + DirectorySearchResponse SearchParticipants(SearchParticipantsRequest requestParameters); + + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITradingPartnersApiAsync + { + #region Asynchronous Operations + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task BatchSearchParticipantsAsync(BatchSearchParticipantsRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Download batch search results in a csv file. + /// + /// + /// Downloads the report for a specific batch search using the batch search ID. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of FileParameter + System.Threading.Tasks.Task DownloadBatchSearchReportAsync(DownloadBatchSearchReportRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get the batch search details for a given id. + /// + /// + /// Get the batch search details for a given id. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of BatchSearch + System.Threading.Tasks.Task GetBatchSearchDetailAsync(GetBatchSearchDetailRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List all batch searches that were previously submitted. + /// + /// + /// Retrieves all batch searches performed by the user. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of BatchSearchListResponse + System.Threading.Tasks.Task ListBatchSearchesAsync(ListBatchSearchesRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Returns a list of participants matching the input query. + /// + /// + /// Returns a list of participants matching the input query. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of DirectorySearchResponse + System.Threading.Tasks.Task SearchParticipantsAsync(SearchParticipantsRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class TradingPartnersApi : ITradingPartnersApiSync, ITradingPartnersApiAsync + { + private Avalara.SDK.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// The client interface for API access. + /// + public TradingPartnersApi(Avalara.SDK.Client.IApiClient client) + { + SetConfiguration(client); + this.ExceptionFactory = Avalara.SDK.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API. + /// + private Avalara.SDK.Client.IInternalApiClient Client { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + private Avalara.SDK.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// + public void BatchSearchParticipants(BatchSearchParticipantsRequest requestParameters) + { + BatchSearchParticipantsWithHttpInfo(requestParameters); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// ApiResponse of Object(void) + private Avalara.SDK.Client.ApiResponse BatchSearchParticipantsWithHttpInfo(BatchSearchParticipantsRequest requestParameters) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling TradingPartnersApi->BatchSearchParticipants"); + + // verify the required parameter 'Name' is set + if (requestParameters.Name == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.Name' when calling TradingPartnersApi->BatchSearchParticipants"); + + // verify the required parameter 'NotificationEmail' is set + if (requestParameters.NotificationEmail == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.NotificationEmail' when calling TradingPartnersApi->BatchSearchParticipants"); + + // verify the required parameter 'File' is set + if (requestParameters.File == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.File' when calling TradingPartnersApi->BatchSearchParticipants"); + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "multipart/form-data" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "name", requestParameters.Name)); + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "notificationEmail", requestParameters.NotificationEmail)); + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + if (requestParameters.XCorrelationID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Correlation-ID", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XCorrelationID)); // header parameter + } + localVarRequestOptions.FileParameters.Add("file", requestParameters.File); + + // make the HTTP request + var localVarResponse = this.Client.Post("/einvoicing/trading-partners/batch-searches", localVarRequestOptions, requiredScopes); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("BatchSearchParticipants", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task BatchSearchParticipantsAsync(BatchSearchParticipantsRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await BatchSearchParticipantsWithHttpInfoAsync(requestParameters, cancellationToken).ConfigureAwait(false); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + private async System.Threading.Tasks.Task> BatchSearchParticipantsWithHttpInfoAsync(BatchSearchParticipantsRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'requestParameters.AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling TradingPartnersApi->BatchSearchParticipants"); + + // verify the required parameter 'requestParameters.Name' is set + if (requestParameters.Name == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.Name' when calling TradingPartnersApi->BatchSearchParticipants"); + + // verify the required parameter 'requestParameters.NotificationEmail' is set + if (requestParameters.NotificationEmail == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.NotificationEmail' when calling TradingPartnersApi->BatchSearchParticipants"); + + // verify the required parameter 'requestParameters.File' is set + if (requestParameters.File == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.File' when calling TradingPartnersApi->BatchSearchParticipants"); + + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "multipart/form-data" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "name", requestParameters.Name)); + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "notificationEmail", requestParameters.NotificationEmail)); + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + if (requestParameters.XCorrelationID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Correlation-ID", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XCorrelationID)); // header parameter + } + localVarRequestOptions.FileParameters.Add("file", requestParameters.File); + + // make the HTTP request + var localVarResponse = await this.Client.PostAsync("/einvoicing/trading-partners/batch-searches", localVarRequestOptions, cancellationToken, requiredScopes).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("BatchSearchParticipants", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Download batch search results in a csv file. Downloads the report for a specific batch search using the batch search ID. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// FileParameter + public FileParameter DownloadBatchSearchReport(DownloadBatchSearchReportRequest requestParameters) + { + Avalara.SDK.Client.ApiResponse localVarResponse = DownloadBatchSearchReportWithHttpInfo(requestParameters); + return localVarResponse.Data; + } + + /// + /// Download batch search results in a csv file. Downloads the report for a specific batch search using the batch search ID. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// ApiResponse of FileParameter + private Avalara.SDK.Client.ApiResponse DownloadBatchSearchReportWithHttpInfo(DownloadBatchSearchReportRequest requestParameters) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling TradingPartnersApi->DownloadBatchSearchReport"); + + // verify the required parameter 'Id' is set + if (requestParameters.Id == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.Id' when calling TradingPartnersApi->DownloadBatchSearchReport"); + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/csv", + "application/json" + }; + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + localVarRequestOptions.PathParameters.Add("id", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.Id)); // path parameter + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + if (requestParameters.XCorrelationID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Correlation-ID", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XCorrelationID)); // header parameter + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/einvoicing/trading-partners/batch-searches/{id}/$download-results", localVarRequestOptions, requiredScopes); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DownloadBatchSearchReport", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Download batch search results in a csv file. Downloads the report for a specific batch search using the batch search ID. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of FileParameter + public async System.Threading.Tasks.Task DownloadBatchSearchReportAsync(DownloadBatchSearchReportRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Avalara.SDK.Client.ApiResponse localVarResponse = await DownloadBatchSearchReportWithHttpInfoAsync(requestParameters, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Download batch search results in a csv file. Downloads the report for a specific batch search using the batch search ID. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (FileParameter) + private async System.Threading.Tasks.Task> DownloadBatchSearchReportWithHttpInfoAsync(DownloadBatchSearchReportRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'requestParameters.AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling TradingPartnersApi->DownloadBatchSearchReport"); + + // verify the required parameter 'requestParameters.Id' is set + if (requestParameters.Id == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.Id' when calling TradingPartnersApi->DownloadBatchSearchReport"); + + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/csv", + "application/json" + }; + + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + localVarRequestOptions.PathParameters.Add("id", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.Id)); // path parameter + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + if (requestParameters.XCorrelationID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Correlation-ID", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XCorrelationID)); // header parameter + } + + // make the HTTP request + var localVarResponse = await this.Client.GetAsync("/einvoicing/trading-partners/batch-searches/{id}/$download-results", localVarRequestOptions, cancellationToken, requiredScopes).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DownloadBatchSearchReport", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get the batch search details for a given id. Get the batch search details for a given id. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// BatchSearch + public BatchSearch GetBatchSearchDetail(GetBatchSearchDetailRequest requestParameters) + { + Avalara.SDK.Client.ApiResponse localVarResponse = GetBatchSearchDetailWithHttpInfo(requestParameters); + return localVarResponse.Data; + } + + /// + /// Get the batch search details for a given id. Get the batch search details for a given id. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// ApiResponse of BatchSearch + private Avalara.SDK.Client.ApiResponse GetBatchSearchDetailWithHttpInfo(GetBatchSearchDetailRequest requestParameters) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling TradingPartnersApi->GetBatchSearchDetail"); + + // verify the required parameter 'Id' is set + if (requestParameters.Id == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.Id' when calling TradingPartnersApi->GetBatchSearchDetail"); + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + localVarRequestOptions.PathParameters.Add("id", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.Id)); // path parameter + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + if (requestParameters.XCorrelationID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Correlation-ID", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XCorrelationID)); // header parameter + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/einvoicing/trading-partners/batch-searches/{id}", localVarRequestOptions, requiredScopes); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetBatchSearchDetail", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get the batch search details for a given id. Get the batch search details for a given id. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of BatchSearch + public async System.Threading.Tasks.Task GetBatchSearchDetailAsync(GetBatchSearchDetailRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Avalara.SDK.Client.ApiResponse localVarResponse = await GetBatchSearchDetailWithHttpInfoAsync(requestParameters, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get the batch search details for a given id. Get the batch search details for a given id. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (BatchSearch) + private async System.Threading.Tasks.Task> GetBatchSearchDetailWithHttpInfoAsync(GetBatchSearchDetailRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'requestParameters.AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling TradingPartnersApi->GetBatchSearchDetail"); + + // verify the required parameter 'requestParameters.Id' is set + if (requestParameters.Id == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.Id' when calling TradingPartnersApi->GetBatchSearchDetail"); + + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + localVarRequestOptions.PathParameters.Add("id", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.Id)); // path parameter + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + if (requestParameters.XCorrelationID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Correlation-ID", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XCorrelationID)); // header parameter + } + + // make the HTTP request + var localVarResponse = await this.Client.GetAsync("/einvoicing/trading-partners/batch-searches/{id}", localVarRequestOptions, cancellationToken, requiredScopes).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetBatchSearchDetail", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// List all batch searches that were previously submitted. Retrieves all batch searches performed by the user. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// BatchSearchListResponse + public BatchSearchListResponse ListBatchSearches(ListBatchSearchesRequest requestParameters) + { + Avalara.SDK.Client.ApiResponse localVarResponse = ListBatchSearchesWithHttpInfo(requestParameters); + return localVarResponse.Data; + } + + /// + /// List all batch searches that were previously submitted. Retrieves all batch searches performed by the user. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// ApiResponse of BatchSearchListResponse + private Avalara.SDK.Client.ApiResponse ListBatchSearchesWithHttpInfo(ListBatchSearchesRequest requestParameters) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling TradingPartnersApi->ListBatchSearches"); + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + if (requestParameters.Filter != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$filter", requestParameters.Filter)); + } + if (requestParameters.Count != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "count", requestParameters.Count)); + } + if (requestParameters.Top != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$top", requestParameters.Top)); + } + if (requestParameters.Skip != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$skip", requestParameters.Skip)); + } + if (requestParameters.OrderBy != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$orderBy", requestParameters.OrderBy)); + } + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + if (requestParameters.XCorrelationID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Correlation-ID", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XCorrelationID)); // header parameter + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/einvoicing/trading-partners/batch-searches", localVarRequestOptions, requiredScopes); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListBatchSearches", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// List all batch searches that were previously submitted. Retrieves all batch searches performed by the user. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of BatchSearchListResponse + public async System.Threading.Tasks.Task ListBatchSearchesAsync(ListBatchSearchesRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Avalara.SDK.Client.ApiResponse localVarResponse = await ListBatchSearchesWithHttpInfoAsync(requestParameters, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List all batch searches that were previously submitted. Retrieves all batch searches performed by the user. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (BatchSearchListResponse) + private async System.Threading.Tasks.Task> ListBatchSearchesWithHttpInfoAsync(ListBatchSearchesRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'requestParameters.AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling TradingPartnersApi->ListBatchSearches"); + + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + if (requestParameters.Filter != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$filter", requestParameters.Filter)); + } + if (requestParameters.Count != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "count", requestParameters.Count)); + } + if (requestParameters.Top != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$top", requestParameters.Top)); + } + if (requestParameters.Skip != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$skip", requestParameters.Skip)); + } + if (requestParameters.OrderBy != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$orderBy", requestParameters.OrderBy)); + } + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + if (requestParameters.XCorrelationID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Correlation-ID", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XCorrelationID)); // header parameter + } + + // make the HTTP request + var localVarResponse = await this.Client.GetAsync("/einvoicing/trading-partners/batch-searches", localVarRequestOptions, cancellationToken, requiredScopes).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListBatchSearches", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Returns a list of participants matching the input query. Returns a list of participants matching the input query. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// DirectorySearchResponse + public DirectorySearchResponse SearchParticipants(SearchParticipantsRequest requestParameters) + { + Avalara.SDK.Client.ApiResponse localVarResponse = SearchParticipantsWithHttpInfo(requestParameters); + return localVarResponse.Data; + } + + /// + /// Returns a list of participants matching the input query. Returns a list of participants matching the input query. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// ApiResponse of DirectorySearchResponse + private Avalara.SDK.Client.ApiResponse SearchParticipantsWithHttpInfo(SearchParticipantsRequest requestParameters) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling TradingPartnersApi->SearchParticipants"); + + // verify the required parameter 'Search' is set + if (requestParameters.Search == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.Search' when calling TradingPartnersApi->SearchParticipants"); + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + if (requestParameters.Count != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "count", requestParameters.Count)); + } + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$search", requestParameters.Search)); + if (requestParameters.Filter != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$filter", requestParameters.Filter)); + } + if (requestParameters.Top != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$top", requestParameters.Top)); + } + if (requestParameters.Skip != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$skip", requestParameters.Skip)); + } + if (requestParameters.OrderBy != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$orderBy", requestParameters.OrderBy)); + } + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + if (requestParameters.XCorrelationID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Correlation-ID", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XCorrelationID)); // header parameter + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/einvoicing/trading-partners", localVarRequestOptions, requiredScopes); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SearchParticipants", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Returns a list of participants matching the input query. Returns a list of participants matching the input query. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of DirectorySearchResponse + public async System.Threading.Tasks.Task SearchParticipantsAsync(SearchParticipantsRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Avalara.SDK.Client.ApiResponse localVarResponse = await SearchParticipantsWithHttpInfoAsync(requestParameters, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Returns a list of participants matching the input query. Returns a list of participants matching the input query. + /// + /// Thrown when fails to make API call + /// Request Object for the API + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DirectorySearchResponse) + private async System.Threading.Tasks.Task> SearchParticipantsWithHttpInfoAsync(SearchParticipantsRequest requestParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + //OAuth2 Scopes + String requiredScopes = ""; + // verify the required parameter 'requestParameters.AvalaraVersion' is set + if (requestParameters.AvalaraVersion == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling TradingPartnersApi->SearchParticipants"); + + // verify the required parameter 'requestParameters.Search' is set + if (requestParameters.Search == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.Search' when calling TradingPartnersApi->SearchParticipants"); + + + Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Avalara.SDK.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); + + if (requestParameters.Count != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "count", requestParameters.Count)); + } + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$search", requestParameters.Search)); + if (requestParameters.Filter != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$filter", requestParameters.Filter)); + } + if (requestParameters.Top != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$top", requestParameters.Top)); + } + if (requestParameters.Skip != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$skip", requestParameters.Skip)); + } + if (requestParameters.OrderBy != null) + { + localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$orderBy", requestParameters.OrderBy)); + } + localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter + if (requestParameters.XAvalaraClient != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter + } + if (requestParameters.XCorrelationID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-Correlation-ID", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XCorrelationID)); // header parameter + } + + // make the HTTP request + var localVarResponse = await this.Client.GetAsync("/einvoicing/trading-partners", localVarRequestOptions, cancellationToken, requiredScopes).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SearchParticipants", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Set the configuration object in APIClient + /// + private void SetConfiguration(IApiClient client) + { + if (client == null) throw new ArgumentNullException("ApiClient"); + if (client.Configuration == null) throw new ArgumentNullException("ApiClient.Configuration"); + + this.Client = (IInternalApiClient)client; + this.Client.SdkVersion = ""; + } + + } + + +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/BadDownloadRequest.cs b/src/Avalara.SDK/Model/EInvoicing/V1/BadDownloadRequest.cs index 0479d10..2e15d29 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/BadDownloadRequest.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/BadDownloadRequest.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Returns an HTTP status code and message for a 'bad request' /// - [DataContract] - public partial class BadDownloadRequest : IEquatable + [DataContract(Name = "BadDownloadRequest")] + public partial class BadDownloadRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -60,21 +60,24 @@ public partial class BadDownloadRequest : IEquatable /// The three-digit HTTP error code for the bad request /// /// The three-digit HTTP error code for the bad request - [DataMember(Name="error", EmitDefaultValue=false)] + /// 406 + [DataMember(Name = "error", EmitDefaultValue = false)] public string Error { get; set; } /// /// A message explaining the bad request /// /// A message explaining the bad request - [DataMember(Name="message", EmitDefaultValue=false)] + /// Incorrect Accept header. + [DataMember(Name = "message", EmitDefaultValue = false)] public string Message { get; set; } /// /// A message explaining the bad request /// /// A message explaining the bad request - [DataMember(Name="supportedAcceptHeaders", EmitDefaultValue=false)] + /// ["application/vnd.oasis.ubl+xml","application/pdf"] + [DataMember(Name = "supportedAcceptHeaders", EmitDefaultValue = false)] public Object SupportedAcceptHeaders { get; set; } /// @@ -83,7 +86,7 @@ public partial class BadDownloadRequest : IEquatable /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class BadDownloadRequest {\n"); sb.Append(" Error: ").Append(Error).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); @@ -101,62 +104,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BadDownloadRequest); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if BadDownloadRequest instances are equal - /// - /// Instance of BadDownloadRequest to be compared - /// Boolean - public bool Equals(BadDownloadRequest input) - { - if (input == null) - return false; - - return - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.SupportedAcceptHeaders == input.SupportedAcceptHeaders || - (this.SupportedAcceptHeaders != null && - this.SupportedAcceptHeaders.Equals(input.SupportedAcceptHeaders)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Error != null) - hashCode = hashCode * 59 + this.Error.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - if (this.SupportedAcceptHeaders != null) - hashCode = hashCode * 59 + this.SupportedAcceptHeaders.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/BadRequest.cs b/src/Avalara.SDK/Model/EInvoicing/V1/BadRequest.cs index a22680c..a888800 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/BadRequest.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/BadRequest.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Returns an HTTP status code and message for a 'bad request' /// - [DataContract] - public partial class BadRequest : IEquatable + [DataContract(Name = "BadRequest")] + public partial class BadRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -58,14 +58,16 @@ public partial class BadRequest : IEquatable /// The three-digit HTTP error code for the bad request /// /// The three-digit HTTP error code for the bad request - [DataMember(Name="error", EmitDefaultValue=false)] + /// 400 + [DataMember(Name = "error", EmitDefaultValue = false)] public string Error { get; set; } /// /// A message explaining the bad request /// /// A message explaining the bad request - [DataMember(Name="message", EmitDefaultValue=false)] + /// string + [DataMember(Name = "message", EmitDefaultValue = false)] public string Message { get; set; } /// @@ -74,7 +76,7 @@ public partial class BadRequest : IEquatable /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class BadRequest {\n"); sb.Append(" Error: ").Append(Error).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); @@ -91,55 +93,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BadRequest); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if BadRequest instances are equal - /// - /// Instance of BadRequest to be compared - /// Boolean - public bool Equals(BadRequest input) - { - if (input == null) - return false; - - return - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Error != null) - hashCode = hashCode * 59 + this.Error.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/BatchSearch.cs b/src/Avalara.SDK/Model/EInvoicing/V1/BatchSearch.cs new file mode 100644 index 0000000..0474f2f --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/BatchSearch.cs @@ -0,0 +1,191 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// BatchSearch + /// + [DataContract(Name = "BatchSearch")] + public partial class BatchSearch : IValidatableObject + { + /// + /// Status of the batch search + /// + /// Status of the batch search + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + /// + /// Enum Accepted for value: Accepted + /// + [EnumMember(Value = "Accepted")] + Accepted = 1, + + /// + /// Enum Running for value: Running + /// + [EnumMember(Value = "Running")] + Running = 2, + + /// + /// Enum Completed for value: Completed + /// + [EnumMember(Value = "Completed")] + Completed = 3, + + /// + /// Enum Failed for value: Failed + /// + [EnumMember(Value = "Failed")] + Failed = 4 + } + + + /// + /// Status of the batch search + /// + /// Status of the batch search + /// Accepted + [DataMember(Name = "status", EmitDefaultValue = false)] + public StatusEnum? Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// ID of the batch search. + /// Name of the batch report. + /// Email of the user who created the batch search. + /// Timestamp when the batch search was created. + /// Timestamp when the batch search was created. + /// Status of the batch search. + /// error. + public BatchSearch(string id = default(string), string name = default(string), string createdBy = default(string), DateTime created = default(DateTime), DateTime lastModified = default(DateTime), StatusEnum? status = default(StatusEnum?), ErrorResponse error = default(ErrorResponse)) + { + this.Id = id; + this.Name = name; + this.CreatedBy = createdBy; + this.Created = created; + this.LastModified = lastModified; + this.Status = status; + this.Error = error; + } + + /// + /// ID of the batch search + /// + /// ID of the batch search + /// 2f5ea4b5-4dae-445a-b3e4-9f65a61eaa99 + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Name of the batch report + /// + /// Name of the batch report + /// Batch Search Report 1 + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Email of the user who created the batch search + /// + /// Email of the user who created the batch search + /// user@example.com + [DataMember(Name = "createdBy", EmitDefaultValue = false)] + public string CreatedBy { get; set; } + + /// + /// Timestamp when the batch search was created + /// + /// Timestamp when the batch search was created + /// 2024-08-01T12:34:56Z + [DataMember(Name = "created", EmitDefaultValue = false)] + public DateTime Created { get; set; } + + /// + /// Timestamp when the batch search was created + /// + /// Timestamp when the batch search was created + /// 2024-08-01T12:34:56Z + [DataMember(Name = "lastModified", EmitDefaultValue = false)] + public DateTime LastModified { get; set; } + + /// + /// Gets or Sets Error + /// + [DataMember(Name = "error", EmitDefaultValue = false)] + public ErrorResponse Error { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BatchSearch {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); + sb.Append(" Created: ").Append(Created).Append("\n"); + sb.Append(" LastModified: ").Append(LastModified).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Error: ").Append(Error).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/BatchSearchListResponse.cs b/src/Avalara.SDK/Model/EInvoicing/V1/BatchSearchListResponse.cs new file mode 100644 index 0000000..339d803 --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/BatchSearchListResponse.cs @@ -0,0 +1,115 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// Schema for batch search list + /// + [DataContract(Name = "BatchSearchListResponse")] + public partial class BatchSearchListResponse : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The count of records in the result set. + /// Next Link. + /// value. + public BatchSearchListResponse(int recordSetCount = default(int), string nextLink = default(string), List value = default(List)) + { + this.RecordSetCount = recordSetCount; + this.NextLink = nextLink; + this.Value = value; + } + + /// + /// The count of records in the result set + /// + /// The count of records in the result set + /// 500 + [DataMember(Name = "@recordSetCount", EmitDefaultValue = false)] + public int RecordSetCount { get; set; } + + /// + /// Next Link + /// + /// Next Link + /// TODO + [DataMember(Name = "@nextLink", EmitDefaultValue = false)] + public string NextLink { get; set; } + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", EmitDefaultValue = false)] + public List Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BatchSearchListResponse {\n"); + sb.Append(" RecordSetCount: ").Append(RecordSetCount).Append("\n"); + sb.Append(" NextLink: ").Append(NextLink).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/ConditionalForField.cs b/src/Avalara.SDK/Model/EInvoicing/V1/ConditionalForField.cs index 9962017..470e8e5 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/ConditionalForField.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/ConditionalForField.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Mandates for which this field is conditional /// - [DataContract] - public partial class ConditionalForField : IEquatable + [DataContract(Name = "ConditionalForField")] + public partial class ConditionalForField : IValidatableObject { /// /// Initializes a new instance of the class. @@ -57,14 +57,15 @@ public partial class ConditionalForField : IEquatable /// /// Gets or Sets CountryMandate /// - [DataMember(Name="countryMandate", EmitDefaultValue=false)] + /// DE-ZUGFERD + [DataMember(Name = "countryMandate", EmitDefaultValue = false)] public string CountryMandate { get; set; } /// /// Array of scenarios which describe when a particular field is conditional for a country mandate /// /// Array of scenarios which describe when a particular field is conditional for a country mandate - [DataMember(Name="requiredWhen", EmitDefaultValue=false)] + [DataMember(Name = "requiredWhen", EmitDefaultValue = false)] public List RequiredWhen { get; set; } /// @@ -73,7 +74,7 @@ public partial class ConditionalForField : IEquatable /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ConditionalForField {\n"); sb.Append(" CountryMandate: ").Append(CountryMandate).Append("\n"); sb.Append(" RequiredWhen: ").Append(RequiredWhen).Append("\n"); @@ -90,56 +91,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ConditionalForField); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if ConditionalForField instances are equal - /// - /// Instance of ConditionalForField to be compared - /// Boolean - public bool Equals(ConditionalForField input) - { - if (input == null) - return false; - - return - ( - this.CountryMandate == input.CountryMandate || - (this.CountryMandate != null && - this.CountryMandate.Equals(input.CountryMandate)) - ) && - ( - this.RequiredWhen == input.RequiredWhen || - this.RequiredWhen != null && - input.RequiredWhen != null && - this.RequiredWhen.SequenceEqual(input.RequiredWhen) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CountryMandate != null) - hashCode = hashCode * 59 + this.CountryMandate.GetHashCode(); - if (this.RequiredWhen != null) - hashCode = hashCode * 59 + this.RequiredWhen.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DataInputField.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DataInputField.cs index 22a3380..67f00c8 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/DataInputField.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DataInputField.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// The Data Input Field /// - [DataContract] - public partial class DataInputField : IEquatable + [DataContract(Name = "DataInputField")] + public partial class DataInputField : IValidatableObject { /// /// Initializes a new instance of the class. @@ -50,7 +50,7 @@ public partial class DataInputField : IEquatable /// Field ID. /// applicableDocumentRoots. /// Path to this field. - /// Namespace of this field. + /// Namespace of this field. /// Field name. /// An example of the content for this field. /// An object representing the acceptable values for this field. @@ -61,13 +61,13 @@ public partial class DataInputField : IEquatable /// conditionalFor. /// notUsedFor. /// optionalFor. - public DataInputField(string id = default(string), string fieldId = default(string), List applicableDocumentRoots = default(List), string path = default(string), string varNameSpace = default(string), string fieldName = default(string), string exampleOrFixedValue = default(string), Object acceptedValues = default(Object), string documentationLink = default(string), string description = default(string), bool isSegment = default(bool), DataInputFieldRequiredFor requiredFor = default(DataInputFieldRequiredFor), List conditionalFor = default(List), DataInputFieldNotUsedFor notUsedFor = default(DataInputFieldNotUsedFor), DataInputFieldOptionalFor optionalFor = default(DataInputFieldOptionalFor)) + public DataInputField(string id = default(string), string fieldId = default(string), List applicableDocumentRoots = default(List), string path = default(string), string varNamespace = default(string), string fieldName = default(string), string exampleOrFixedValue = default(string), Object acceptedValues = default(Object), string documentationLink = default(string), string description = default(string), bool isSegment = default(bool), DataInputFieldRequiredFor requiredFor = default(DataInputFieldRequiredFor), List conditionalFor = default(List), DataInputFieldNotUsedFor notUsedFor = default(DataInputFieldNotUsedFor), DataInputFieldOptionalFor optionalFor = default(DataInputFieldOptionalFor)) { this.Id = id; this.FieldId = fieldId; this.ApplicableDocumentRoots = applicableDocumentRoots; this.Path = path; - this.VarNameSpace = varNameSpace; + this.Namespace = varNamespace; this.FieldName = fieldName; this.ExampleOrFixedValue = exampleOrFixedValue; this.AcceptedValues = acceptedValues; @@ -84,100 +84,109 @@ public partial class DataInputField : IEquatable /// Field UUID /// /// Field UUID - [DataMember(Name="id", EmitDefaultValue=false)] + /// f1768981-7025-468b-9f87-8a8982cd6984 + [DataMember(Name = "id", EmitDefaultValue = false)] public string Id { get; set; } /// /// Field ID /// /// Field ID - [DataMember(Name="fieldId", EmitDefaultValue=false)] + /// 1 + [DataMember(Name = "fieldId", EmitDefaultValue = false)] public string FieldId { get; set; } /// /// Gets or Sets ApplicableDocumentRoots /// - [DataMember(Name="applicableDocumentRoots", EmitDefaultValue=false)] + [DataMember(Name = "applicableDocumentRoots", EmitDefaultValue = false)] public List ApplicableDocumentRoots { get; set; } /// /// Path to this field /// /// Path to this field - [DataMember(Name="path", EmitDefaultValue=false)] + /// invoice/cbc:CustomizationID + [DataMember(Name = "path", EmitDefaultValue = false)] public string Path { get; set; } /// /// Namespace of this field /// /// Namespace of this field - [DataMember(Name="nameSpace", EmitDefaultValue=false)] - public string VarNameSpace { get; set; } + /// cbc: + [DataMember(Name = "namespace", EmitDefaultValue = false)] + public string Namespace { get; set; } /// /// Field name /// /// Field name - [DataMember(Name="fieldName", EmitDefaultValue=false)] + /// cbc:CustomizationID + [DataMember(Name = "fieldName", EmitDefaultValue = false)] public string FieldName { get; set; } /// /// An example of the content for this field /// /// An example of the content for this field - [DataMember(Name="exampleOrFixedValue", EmitDefaultValue=false)] + /// urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 + [DataMember(Name = "exampleOrFixedValue", EmitDefaultValue = false)] public string ExampleOrFixedValue { get; set; } /// /// An object representing the acceptable values for this field /// /// An object representing the acceptable values for this field - [DataMember(Name="acceptedValues", EmitDefaultValue=false)] + [DataMember(Name = "acceptedValues", EmitDefaultValue = false)] public Object AcceptedValues { get; set; } /// /// An example of the content for this field /// /// An example of the content for this field - [DataMember(Name="documentationLink", EmitDefaultValue=false)] + /// https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/cbc-CustomizationID + [DataMember(Name = "documentationLink", EmitDefaultValue = false)] public string DocumentationLink { get; set; } /// /// A description of this field /// /// A description of this field - [DataMember(Name="description", EmitDefaultValue=false)] + /// Specification identifier: An identification of the specification containing the total set of rules regarding semantic content, cardinalities and business rules to which the data contained in the instance document conforms. + [DataMember(Name = "description", EmitDefaultValue = false)] public string Description { get; set; } /// /// Is this a segment of the schema /// /// Is this a segment of the schema - [DataMember(Name="isSegment", EmitDefaultValue=false)] + /// false + [DataMember(Name = "isSegment", EmitDefaultValue = true)] public bool IsSegment { get; set; } /// /// Gets or Sets RequiredFor /// - [DataMember(Name="requiredFor", EmitDefaultValue=false)] + [DataMember(Name = "requiredFor", EmitDefaultValue = false)] public DataInputFieldRequiredFor RequiredFor { get; set; } /// /// Gets or Sets ConditionalFor /// - [DataMember(Name="conditionalFor", EmitDefaultValue=false)] + [DataMember(Name = "conditionalFor", EmitDefaultValue = false)] public List ConditionalFor { get; set; } /// /// Gets or Sets NotUsedFor /// - [DataMember(Name="notUsedFor", EmitDefaultValue=false)] + [DataMember(Name = "notUsedFor", EmitDefaultValue = false)] public DataInputFieldNotUsedFor NotUsedFor { get; set; } /// /// Gets or Sets OptionalFor /// - [DataMember(Name="optionalFor", EmitDefaultValue=false)] + [DataMember(Name = "optionalFor", EmitDefaultValue = false)] public DataInputFieldOptionalFor OptionalFor { get; set; } /// @@ -186,13 +195,13 @@ public partial class DataInputField : IEquatable /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DataInputField {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" FieldId: ").Append(FieldId).Append("\n"); sb.Append(" ApplicableDocumentRoots: ").Append(ApplicableDocumentRoots).Append("\n"); sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" VarNameSpace: ").Append(VarNameSpace).Append("\n"); + sb.Append(" Namespace: ").Append(Namespace).Append("\n"); sb.Append(" FieldName: ").Append(FieldName).Append("\n"); sb.Append(" ExampleOrFixedValue: ").Append(ExampleOrFixedValue).Append("\n"); sb.Append(" AcceptedValues: ").Append(AcceptedValues).Append("\n"); @@ -216,148 +225,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DataInputField); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if DataInputField instances are equal - /// - /// Instance of DataInputField to be compared - /// Boolean - public bool Equals(DataInputField input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.FieldId == input.FieldId || - (this.FieldId != null && - this.FieldId.Equals(input.FieldId)) - ) && - ( - this.ApplicableDocumentRoots == input.ApplicableDocumentRoots || - this.ApplicableDocumentRoots != null && - input.ApplicableDocumentRoots != null && - this.ApplicableDocumentRoots.SequenceEqual(input.ApplicableDocumentRoots) - ) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && - ( - this.VarNameSpace == input.VarNameSpace || - (this.VarNameSpace != null && - this.VarNameSpace.Equals(input.VarNameSpace)) - ) && - ( - this.FieldName == input.FieldName || - (this.FieldName != null && - this.FieldName.Equals(input.FieldName)) - ) && - ( - this.ExampleOrFixedValue == input.ExampleOrFixedValue || - (this.ExampleOrFixedValue != null && - this.ExampleOrFixedValue.Equals(input.ExampleOrFixedValue)) - ) && - ( - this.AcceptedValues == input.AcceptedValues || - (this.AcceptedValues != null && - this.AcceptedValues.Equals(input.AcceptedValues)) - ) && - ( - this.DocumentationLink == input.DocumentationLink || - (this.DocumentationLink != null && - this.DocumentationLink.Equals(input.DocumentationLink)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.IsSegment == input.IsSegment || - (this.IsSegment != null && - this.IsSegment.Equals(input.IsSegment)) - ) && - ( - this.RequiredFor == input.RequiredFor || - (this.RequiredFor != null && - this.RequiredFor.Equals(input.RequiredFor)) - ) && - ( - this.ConditionalFor == input.ConditionalFor || - this.ConditionalFor != null && - input.ConditionalFor != null && - this.ConditionalFor.SequenceEqual(input.ConditionalFor) - ) && - ( - this.NotUsedFor == input.NotUsedFor || - (this.NotUsedFor != null && - this.NotUsedFor.Equals(input.NotUsedFor)) - ) && - ( - this.OptionalFor == input.OptionalFor || - (this.OptionalFor != null && - this.OptionalFor.Equals(input.OptionalFor)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.FieldId != null) - hashCode = hashCode * 59 + this.FieldId.GetHashCode(); - if (this.ApplicableDocumentRoots != null) - hashCode = hashCode * 59 + this.ApplicableDocumentRoots.GetHashCode(); - if (this.Path != null) - hashCode = hashCode * 59 + this.Path.GetHashCode(); - if (this.VarNameSpace != null) - hashCode = hashCode * 59 + this.VarNameSpace.GetHashCode(); - if (this.FieldName != null) - hashCode = hashCode * 59 + this.FieldName.GetHashCode(); - if (this.ExampleOrFixedValue != null) - hashCode = hashCode * 59 + this.ExampleOrFixedValue.GetHashCode(); - if (this.AcceptedValues != null) - hashCode = hashCode * 59 + this.AcceptedValues.GetHashCode(); - if (this.DocumentationLink != null) - hashCode = hashCode * 59 + this.DocumentationLink.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this.IsSegment != null) - hashCode = hashCode * 59 + this.IsSegment.GetHashCode(); - if (this.RequiredFor != null) - hashCode = hashCode * 59 + this.RequiredFor.GetHashCode(); - if (this.ConditionalFor != null) - hashCode = hashCode * 59 + this.ConditionalFor.GetHashCode(); - if (this.NotUsedFor != null) - hashCode = hashCode * 59 + this.NotUsedFor.GetHashCode(); - if (this.OptionalFor != null) - hashCode = hashCode * 59 + this.OptionalFor.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldNotUsedFor.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldNotUsedFor.cs index 2c18291..af09341 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldNotUsedFor.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldNotUsedFor.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Array of CountryMandate names for which this field is not used. /// - [DataContract] - public partial class DataInputFieldNotUsedFor : IEquatable + [DataContract(Name = "DataInputField_notUsedFor")] + public partial class DataInputFieldNotUsedFor : IValidatableObject { /// /// Initializes a new instance of the class. @@ -55,7 +55,7 @@ public partial class DataInputFieldNotUsedFor : IEquatable /// Gets or Sets CountryMandate /// - [DataMember(Name="countryMandate", EmitDefaultValue=false)] + [DataMember(Name = "countryMandate", EmitDefaultValue = false)] public string CountryMandate { get; set; } /// @@ -64,7 +64,7 @@ public partial class DataInputFieldNotUsedFor : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DataInputFieldNotUsedFor {\n"); sb.Append(" CountryMandate: ").Append(CountryMandate).Append("\n"); sb.Append("}\n"); @@ -80,48 +80,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DataInputFieldNotUsedFor); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if DataInputFieldNotUsedFor instances are equal - /// - /// Instance of DataInputFieldNotUsedFor to be compared - /// Boolean - public bool Equals(DataInputFieldNotUsedFor input) - { - if (input == null) - return false; - - return - ( - this.CountryMandate == input.CountryMandate || - (this.CountryMandate != null && - this.CountryMandate.Equals(input.CountryMandate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CountryMandate != null) - hashCode = hashCode * 59 + this.CountryMandate.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldOptionalFor.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldOptionalFor.cs index a5f37a4..1434051 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldOptionalFor.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldOptionalFor.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Array of CountryMandate names for which this field is optional. /// - [DataContract] - public partial class DataInputFieldOptionalFor : IEquatable + [DataContract(Name = "DataInputField_optionalFor")] + public partial class DataInputFieldOptionalFor : IValidatableObject { /// /// Initializes a new instance of the class. @@ -55,7 +55,7 @@ public partial class DataInputFieldOptionalFor : IEquatable /// Gets or Sets CountryMandate /// - [DataMember(Name="countryMandate", EmitDefaultValue=false)] + [DataMember(Name = "countryMandate", EmitDefaultValue = false)] public string CountryMandate { get; set; } /// @@ -64,7 +64,7 @@ public partial class DataInputFieldOptionalFor : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DataInputFieldOptionalFor {\n"); sb.Append(" CountryMandate: ").Append(CountryMandate).Append("\n"); sb.Append("}\n"); @@ -80,48 +80,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DataInputFieldOptionalFor); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if DataInputFieldOptionalFor instances are equal - /// - /// Instance of DataInputFieldOptionalFor to be compared - /// Boolean - public bool Equals(DataInputFieldOptionalFor input) - { - if (input == null) - return false; - - return - ( - this.CountryMandate == input.CountryMandate || - (this.CountryMandate != null && - this.CountryMandate.Equals(input.CountryMandate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CountryMandate != null) - hashCode = hashCode * 59 + this.CountryMandate.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldRequiredFor.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldRequiredFor.cs index 89fa238..a5c7a5c 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldRequiredFor.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldRequiredFor.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Array of CountryMandate names for which this field is required. /// - [DataContract] - public partial class DataInputFieldRequiredFor : IEquatable + [DataContract(Name = "DataInputField_requiredFor")] + public partial class DataInputFieldRequiredFor : IValidatableObject { /// /// Initializes a new instance of the class. @@ -55,7 +55,7 @@ public partial class DataInputFieldRequiredFor : IEquatable /// Gets or Sets CountryMandate /// - [DataMember(Name="countryMandate", EmitDefaultValue=false)] + [DataMember(Name = "countryMandate", EmitDefaultValue = false)] public string CountryMandate { get; set; } /// @@ -64,7 +64,7 @@ public partial class DataInputFieldRequiredFor : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DataInputFieldRequiredFor {\n"); sb.Append(" CountryMandate: ").Append(CountryMandate).Append("\n"); sb.Append("}\n"); @@ -80,48 +80,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DataInputFieldRequiredFor); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if DataInputFieldRequiredFor instances are equal - /// - /// Instance of DataInputFieldRequiredFor to be compared - /// Boolean - public bool Equals(DataInputFieldRequiredFor input) - { - if (input == null) - return false; - - return - ( - this.CountryMandate == input.CountryMandate || - (this.CountryMandate != null && - this.CountryMandate.Equals(input.CountryMandate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CountryMandate != null) - hashCode = hashCode * 59 + this.CountryMandate.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldsResponse.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldsResponse.cs index 4264c28..7ba9208 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldsResponse.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DataInputFieldsResponse.cs @@ -37,22 +37,21 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// DataInputFieldsResponse /// - [DataContract] - public partial class DataInputFieldsResponse : IEquatable + [DataContract(Name = "DataInputFieldsResponse")] + public partial class DataInputFieldsResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Total count of results. + /// Total count of results. /// nextLink. /// Array of Data Input Fields. - public DataInputFieldsResponse(decimal recordSetCount = default(decimal), string nextLink = default(string), List value = default(List)) + public DataInputFieldsResponse(decimal recordsetCount = default(decimal), string nextLink = default(string), List value = default(List)) { - this.NextLink = nextLink; - this.RecordSetCount = recordSetCount; + this.RecordsetCount = recordsetCount; this.NextLink = nextLink; this.Value = value; } @@ -61,20 +60,21 @@ public partial class DataInputFieldsResponse : IEquatable /// Total count of results - [DataMember(Name="@recordSetCount", EmitDefaultValue=false)] - public decimal RecordSetCount { get; set; } + /// 1 + [DataMember(Name = "@recordsetCount", EmitDefaultValue = false)] + public decimal RecordsetCount { get; set; } /// /// Gets or Sets NextLink /// - [DataMember(Name="@nextLink", EmitDefaultValue=true)] + [DataMember(Name = "@nextLink", EmitDefaultValue = true)] public string NextLink { get; set; } /// /// Array of Data Input Fields /// /// Array of Data Input Fields - [DataMember(Name="value", EmitDefaultValue=false)] + [DataMember(Name = "value", EmitDefaultValue = false)] public List Value { get; set; } /// @@ -83,9 +83,9 @@ public partial class DataInputFieldsResponse : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DataInputFieldsResponse {\n"); - sb.Append(" RecordSetCount: ").Append(RecordSetCount).Append("\n"); + sb.Append(" RecordsetCount: ").Append(RecordsetCount).Append("\n"); sb.Append(" NextLink: ").Append(NextLink).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); sb.Append("}\n"); @@ -101,63 +101,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DataInputFieldsResponse); - } - - /// - /// Returns true if DataInputFieldsResponse instances are equal - /// - /// Instance of DataInputFieldsResponse to be compared - /// Boolean - public bool Equals(DataInputFieldsResponse input) - { - if (input == null) - return false; - - return - ( - this.RecordSetCount == input.RecordSetCount || - (this.RecordSetCount != null && - this.RecordSetCount.Equals(input.RecordSetCount)) - ) && - ( - this.NextLink == input.NextLink || - (this.NextLink != null && - this.NextLink.Equals(input.NextLink)) - ) && - ( - this.Value == input.Value || - this.Value != null && - input.Value != null && - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RecordSetCount != null) - hashCode = hashCode * 59 + this.RecordSetCount.GetHashCode(); - if (this.NextLink != null) - hashCode = hashCode * 59 + this.NextLink.GetHashCode(); - if (this.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); - return hashCode; - } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponse.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponse.cs new file mode 100644 index 0000000..4e7289d --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponse.cs @@ -0,0 +1,115 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// Response schema for directory search results + /// + [DataContract(Name = "DirectorySearchResponse")] + public partial class DirectorySearchResponse : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The count of records in the result set. + /// The next page link to get the next set of results.. + /// value. + public DirectorySearchResponse(int recordSetCount = default(int), string nextLink = default(string), List value = default(List)) + { + this.RecordSetCount = recordSetCount; + this.NextLink = nextLink; + this.Value = value; + } + + /// + /// The count of records in the result set + /// + /// The count of records in the result set + /// 500 + [DataMember(Name = "@recordSetCount", EmitDefaultValue = false)] + public int RecordSetCount { get; set; } + + /// + /// The next page link to get the next set of results. + /// + /// The next page link to get the next set of results. + /// TODO + [DataMember(Name = "@nextLink", EmitDefaultValue = false)] + public string NextLink { get; set; } + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", EmitDefaultValue = false)] + public List Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DirectorySearchResponse {\n"); + sb.Append(" RecordSetCount: ").Append(RecordSetCount).Append("\n"); + sb.Append(" NextLink: ").Append(NextLink).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInner.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInner.cs new file mode 100644 index 0000000..fef892f --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInner.cs @@ -0,0 +1,155 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// DirectorySearchResponseValueInner + /// + [DataContract(Name = "DirectorySearchResponse_value_inner")] + public partial class DirectorySearchResponseValueInner : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Avalara unique ID of the participant in the directory.. + /// Name of the participant (typically, the name of the business entity).. + /// The network where the participant is present.. + /// Registration date of the participant if available. + /// identifiers. + /// addresses. + /// supportedDocumentTypes. + public DirectorySearchResponseValueInner(string id = default(string), string name = default(string), string network = default(string), DateTime registrationDate = default(DateTime), List identifiers = default(List), List addresses = default(List), List supportedDocumentTypes = default(List)) + { + this.Id = id; + this.Name = name; + this.Network = network; + this.RegistrationDate = registrationDate; + this.Identifiers = identifiers; + this.Addresses = addresses; + this.SupportedDocumentTypes = supportedDocumentTypes; + } + + /// + /// Avalara unique ID of the participant in the directory. + /// + /// Avalara unique ID of the participant in the directory. + /// 2a27ee0cf5bcb6165ab891503652343419a8fc5fe6b406299c47d7b44aa8548c + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Name of the participant (typically, the name of the business entity). + /// + /// Name of the participant (typically, the name of the business entity). + /// Pineapple Labs ltd + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// The network where the participant is present. + /// + /// The network where the participant is present. + /// Peppol + [DataMember(Name = "network", EmitDefaultValue = false)] + public string Network { get; set; } + + /// + /// Registration date of the participant if available + /// + /// Registration date of the participant if available + [DataMember(Name = "registrationDate", EmitDefaultValue = false)] + [JsonConverter(typeof(OpenAPIDateConverter))] + public DateTime RegistrationDate { get; set; } + + /// + /// Gets or Sets Identifiers + /// + [DataMember(Name = "identifiers", EmitDefaultValue = false)] + public List Identifiers { get; set; } + + /// + /// Gets or Sets Addresses + /// + [DataMember(Name = "addresses", EmitDefaultValue = false)] + public List Addresses { get; set; } + + /// + /// Gets or Sets SupportedDocumentTypes + /// + [DataMember(Name = "supportedDocumentTypes", EmitDefaultValue = false)] + public List SupportedDocumentTypes { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DirectorySearchResponseValueInner {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Network: ").Append(Network).Append("\n"); + sb.Append(" RegistrationDate: ").Append(RegistrationDate).Append("\n"); + sb.Append(" Identifiers: ").Append(Identifiers).Append("\n"); + sb.Append(" Addresses: ").Append(Addresses).Append("\n"); + sb.Append(" SupportedDocumentTypes: ").Append(SupportedDocumentTypes).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.cs new file mode 100644 index 0000000..999e0a6 --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.cs @@ -0,0 +1,134 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// DirectorySearchResponseValueInnerAddressesInner + /// + [DataContract(Name = "DirectorySearchResponse_value_inner_addresses_inner")] + public partial class DirectorySearchResponseValueInnerAddressesInner : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Address line 1. + /// Address line 2. + /// City. + /// State. + /// Country. + public DirectorySearchResponseValueInnerAddressesInner(string line1 = default(string), string line2 = default(string), string city = default(string), string state = default(string), string country = default(string)) + { + this.Line1 = line1; + this.Line2 = line2; + this.City = city; + this.State = state; + this.Country = country; + } + + /// + /// Address line 1 + /// + /// Address line 1 + [DataMember(Name = "line1", EmitDefaultValue = false)] + public string Line1 { get; set; } + + /// + /// Address line 2 + /// + /// Address line 2 + [DataMember(Name = "line2", EmitDefaultValue = false)] + public string Line2 { get; set; } + + /// + /// City + /// + /// City + [DataMember(Name = "city", EmitDefaultValue = false)] + public string City { get; set; } + + /// + /// State + /// + /// State + [DataMember(Name = "state", EmitDefaultValue = false)] + public string State { get; set; } + + /// + /// Country + /// + /// Country + [DataMember(Name = "country", EmitDefaultValue = false)] + public string Country { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DirectorySearchResponseValueInnerAddressesInner {\n"); + sb.Append(" Line1: ").Append(Line1).Append("\n"); + sb.Append(" Line2: ").Append(Line2).Append("\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" State: ").Append(State).Append("\n"); + sb.Append(" Country: ").Append(Country).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.cs new file mode 100644 index 0000000..9ec786d --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.cs @@ -0,0 +1,106 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// DirectorySearchResponseValueInnerIdentifiersInner + /// + [DataContract(Name = "DirectorySearchResponse_value_inner_identifiers_inner")] + public partial class DirectorySearchResponseValueInnerIdentifiersInner : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Peppol Participant ID if the participant is in Peppol network. + /// Value of the identifier. + public DirectorySearchResponseValueInnerIdentifiersInner(string name = default(string), string value = default(string)) + { + this.Name = name; + this.Value = value; + } + + /// + /// Peppol Participant ID if the participant is in Peppol network + /// + /// Peppol Participant ID if the participant is in Peppol network + /// PeppolParticipantId + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Value of the identifier + /// + /// Value of the identifier + /// 9930:de112233445 + [DataMember(Name = "value", EmitDefaultValue = false)] + public string Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DirectorySearchResponseValueInnerIdentifiersInner {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.cs new file mode 100644 index 0000000..fd6b629 --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.cs @@ -0,0 +1,128 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// DirectorySearchResponseValueInnerSupportedDocumentTypesInner + /// + [DataContract(Name = "DirectorySearchResponse_value_inner_supportedDocumentTypes_inner")] + public partial class DirectorySearchResponseValueInnerSupportedDocumentTypesInner : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Document type name.. + /// Document type identifier.. + /// Does trading partner support receiving this document type. + /// Does avalara support exchanging this document type. + public DirectorySearchResponseValueInnerSupportedDocumentTypesInner(string name = default(string), string value = default(string), bool supportedByTradingPartner = default(bool), bool supportedByAvalara = default(bool)) + { + this.Name = name; + this.Value = value; + this.SupportedByTradingPartner = supportedByTradingPartner; + this.SupportedByAvalara = supportedByAvalara; + } + + /// + /// Document type name. + /// + /// Document type name. + /// Peppol BIS Billing UBL Invoice V3 + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Document type identifier. + /// + /// Document type identifier. + /// busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1 + [DataMember(Name = "value", EmitDefaultValue = false)] + public string Value { get; set; } + + /// + /// Does trading partner support receiving this document type + /// + /// Does trading partner support receiving this document type + /// true + [DataMember(Name = "supportedByTradingPartner", EmitDefaultValue = true)] + public bool SupportedByTradingPartner { get; set; } + + /// + /// Does avalara support exchanging this document type + /// + /// Does avalara support exchanging this document type + /// true + [DataMember(Name = "supportedByAvalara", EmitDefaultValue = true)] + public bool SupportedByAvalara { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DirectorySearchResponseValueInnerSupportedDocumentTypesInner {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" SupportedByTradingPartner: ").Append(SupportedByTradingPartner).Append("\n"); + sb.Append(" SupportedByAvalara: ").Append(SupportedByAvalara).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetch.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetch.cs new file mode 100644 index 0000000..70a4513 --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetch.cs @@ -0,0 +1,117 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// DocumentFetch + /// + [DataContract(Name = "documentFetch")] + public partial class DocumentFetch : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// 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.. + /// Status of the document. + /// The date and time when the inbound document was accepted by the Avalara E-Invoicing Platform. + public DocumentFetch(string id = default(string), string status = default(string), string eventDateTime = default(string)) + { + this.Id = id; + this.Status = status; + this.EventDateTime = eventDateTime; + } + + /// + /// 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. + /// + /// 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. + /// 52f60401-44d0-4667-ad47-4afe519abb53 + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Status of the document + /// + /// Status of the document + /// Accepted + [DataMember(Name = "status", EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// The date and time when the inbound document was accepted by the Avalara E-Invoicing Platform + /// + /// The date and time when the inbound document was accepted by the Avalara E-Invoicing Platform + /// 2024-05-27T14:20:07:723 + [DataMember(Name = "eventDateTime", EmitDefaultValue = false)] + public string EventDateTime { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DocumentFetch {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" EventDateTime: ").Append(EventDateTime).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DocumentListResponse.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentListResponse.cs index 39738bf..050fa4f 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/DocumentListResponse.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentListResponse.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Returns the requested list of documents /// - [DataContract] - public partial class DocumentListResponse : IEquatable + [DataContract(Name = "DocumentListResponse")] + public partial class DocumentListResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -51,23 +51,18 @@ protected DocumentListResponse() { } /// /// Initializes a new instance of the class. /// - /// Count of collections for the given date range. + /// Count of collections for the given date range. /// nextLink. - /// Array of invoices matching query parameters (required). - public DocumentListResponse(string recordSetCount = default(string), string nextLink = default(string), List value = default(List)) + /// Array of documents matching query parameters (required). + public DocumentListResponse(string recordsetCount = default(string), string nextLink = default(string), List value = default(List)) { - this.NextLink = nextLink; // to ensure "value" is required (not null) if (value == null) { - throw new InvalidDataException("value is a required property for DocumentListResponse and cannot be null"); - } - else - { - this.Value = value; + throw new ArgumentNullException("value is a required property for DocumentListResponse and cannot be null"); } - - this.RecordSetCount = recordSetCount; + this.Value = value; + this.RecordsetCount = recordsetCount; this.NextLink = nextLink; } @@ -75,20 +70,21 @@ protected DocumentListResponse() { } /// Count of collections for the given date range /// /// Count of collections for the given date range - [DataMember(Name="@recordSetCount", EmitDefaultValue=false)] - public string RecordSetCount { get; set; } + /// 1 + [DataMember(Name = "@recordsetCount", EmitDefaultValue = false)] + public string RecordsetCount { get; set; } /// /// Gets or Sets NextLink /// - [DataMember(Name="@nextLink", EmitDefaultValue=true)] + [DataMember(Name = "@nextLink", EmitDefaultValue = true)] public string NextLink { get; set; } /// - /// Array of invoices matching query parameters + /// Array of documents matching query parameters /// - /// Array of invoices matching query parameters - [DataMember(Name="value", EmitDefaultValue=true)] + /// Array of documents matching query parameters + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] public List Value { get; set; } /// @@ -97,9 +93,9 @@ protected DocumentListResponse() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocumentListResponse {\n"); - sb.Append(" RecordSetCount: ").Append(RecordSetCount).Append("\n"); + sb.Append(" RecordsetCount: ").Append(RecordsetCount).Append("\n"); sb.Append(" NextLink: ").Append(NextLink).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); sb.Append("}\n"); @@ -115,63 +111,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DocumentListResponse); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if DocumentListResponse instances are equal - /// - /// Instance of DocumentListResponse to be compared - /// Boolean - public bool Equals(DocumentListResponse input) - { - if (input == null) - return false; - - return - ( - this.RecordSetCount == input.RecordSetCount || - (this.RecordSetCount != null && - this.RecordSetCount.Equals(input.RecordSetCount)) - ) && - ( - this.NextLink == input.NextLink || - (this.NextLink != null && - this.NextLink.Equals(input.NextLink)) - ) && - ( - this.Value == input.Value || - this.Value != null && - input.Value != null && - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RecordSetCount != null) - hashCode = hashCode * 59 + this.RecordSetCount.GetHashCode(); - if (this.NextLink != null) - hashCode = hashCode * 59 + this.NextLink.GetHashCode(); - if (this.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DocumentStatusResponse.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentStatusResponse.cs index 31391fc..f0f7cb3 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/DocumentStatusResponse.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentStatusResponse.cs @@ -37,17 +37,17 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Returns the current document ID and status /// - [DataContract] - public partial class DocumentStatusResponse : IEquatable + [DataContract(Name = "DocumentStatusResponse")] + public partial class DocumentStatusResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// /// The unique ID for this document. - /// Status of the transaction: <br> 'Pending' <br> 'Failed' <br> 'Complete'. + /// Status of the document. /// events. public DocumentStatusResponse(string id = default(string), string status = default(string), List events = default(List)) { @@ -60,20 +60,22 @@ public partial class DocumentStatusResponse : IEquatable /// The unique ID for this document - [DataMember(Name="id", EmitDefaultValue=false)] + /// 52f60401-44d0-4667-ad47-4afe519abb53 + [DataMember(Name = "id", EmitDefaultValue = false)] public string Id { get; set; } /// - /// Status of the transaction: <br> 'Pending' <br> 'Failed' <br> 'Complete' + /// Status of the document /// - /// Status of the transaction: <br> 'Pending' <br> 'Failed' <br> 'Complete' - [DataMember(Name="status", EmitDefaultValue=false)] + /// Status of the document + /// Complete + [DataMember(Name = "status", EmitDefaultValue = false)] public string Status { get; set; } /// /// Gets or Sets Events /// - [DataMember(Name="events", EmitDefaultValue=false)] + [DataMember(Name = "events", EmitDefaultValue = false)] public List Events { get; set; } /// @@ -82,7 +84,7 @@ public partial class DocumentStatusResponse : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocumentStatusResponse {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); @@ -100,63 +102,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DocumentStatusResponse); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if DocumentStatusResponse instances are equal - /// - /// Instance of DocumentStatusResponse to be compared - /// Boolean - public bool Equals(DocumentStatusResponse input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.Events == input.Events || - this.Events != null && - input.Events != null && - this.Events.SequenceEqual(input.Events) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - if (this.Events != null) - hashCode = hashCode * 59 + this.Events.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DocumentSubmissionError.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentSubmissionError.cs index 754f079..d63ad94 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/DocumentSubmissionError.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentSubmissionError.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Returns an HTTP status code and message for an 'exception' /// - [DataContract] - public partial class DocumentSubmissionError : IEquatable + [DataContract(Name = "DocumentSubmissionError")] + public partial class DocumentSubmissionError : IValidatableObject { /// /// Initializes a new instance of the class. @@ -58,14 +58,16 @@ public partial class DocumentSubmissionError : IEquatable /// The three-digit HTTP status code for the exception - [DataMember(Name="StatusCode", EmitDefaultValue=false)] + /// 400 + [DataMember(Name = "StatusCode", EmitDefaultValue = false)] public string StatusCode { get; set; } /// /// A message explaining the exception /// /// A message explaining the exception - [DataMember(Name="Message", EmitDefaultValue=false)] + /// Failed to parse document + [DataMember(Name = "Message", EmitDefaultValue = false)] public string Message { get; set; } /// @@ -74,7 +76,7 @@ public partial class DocumentSubmissionError : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocumentSubmissionError {\n"); sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); @@ -91,55 +93,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DocumentSubmissionError); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if DocumentSubmissionError instances are equal - /// - /// Instance of DocumentSubmissionError to be compared - /// Boolean - public bool Equals(DocumentSubmissionError input) - { - if (input == null) - return false; - - return - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.StatusCode != null) - hashCode = hashCode * 59 + this.StatusCode.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DocumentSubmitResponse.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentSubmitResponse.cs index 69be544..15805bc 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/DocumentSubmitResponse.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentSubmitResponse.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Returns the unique ID of a successful document submission /// - [DataContract] - public partial class DocumentSubmitResponse : IEquatable + [DataContract(Name = "DocumentSubmitResponse")] + public partial class DocumentSubmitResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -56,7 +56,8 @@ public partial class DocumentSubmitResponse : IEquatable /// 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. - [DataMember(Name="id", EmitDefaultValue=false)] + /// 52f60401-44d0-4667-ad47-4afe519abb53 + [DataMember(Name = "id", EmitDefaultValue = false)] public string Id { get; set; } /// @@ -65,7 +66,7 @@ public partial class DocumentSubmitResponse : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocumentSubmitResponse {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append("}\n"); @@ -81,48 +82,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DocumentSubmitResponse); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if DocumentSubmitResponse instances are equal - /// - /// Instance of DocumentSubmitResponse to be compared - /// Boolean - public bool Equals(DocumentSubmitResponse input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DocumentSummary.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentSummary.cs index 293c20a..1e0e552 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/DocumentSummary.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentSummary.cs @@ -37,40 +37,44 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Displays a summary of information about the document /// - [DataContract] - public partial class DocumentSummary : IEquatable + [DataContract(Name = "DocumentSummary")] + public partial class DocumentSummary : IValidatableObject { /// /// Initializes a new instance of the class. /// /// The unique ID for this document. /// The date and time when the document was processed, displayed in the format YYYY-MM-DDThh:mm:ss. - /// The transaction status: <br> 'Pending' <br> 'Failed' <br> 'Complete'. + /// The Document status. /// The name of the supplier in the transaction. /// The name of the customer in the transaction. - /// The invoice document number. - /// The invoice issue date. - /// The invoice direction, where issued = `out` and received = `in`. - /// The two-letter ISO-3166 country code for the country where the e-invoice is being submitted. + /// The document type. + /// The document version. + /// The document number. + /// The document issue date. + /// The document direction, where issued = `out` and received = `in`. + /// The two-letter ISO-3166 country code for the country where the document is being submitted. /// The e-invoicing mandate for the specified country. - /// The interface where the invoice data is sent. - /// The invoice recipient based on the interface. - public DocumentSummary(string id = default(string), string processDateTime = default(string), string status = default(string), string supplierName = default(string), string customerName = default(string), string documentNumber = default(string), string documentDate = default(string), string flow = default(string), string countryCode = default(string), string countryMandate = default(string), string varInterface = default(string), string receiver = default(string)) + /// The interface where the document is sent. + /// The document recipient based on the interface. + public DocumentSummary(string id = default(string), string processDateTime = default(string), string status = default(string), string supplierName = default(string), string customerName = default(string), string documentType = default(string), string documentVersion = default(string), string documentNumber = default(string), string documentDate = default(string), string flow = default(string), string countryCode = default(string), string countryMandate = default(string), string varInterface = default(string), string receiver = default(string)) { this.Id = id; this.ProcessDateTime = processDateTime; this.Status = status; this.SupplierName = supplierName; this.CustomerName = customerName; + this.DocumentType = documentType; + this.DocumentVersion = documentVersion; this.DocumentNumber = documentNumber; this.DocumentDate = documentDate; this.Flow = flow; this.CountryCode = countryCode; this.CountryMandate = countryMandate; - this.VarInterface = varInterface; + this.Interface = varInterface; this.Receiver = receiver; } @@ -78,84 +82,112 @@ public partial class DocumentSummary : IEquatable /// The unique ID for this document /// /// The unique ID for this document - [DataMember(Name="id", EmitDefaultValue=false)] + /// 52f60401-44d0-4667-ad47-4afe519abb53 + [DataMember(Name = "id", EmitDefaultValue = false)] public string Id { get; set; } /// /// The date and time when the document was processed, displayed in the format YYYY-MM-DDThh:mm:ss /// /// The date and time when the document was processed, displayed in the format YYYY-MM-DDThh:mm:ss - [DataMember(Name="processDateTime", EmitDefaultValue=false)] + /// 2022-01-09T12:36:02 + [DataMember(Name = "processDateTime", EmitDefaultValue = false)] public string ProcessDateTime { get; set; } /// - /// The transaction status: <br> 'Pending' <br> 'Failed' <br> 'Complete' + /// The Document status /// - /// The transaction status: <br> 'Pending' <br> 'Failed' <br> 'Complete' - [DataMember(Name="status", EmitDefaultValue=false)] + /// The Document status + /// Complete + [DataMember(Name = "status", EmitDefaultValue = false)] public string Status { get; set; } /// /// The name of the supplier in the transaction /// /// The name of the supplier in the transaction - [DataMember(Name="supplierName", EmitDefaultValue=false)] + /// Inposia GmbH + [DataMember(Name = "supplierName", EmitDefaultValue = false)] public string SupplierName { get; set; } /// /// The name of the customer in the transaction /// /// The name of the customer in the transaction - [DataMember(Name="customerName", EmitDefaultValue=false)] + /// Avalara Inc. + [DataMember(Name = "customerName", EmitDefaultValue = false)] public string CustomerName { get; set; } /// - /// The invoice document number + /// The document type /// - /// The invoice document number - [DataMember(Name="documentNumber", EmitDefaultValue=false)] + /// The document type + /// ubl-invoice + [DataMember(Name = "documentType", EmitDefaultValue = false)] + public string DocumentType { get; set; } + + /// + /// The document version + /// + /// The document version + /// 2.1 + [DataMember(Name = "documentVersion", EmitDefaultValue = false)] + public string DocumentVersion { get; set; } + + /// + /// The document number + /// + /// The document number + /// 8042091758 + [DataMember(Name = "documentNumber", EmitDefaultValue = false)] public string DocumentNumber { get; set; } /// - /// The invoice issue date + /// The document issue date /// - /// The invoice issue date - [DataMember(Name="documentDate", EmitDefaultValue=false)] + /// The document issue date + /// 2022-01-09 + [DataMember(Name = "documentDate", EmitDefaultValue = false)] public string DocumentDate { get; set; } /// - /// The invoice direction, where issued = `out` and received = `in` + /// The document direction, where issued = `out` and received = `in` /// - /// The invoice direction, where issued = `out` and received = `in` - [DataMember(Name="flow", EmitDefaultValue=false)] + /// The document direction, where issued = `out` and received = `in` + /// out + [DataMember(Name = "flow", EmitDefaultValue = false)] public string Flow { get; set; } /// - /// The two-letter ISO-3166 country code for the country where the e-invoice is being submitted + /// The two-letter ISO-3166 country code for the country where the document is being submitted /// - /// The two-letter ISO-3166 country code for the country where the e-invoice is being submitted - [DataMember(Name="countryCode", EmitDefaultValue=false)] + /// The two-letter ISO-3166 country code for the country where the document is being submitted + /// DE + [DataMember(Name = "countryCode", EmitDefaultValue = false)] public string CountryCode { get; set; } /// /// The e-invoicing mandate for the specified country /// /// The e-invoicing mandate for the specified country - [DataMember(Name="countryMandate", EmitDefaultValue=false)] + /// DE-B2G-XRECHNUNG + [DataMember(Name = "countryMandate", EmitDefaultValue = false)] public string CountryMandate { get; set; } /// - /// The interface where the invoice data is sent + /// The interface where the document is sent /// - /// The interface where the invoice data is sent - [DataMember(Name="interface", EmitDefaultValue=false)] - public string VarInterface { get; set; } + /// The interface where the document is sent + /// PEPPOL + [DataMember(Name = "interface", EmitDefaultValue = false)] + public string Interface { get; set; } /// - /// The invoice recipient based on the interface + /// The document recipient based on the interface /// - /// The invoice recipient based on the interface - [DataMember(Name="receiver", EmitDefaultValue=false)] + /// The document recipient based on the interface + /// 9930:AVALARATEST + [DataMember(Name = "receiver", EmitDefaultValue = false)] public string Receiver { get; set; } /// @@ -164,19 +196,21 @@ public partial class DocumentSummary : IEquatable /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocumentSummary {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" ProcessDateTime: ").Append(ProcessDateTime).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append(" SupplierName: ").Append(SupplierName).Append("\n"); sb.Append(" CustomerName: ").Append(CustomerName).Append("\n"); + sb.Append(" DocumentType: ").Append(DocumentType).Append("\n"); + sb.Append(" DocumentVersion: ").Append(DocumentVersion).Append("\n"); sb.Append(" DocumentNumber: ").Append(DocumentNumber).Append("\n"); sb.Append(" DocumentDate: ").Append(DocumentDate).Append("\n"); sb.Append(" Flow: ").Append(Flow).Append("\n"); sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); sb.Append(" CountryMandate: ").Append(CountryMandate).Append("\n"); - sb.Append(" VarInterface: ").Append(VarInterface).Append("\n"); + sb.Append(" Interface: ").Append(Interface).Append("\n"); sb.Append(" Receiver: ").Append(Receiver).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -191,125 +225,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DocumentSummary); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if DocumentSummary instances are equal - /// - /// Instance of DocumentSummary to be compared - /// Boolean - public bool Equals(DocumentSummary input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.ProcessDateTime == input.ProcessDateTime || - (this.ProcessDateTime != null && - this.ProcessDateTime.Equals(input.ProcessDateTime)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.SupplierName == input.SupplierName || - (this.SupplierName != null && - this.SupplierName.Equals(input.SupplierName)) - ) && - ( - this.CustomerName == input.CustomerName || - (this.CustomerName != null && - this.CustomerName.Equals(input.CustomerName)) - ) && - ( - this.DocumentNumber == input.DocumentNumber || - (this.DocumentNumber != null && - this.DocumentNumber.Equals(input.DocumentNumber)) - ) && - ( - this.DocumentDate == input.DocumentDate || - (this.DocumentDate != null && - this.DocumentDate.Equals(input.DocumentDate)) - ) && - ( - this.Flow == input.Flow || - (this.Flow != null && - this.Flow.Equals(input.Flow)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.CountryMandate == input.CountryMandate || - (this.CountryMandate != null && - this.CountryMandate.Equals(input.CountryMandate)) - ) && - ( - this.VarInterface == input.VarInterface || - (this.VarInterface != null && - this.VarInterface.Equals(input.VarInterface)) - ) && - ( - this.Receiver == input.Receiver || - (this.Receiver != null && - this.Receiver.Equals(input.Receiver)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.ProcessDateTime != null) - hashCode = hashCode * 59 + this.ProcessDateTime.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - if (this.SupplierName != null) - hashCode = hashCode * 59 + this.SupplierName.GetHashCode(); - if (this.CustomerName != null) - hashCode = hashCode * 59 + this.CustomerName.GetHashCode(); - if (this.DocumentNumber != null) - hashCode = hashCode * 59 + this.DocumentNumber.GetHashCode(); - if (this.DocumentDate != null) - hashCode = hashCode * 59 + this.DocumentDate.GetHashCode(); - if (this.Flow != null) - hashCode = hashCode * 59 + this.Flow.GetHashCode(); - if (this.CountryCode != null) - hashCode = hashCode * 59 + this.CountryCode.GetHashCode(); - if (this.CountryMandate != null) - hashCode = hashCode * 59 + this.CountryMandate.GetHashCode(); - if (this.VarInterface != null) - hashCode = hashCode * 59 + this.VarInterface.GetHashCode(); - if (this.Receiver != null) - hashCode = hashCode * 59 + this.Receiver.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/ErrorResponse.cs b/src/Avalara.SDK/Model/EInvoicing/V1/ErrorResponse.cs new file mode 100644 index 0000000..579f929 --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/ErrorResponse.cs @@ -0,0 +1,124 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// ErrorResponse + /// + [DataContract(Name = "ErrorResponse")] + public partial class ErrorResponse : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// title. + /// status. + /// detail. + /// instance. + public ErrorResponse(string title = default(string), string status = default(string), string detail = default(string), string instance = default(string)) + { + this.Title = title; + this.Status = status; + this.Detail = detail; + this.Instance = instance; + } + + /// + /// Gets or Sets Title + /// + /// BadInput + [DataMember(Name = "title", EmitDefaultValue = false)] + public string Title { get; set; } + + /// + /// Gets or Sets Status + /// + /// Error + [DataMember(Name = "status", EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// Gets or Sets Detail + /// + /// The input query is invalid. + [DataMember(Name = "detail", EmitDefaultValue = false)] + public string Detail { get; set; } + + /// + /// Gets or Sets Instance + /// + /// unknown parameter 'city' + [DataMember(Name = "instance", EmitDefaultValue = false)] + public string Instance { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ErrorResponse {\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Detail: ").Append(Detail).Append("\n"); + sb.Append(" Instance: ").Append(Instance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/FetchDocumentsRequest.cs b/src/Avalara.SDK/Model/EInvoicing/V1/FetchDocumentsRequest.cs new file mode 100644 index 0000000..e183396 --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/FetchDocumentsRequest.cs @@ -0,0 +1,104 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// FetchDocumentsRequest + /// + [DataContract(Name = "FetchDocuments_request")] + public partial class FetchDocumentsRequest : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Array of key-value pairs used to retrieve inbound documents from the Tax Authority. + /// metadata. + public FetchDocumentsRequest(List data = default(List), FetchDocumentsRequestMetadata metadata = default(FetchDocumentsRequestMetadata)) + { + this.Data = data; + this.Metadata = metadata; + } + + /// + /// Array of key-value pairs used to retrieve inbound documents from the Tax Authority + /// + /// Array of key-value pairs used to retrieve inbound documents from the Tax Authority + /// [{"key":"Confirmation_Number","value":"987654321"},{"key":"Customer_VAT_Number","value":"777777715"}] + [DataMember(Name = "data", EmitDefaultValue = false)] + public List Data { get; set; } + + /// + /// Gets or Sets Metadata + /// + [DataMember(Name = "metadata", EmitDefaultValue = false)] + public FetchDocumentsRequestMetadata Metadata { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FetchDocumentsRequest {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/FetchDocumentsRequestDataInner.cs b/src/Avalara.SDK/Model/EInvoicing/V1/FetchDocumentsRequestDataInner.cs new file mode 100644 index 0000000..1cd9674 --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/FetchDocumentsRequestDataInner.cs @@ -0,0 +1,119 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// FetchDocumentsRequestDataInner + /// + [DataContract(Name = "FetchDocuments_request_data_inner")] + public partial class FetchDocumentsRequestDataInner : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FetchDocumentsRequestDataInner() { } + /// + /// Initializes a new instance of the class. + /// + /// Descriptor of the identifier (required). + /// Value of the identifier (required). + public FetchDocumentsRequestDataInner(string key = default(string), string value = default(string)) + { + // to ensure "key" is required (not null) + if (key == null) + { + throw new ArgumentNullException("key is a required property for FetchDocumentsRequestDataInner and cannot be null"); + } + this.Key = key; + // to ensure "value" is required (not null) + if (value == null) + { + throw new ArgumentNullException("value is a required property for FetchDocumentsRequestDataInner and cannot be null"); + } + this.Value = value; + } + + /// + /// Descriptor of the identifier + /// + /// Descriptor of the identifier + [DataMember(Name = "key", IsRequired = true, EmitDefaultValue = true)] + public string Key { get; set; } + + /// + /// Value of the identifier + /// + /// Value of the identifier + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] + public string Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FetchDocumentsRequestDataInner {\n"); + sb.Append(" Key: ").Append(Key).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/FetchDocumentsRequestMetadata.cs b/src/Avalara.SDK/Model/EInvoicing/V1/FetchDocumentsRequestMetadata.cs new file mode 100644 index 0000000..a36ec1b --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/FetchDocumentsRequestMetadata.cs @@ -0,0 +1,164 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// FetchDocumentsRequestMetadata + /// + [DataContract(Name = "FetchDocuments_request_metadata")] + public partial class FetchDocumentsRequestMetadata : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FetchDocumentsRequestMetadata() { } + /// + /// Initializes a new instance of the class. + /// + /// Specifies a unique ID for this workflow. (required). + /// Specifies the data format for this workflow (required). + /// Specifies the data format version number (required). + /// The two-letter ISO-3166 country code for the country for which document is being retrieved (required). + /// The e-invoicing mandate for the specified country (required). + public FetchDocumentsRequestMetadata(string workflowId = default(string), string dataFormat = default(string), decimal dataFormatVersion = default(decimal), string countryCode = default(string), string countryMandate = default(string)) + { + // to ensure "workflowId" is required (not null) + if (workflowId == null) + { + throw new ArgumentNullException("workflowId is a required property for FetchDocumentsRequestMetadata and cannot be null"); + } + this.WorkflowId = workflowId; + // to ensure "dataFormat" is required (not null) + if (dataFormat == null) + { + throw new ArgumentNullException("dataFormat is a required property for FetchDocumentsRequestMetadata and cannot be null"); + } + this.DataFormat = dataFormat; + this.DataFormatVersion = dataFormatVersion; + // to ensure "countryCode" is required (not null) + if (countryCode == null) + { + throw new ArgumentNullException("countryCode is a required property for FetchDocumentsRequestMetadata and cannot be null"); + } + this.CountryCode = countryCode; + // to ensure "countryMandate" is required (not null) + if (countryMandate == null) + { + throw new ArgumentNullException("countryMandate is a required property for FetchDocumentsRequestMetadata and cannot be null"); + } + this.CountryMandate = countryMandate; + } + + /// + /// Specifies a unique ID for this workflow. + /// + /// Specifies a unique ID for this workflow. + /// partner-einvoicing + [DataMember(Name = "workflowId", IsRequired = true, EmitDefaultValue = true)] + public string WorkflowId { get; set; } + + /// + /// Specifies the data format for this workflow + /// + /// Specifies the data format for this workflow + /// ubl-invoice + [DataMember(Name = "dataFormat", IsRequired = true, EmitDefaultValue = true)] + public string DataFormat { get; set; } + + /// + /// Specifies the data format version number + /// + /// Specifies the data format version number + /// 2.1 + [DataMember(Name = "dataFormatVersion", IsRequired = true, EmitDefaultValue = true)] + public decimal DataFormatVersion { get; set; } + + /// + /// The two-letter ISO-3166 country code for the country for which document is being retrieved + /// + /// The two-letter ISO-3166 country code for the country for which document is being retrieved + /// IL + [DataMember(Name = "countryCode", IsRequired = true, EmitDefaultValue = true)] + public string CountryCode { get; set; } + + /// + /// The e-invoicing mandate for the specified country + /// + /// The e-invoicing mandate for the specified country + /// IL-B2B-CLEARANCE + [DataMember(Name = "countryMandate", IsRequired = true, EmitDefaultValue = true)] + public string CountryMandate { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FetchDocumentsRequestMetadata {\n"); + sb.Append(" WorkflowId: ").Append(WorkflowId).Append("\n"); + sb.Append(" DataFormat: ").Append(DataFormat).Append("\n"); + sb.Append(" DataFormatVersion: ").Append(DataFormatVersion).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" CountryMandate: ").Append(CountryMandate).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/ForbiddenError.cs b/src/Avalara.SDK/Model/EInvoicing/V1/ForbiddenError.cs index 01fbe81..3a3025b 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/ForbiddenError.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/ForbiddenError.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Returns an optional message with a 'forbidden' response /// - [DataContract] - public partial class ForbiddenError : IEquatable + [DataContract(Name = "ForbiddenError")] + public partial class ForbiddenError : IValidatableObject { /// /// Initializes a new instance of the class. @@ -56,7 +56,8 @@ public partial class ForbiddenError : IEquatable /// A message that informs the user that they may not access a resource /// /// A message that informs the user that they may not access a resource - [DataMember(Name="Message", EmitDefaultValue=false)] + /// User is not authorized to access this resource with an explicit deny + [DataMember(Name = "Message", EmitDefaultValue = false)] public string Message { get; set; } /// @@ -65,7 +66,7 @@ public partial class ForbiddenError : IEquatable /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ForbiddenError {\n"); sb.Append(" Message: ").Append(Message).Append("\n"); sb.Append("}\n"); @@ -81,48 +82,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ForbiddenError); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if ForbiddenError instances are equal - /// - /// Instance of ForbiddenError to be compared - /// Boolean - public bool Equals(ForbiddenError input) - { - if (input == null) - return false; - - return - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/InputDataFormats.cs b/src/Avalara.SDK/Model/EInvoicing/V1/InputDataFormats.cs index dc96ed0..e4f90ef 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/InputDataFormats.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/InputDataFormats.cs @@ -37,16 +37,16 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Format and version used when inputting the data /// - [DataContract] - public partial class InputDataFormats : IEquatable + [DataContract(Name = "inputDataFormats")] + public partial class InputDataFormats : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Invoice format. + /// Document format. /// versions. public InputDataFormats(string format = default(string), List versions = default(List)) { @@ -55,16 +55,17 @@ public partial class InputDataFormats : IEquatable } /// - /// Invoice format + /// Document format /// - /// Invoice format - [DataMember(Name="format", EmitDefaultValue=false)] + /// Document format + /// ubl-invoice + [DataMember(Name = "format", EmitDefaultValue = false)] public string Format { get; set; } /// /// Gets or Sets Versions /// - [DataMember(Name="versions", EmitDefaultValue=false)] + [DataMember(Name = "versions", EmitDefaultValue = false)] public List Versions { get; set; } /// @@ -73,7 +74,7 @@ public partial class InputDataFormats : IEquatable /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class InputDataFormats {\n"); sb.Append(" Format: ").Append(Format).Append("\n"); sb.Append(" Versions: ").Append(Versions).Append("\n"); @@ -90,56 +91,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InputDataFormats); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if InputDataFormats instances are equal - /// - /// Instance of InputDataFormats to be compared - /// Boolean - public bool Equals(InputDataFormats input) - { - if (input == null) - return false; - - return - ( - this.Format == input.Format || - (this.Format != null && - this.Format.Equals(input.Format)) - ) && - ( - this.Versions == input.Versions || - this.Versions != null && - input.Versions != null && - this.Versions.SequenceEqual(input.Versions) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Format != null) - hashCode = hashCode * 59 + this.Format.GetHashCode(); - if (this.Versions != null) - hashCode = hashCode * 59 + this.Versions.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/InternalServerError.cs b/src/Avalara.SDK/Model/EInvoicing/V1/InternalServerError.cs index bcdf826..0fa32f9 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/InternalServerError.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/InternalServerError.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Returns an optional message with a 'InternalServerError' response /// - [DataContract] - public partial class InternalServerError : IEquatable + [DataContract(Name = "InternalServerError")] + public partial class InternalServerError : IValidatableObject { /// /// Initializes a new instance of the class. @@ -58,14 +58,16 @@ public partial class InternalServerError : IEquatable /// A bad request error code /// /// A bad request error code - [DataMember(Name="error", EmitDefaultValue=false)] + /// 500 + [DataMember(Name = "error", EmitDefaultValue = false)] public string Error { get; set; } /// /// A message explaining the bad request error /// /// A message explaining the bad request error - [DataMember(Name="message", EmitDefaultValue=false)] + /// Something went wrong, please try again + [DataMember(Name = "message", EmitDefaultValue = false)] public string Message { get; set; } /// @@ -74,7 +76,7 @@ public partial class InternalServerError : IEquatable /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class InternalServerError {\n"); sb.Append(" Error: ").Append(Error).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); @@ -91,55 +93,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InternalServerError); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if InternalServerError instances are equal - /// - /// Instance of InternalServerError to be compared - /// Boolean - public bool Equals(InternalServerError input) - { - if (input == null) - return false; - - return - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Error != null) - hashCode = hashCode * 59 + this.Error.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/Mandate.cs b/src/Avalara.SDK/Model/EInvoicing/V1/Mandate.cs index 73f2508..be7dd61 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/Mandate.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/Mandate.cs @@ -37,17 +37,17 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Mandate /// - [DataContract] - public partial class Mandate : IEquatable + [DataContract(Name = "Mandate")] + public partial class Mandate : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Mandate UUID. - /// Country mandate name. + /// 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.. + /// **[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). . /// Country code. /// Mandate description. /// Indicates whether this mandate supported by the partner API. @@ -67,59 +67,65 @@ public partial class Mandate : IEquatable } /// - /// Mandate UUID + /// 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. /// - /// Mandate UUID - [DataMember(Name="mandateId", EmitDefaultValue=false)] + /// 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. + /// AU-B2G-PEPPOL + [DataMember(Name = "mandateId", EmitDefaultValue = false)] public string MandateId { get; set; } /// - /// Country mandate name + /// **[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). /// - /// Country mandate name - [DataMember(Name="countryMandate", EmitDefaultValue=false)] + /// **[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). + /// AU-B2G-PEPPOL + [DataMember(Name = "countryMandate", EmitDefaultValue = false)] public string CountryMandate { get; set; } /// /// Country code /// /// Country code - [DataMember(Name="countryCode", EmitDefaultValue=false)] + /// AU + [DataMember(Name = "countryCode", EmitDefaultValue = false)] public string CountryCode { get; set; } /// /// Mandate description /// /// Mandate description - [DataMember(Name="description", EmitDefaultValue=false)] + /// The mandate supporting B2G eInvoicing in Australia. This function will create a Peppol BIS 3.0 file and sends the invoice to the related recipient via the Peppol network + [DataMember(Name = "description", EmitDefaultValue = false)] public string Description { get; set; } /// /// Indicates whether this mandate supported by the partner API /// /// Indicates whether this mandate supported by the partner API - [DataMember(Name="supportedByPartnerAPI", EmitDefaultValue=false)] + /// true + [DataMember(Name = "supportedByPartnerAPI", EmitDefaultValue = true)] public bool SupportedByPartnerAPI { get; set; } /// /// Mandate format /// /// Mandate format - [DataMember(Name="mandateFormat", EmitDefaultValue=false)] + /// xml + [DataMember(Name = "mandateFormat", EmitDefaultValue = false)] public string MandateFormat { get; set; } /// /// Format and version used when inputting the data /// /// Format and version used when inputting the data - [DataMember(Name="inputDataFormats", EmitDefaultValue=false)] + [DataMember(Name = "inputDataFormats", EmitDefaultValue = false)] public List InputDataFormats { get; set; } /// /// Workflow ID list /// /// Workflow ID list - [DataMember(Name="workflowIds", EmitDefaultValue=false)] + [DataMember(Name = "workflowIds", EmitDefaultValue = false)] public List WorkflowIds { get; set; } /// @@ -128,7 +134,7 @@ public partial class Mandate : IEquatable /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Mandate {\n"); sb.Append(" MandateId: ").Append(MandateId).Append("\n"); sb.Append(" CountryMandate: ").Append(CountryMandate).Append("\n"); @@ -151,99 +157,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Mandate); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if Mandate instances are equal - /// - /// Instance of Mandate to be compared - /// Boolean - public bool Equals(Mandate input) - { - if (input == null) - return false; - - return - ( - this.MandateId == input.MandateId || - (this.MandateId != null && - this.MandateId.Equals(input.MandateId)) - ) && - ( - this.CountryMandate == input.CountryMandate || - (this.CountryMandate != null && - this.CountryMandate.Equals(input.CountryMandate)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.SupportedByPartnerAPI == input.SupportedByPartnerAPI || - (this.SupportedByPartnerAPI != null && - this.SupportedByPartnerAPI.Equals(input.SupportedByPartnerAPI)) - ) && - ( - this.MandateFormat == input.MandateFormat || - (this.MandateFormat != null && - this.MandateFormat.Equals(input.MandateFormat)) - ) && - ( - this.InputDataFormats == input.InputDataFormats || - this.InputDataFormats != null && - input.InputDataFormats != null && - this.InputDataFormats.SequenceEqual(input.InputDataFormats) - ) && - ( - this.WorkflowIds == input.WorkflowIds || - this.WorkflowIds != null && - input.WorkflowIds != null && - this.WorkflowIds.SequenceEqual(input.WorkflowIds) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MandateId != null) - hashCode = hashCode * 59 + this.MandateId.GetHashCode(); - if (this.CountryMandate != null) - hashCode = hashCode * 59 + this.CountryMandate.GetHashCode(); - if (this.CountryCode != null) - hashCode = hashCode * 59 + this.CountryCode.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this.SupportedByPartnerAPI != null) - hashCode = hashCode * 59 + this.SupportedByPartnerAPI.GetHashCode(); - if (this.MandateFormat != null) - hashCode = hashCode * 59 + this.MandateFormat.GetHashCode(); - if (this.InputDataFormats != null) - hashCode = hashCode * 59 + this.InputDataFormats.GetHashCode(); - if (this.WorkflowIds != null) - hashCode = hashCode * 59 + this.WorkflowIds.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/MandateDataInputField.cs b/src/Avalara.SDK/Model/EInvoicing/V1/MandateDataInputField.cs new file mode 100644 index 0000000..ca6df57 --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/MandateDataInputField.cs @@ -0,0 +1,235 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// The Data Input Field + /// + [DataContract(Name = "MandateDataInputField")] + public partial class MandateDataInputField : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Field ID. + /// The document type. + /// The document version. + /// Path to this field. + /// The type of path. + /// Field name. + /// varNamespace. + /// An example of the content for this field. + /// An Array representing the acceptable values for this field. + /// An example of the content for this field. + /// The data type of this field.. + /// A description of this field. + /// Determines if the field if Required/Conditional/Optional or not required.. + /// Represents the number of times an element can appear within the document. + public MandateDataInputField(string fieldId = default(string), string documentType = default(string), string documentVersion = default(string), string path = default(string), string pathType = default(string), string fieldName = default(string), MandateDataInputFieldNamespace varNamespace = default(MandateDataInputFieldNamespace), string exampleOrFixedValue = default(string), List acceptedValues = default(List), string documentationLink = default(string), string dataType = default(string), string description = default(string), string optionality = default(string), string cardinality = default(string)) + { + this.FieldId = fieldId; + this.DocumentType = documentType; + this.DocumentVersion = documentVersion; + this.Path = path; + this.PathType = pathType; + this.FieldName = fieldName; + this.Namespace = varNamespace; + this.ExampleOrFixedValue = exampleOrFixedValue; + this.AcceptedValues = acceptedValues; + this.DocumentationLink = documentationLink; + this.DataType = dataType; + this.Description = description; + this.Optionality = optionality; + this.Cardinality = cardinality; + } + + /// + /// Field ID + /// + /// Field ID + /// 1 + [DataMember(Name = "fieldId", EmitDefaultValue = false)] + public string FieldId { get; set; } + + /// + /// The document type + /// + /// The document type + /// ubl-inovice + [DataMember(Name = "documentType", EmitDefaultValue = false)] + public string DocumentType { get; set; } + + /// + /// The document version + /// + /// The document version + /// 2.1 + [DataMember(Name = "documentVersion", EmitDefaultValue = false)] + public string DocumentVersion { get; set; } + + /// + /// Path to this field + /// + /// Path to this field + /// Invoice/cbc:CustomizationID + [DataMember(Name = "path", EmitDefaultValue = false)] + public string Path { get; set; } + + /// + /// The type of path + /// + /// The type of path + /// xpath + [DataMember(Name = "pathType", EmitDefaultValue = false)] + public string PathType { get; set; } + + /// + /// Field name + /// + /// Field name + /// cbc:CustomizationID + [DataMember(Name = "fieldName", EmitDefaultValue = false)] + public string FieldName { get; set; } + + /// + /// Gets or Sets Namespace + /// + [DataMember(Name = "namespace", EmitDefaultValue = false)] + public MandateDataInputFieldNamespace Namespace { get; set; } + + /// + /// An example of the content for this field + /// + /// An example of the content for this field + /// urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 + [DataMember(Name = "exampleOrFixedValue", EmitDefaultValue = false)] + public string ExampleOrFixedValue { get; set; } + + /// + /// An Array representing the acceptable values for this field + /// + /// An Array representing the acceptable values for this field + [DataMember(Name = "acceptedValues", EmitDefaultValue = false)] + public List AcceptedValues { get; set; } + + /// + /// An example of the content for this field + /// + /// An example of the content for this field + /// https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/cbc-CustomizationID + [DataMember(Name = "documentationLink", EmitDefaultValue = false)] + public string DocumentationLink { get; set; } + + /// + /// The data type of this field. + /// + /// The data type of this field. + /// object + [DataMember(Name = "dataType", EmitDefaultValue = false)] + public string DataType { get; set; } + + /// + /// A description of this field + /// + /// A description of this field + /// Specification identifier: An identification of the specification containing the total set of rules regarding semantic content, cardinalities and business rules to which the data contained in the instance document conforms. + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Determines if the field if Required/Conditional/Optional or not required. + /// + /// Determines if the field if Required/Conditional/Optional or not required. + /// Required + [DataMember(Name = "optionality", EmitDefaultValue = false)] + public string Optionality { get; set; } + + /// + /// Represents the number of times an element can appear within the document + /// + /// Represents the number of times an element can appear within the document + /// 1..1 + [DataMember(Name = "cardinality", EmitDefaultValue = false)] + public string Cardinality { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MandateDataInputField {\n"); + sb.Append(" FieldId: ").Append(FieldId).Append("\n"); + sb.Append(" DocumentType: ").Append(DocumentType).Append("\n"); + sb.Append(" DocumentVersion: ").Append(DocumentVersion).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" PathType: ").Append(PathType).Append("\n"); + sb.Append(" FieldName: ").Append(FieldName).Append("\n"); + sb.Append(" Namespace: ").Append(Namespace).Append("\n"); + sb.Append(" ExampleOrFixedValue: ").Append(ExampleOrFixedValue).Append("\n"); + sb.Append(" AcceptedValues: ").Append(AcceptedValues).Append("\n"); + sb.Append(" DocumentationLink: ").Append(DocumentationLink).Append("\n"); + sb.Append(" DataType: ").Append(DataType).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Optionality: ").Append(Optionality).Append("\n"); + sb.Append(" Cardinality: ").Append(Cardinality).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/MandateDataInputFieldNamespace.cs b/src/Avalara.SDK/Model/EInvoicing/V1/MandateDataInputFieldNamespace.cs new file mode 100644 index 0000000..b65ba01 --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/MandateDataInputFieldNamespace.cs @@ -0,0 +1,105 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// The namespace of the UBL element + /// + [DataContract(Name = "MandateDataInputField_namespace")] + public partial class MandateDataInputFieldNamespace : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The namespace prefix for the UBL Element. + /// value. + public MandateDataInputFieldNamespace(string prefix = default(string), string value = default(string)) + { + this.Prefix = prefix; + this.Value = value; + } + + /// + /// The namespace prefix for the UBL Element + /// + /// The namespace prefix for the UBL Element + /// cbc + [DataMember(Name = "prefix", EmitDefaultValue = false)] + public string Prefix { get; set; } + + /// + /// Gets or Sets Value + /// + /// urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 + [DataMember(Name = "value", EmitDefaultValue = false)] + public string Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MandateDataInputFieldNamespace {\n"); + sb.Append(" Prefix: ").Append(Prefix).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/MandatesResponse.cs b/src/Avalara.SDK/Model/EInvoicing/V1/MandatesResponse.cs index 0f75a07..a0a0965 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/MandatesResponse.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/MandatesResponse.cs @@ -37,22 +37,21 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Mandate list response schema /// - [DataContract] - public partial class MandatesResponse : IEquatable + [DataContract(Name = "MandatesResponse")] + public partial class MandatesResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Total count of results. + /// Total count of results. /// nextLink. /// Mandates schema. - public MandatesResponse(decimal recordSetCount = default(decimal), string nextLink = default(string), List value = default(List)) + public MandatesResponse(decimal recordsetCount = default(decimal), string nextLink = default(string), List value = default(List)) { - this.NextLink = nextLink; - this.RecordSetCount = recordSetCount; + this.RecordsetCount = recordsetCount; this.NextLink = nextLink; this.Value = value; } @@ -61,20 +60,21 @@ public partial class MandatesResponse : IEquatable /// Total count of results /// /// Total count of results - [DataMember(Name="@recordSetCount", EmitDefaultValue=false)] - public decimal RecordSetCount { get; set; } + /// 1 + [DataMember(Name = "@recordsetCount", EmitDefaultValue = false)] + public decimal RecordsetCount { get; set; } /// /// Gets or Sets NextLink /// - [DataMember(Name="@nextLink", EmitDefaultValue=true)] + [DataMember(Name = "@nextLink", EmitDefaultValue = true)] public string NextLink { get; set; } /// /// Mandates schema /// /// Mandates schema - [DataMember(Name="value", EmitDefaultValue=false)] + [DataMember(Name = "value", EmitDefaultValue = false)] public List Value { get; set; } /// @@ -83,9 +83,9 @@ public partial class MandatesResponse : IEquatable /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class MandatesResponse {\n"); - sb.Append(" RecordSetCount: ").Append(RecordSetCount).Append("\n"); + sb.Append(" RecordsetCount: ").Append(RecordsetCount).Append("\n"); sb.Append(" NextLink: ").Append(NextLink).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); sb.Append("}\n"); @@ -101,63 +101,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MandatesResponse); - } - - /// - /// Returns true if MandatesResponse instances are equal - /// - /// Instance of MandatesResponse to be compared - /// Boolean - public bool Equals(MandatesResponse input) - { - if (input == null) - return false; - - return - ( - this.RecordSetCount == input.RecordSetCount || - (this.RecordSetCount != null && - this.RecordSetCount.Equals(input.RecordSetCount)) - ) && - ( - this.NextLink == input.NextLink || - (this.NextLink != null && - this.NextLink.Equals(input.NextLink)) - ) && - ( - this.Value == input.Value || - this.Value != null && - input.Value != null && - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RecordSetCount != null) - hashCode = hashCode * 59 + this.RecordSetCount.GetHashCode(); - if (this.NextLink != null) - hashCode = hashCode * 59 + this.NextLink.GetHashCode(); - if (this.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); - return hashCode; - } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/NotFoundError.cs b/src/Avalara.SDK/Model/EInvoicing/V1/NotFoundError.cs index f68c0ff..9c1efdc 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/NotFoundError.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/NotFoundError.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Returns an HTTP error code and message for a 'not found' error /// - [DataContract] - public partial class NotFoundError : IEquatable + [DataContract(Name = "NotFoundError")] + public partial class NotFoundError : IValidatableObject { /// /// Initializes a new instance of the class. @@ -58,14 +58,16 @@ public partial class NotFoundError : IEquatable /// The three-digit HTTP error code for a not found error /// /// The three-digit HTTP error code for a not found error - [DataMember(Name="error", EmitDefaultValue=false)] + /// 404 + [DataMember(Name = "error", EmitDefaultValue = false)] public string Error { get; set; } /// /// A message about the not found error /// /// A message about the not found error - [DataMember(Name="message", EmitDefaultValue=false)] + /// Not Found + [DataMember(Name = "message", EmitDefaultValue = false)] public string Message { get; set; } /// @@ -74,7 +76,7 @@ public partial class NotFoundError : IEquatable /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class NotFoundError {\n"); sb.Append(" Error: ").Append(Error).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); @@ -91,55 +93,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NotFoundError); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if NotFoundError instances are equal - /// - /// Instance of NotFoundError to be compared - /// Boolean - public bool Equals(NotFoundError input) - { - if (input == null) - return false; - - return - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Error != null) - hashCode = hashCode * 59 + this.Error.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/NotUsedForField.cs b/src/Avalara.SDK/Model/EInvoicing/V1/NotUsedForField.cs index 6a62053..d8e3a2f 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/NotUsedForField.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/NotUsedForField.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Mandates for which this field is not used /// - [DataContract] - public partial class NotUsedForField : IEquatable + [DataContract(Name = "NotUsedForField")] + public partial class NotUsedForField : IValidatableObject { /// /// Initializes a new instance of the class. @@ -55,7 +55,7 @@ public partial class NotUsedForField : IEquatable /// /// Gets or Sets CountryMandate /// - [DataMember(Name="countryMandate", EmitDefaultValue=false)] + [DataMember(Name = "countryMandate", EmitDefaultValue = false)] public string CountryMandate { get; set; } /// @@ -64,7 +64,7 @@ public partial class NotUsedForField : IEquatable /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class NotUsedForField {\n"); sb.Append(" CountryMandate: ").Append(CountryMandate).Append("\n"); sb.Append("}\n"); @@ -80,48 +80,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NotUsedForField); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if NotUsedForField instances are equal - /// - /// Instance of NotUsedForField to be compared - /// Boolean - public bool Equals(NotUsedForField input) - { - if (input == null) - return false; - - return - ( - this.CountryMandate == input.CountryMandate || - (this.CountryMandate != null && - this.CountryMandate.Equals(input.CountryMandate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CountryMandate != null) - hashCode = hashCode * 59 + this.CountryMandate.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/RequiredWhenField.cs b/src/Avalara.SDK/Model/EInvoicing/V1/RequiredWhenField.cs index 94e562a..7079f61 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/RequiredWhenField.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/RequiredWhenField.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// RequiredWhenField /// - [DataContract] - public partial class RequiredWhenField : IEquatable + [DataContract(Name = "RequiredWhenField")] + public partial class RequiredWhenField : IValidatableObject { /// /// Initializes a new instance of the class. @@ -55,7 +55,7 @@ public partial class RequiredWhenField : IEquatable /// /// Gets or Sets Scenario /// - [DataMember(Name="scenario", EmitDefaultValue=false)] + [DataMember(Name = "scenario", EmitDefaultValue = false)] public string Scenario { get; set; } /// @@ -64,7 +64,7 @@ public partial class RequiredWhenField : IEquatable /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class RequiredWhenField {\n"); sb.Append(" Scenario: ").Append(Scenario).Append("\n"); sb.Append("}\n"); @@ -80,48 +80,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RequiredWhenField); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if RequiredWhenField instances are equal - /// - /// Instance of RequiredWhenField to be compared - /// Boolean - public bool Equals(RequiredWhenField input) - { - if (input == null) - return false; - - return - ( - this.Scenario == input.Scenario || - (this.Scenario != null && - this.Scenario.Equals(input.Scenario)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Scenario != null) - hashCode = hashCode * 59 + this.Scenario.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/StatusEvent.cs b/src/Avalara.SDK/Model/EInvoicing/V1/StatusEvent.cs index bc46619..bbdd9f9 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/StatusEvent.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/StatusEvent.cs @@ -37,47 +37,71 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Displays when a status event occurred /// - [DataContract] - public partial class StatusEvent : IEquatable + [DataContract(Name = "StatusEvent")] + public partial class StatusEvent : IValidatableObject { /// /// Initializes a new instance of the class. /// /// The date and time when the status event occured, displayed in the format YYYY-MM-DDThh:mm:ss. /// A message describing the status event. - public StatusEvent(string eventDateTime = default(string), string message = default(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.. + /// The corresponding value associated with the response key. This value is provided by the tax authority in response to the event.. + public StatusEvent(string eventDateTime = default(string), string message = default(string), string responseKey = default(string), string responseValue = default(string)) { this.EventDateTime = eventDateTime; this.Message = message; + this.ResponseKey = responseKey; + this.ResponseValue = responseValue; } /// /// The date and time when the status event occured, displayed in the format YYYY-MM-DDThh:mm:ss /// /// The date and time when the status event occured, displayed in the format YYYY-MM-DDThh:mm:ss - [DataMember(Name="eventDateTime", EmitDefaultValue=false)] + /// 2022-01-09T12:36:02 + [DataMember(Name = "eventDateTime", EmitDefaultValue = false)] public string EventDateTime { get; set; } /// /// A message describing the status event /// /// A message describing the status event - [DataMember(Name="message", EmitDefaultValue=false)] + /// E-Invoice sent to SDI + [DataMember(Name = "message", EmitDefaultValue = false)] public string Message { get; set; } + /// + /// 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. + /// + /// 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. + /// IdentificativoSdI + [DataMember(Name = "responseKey", EmitDefaultValue = true)] + public string ResponseKey { get; set; } + + /// + /// The corresponding value associated with the response key. This value is provided by the tax authority in response to the event. + /// + /// The corresponding value associated with the response key. This value is provided by the tax authority in response to the event. + /// 2865701 + [DataMember(Name = "responseValue", EmitDefaultValue = true)] + public string ResponseValue { get; set; } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class StatusEvent {\n"); sb.Append(" EventDateTime: ").Append(EventDateTime).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" ResponseKey: ").Append(ResponseKey).Append("\n"); + sb.Append(" ResponseValue: ").Append(ResponseValue).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -91,55 +115,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StatusEvent); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if StatusEvent instances are equal - /// - /// Instance of StatusEvent to be compared - /// Boolean - public bool Equals(StatusEvent input) - { - if (input == null) - return false; - - return - ( - this.EventDateTime == input.EventDateTime || - (this.EventDateTime != null && - this.EventDateTime.Equals(input.EventDateTime)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EventDateTime != null) - hashCode = hashCode * 59 + this.EventDateTime.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - return hashCode; - } - } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/SubmitDocumentMetadata.cs b/src/Avalara.SDK/Model/EInvoicing/V1/SubmitDocumentMetadata.cs index 42bf0f6..16cdf06 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/SubmitDocumentMetadata.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/SubmitDocumentMetadata.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// - /// 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> +/// + /// 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> /// - [DataContract] - public partial class SubmitDocumentMetadata : IEquatable + [DataContract(Name = "SubmitDocument_metadata")] + public partial class SubmitDocumentMetadata : IValidatableObject { /// /// Initializes a new instance of the class. @@ -54,95 +54,80 @@ protected SubmitDocumentMetadata() { } /// Specifies a unique ID for this workflow. (required). /// Specifies the data format for this workflow. (required). /// Specifies the data format version number. (required). - /// The two-letter ISO-3166 country code for the country where the e-invoice is being submitted (required). + /// The two-letter ISO-3166 country code for the country where the document is being submitted (required). /// The e-invoicing mandate for the specified country. (required). public SubmitDocumentMetadata(string workflowId = default(string), string dataFormat = default(string), string dataFormatVersion = default(string), string countryCode = default(string), string countryMandate = default(string)) { // to ensure "workflowId" is required (not null) if (workflowId == null) { - throw new InvalidDataException("workflowId is a required property for SubmitDocumentMetadata and cannot be null"); + throw new ArgumentNullException("workflowId is a required property for SubmitDocumentMetadata and cannot be null"); } - else - { - this.WorkflowId = workflowId; - } - + this.WorkflowId = workflowId; // to ensure "dataFormat" is required (not null) if (dataFormat == null) { - throw new InvalidDataException("dataFormat is a required property for SubmitDocumentMetadata and cannot be null"); - } - else - { - this.DataFormat = dataFormat; + throw new ArgumentNullException("dataFormat is a required property for SubmitDocumentMetadata and cannot be null"); } - + this.DataFormat = dataFormat; // to ensure "dataFormatVersion" is required (not null) if (dataFormatVersion == null) { - throw new InvalidDataException("dataFormatVersion is a required property for SubmitDocumentMetadata and cannot be null"); - } - else - { - this.DataFormatVersion = dataFormatVersion; + throw new ArgumentNullException("dataFormatVersion is a required property for SubmitDocumentMetadata and cannot be null"); } - + this.DataFormatVersion = dataFormatVersion; // to ensure "countryCode" is required (not null) if (countryCode == null) { - throw new InvalidDataException("countryCode is a required property for SubmitDocumentMetadata and cannot be null"); - } - else - { - this.CountryCode = countryCode; + throw new ArgumentNullException("countryCode is a required property for SubmitDocumentMetadata and cannot be null"); } - + this.CountryCode = countryCode; // to ensure "countryMandate" is required (not null) if (countryMandate == null) { - throw new InvalidDataException("countryMandate is a required property for SubmitDocumentMetadata and cannot be null"); + throw new ArgumentNullException("countryMandate is a required property for SubmitDocumentMetadata and cannot be null"); } - else - { - this.CountryMandate = countryMandate; - } - + this.CountryMandate = countryMandate; } /// /// Specifies a unique ID for this workflow. /// /// Specifies a unique ID for this workflow. - [DataMember(Name="workflowId", EmitDefaultValue=true)] + /// partner-einvoicing + [DataMember(Name = "workflowId", IsRequired = true, EmitDefaultValue = true)] public string WorkflowId { get; set; } /// /// Specifies the data format for this workflow. /// /// Specifies the data format for this workflow. - [DataMember(Name="dataFormat", EmitDefaultValue=true)] + /// ubl-invoice + [DataMember(Name = "dataFormat", IsRequired = true, EmitDefaultValue = true)] public string DataFormat { get; set; } /// /// Specifies the data format version number. /// /// Specifies the data format version number. - [DataMember(Name="dataFormatVersion", EmitDefaultValue=true)] + /// 2.1 + [DataMember(Name = "dataFormatVersion", IsRequired = true, EmitDefaultValue = true)] public string DataFormatVersion { get; set; } /// - /// The two-letter ISO-3166 country code for the country where the e-invoice is being submitted + /// The two-letter ISO-3166 country code for the country where the document is being submitted /// - /// The two-letter ISO-3166 country code for the country where the e-invoice is being submitted - [DataMember(Name="countryCode", EmitDefaultValue=true)] + /// The two-letter ISO-3166 country code for the country where the document is being submitted + /// SA + [DataMember(Name = "countryCode", IsRequired = true, EmitDefaultValue = true)] public string CountryCode { get; set; } /// /// The e-invoicing mandate for the specified country. /// /// The e-invoicing mandate for the specified country. - [DataMember(Name="countryMandate", EmitDefaultValue=true)] + /// SA-Phase1-B2B + [DataMember(Name = "countryMandate", IsRequired = true, EmitDefaultValue = true)] public string CountryMandate { get; set; } /// @@ -151,7 +136,7 @@ protected SubmitDocumentMetadata() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class SubmitDocumentMetadata {\n"); sb.Append(" WorkflowId: ").Append(WorkflowId).Append("\n"); sb.Append(" DataFormat: ").Append(DataFormat).Append("\n"); @@ -171,76 +156,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SubmitDocumentMetadata); - } - - /// - /// Returns true if SubmitDocumentMetadata instances are equal - /// - /// Instance of SubmitDocumentMetadata to be compared - /// Boolean - public bool Equals(SubmitDocumentMetadata input) - { - if (input == null) - return false; - - return - ( - this.WorkflowId == input.WorkflowId || - (this.WorkflowId != null && - this.WorkflowId.Equals(input.WorkflowId)) - ) && - ( - this.DataFormat == input.DataFormat || - (this.DataFormat != null && - this.DataFormat.Equals(input.DataFormat)) - ) && - ( - this.DataFormatVersion == input.DataFormatVersion || - (this.DataFormatVersion != null && - this.DataFormatVersion.Equals(input.DataFormatVersion)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.CountryMandate == input.CountryMandate || - (this.CountryMandate != null && - this.CountryMandate.Equals(input.CountryMandate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.WorkflowId != null) - hashCode = hashCode * 59 + this.WorkflowId.GetHashCode(); - if (this.DataFormat != null) - hashCode = hashCode * 59 + this.DataFormat.GetHashCode(); - if (this.DataFormatVersion != null) - hashCode = hashCode * 59 + this.DataFormatVersion.GetHashCode(); - if (this.CountryCode != null) - hashCode = hashCode * 59 + this.CountryCode.GetHashCode(); - if (this.CountryMandate != null) - hashCode = hashCode * 59 + this.CountryMandate.GetHashCode(); - return hashCode; - } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - } - + } } diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/SubmitInteropDocument202Response.cs b/src/Avalara.SDK/Model/EInvoicing/V1/SubmitInteropDocument202Response.cs new file mode 100644 index 0000000..22cca06 --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/SubmitInteropDocument202Response.cs @@ -0,0 +1,106 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// SubmitInteropDocument202Response + /// + [DataContract(Name = "SubmitInteropDocument_202_response")] + public partial class SubmitInteropDocument202Response : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The unique interchange ID for this submission.. + /// A message indicating that the document has been accepted.. + public SubmitInteropDocument202Response(string interchangeId = default(string), string message = default(string)) + { + this.InterchangeId = interchangeId; + this.Message = message; + } + + /// + /// The unique interchange ID for this submission. + /// + /// The unique interchange ID for this submission. + /// 1a70d108-d550-424f-b6c7-755f12d4daf4 + [DataMember(Name = "interchangeId", EmitDefaultValue = false)] + public string InterchangeId { get; set; } + + /// + /// A message indicating that the document has been accepted. + /// + /// A message indicating that the document has been accepted. + /// Document accepted for processing. + [DataMember(Name = "message", EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SubmitInteropDocument202Response {\n"); + sb.Append(" InterchangeId: ").Append(InterchangeId).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/WorkflowIds.cs b/src/Avalara.SDK/Model/EInvoicing/V1/WorkflowIds.cs index 48d714a..a596a84 100644 --- a/src/Avalara.SDK/Model/EInvoicing/V1/WorkflowIds.cs +++ b/src/Avalara.SDK/Model/EInvoicing/V1/WorkflowIds.cs @@ -37,11 +37,11 @@ namespace Avalara.SDK.Model.EInvoicing.V1 { - /// +/// /// Workflow ID list /// - [DataContract] - public partial class WorkflowIds : IEquatable + [DataContract(Name = "WorkflowIds")] + public partial class WorkflowIds : IValidatableObject { /// /// Initializes a new instance of the class. @@ -58,14 +58,16 @@ public partial class WorkflowIds : IEquatable /// The name of this workflow /// /// The name of this workflow - [DataMember(Name="name", EmitDefaultValue=false)] + /// partner-einvoicing + [DataMember(Name = "name", EmitDefaultValue = false)] public string Name { get; set; } /// /// Workflow description /// /// Workflow description - [DataMember(Name="description", EmitDefaultValue=false)] + /// The standard value for the metadata object in POST /einvoicing/documents + [DataMember(Name = "description", EmitDefaultValue = false)] public string Description { get; set; } /// @@ -74,7 +76,7 @@ public partial class WorkflowIds : IEquatable /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class WorkflowIds {\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Description: ").Append(Description).Append("\n"); @@ -91,55 +93,14 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WorkflowIds); + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; } - - /// - /// Returns true if WorkflowIds instances are equal - /// - /// Instance of WorkflowIds to be compared - /// Boolean - public bool Equals(WorkflowIds input) - { - if (input == null) - return false; - - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - return hashCode; - } - } - } - + } } From 5fb1c561752594e0d7055b72ddc1a41151d1abbb Mon Sep 17 00:00:00 2001 From: Jonathan Wenger Date: Fri, 20 Dec 2024 09:52:10 -0800 Subject: [PATCH 2/4] Bump version --- src/Avalara.SDK/Avalara.SDK.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalara.SDK/Avalara.SDK.csproj b/src/Avalara.SDK/Avalara.SDK.csproj index 8dd888a..c244e70 100644 --- a/src/Avalara.SDK/Avalara.SDK.csproj +++ b/src/Avalara.SDK/Avalara.SDK.csproj @@ -12,7 +12,7 @@ A library generated from a OpenAPI doc No Copyright Avalara.SDK - 1.0.0 + 24.12.10 bin\$(Configuration)\$(TargetFramework)\Avalara.SDK.xml https://github.com/GIT_USER_ID/GIT_REPO_ID.git git From 1a376e24bb7a3072008c259748ca32ba2c7ffa32 Mon Sep 17 00:00:00 2001 From: Jonathan Wenger Date: Fri, 20 Dec 2024 14:37:47 -0800 Subject: [PATCH 3/4] Fix build issue dotnet --- README.md | 96 +--------- docs/EInvoicing/V1/DocumentFetchRequest.md | 11 ++ .../V1/DocumentFetchRequestDataInner.md | 11 ++ .../V1/DocumentFetchRequestMetadata.md | 14 ++ docs/EInvoicing/V1/DocumentsApi.md | 8 +- .../Api/EInvoicing/V1/DocumentsApi.cs | 20 +-- .../EInvoicing/V1/DocumentFetchRequest.cs | 104 +++++++++++ .../V1/DocumentFetchRequestDataInner.cs | 119 +++++++++++++ .../V1/DocumentFetchRequestMetadata.cs | 164 ++++++++++++++++++ 9 files changed, 440 insertions(+), 107 deletions(-) create mode 100644 docs/EInvoicing/V1/DocumentFetchRequest.md create mode 100644 docs/EInvoicing/V1/DocumentFetchRequestDataInner.md create mode 100644 docs/EInvoicing/V1/DocumentFetchRequestMetadata.md create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetchRequest.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetchRequestDataInner.cs create mode 100644 src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetchRequestMetadata.cs diff --git a/README.md b/README.md index eb10c9a..1e75f88 100644 --- a/README.md +++ b/README.md @@ -217,32 +217,6 @@ namespace Example ### 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 @@ -263,70 +237,6 @@ Class | Method | HTTP request | Description ## Documentation for Models - -### EInvoicing V1 Model Documentation - - - [Model.EInvoicing.V1.BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) - - [Model.EInvoicing.V1.BadRequest](docs/EInvoicing/V1/BadRequest.md) - - [Model.EInvoicing.V1.ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) - - [Model.EInvoicing.V1.DataInputField](docs/EInvoicing/V1/DataInputField.md) - - [Model.EInvoicing.V1.DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) - - [Model.EInvoicing.V1.DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) - - [Model.EInvoicing.V1.DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) - - [Model.EInvoicing.V1.DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) - - [Model.EInvoicing.V1.DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) - - [Model.EInvoicing.V1.DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) - - [Model.EInvoicing.V1.DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) - - [Model.EInvoicing.V1.DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) - - [Model.EInvoicing.V1.DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) - - [Model.EInvoicing.V1.ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) - - [Model.EInvoicing.V1.InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) - - [Model.EInvoicing.V1.InternalServerError](docs/EInvoicing/V1/InternalServerError.md) - - [Model.EInvoicing.V1.Mandate](docs/EInvoicing/V1/Mandate.md) - - [Model.EInvoicing.V1.MandatesResponse](docs/EInvoicing/V1/MandatesResponse.md) - - [Model.EInvoicing.V1.NotFoundError](docs/EInvoicing/V1/NotFoundError.md) - - [Model.EInvoicing.V1.NotUsedForField](docs/EInvoicing/V1/NotUsedForField.md) - - [Model.EInvoicing.V1.RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) - - [Model.EInvoicing.V1.StatusEvent](docs/EInvoicing/V1/StatusEvent.md) - - [Model.EInvoicing.V1.SubmitDocumentMetadata](docs/EInvoicing/V1/SubmitDocumentMetadata.md) - - [Model.EInvoicing.V1.WorkflowIds](docs/EInvoicing/V1/WorkflowIds.md) - - - -### EInvoicing V1 Model Documentation - - - [Model.EInvoicing.V1.BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) - - [Model.EInvoicing.V1.BadRequest](docs/EInvoicing/V1/BadRequest.md) - - [Model.EInvoicing.V1.ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) - - [Model.EInvoicing.V1.DataInputField](docs/EInvoicing/V1/DataInputField.md) - - [Model.EInvoicing.V1.DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) - - [Model.EInvoicing.V1.DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) - - [Model.EInvoicing.V1.DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) - - [Model.EInvoicing.V1.DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) - - [Model.EInvoicing.V1.DocumentFetch](docs/EInvoicing/V1/DocumentFetch.md) - - [Model.EInvoicing.V1.DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) - - [Model.EInvoicing.V1.DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) - - [Model.EInvoicing.V1.DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) - - [Model.EInvoicing.V1.DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) - - [Model.EInvoicing.V1.DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) - - [Model.EInvoicing.V1.FetchDocumentsRequest](docs/EInvoicing/V1/FetchDocumentsRequest.md) - - [Model.EInvoicing.V1.FetchDocumentsRequestDataInner](docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md) - - [Model.EInvoicing.V1.FetchDocumentsRequestMetadata](docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md) - - [Model.EInvoicing.V1.ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) - - [Model.EInvoicing.V1.InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) - - [Model.EInvoicing.V1.InternalServerError](docs/EInvoicing/V1/InternalServerError.md) - - [Model.EInvoicing.V1.Mandate](docs/EInvoicing/V1/Mandate.md) - - [Model.EInvoicing.V1.MandateDataInputField](docs/EInvoicing/V1/MandateDataInputField.md) - - [Model.EInvoicing.V1.MandateDataInputFieldNamespace](docs/EInvoicing/V1/MandateDataInputFieldNamespace.md) - - [Model.EInvoicing.V1.MandatesResponse](docs/EInvoicing/V1/MandatesResponse.md) - - [Model.EInvoicing.V1.NotFoundError](docs/EInvoicing/V1/NotFoundError.md) - - [Model.EInvoicing.V1.NotUsedForField](docs/EInvoicing/V1/NotUsedForField.md) - - [Model.EInvoicing.V1.RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) - - [Model.EInvoicing.V1.StatusEvent](docs/EInvoicing/V1/StatusEvent.md) - - [Model.EInvoicing.V1.SubmitDocumentMetadata](docs/EInvoicing/V1/SubmitDocumentMetadata.md) - - [Model.EInvoicing.V1.WorkflowIds](docs/EInvoicing/V1/WorkflowIds.md) - - ### EInvoicing V1 Model Documentation @@ -346,15 +256,15 @@ Class | Method | HTTP request | Description - [Model.EInvoicing.V1.DirectorySearchResponseValueInnerIdentifiersInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.md) - [Model.EInvoicing.V1.DirectorySearchResponseValueInnerSupportedDocumentTypesInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md) - [Model.EInvoicing.V1.DocumentFetch](docs/EInvoicing/V1/DocumentFetch.md) + - [Model.EInvoicing.V1.DocumentFetchRequest](docs/EInvoicing/V1/DocumentFetchRequest.md) + - [Model.EInvoicing.V1.DocumentFetchRequestDataInner](docs/EInvoicing/V1/DocumentFetchRequestDataInner.md) + - [Model.EInvoicing.V1.DocumentFetchRequestMetadata](docs/EInvoicing/V1/DocumentFetchRequestMetadata.md) - [Model.EInvoicing.V1.DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) - [Model.EInvoicing.V1.DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) - [Model.EInvoicing.V1.DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) - [Model.EInvoicing.V1.DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) - [Model.EInvoicing.V1.DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) - [Model.EInvoicing.V1.ErrorResponse](docs/EInvoicing/V1/ErrorResponse.md) - - [Model.EInvoicing.V1.FetchDocumentsRequest](docs/EInvoicing/V1/FetchDocumentsRequest.md) - - [Model.EInvoicing.V1.FetchDocumentsRequestDataInner](docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md) - - [Model.EInvoicing.V1.FetchDocumentsRequestMetadata](docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md) - [Model.EInvoicing.V1.ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) - [Model.EInvoicing.V1.InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) - [Model.EInvoicing.V1.InternalServerError](docs/EInvoicing/V1/InternalServerError.md) diff --git a/docs/EInvoicing/V1/DocumentFetchRequest.md b/docs/EInvoicing/V1/DocumentFetchRequest.md new file mode 100644 index 0000000..ffb3599 --- /dev/null +++ b/docs/EInvoicing/V1/DocumentFetchRequest.md @@ -0,0 +1,11 @@ +# Avalara.SDK.Model.EInvoicing.V1.DocumentFetchRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**List<DocumentFetchRequestDataInner>**](DocumentFetchRequestDataInner.md) | Array of key-value pairs used to retrieve inbound documents from the Tax Authority | [optional] +**Metadata** | [**DocumentFetchRequestMetadata**](DocumentFetchRequestMetadata.md) | | [optional] + +[[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/DocumentFetchRequestDataInner.md b/docs/EInvoicing/V1/DocumentFetchRequestDataInner.md new file mode 100644 index 0000000..bc81fbb --- /dev/null +++ b/docs/EInvoicing/V1/DocumentFetchRequestDataInner.md @@ -0,0 +1,11 @@ +# Avalara.SDK.Model.EInvoicing.V1.DocumentFetchRequestDataInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | Descriptor of the identifier | +**Value** | **string** | Value of the identifier | + +[[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/DocumentFetchRequestMetadata.md b/docs/EInvoicing/V1/DocumentFetchRequestMetadata.md new file mode 100644 index 0000000..d1899f0 --- /dev/null +++ b/docs/EInvoicing/V1/DocumentFetchRequestMetadata.md @@ -0,0 +1,14 @@ +# Avalara.SDK.Model.EInvoicing.V1.DocumentFetchRequestMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WorkflowId** | **string** | Specifies a unique ID for this workflow. | +**DataFormat** | **string** | Specifies the data format for this workflow | +**DataFormatVersion** | **decimal** | Specifies the data format version number | +**CountryCode** | **string** | The two-letter ISO-3166 country code for the country for which document is being retrieved | +**CountryMandate** | **string** | The e-invoicing mandate for the specified country | + +[[Back to Model list]](../../../README.md#documentation-for-models) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/DocumentsApi.md b/docs/EInvoicing/V1/DocumentsApi.md index 657f8aa..9fc24fc 100644 --- a/docs/EInvoicing/V1/DocumentsApi.md +++ b/docs/EInvoicing/V1/DocumentsApi.md @@ -130,7 +130,7 @@ namespace Example var apiInstance = new DocumentsApi(apiClient); var requestParameters = new FetchDocumentsRequest(); requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used - requestParameters.FetchDocumentsRequest = new FetchDocumentsRequest(); // FetchDocumentsRequest | + requestParameters.DocumentFetchRequest = new DocumentFetchRequest(); // DocumentFetchRequest | requestParameters.XAvalaraClient = 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. (optional) try @@ -155,7 +155,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **AvalaraVersion** | **string**| The HTTP Header meant to specify the version of the API intended to be used | - **FetchDocumentsRequest** | [**FetchDocumentsRequest**](FetchDocumentsRequest.md)| | + **DocumentFetchRequest** | [**DocumentFetchRequest**](DocumentFetchRequest.md)| | **XAvalaraClient** | **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 @@ -397,7 +397,7 @@ namespace Example var requestParameters = new SubmitDocumentRequest(); requestParameters.AvalaraVersion = 1.2; // string | The HTTP Header meant to specify the version of the API intended to be used requestParameters.Metadata = new SubmitDocumentMetadata(); // SubmitDocumentMetadata | - requestParameters.Data = new Object(); // Object | The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' + requestParameters.Data = "data_example"; // string | The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' requestParameters.XAvalaraClient = 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. (optional) try @@ -423,7 +423,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **AvalaraVersion** | **string**| The HTTP Header meant to specify the version of the API intended to be used | **Metadata** | [**SubmitDocumentMetadata**](SubmitDocumentMetadata.md)| | - **Data** | [**Object**](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' | **XAvalaraClient** | **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/src/Avalara.SDK/Api/EInvoicing/V1/DocumentsApi.cs b/src/Avalara.SDK/Api/EInvoicing/V1/DocumentsApi.cs index 6d98373..96ea3e1 100644 --- a/src/Avalara.SDK/Api/EInvoicing/V1/DocumentsApi.cs +++ b/src/Avalara.SDK/Api/EInvoicing/V1/DocumentsApi.cs @@ -73,7 +73,7 @@ public FetchDocumentsRequest () { /// /// /// - public FetchDocumentsRequest FetchDocumentsRequest { get; set; } + public DocumentFetchRequest DocumentFetchRequest { get; set; } /// /// 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. /// @@ -174,7 +174,7 @@ public SubmitDocumentRequest () { /// /// The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' /// - public Object Data { get; set; } + public string Data { get; set; } /// /// 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. /// @@ -532,9 +532,9 @@ private Avalara.SDK.Client.ApiResponse FetchDocumentsWithHttpInfo if (requestParameters.AvalaraVersion == null) throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling DocumentsApi->FetchDocuments"); - // verify the required parameter 'FetchDocumentsRequest' is set - if (requestParameters.FetchDocumentsRequest == null) - throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.FetchDocumentsRequest' when calling DocumentsApi->FetchDocuments"); + // verify the required parameter 'DocumentFetchRequest' is set + if (requestParameters.DocumentFetchRequest == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.DocumentFetchRequest' when calling DocumentsApi->FetchDocuments"); Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); @@ -560,7 +560,7 @@ private Avalara.SDK.Client.ApiResponse FetchDocumentsWithHttpInfo { localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter } - localVarRequestOptions.Data = requestParameters.FetchDocumentsRequest; + localVarRequestOptions.Data = requestParameters.DocumentFetchRequest; // make the HTTP request var localVarResponse = this.Client.Post("/einvoicing/documents/$fetch", localVarRequestOptions, requiredScopes); @@ -602,9 +602,9 @@ private Avalara.SDK.Client.ApiResponse FetchDocumentsWithHttpInfo if (requestParameters.AvalaraVersion == null) throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.AvalaraVersion' when calling DocumentsApi->FetchDocuments"); - // verify the required parameter 'requestParameters.FetchDocumentsRequest' is set - if (requestParameters.FetchDocumentsRequest == null) - throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.FetchDocumentsRequest' when calling DocumentsApi->FetchDocuments"); + // verify the required parameter 'requestParameters.DocumentFetchRequest' is set + if (requestParameters.DocumentFetchRequest == null) + throw new Avalara.SDK.Client.ApiException(400, "Missing required parameter 'requestParameters.DocumentFetchRequest' when calling DocumentsApi->FetchDocuments"); Avalara.SDK.Client.RequestOptions localVarRequestOptions = new Avalara.SDK.Client.RequestOptions(); @@ -632,7 +632,7 @@ private Avalara.SDK.Client.ApiResponse FetchDocumentsWithHttpInfo { localVarRequestOptions.HeaderParameters.Add("X-Avalara-Client", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.XAvalaraClient)); // header parameter } - localVarRequestOptions.Data = requestParameters.FetchDocumentsRequest; + localVarRequestOptions.Data = requestParameters.DocumentFetchRequest; // make the HTTP request var localVarResponse = await this.Client.PostAsync("/einvoicing/documents/$fetch", localVarRequestOptions, cancellationToken, requiredScopes).ConfigureAwait(false); diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetchRequest.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetchRequest.cs new file mode 100644 index 0000000..60cc312 --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetchRequest.cs @@ -0,0 +1,104 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// DocumentFetchRequest + /// + [DataContract(Name = "DocumentFetchRequest")] + public partial class DocumentFetchRequest : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Array of key-value pairs used to retrieve inbound documents from the Tax Authority. + /// metadata. + public DocumentFetchRequest(List data = default(List), DocumentFetchRequestMetadata metadata = default(DocumentFetchRequestMetadata)) + { + this.Data = data; + this.Metadata = metadata; + } + + /// + /// Array of key-value pairs used to retrieve inbound documents from the Tax Authority + /// + /// Array of key-value pairs used to retrieve inbound documents from the Tax Authority + /// [{"key":"Confirmation_Number","value":"987654321"},{"key":"Customer_VAT_Number","value":"777777715"}] + [DataMember(Name = "data", EmitDefaultValue = false)] + public List Data { get; set; } + + /// + /// Gets or Sets Metadata + /// + [DataMember(Name = "metadata", EmitDefaultValue = false)] + public DocumentFetchRequestMetadata Metadata { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DocumentFetchRequest {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetchRequestDataInner.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetchRequestDataInner.cs new file mode 100644 index 0000000..8ff1f72 --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetchRequestDataInner.cs @@ -0,0 +1,119 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// DocumentFetchRequestDataInner + /// + [DataContract(Name = "DocumentFetchRequest_data_inner")] + public partial class DocumentFetchRequestDataInner : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DocumentFetchRequestDataInner() { } + /// + /// Initializes a new instance of the class. + /// + /// Descriptor of the identifier (required). + /// Value of the identifier (required). + public DocumentFetchRequestDataInner(string key = default(string), string value = default(string)) + { + // to ensure "key" is required (not null) + if (key == null) + { + throw new ArgumentNullException("key is a required property for DocumentFetchRequestDataInner and cannot be null"); + } + this.Key = key; + // to ensure "value" is required (not null) + if (value == null) + { + throw new ArgumentNullException("value is a required property for DocumentFetchRequestDataInner and cannot be null"); + } + this.Value = value; + } + + /// + /// Descriptor of the identifier + /// + /// Descriptor of the identifier + [DataMember(Name = "key", IsRequired = true, EmitDefaultValue = true)] + public string Key { get; set; } + + /// + /// Value of the identifier + /// + /// Value of the identifier + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] + public string Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DocumentFetchRequestDataInner {\n"); + sb.Append(" Key: ").Append(Key).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetchRequestMetadata.cs b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetchRequestMetadata.cs new file mode 100644 index 0000000..aa15eeb --- /dev/null +++ b/src/Avalara.SDK/Model/EInvoicing/V1/DocumentFetchRequestMetadata.cs @@ -0,0 +1,164 @@ +/* + * AvaTax Software Development Kit for C# + * + * (c) 2004-2022 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2022 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-DotNet-SDK + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Avalara.SDK.Client.FileParameter; +using OpenAPIDateConverter = Avalara.SDK.Client.OpenAPIDateConverter; + +namespace Avalara.SDK.Model.EInvoicing.V1 +{ +/// + /// DocumentFetchRequestMetadata + /// + [DataContract(Name = "DocumentFetchRequest_metadata")] + public partial class DocumentFetchRequestMetadata : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DocumentFetchRequestMetadata() { } + /// + /// Initializes a new instance of the class. + /// + /// Specifies a unique ID for this workflow. (required). + /// Specifies the data format for this workflow (required). + /// Specifies the data format version number (required). + /// The two-letter ISO-3166 country code for the country for which document is being retrieved (required). + /// The e-invoicing mandate for the specified country (required). + public DocumentFetchRequestMetadata(string workflowId = default(string), string dataFormat = default(string), decimal dataFormatVersion = default(decimal), string countryCode = default(string), string countryMandate = default(string)) + { + // to ensure "workflowId" is required (not null) + if (workflowId == null) + { + throw new ArgumentNullException("workflowId is a required property for DocumentFetchRequestMetadata and cannot be null"); + } + this.WorkflowId = workflowId; + // to ensure "dataFormat" is required (not null) + if (dataFormat == null) + { + throw new ArgumentNullException("dataFormat is a required property for DocumentFetchRequestMetadata and cannot be null"); + } + this.DataFormat = dataFormat; + this.DataFormatVersion = dataFormatVersion; + // to ensure "countryCode" is required (not null) + if (countryCode == null) + { + throw new ArgumentNullException("countryCode is a required property for DocumentFetchRequestMetadata and cannot be null"); + } + this.CountryCode = countryCode; + // to ensure "countryMandate" is required (not null) + if (countryMandate == null) + { + throw new ArgumentNullException("countryMandate is a required property for DocumentFetchRequestMetadata and cannot be null"); + } + this.CountryMandate = countryMandate; + } + + /// + /// Specifies a unique ID for this workflow. + /// + /// Specifies a unique ID for this workflow. + /// partner-einvoicing + [DataMember(Name = "workflowId", IsRequired = true, EmitDefaultValue = true)] + public string WorkflowId { get; set; } + + /// + /// Specifies the data format for this workflow + /// + /// Specifies the data format for this workflow + /// ubl-invoice + [DataMember(Name = "dataFormat", IsRequired = true, EmitDefaultValue = true)] + public string DataFormat { get; set; } + + /// + /// Specifies the data format version number + /// + /// Specifies the data format version number + /// 2.1 + [DataMember(Name = "dataFormatVersion", IsRequired = true, EmitDefaultValue = true)] + public decimal DataFormatVersion { get; set; } + + /// + /// The two-letter ISO-3166 country code for the country for which document is being retrieved + /// + /// The two-letter ISO-3166 country code for the country for which document is being retrieved + /// IL + [DataMember(Name = "countryCode", IsRequired = true, EmitDefaultValue = true)] + public string CountryCode { get; set; } + + /// + /// The e-invoicing mandate for the specified country + /// + /// The e-invoicing mandate for the specified country + /// IL-B2B-CLEARANCE + [DataMember(Name = "countryMandate", IsRequired = true, EmitDefaultValue = true)] + public string CountryMandate { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DocumentFetchRequestMetadata {\n"); + sb.Append(" WorkflowId: ").Append(WorkflowId).Append("\n"); + sb.Append(" DataFormat: ").Append(DataFormat).Append("\n"); + sb.Append(" DataFormatVersion: ").Append(DataFormatVersion).Append("\n"); + sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); + sb.Append(" CountryMandate: ").Append(CountryMandate).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} From a85fc5ec3316cfd034099e7331453235c1ea39da Mon Sep 17 00:00:00 2001 From: Jonathan Wenger Date: Fri, 3 Jan 2025 09:45:35 -0800 Subject: [PATCH 4/4] Update Avalara Version handling and tests --- src/Avalara.SDK.Test/Api/EInvoicingTests.cs | 29 ++++++++++++------ .../Api/EInvoicing/V1/DataInputFieldsApi.cs | 6 +--- .../Api/EInvoicing/V1/DocumentsApi.cs | 30 ++++--------------- .../Api/EInvoicing/V1/InteropApi.cs | 6 +--- .../Api/EInvoicing/V1/MandatesApi.cs | 12 ++------ .../Api/EInvoicing/V1/TradingPartnersApi.cs | 30 ++++--------------- 6 files changed, 34 insertions(+), 79 deletions(-) diff --git a/src/Avalara.SDK.Test/Api/EInvoicingTests.cs b/src/Avalara.SDK.Test/Api/EInvoicingTests.cs index 5fb0b7e..67807c8 100644 --- a/src/Avalara.SDK.Test/Api/EInvoicingTests.cs +++ b/src/Avalara.SDK.Test/Api/EInvoicingTests.cs @@ -14,6 +14,7 @@ Avalara API Client Library using Avalara.SDK.Client; using Avalara.SDK.Helpers; using Avalara.SDK.Api.EInvoicing.V1; +using System.Threading.Tasks; namespace Avalara.SDK.Test.Api { @@ -26,7 +27,8 @@ namespace Avalara.SDK.Test.Api /// public class EInvoicingTests : IDisposable { - private DocumentsApi instance; + private MandatesApi mandatesApi; + private DocumentsApi documentsApi; private ApiClient apiclient; public EInvoicingTests() { @@ -45,7 +47,9 @@ public EInvoicingTests() apiclient = new ApiClient(configuration); - instance = new DocumentsApi(apiclient); + mandatesApi = new MandatesApi(apiclient); + documentsApi = new DocumentsApi(apiclient); + } public void Dispose() @@ -59,20 +63,27 @@ public void Dispose() [Fact] public void InstanceTest() { - Assert.IsType(instance); + Assert.IsType(mandatesApi); } /// /// Test Get Documents /// [Fact] - public void DocumentsTest() + public async Task DocumentsTest() + { + var response = await documentsApi.GetDocumentListAsync(new GetDocumentListRequest() { }); + Assert.NotNull(response); + } + + /// + /// Test Get Mandates + /// + [Fact] + public async Task MandatesTest() { - - var requestParameters = new GetDocumentListRequest(); - requestParameters.AvalaraVersion = "1.0"; - var response = instance.GetDocumentList(requestParameters); - Assert.True(response != null); + var response = await mandatesApi.GetMandatesAsync(new GetMandatesRequest() { }); + Assert.NotNull(response.Value); } } } \ No newline at end of file diff --git a/src/Avalara.SDK/Api/EInvoicing/V1/DataInputFieldsApi.cs b/src/Avalara.SDK/Api/EInvoicing/V1/DataInputFieldsApi.cs index ca6e8cf..2d3ccb7 100644 --- a/src/Avalara.SDK/Api/EInvoicing/V1/DataInputFieldsApi.cs +++ b/src/Avalara.SDK/Api/EInvoicing/V1/DataInputFieldsApi.cs @@ -42,7 +42,7 @@ public GetDataInputFieldsRequest () { /// /// The HTTP Header meant to specify the version of the API intended to be used /// - public string AvalaraVersion { get; set; } + public string? AvalaraVersion { get; set; } = "1.2"; /// /// 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. /// @@ -192,8 +192,6 @@ private Avalara.SDK.Client.ApiResponse GetDataInputFiel var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - if (requestParameters.Filter != null) { localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$filter", requestParameters.Filter)); @@ -278,8 +276,6 @@ private Avalara.SDK.Client.ApiResponse GetDataInputFiel var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - if (requestParameters.Filter != null) { localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$filter", requestParameters.Filter)); diff --git a/src/Avalara.SDK/Api/EInvoicing/V1/DocumentsApi.cs b/src/Avalara.SDK/Api/EInvoicing/V1/DocumentsApi.cs index 96ea3e1..f16348d 100644 --- a/src/Avalara.SDK/Api/EInvoicing/V1/DocumentsApi.cs +++ b/src/Avalara.SDK/Api/EInvoicing/V1/DocumentsApi.cs @@ -42,7 +42,7 @@ public DownloadDocumentRequest () { /// /// The HTTP Header meant to specify the version of the API intended to be used /// - public string AvalaraVersion { get; set; } + public string? AvalaraVersion { get; set; } = "1.2"; /// /// This header indicates the MIME type of the document /// @@ -69,7 +69,7 @@ public FetchDocumentsRequest () { /// /// The HTTP Header meant to specify the version of the API intended to be used /// - public string AvalaraVersion { get; set; } + public string? AvalaraVersion { get; set; } = "1.2"; /// /// /// @@ -92,7 +92,7 @@ public GetDocumentListRequest () { /// /// The HTTP Header meant to specify the version of the API intended to be used /// - public string AvalaraVersion { get; set; } + public string? AvalaraVersion { get; set; } = "1.2"; /// /// 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. /// @@ -143,7 +143,7 @@ public GetDocumentStatusRequest () { /// /// The HTTP Header meant to specify the version of the API intended to be used /// - public string AvalaraVersion { get; set; } + public string? AvalaraVersion { get; set; } = "1.2"; /// /// The unique ID for this document that was returned in the POST /einvoicing/documents response body /// @@ -166,7 +166,7 @@ public SubmitDocumentRequest () { /// /// The HTTP Header meant to specify the version of the API intended to be used /// - public string AvalaraVersion { get; set; } + public string? AvalaraVersion { get; set; } = "1.2"; /// /// /// @@ -406,8 +406,6 @@ private Avalara.SDK.Client.ApiResponse DownloadDocumentWithHttpIn var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.PathParameters.Add("documentId", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.DocumentId)); // path parameter localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter localVarRequestOptions.HeaderParameters.Add("Accept", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.Accept)); // header parameter @@ -484,8 +482,6 @@ private Avalara.SDK.Client.ApiResponse DownloadDocumentWithHttpIn var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.PathParameters.Add("documentId", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.DocumentId)); // path parameter localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter localVarRequestOptions.HeaderParameters.Add("Accept", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.Accept)); // header parameter @@ -553,8 +549,6 @@ private Avalara.SDK.Client.ApiResponse FetchDocumentsWithHttpInfo var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter if (requestParameters.XAvalaraClient != null) { @@ -625,8 +619,6 @@ private Avalara.SDK.Client.ApiResponse FetchDocumentsWithHttpInfo var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter if (requestParameters.XAvalaraClient != null) { @@ -688,8 +680,6 @@ private Avalara.SDK.Client.ApiResponse GetDocumentListWith var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - if (requestParameters.StartDate != null) { localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "startDate", requestParameters.StartDate)); @@ -786,8 +776,6 @@ private Avalara.SDK.Client.ApiResponse GetDocumentListWith var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - if (requestParameters.StartDate != null) { localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "startDate", requestParameters.StartDate)); @@ -884,8 +872,6 @@ private Avalara.SDK.Client.ApiResponse GetDocumentStatus var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.PathParameters.Add("documentId", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.DocumentId)); // path parameter localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter if (requestParameters.XAvalaraClient != null) @@ -955,8 +941,6 @@ private Avalara.SDK.Client.ApiResponse GetDocumentStatus var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.PathParameters.Add("documentId", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.DocumentId)); // path parameter localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter if (requestParameters.XAvalaraClient != null) @@ -1028,8 +1012,6 @@ private Avalara.SDK.Client.ApiResponse SubmitDocumentWit var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter if (requestParameters.XAvalaraClient != null) { @@ -1106,8 +1088,6 @@ private Avalara.SDK.Client.ApiResponse SubmitDocumentWit var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter if (requestParameters.XAvalaraClient != null) { diff --git a/src/Avalara.SDK/Api/EInvoicing/V1/InteropApi.cs b/src/Avalara.SDK/Api/EInvoicing/V1/InteropApi.cs index 15080ce..598493f 100644 --- a/src/Avalara.SDK/Api/EInvoicing/V1/InteropApi.cs +++ b/src/Avalara.SDK/Api/EInvoicing/V1/InteropApi.cs @@ -50,7 +50,7 @@ public SubmitInteropDocumentRequest () { /// /// The HTTP Header meant to specify the version of the API intended to be used /// - public string AvalaraVersion { get; set; } + public string? AvalaraVersion { get; set; } = "1.2"; /// /// 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\" /// @@ -197,8 +197,6 @@ private Avalara.SDK.Client.ApiResponse SubmitI var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "documentType", requestParameters.DocumentType)); localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "interchangeType", requestParameters.InterchangeType)); localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter @@ -282,8 +280,6 @@ private Avalara.SDK.Client.ApiResponse SubmitI var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "documentType", requestParameters.DocumentType)); localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "interchangeType", requestParameters.InterchangeType)); localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter diff --git a/src/Avalara.SDK/Api/EInvoicing/V1/MandatesApi.cs b/src/Avalara.SDK/Api/EInvoicing/V1/MandatesApi.cs index 81d205a..9dd0d8f 100644 --- a/src/Avalara.SDK/Api/EInvoicing/V1/MandatesApi.cs +++ b/src/Avalara.SDK/Api/EInvoicing/V1/MandatesApi.cs @@ -42,7 +42,7 @@ public GetMandateDataInputFieldsRequest () { /// /// The HTTP Header meant to specify the version of the API intended to be used /// - public string AvalaraVersion { get; set; } + public string? AvalaraVersion { get; set; } = "1.2"; /// /// The unique ID for the mandate that was returned in the GET /einvoicing/mandates response body /// @@ -73,7 +73,7 @@ public GetMandatesRequest () { /// /// The HTTP Header meant to specify the version of the API intended to be used /// - public string AvalaraVersion { get; set; } + public string? AvalaraVersion { get; set; } = "1.2"; /// /// 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. /// @@ -258,8 +258,6 @@ private Avalara.SDK.Client.ApiResponse> GetMandateDa var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.PathParameters.Add("mandateId", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.MandateId)); // path parameter localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "documentType", requestParameters.DocumentType)); localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "documentVersion", requestParameters.DocumentVersion)); @@ -339,8 +337,6 @@ private Avalara.SDK.Client.ApiResponse> GetMandateDa var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.PathParameters.Add("mandateId", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.MandateId)); // path parameter localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "documentType", requestParameters.DocumentType)); localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "documentVersion", requestParameters.DocumentVersion)); @@ -404,8 +400,6 @@ private Avalara.SDK.Client.ApiResponse GetMandatesWithHttpInfo var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - if (requestParameters.Filter != null) { localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$filter", requestParameters.Filter)); @@ -490,8 +484,6 @@ private Avalara.SDK.Client.ApiResponse GetMandatesWithHttpInfo var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - if (requestParameters.Filter != null) { localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$filter", requestParameters.Filter)); diff --git a/src/Avalara.SDK/Api/EInvoicing/V1/TradingPartnersApi.cs b/src/Avalara.SDK/Api/EInvoicing/V1/TradingPartnersApi.cs index adab477..c46d59e 100644 --- a/src/Avalara.SDK/Api/EInvoicing/V1/TradingPartnersApi.cs +++ b/src/Avalara.SDK/Api/EInvoicing/V1/TradingPartnersApi.cs @@ -42,7 +42,7 @@ public BatchSearchParticipantsRequest () { /// /// The HTTP Header meant to specify the version of the API intended to be used /// - public string AvalaraVersion { get; set; } + public string? AvalaraVersion { get; set; } = "1.2"; /// /// The human readable name given to this batch search. /// @@ -77,7 +77,7 @@ public DownloadBatchSearchReportRequest () { /// /// The HTTP Header meant to specify the version of the API intended to be used /// - public string AvalaraVersion { get; set; } + public string? AvalaraVersion { get; set; } = "1.2"; /// /// The ID of the batch search whose report is to be downloaded. /// @@ -104,7 +104,7 @@ public GetBatchSearchDetailRequest () { /// /// The HTTP Header meant to specify the version of the API intended to be used /// - public string AvalaraVersion { get; set; } + public string? AvalaraVersion { get; set; } = "1.2"; /// /// The ID of the batch search that was submitted earlier. /// @@ -131,7 +131,7 @@ public ListBatchSearchesRequest () { /// /// The HTTP Header meant to specify the version of the API intended to be used /// - public string AvalaraVersion { get; set; } + public string? AvalaraVersion { get; set; } = "1.2"; /// /// 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\" /// @@ -174,7 +174,7 @@ public SearchParticipantsRequest () { /// /// The HTTP Header meant to specify the version of the API intended to be used /// - public string AvalaraVersion { get; set; } + public string? AvalaraVersion { get; set; } = "1.2"; /// /// 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. /// @@ -436,8 +436,6 @@ private Avalara.SDK.Client.ApiResponse BatchSearchParticipantsWithHttpIn var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "name", requestParameters.Name)); localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "notificationEmail", requestParameters.NotificationEmail)); localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter @@ -521,8 +519,6 @@ private Avalara.SDK.Client.ApiResponse BatchSearchParticipantsWithHttpIn var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "name", requestParameters.Name)); localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "notificationEmail", requestParameters.NotificationEmail)); localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter @@ -595,8 +591,6 @@ private Avalara.SDK.Client.ApiResponse DownloadBatchSearchReportW var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.PathParameters.Add("id", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.Id)); // path parameter localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter if (requestParameters.XAvalaraClient != null) @@ -671,8 +665,6 @@ private Avalara.SDK.Client.ApiResponse DownloadBatchSearchReportW var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.PathParameters.Add("id", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.Id)); // path parameter localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter if (requestParameters.XAvalaraClient != null) @@ -742,8 +734,6 @@ private Avalara.SDK.Client.ApiResponse GetBatchSearchDetailWithHttp var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.PathParameters.Add("id", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.Id)); // path parameter localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter if (requestParameters.XAvalaraClient != null) @@ -817,8 +807,6 @@ private Avalara.SDK.Client.ApiResponse GetBatchSearchDetailWithHttp var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - localVarRequestOptions.PathParameters.Add("id", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.Id)); // path parameter localVarRequestOptions.HeaderParameters.Add("avalara-version", Avalara.SDK.Client.ClientUtils.ParameterToString(requestParameters.AvalaraVersion)); // header parameter if (requestParameters.XAvalaraClient != null) @@ -884,8 +872,6 @@ private Avalara.SDK.Client.ApiResponse ListBatchSearche var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - if (requestParameters.Filter != null) { localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$filter", requestParameters.Filter)); @@ -974,8 +960,6 @@ private Avalara.SDK.Client.ApiResponse ListBatchSearche var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - if (requestParameters.Filter != null) { localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "$filter", requestParameters.Filter)); @@ -1064,8 +1048,6 @@ private Avalara.SDK.Client.ApiResponse SearchParticipan var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - if (requestParameters.Count != null) { localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "count", requestParameters.Count)); @@ -1159,8 +1141,6 @@ private Avalara.SDK.Client.ApiResponse SearchParticipan var localVarAccept = Avalara.SDK.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.HeaderParameters.Add("avalara-version", "1.2"); - if (requestParameters.Count != null) { localVarRequestOptions.QueryParameters.Add(Avalara.SDK.Client.ClientUtils.ParameterToMultiMap("", "count", requestParameters.Count));