Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Wenger committed Jan 2, 2025
1 parent 69deabb commit b62de02
Show file tree
Hide file tree
Showing 20 changed files with 3,235 additions and 78 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "avalara-sdk",
"version": "24.12.10",
"version": "",
"description": "OpenAPI client for avalara-sdk",
"author": "OpenAPI-Generator",
"main": "./dist/index.js",
Expand Down
6 changes: 3 additions & 3 deletions src/apis/EInvoicing/V1/DataInputFieldsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
InternalServerErrorToJSON,
} from '../../../packages/EInvoicing/V1';

export interface GetDataInputFieldsRequest {
export interface GetDataInputFieldsInterface {
avalaraVersion: string;
xAvalaraClient?: string;
$filter?: string;
Expand All @@ -53,7 +53,7 @@ export class DataInputFieldsApi extends runtime.ApiClient {
* 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
*/
async getDataInputFieldsRaw(requestParameters: GetDataInputFieldsRequest, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<DataInputFieldsResponse>, logObject: LogObject }> {
async getDataInputFieldsRaw(requestParameters: GetDataInputFieldsInterface, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<DataInputFieldsResponse>, logObject: LogObject }> {
if (requestParameters.avalaraVersion === null || requestParameters.avalaraVersion === undefined) {
throw new runtime.RequiredError('avalaraVersion','Required parameter requestParameters.avalaraVersion was null or undefined when calling getDataInputFields.');
}
Expand Down Expand Up @@ -108,7 +108,7 @@ export class DataInputFieldsApi extends runtime.ApiClient {
* 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
*/
async getDataInputFields(requestParameters: GetDataInputFieldsRequest, initOverrides?: RequestInit): Promise<DataInputFieldsResponse> {
async getDataInputFields(requestParameters: GetDataInputFieldsInterface, initOverrides?: RequestInit): Promise<DataInputFieldsResponse> {
const { response, logObject } = await this.getDataInputFieldsRaw(requestParameters, initOverrides);
const value = await response.value();
logObject.populateResponseBody(value);
Expand Down
30 changes: 15 additions & 15 deletions src/apis/EInvoicing/V1/DocumentsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ import {
SubmitDocumentMetadataToJSON,
} from '../../../packages/EInvoicing/V1';

export interface DownloadDocumentRequest {
export interface DownloadDocumentInterface {
avalaraVersion: string;
accept: string;
documentId: string;
xAvalaraClient?: string;
}

export interface FetchDocumentsRequest {
export interface FetchDocumentsInterface {
avalaraVersion: string;
documentFetchRequest: DocumentFetchRequest;
xAvalaraClient?: string;
}

export interface GetDocumentListRequest {
export interface GetDocumentListInterface {
avalaraVersion: string;
xAvalaraClient?: string;
startDate?: Date;
Expand All @@ -82,13 +82,13 @@ export interface GetDocumentListRequest {
$skip?: string;
}

export interface GetDocumentStatusRequest {
export interface GetDocumentStatusInterface {
avalaraVersion: string;
documentId: string;
xAvalaraClient?: string;
}

export interface SubmitDocumentRequest {
export interface SubmitDocumentInterface {
avalaraVersion: string;
metadata: SubmitDocumentMetadata;
data: string;
Expand All @@ -109,7 +109,7 @@ export class DocumentsApi extends runtime.ApiClient {
* 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
*/
async downloadDocumentRaw(requestParameters: DownloadDocumentRequest, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<Blob>, logObject: LogObject }> {
async downloadDocumentRaw(requestParameters: DownloadDocumentInterface, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<Blob>, logObject: LogObject }> {
if (requestParameters.avalaraVersion === null || requestParameters.avalaraVersion === undefined) {
throw new runtime.RequiredError('avalaraVersion','Required parameter requestParameters.avalaraVersion was null or undefined when calling downloadDocument.');
}
Expand Down Expand Up @@ -156,7 +156,7 @@ export class DocumentsApi extends runtime.ApiClient {
* 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
*/
async downloadDocument(requestParameters: DownloadDocumentRequest, initOverrides?: RequestInit): Promise<Blob> {
async downloadDocument(requestParameters: DownloadDocumentInterface, initOverrides?: RequestInit): Promise<Blob> {
const { response, logObject } = await this.downloadDocumentRaw(requestParameters, initOverrides);
const value = await response.value();
logObject.populateResponseBody(value);
Expand All @@ -168,7 +168,7 @@ export class DocumentsApi extends runtime.ApiClient {
* 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.
* Fetch the inbound document from a tax authority
*/
async fetchDocumentsRaw(requestParameters: FetchDocumentsRequest, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<DocumentFetch>, logObject: LogObject }> {
async fetchDocumentsRaw(requestParameters: FetchDocumentsInterface, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<DocumentFetch>, logObject: LogObject }> {
if (requestParameters.avalaraVersion === null || requestParameters.avalaraVersion === undefined) {
throw new runtime.RequiredError('avalaraVersion','Required parameter requestParameters.avalaraVersion was null or undefined when calling fetchDocuments.');
}
Expand Down Expand Up @@ -210,7 +210,7 @@ export class DocumentsApi extends runtime.ApiClient {
* 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.
* Fetch the inbound document from a tax authority
*/
async fetchDocuments(requestParameters: FetchDocumentsRequest, initOverrides?: RequestInit): Promise<DocumentFetch> {
async fetchDocuments(requestParameters: FetchDocumentsInterface, initOverrides?: RequestInit): Promise<DocumentFetch> {
const { response, logObject } = await this.fetchDocumentsRaw(requestParameters, initOverrides);
const value = await response.value();
logObject.populateResponseBody(value);
Expand All @@ -222,7 +222,7 @@ export class DocumentsApi extends runtime.ApiClient {
* Get a list of documents on the Avalara E-Invoicing platform that have a processing date within the specified date range.
* Returns a summary of documents for a date range
*/
async getDocumentListRaw(requestParameters: GetDocumentListRequest, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<DocumentListResponse>, logObject: LogObject }> {
async getDocumentListRaw(requestParameters: GetDocumentListInterface, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<DocumentListResponse>, logObject: LogObject }> {
if (requestParameters.avalaraVersion === null || requestParameters.avalaraVersion === undefined) {
throw new runtime.RequiredError('avalaraVersion','Required parameter requestParameters.avalaraVersion was null or undefined when calling getDocumentList.');
}
Expand Down Expand Up @@ -289,7 +289,7 @@ export class DocumentsApi extends runtime.ApiClient {
* Get a list of documents on the Avalara E-Invoicing platform that have a processing date within the specified date range.
* Returns a summary of documents for a date range
*/
async getDocumentList(requestParameters: GetDocumentListRequest, initOverrides?: RequestInit): Promise<DocumentListResponse> {
async getDocumentList(requestParameters: GetDocumentListInterface, initOverrides?: RequestInit): Promise<DocumentListResponse> {
const { response, logObject } = await this.getDocumentListRaw(requestParameters, initOverrides);
const value = await response.value();
logObject.populateResponseBody(value);
Expand All @@ -301,7 +301,7 @@ export class DocumentsApi extends runtime.ApiClient {
* Using the unique ID from POST /einvoicing/documents response body, request the current status of a document.
* Checks the status of a document
*/
async getDocumentStatusRaw(requestParameters: GetDocumentStatusRequest, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<DocumentStatusResponse>, logObject: LogObject }> {
async getDocumentStatusRaw(requestParameters: GetDocumentStatusInterface, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<DocumentStatusResponse>, logObject: LogObject }> {
if (requestParameters.avalaraVersion === null || requestParameters.avalaraVersion === undefined) {
throw new runtime.RequiredError('avalaraVersion','Required parameter requestParameters.avalaraVersion was null or undefined when calling getDocumentStatus.');
}
Expand Down Expand Up @@ -340,7 +340,7 @@ export class DocumentsApi extends runtime.ApiClient {
* Using the unique ID from POST /einvoicing/documents response body, request the current status of a document.
* Checks the status of a document
*/
async getDocumentStatus(requestParameters: GetDocumentStatusRequest, initOverrides?: RequestInit): Promise<DocumentStatusResponse> {
async getDocumentStatus(requestParameters: GetDocumentStatusInterface, initOverrides?: RequestInit): Promise<DocumentStatusResponse> {
const { response, logObject } = await this.getDocumentStatusRaw(requestParameters, initOverrides);
const value = await response.value();
logObject.populateResponseBody(value);
Expand All @@ -352,7 +352,7 @@ export class DocumentsApi extends runtime.ApiClient {
* 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.
* Submits a document to Avalara E-Invoicing API
*/
async submitDocumentRaw(requestParameters: SubmitDocumentRequest, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<DocumentSubmitResponse>, logObject: LogObject }> {
async submitDocumentRaw(requestParameters: SubmitDocumentInterface, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<DocumentSubmitResponse>, logObject: LogObject }> {
if (requestParameters.avalaraVersion === null || requestParameters.avalaraVersion === undefined) {
throw new runtime.RequiredError('avalaraVersion','Required parameter requestParameters.avalaraVersion was null or undefined when calling submitDocument.');
}
Expand Down Expand Up @@ -418,7 +418,7 @@ export class DocumentsApi extends runtime.ApiClient {
* 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.
* Submits a document to Avalara E-Invoicing API
*/
async submitDocument(requestParameters: SubmitDocumentRequest, initOverrides?: RequestInit): Promise<DocumentSubmitResponse> {
async submitDocument(requestParameters: SubmitDocumentInterface, initOverrides?: RequestInit): Promise<DocumentSubmitResponse> {
const { response, logObject } = await this.submitDocumentRaw(requestParameters, initOverrides);
const value = await response.value();
logObject.populateResponseBody(value);
Expand Down
6 changes: 3 additions & 3 deletions src/apis/EInvoicing/V1/InteropApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
SubmitInteropDocument202ResponseToJSON,
} from '../../../packages/EInvoicing/V1';

export interface SubmitInteropDocumentRequest {
export interface SubmitInteropDocumentInterface {
documentType: SubmitInteropDocumentDocumentTypeEnum;
interchangeType: SubmitInteropDocumentInterchangeTypeEnum;
avalaraVersion: string;
Expand All @@ -49,7 +49,7 @@ export class InteropApi extends runtime.ApiClient {
* This API used by the interoperability partners to submit a document to their trading partners in Avalara on behalf of their customers.
* Submit a document
*/
async submitInteropDocumentRaw(requestParameters: SubmitInteropDocumentRequest, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<SubmitInteropDocument202Response>, logObject: LogObject }> {
async submitInteropDocumentRaw(requestParameters: SubmitInteropDocumentInterface, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<SubmitInteropDocument202Response>, logObject: LogObject }> {
if (requestParameters.documentType === null || requestParameters.documentType === undefined) {
throw new runtime.RequiredError('documentType','Required parameter requestParameters.documentType was null or undefined when calling submitInteropDocument.');
}
Expand Down Expand Up @@ -125,7 +125,7 @@ export class InteropApi extends runtime.ApiClient {
* This API used by the interoperability partners to submit a document to their trading partners in Avalara on behalf of their customers.
* Submit a document
*/
async submitInteropDocument(requestParameters: SubmitInteropDocumentRequest, initOverrides?: RequestInit): Promise<SubmitInteropDocument202Response> {
async submitInteropDocument(requestParameters: SubmitInteropDocumentInterface, initOverrides?: RequestInit): Promise<SubmitInteropDocument202Response> {
const { response, logObject } = await this.submitInteropDocumentRaw(requestParameters, initOverrides);
const value = await response.value();
logObject.populateResponseBody(value);
Expand Down
12 changes: 6 additions & 6 deletions src/apis/EInvoicing/V1/MandatesApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ import {
NotFoundErrorToJSON,
} from '../../../packages/EInvoicing/V1';

export interface GetMandateDataInputFieldsRequest {
export interface GetMandateDataInputFieldsInterface {
avalaraVersion: string;
mandateId: string;
documentType: string;
documentVersion: string;
xAvalaraClient?: string;
}

export interface GetMandatesRequest {
export interface GetMandatesInterface {
avalaraVersion: string;
xAvalaraClient?: string;
$filter?: string;
Expand All @@ -70,7 +70,7 @@ export class MandatesApi extends runtime.ApiClient {
* 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.
* Returns document field information for a country mandate, a selected document type, and its version
*/
async getMandateDataInputFieldsRaw(requestParameters: GetMandateDataInputFieldsRequest, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<Array<MandateDataInputField>>, logObject: LogObject }> {
async getMandateDataInputFieldsRaw(requestParameters: GetMandateDataInputFieldsInterface, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<Array<MandateDataInputField>>, logObject: LogObject }> {
if (requestParameters.avalaraVersion === null || requestParameters.avalaraVersion === undefined) {
throw new runtime.RequiredError('avalaraVersion','Required parameter requestParameters.avalaraVersion was null or undefined when calling getMandateDataInputFields.');
}
Expand Down Expand Up @@ -125,7 +125,7 @@ export class MandatesApi extends runtime.ApiClient {
* 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.
* Returns document field information for a country mandate, a selected document type, and its version
*/
async getMandateDataInputFields(requestParameters: GetMandateDataInputFieldsRequest, initOverrides?: RequestInit): Promise<Array<MandateDataInputField>> {
async getMandateDataInputFields(requestParameters: GetMandateDataInputFieldsInterface, initOverrides?: RequestInit): Promise<Array<MandateDataInputField>> {
const { response, logObject } = await this.getMandateDataInputFieldsRaw(requestParameters, initOverrides);
const value = await response.value();
logObject.populateResponseBody(value);
Expand All @@ -137,7 +137,7 @@ export class MandatesApi extends runtime.ApiClient {
* This endpoint offers a list of country mandates supported by the Avalara E-Invoicing API.
* List country mandates that are supported by the Avalara E-Invoicing platform
*/
async getMandatesRaw(requestParameters: GetMandatesRequest, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<MandatesResponse>, logObject: LogObject }> {
async getMandatesRaw(requestParameters: GetMandatesInterface, initOverrides?: RequestInit): Promise<{ response: runtime.ApiResponse<MandatesResponse>, logObject: LogObject }> {
if (requestParameters.avalaraVersion === null || requestParameters.avalaraVersion === undefined) {
throw new runtime.RequiredError('avalaraVersion','Required parameter requestParameters.avalaraVersion was null or undefined when calling getMandates.');
}
Expand Down Expand Up @@ -192,7 +192,7 @@ export class MandatesApi extends runtime.ApiClient {
* This endpoint offers a list of country mandates supported by the Avalara E-Invoicing API.
* List country mandates that are supported by the Avalara E-Invoicing platform
*/
async getMandates(requestParameters: GetMandatesRequest, initOverrides?: RequestInit): Promise<MandatesResponse> {
async getMandates(requestParameters: GetMandatesInterface, initOverrides?: RequestInit): Promise<MandatesResponse> {
const { response, logObject } = await this.getMandatesRaw(requestParameters, initOverrides);
const value = await response.value();
logObject.populateResponseBody(value);
Expand Down
Loading

0 comments on commit b62de02

Please sign in to comment.