@sp-api-sdk/vendor-direct-fulfillment-payments-api-v1 1.6.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -0
  3. package/dist/cjs/index.js +6 -0
  4. package/dist/cjs/src/api-model/api/vendor-invoice-api.js +119 -0
  5. package/dist/cjs/src/api-model/api.js +17 -0
  6. package/dist/cjs/src/api-model/base.js +62 -0
  7. package/dist/cjs/src/api-model/common.js +137 -0
  8. package/dist/cjs/src/api-model/configuration.js +42 -0
  9. package/dist/cjs/src/api-model/index.js +19 -0
  10. package/dist/cjs/src/api-model/models/additional-details.js +25 -0
  11. package/dist/cjs/src/api-model/models/address.js +15 -0
  12. package/dist/cjs/src/api-model/models/charge-details.js +30 -0
  13. package/dist/cjs/src/api-model/models/index.js +17 -0
  14. package/dist/cjs/src/api-model/models/invoice-detail.js +15 -0
  15. package/dist/cjs/src/api-model/models/invoice-item.js +15 -0
  16. package/dist/cjs/src/api-model/models/item-quantity.js +15 -0
  17. package/dist/cjs/src/api-model/models/model-error.js +15 -0
  18. package/dist/cjs/src/api-model/models/money.js +15 -0
  19. package/dist/cjs/src/api-model/models/party-identification.js +15 -0
  20. package/dist/cjs/src/api-model/models/submit-invoice-request.js +15 -0
  21. package/dist/cjs/src/api-model/models/submit-invoice-response.js +15 -0
  22. package/dist/cjs/src/api-model/models/tax-detail.js +37 -0
  23. package/dist/cjs/src/api-model/models/tax-registration-detail.js +25 -0
  24. package/dist/cjs/src/api-model/models/transaction-reference.js +15 -0
  25. package/dist/cjs/src/client.js +35 -0
  26. package/dist/cjs/src/error.js +10 -0
  27. package/dist/es/index.js +3 -0
  28. package/dist/es/src/api-model/api/vendor-invoice-api.js +111 -0
  29. package/dist/es/src/api-model/api.js +14 -0
  30. package/dist/es/src/api-model/base.js +56 -0
  31. package/dist/es/src/api-model/common.js +125 -0
  32. package/dist/es/src/api-model/configuration.js +38 -0
  33. package/dist/es/src/api-model/index.js +16 -0
  34. package/dist/es/src/api-model/models/additional-details.js +22 -0
  35. package/dist/es/src/api-model/models/address.js +14 -0
  36. package/dist/es/src/api-model/models/charge-details.js +27 -0
  37. package/dist/es/src/api-model/models/index.js +14 -0
  38. package/dist/es/src/api-model/models/invoice-detail.js +14 -0
  39. package/dist/es/src/api-model/models/invoice-item.js +14 -0
  40. package/dist/es/src/api-model/models/item-quantity.js +14 -0
  41. package/dist/es/src/api-model/models/model-error.js +14 -0
  42. package/dist/es/src/api-model/models/money.js +14 -0
  43. package/dist/es/src/api-model/models/party-identification.js +14 -0
  44. package/dist/es/src/api-model/models/submit-invoice-request.js +14 -0
  45. package/dist/es/src/api-model/models/submit-invoice-response.js +14 -0
  46. package/dist/es/src/api-model/models/tax-detail.js +34 -0
  47. package/dist/es/src/api-model/models/tax-registration-detail.js +22 -0
  48. package/dist/es/src/api-model/models/transaction-reference.js +14 -0
  49. package/dist/es/src/client.js +31 -0
  50. package/dist/es/src/error.js +6 -0
  51. package/dist/types/index.d.ts +3 -0
  52. package/dist/types/src/api-model/api/vendor-invoice-api.d.ts +84 -0
  53. package/dist/types/src/api-model/api.d.ts +12 -0
  54. package/dist/types/src/api-model/base.d.ts +55 -0
  55. package/dist/types/src/api-model/common.d.ts +65 -0
  56. package/dist/types/src/api-model/configuration.d.ts +83 -0
  57. package/dist/types/src/api-model/index.d.ts +14 -0
  58. package/dist/types/src/api-model/models/additional-details.d.ts +44 -0
  59. package/dist/types/src/api-model/models/address.d.ts +84 -0
  60. package/dist/types/src/api-model/models/charge-details.d.ts +51 -0
  61. package/dist/types/src/api-model/models/index.d.ts +14 -0
  62. package/dist/types/src/api-model/models/invoice-detail.d.ts +102 -0
  63. package/dist/types/src/api-model/models/invoice-item.d.ts +82 -0
  64. package/dist/types/src/api-model/models/item-quantity.d.ts +30 -0
  65. package/dist/types/src/api-model/models/model-error.d.ts +36 -0
  66. package/dist/types/src/api-model/models/money.d.ts +30 -0
  67. package/dist/types/src/api-model/models/party-identification.d.ts +38 -0
  68. package/dist/types/src/api-model/models/submit-invoice-request.d.ts +25 -0
  69. package/dist/types/src/api-model/models/submit-invoice-response.d.ts +31 -0
  70. package/dist/types/src/api-model/models/tax-detail.d.ts +63 -0
  71. package/dist/types/src/api-model/models/tax-registration-detail.d.ts +51 -0
  72. package/dist/types/src/api-model/models/transaction-reference.d.ts +24 -0
  73. package/dist/types/src/client.d.ts +13 -0
  74. package/dist/types/src/error.d.ts +3 -0
  75. package/package.json +53 -0
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Direct Fulfillment Payments
6
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ const tslib_1 = require("tslib");
17
+ (0, tslib_1.__exportStar)(require("./api"), exports);
18
+ (0, tslib_1.__exportStar)(require("./configuration"), exports);
19
+ (0, tslib_1.__exportStar)(require("./models"), exports);
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Direct Fulfillment Payments
6
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.AdditionalDetailsTypeEnum = void 0;
17
+ /**
18
+ * @export
19
+ * @enum {string}
20
+ */
21
+ var AdditionalDetailsTypeEnum;
22
+ (function (AdditionalDetailsTypeEnum) {
23
+ AdditionalDetailsTypeEnum["Sur"] = "SUR";
24
+ AdditionalDetailsTypeEnum["Ocr"] = "OCR";
25
+ })(AdditionalDetailsTypeEnum = exports.AdditionalDetailsTypeEnum || (exports.AdditionalDetailsTypeEnum = {}));
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Direct Fulfillment Payments
6
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Direct Fulfillment Payments
6
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ChargeDetailsTypeEnum = void 0;
17
+ /**
18
+ * @export
19
+ * @enum {string}
20
+ */
21
+ var ChargeDetailsTypeEnum;
22
+ (function (ChargeDetailsTypeEnum) {
23
+ ChargeDetailsTypeEnum["Giftwrap"] = "GIFTWRAP";
24
+ ChargeDetailsTypeEnum["Fulfillment"] = "FULFILLMENT";
25
+ ChargeDetailsTypeEnum["Marketinginsert"] = "MARKETINGINSERT";
26
+ ChargeDetailsTypeEnum["Packaging"] = "PACKAGING";
27
+ ChargeDetailsTypeEnum["Loading"] = "LOADING";
28
+ ChargeDetailsTypeEnum["Freightout"] = "FREIGHTOUT";
29
+ ChargeDetailsTypeEnum["TaxCollectedAtSource"] = "TAX_COLLECTED_AT_SOURCE";
30
+ })(ChargeDetailsTypeEnum = exports.ChargeDetailsTypeEnum || (exports.ChargeDetailsTypeEnum = {}));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ (0, tslib_1.__exportStar)(require("./additional-details"), exports);
5
+ (0, tslib_1.__exportStar)(require("./address"), exports);
6
+ (0, tslib_1.__exportStar)(require("./charge-details"), exports);
7
+ (0, tslib_1.__exportStar)(require("./invoice-detail"), exports);
8
+ (0, tslib_1.__exportStar)(require("./invoice-item"), exports);
9
+ (0, tslib_1.__exportStar)(require("./item-quantity"), exports);
10
+ (0, tslib_1.__exportStar)(require("./model-error"), exports);
11
+ (0, tslib_1.__exportStar)(require("./money"), exports);
12
+ (0, tslib_1.__exportStar)(require("./party-identification"), exports);
13
+ (0, tslib_1.__exportStar)(require("./submit-invoice-request"), exports);
14
+ (0, tslib_1.__exportStar)(require("./submit-invoice-response"), exports);
15
+ (0, tslib_1.__exportStar)(require("./tax-detail"), exports);
16
+ (0, tslib_1.__exportStar)(require("./tax-registration-detail"), exports);
17
+ (0, tslib_1.__exportStar)(require("./transaction-reference"), exports);
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Direct Fulfillment Payments
6
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Direct Fulfillment Payments
6
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Direct Fulfillment Payments
6
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Direct Fulfillment Payments
6
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Direct Fulfillment Payments
6
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Direct Fulfillment Payments
6
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Direct Fulfillment Payments
6
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Direct Fulfillment Payments
6
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Direct Fulfillment Payments
6
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.TaxDetailTaxTypeEnum = void 0;
17
+ /**
18
+ * @export
19
+ * @enum {string}
20
+ */
21
+ var TaxDetailTaxTypeEnum;
22
+ (function (TaxDetailTaxTypeEnum) {
23
+ TaxDetailTaxTypeEnum["Cgst"] = "CGST";
24
+ TaxDetailTaxTypeEnum["Sgst"] = "SGST";
25
+ TaxDetailTaxTypeEnum["Cess"] = "CESS";
26
+ TaxDetailTaxTypeEnum["Utgst"] = "UTGST";
27
+ TaxDetailTaxTypeEnum["Igst"] = "IGST";
28
+ TaxDetailTaxTypeEnum["MwSt"] = "MwSt.";
29
+ TaxDetailTaxTypeEnum["Pst"] = "PST";
30
+ TaxDetailTaxTypeEnum["Tva"] = "TVA";
31
+ TaxDetailTaxTypeEnum["Vat"] = "VAT";
32
+ TaxDetailTaxTypeEnum["Gst"] = "GST";
33
+ TaxDetailTaxTypeEnum["St"] = "ST";
34
+ TaxDetailTaxTypeEnum["Consumption"] = "Consumption";
35
+ TaxDetailTaxTypeEnum["MutuallyDefined"] = "MutuallyDefined";
36
+ TaxDetailTaxTypeEnum["DomesticVat"] = "DomesticVAT";
37
+ })(TaxDetailTaxTypeEnum = exports.TaxDetailTaxTypeEnum || (exports.TaxDetailTaxTypeEnum = {}));
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Direct Fulfillment Payments
6
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.TaxRegistrationDetailTaxRegistrationTypeEnum = void 0;
17
+ /**
18
+ * @export
19
+ * @enum {string}
20
+ */
21
+ var TaxRegistrationDetailTaxRegistrationTypeEnum;
22
+ (function (TaxRegistrationDetailTaxRegistrationTypeEnum) {
23
+ TaxRegistrationDetailTaxRegistrationTypeEnum["Vat"] = "VAT";
24
+ TaxRegistrationDetailTaxRegistrationTypeEnum["Gst"] = "GST";
25
+ })(TaxRegistrationDetailTaxRegistrationTypeEnum = exports.TaxRegistrationDetailTaxRegistrationTypeEnum || (exports.TaxRegistrationDetailTaxRegistrationTypeEnum = {}));
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Direct Fulfillment Payments
6
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VendorDirectFulfillmentPaymentsApiClient = exports.RATE_LIMITS = void 0;
4
+ /* eslint-disable prefer-regex-literals */
5
+ const common_1 = require("@sp-api-sdk/common");
6
+ const api_model_1 = require("./api-model");
7
+ const error_1 = require("./error");
8
+ exports.RATE_LIMITS = [
9
+ {
10
+ method: 'post',
11
+ urlRegex: new RegExp('^/vendor/directFulfillment/payments/v1/invoices$'),
12
+ rate: 10,
13
+ burst: 10,
14
+ },
15
+ ];
16
+ class VendorDirectFulfillmentPaymentsApiClient extends api_model_1.VendorInvoiceApi {
17
+ constructor(parameters) {
18
+ const region = common_1.awsRegionByCode[parameters.region] ?? parameters.region;
19
+ const { rateLimiting, ...clientParameters } = parameters;
20
+ const axiosParameters = { ...clientParameters, region };
21
+ if (rateLimiting?.retry) {
22
+ axiosParameters.rateLimits = exports.RATE_LIMITS;
23
+ axiosParameters.onRetry = rateLimiting.onRetry;
24
+ }
25
+ const axiosInstance = (0, common_1.createAxiosInstance)(axiosParameters);
26
+ const configuration = new api_model_1.Configuration();
27
+ const environment = parameters.sandbox ? 'sandbox' : 'production';
28
+ const endpoint = common_1.endpoints[environment][region];
29
+ if (!endpoint) {
30
+ throw new error_1.VendorDirectFulfillmentPaymentsApiError(`Unknown region : ${region}`);
31
+ }
32
+ super(configuration, endpoint, axiosInstance);
33
+ }
34
+ }
35
+ exports.VendorDirectFulfillmentPaymentsApiClient = VendorDirectFulfillmentPaymentsApiClient;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VendorDirectFulfillmentPaymentsApiError = void 0;
4
+ class VendorDirectFulfillmentPaymentsApiError extends Error {
5
+ constructor(message) {
6
+ super(message);
7
+ this.name = 'VendorDirectFulfillmentPaymentsApiError';
8
+ }
9
+ }
10
+ exports.VendorDirectFulfillmentPaymentsApiError = VendorDirectFulfillmentPaymentsApiError;
@@ -0,0 +1,3 @@
1
+ export * from './src/client';
2
+ export * from './src/error';
3
+ export * from './src/api-model/models';
@@ -0,0 +1,111 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Selling Partner API for Direct Fulfillment Payments
5
+ * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\'s invoice data.
6
+ *
7
+ * The version of the OpenAPI document: v1
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import globalAxios from 'axios';
15
+ // Some imports not used depending on template conditions
16
+ // @ts-ignore
17
+ import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
18
+ // @ts-ignore
19
+ import { BASE_PATH, BaseAPI } from '../base';
20
+ /**
21
+ * VendorInvoiceApi - axios parameter creator
22
+ * @export
23
+ */
24
+ export const VendorInvoiceApiAxiosParamCreator = function (configuration) {
25
+ return {
26
+ /**
27
+ * Submits one or more invoices for a vendor\'s direct fulfillment orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
28
+ * @param {SubmitInvoiceRequest} body
29
+ * @param {*} [options] Override http request option.
30
+ * @throws {RequiredError}
31
+ */
32
+ submitInvoice: async (body, options = {}) => {
33
+ // verify required parameter 'body' is not null or undefined
34
+ assertParamExists('submitInvoice', 'body', body);
35
+ const localVarPath = `/vendor/directFulfillment/payments/v1/invoices`;
36
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
37
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
38
+ let baseOptions;
39
+ if (configuration) {
40
+ baseOptions = configuration.baseOptions;
41
+ }
42
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
43
+ const localVarHeaderParameter = {};
44
+ const localVarQueryParameter = {};
45
+ localVarHeaderParameter['Content-Type'] = 'application/json';
46
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
47
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
48
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
49
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
50
+ return {
51
+ url: toPathString(localVarUrlObj),
52
+ options: localVarRequestOptions,
53
+ };
54
+ },
55
+ };
56
+ };
57
+ /**
58
+ * VendorInvoiceApi - functional programming interface
59
+ * @export
60
+ */
61
+ export const VendorInvoiceApiFp = function (configuration) {
62
+ const localVarAxiosParamCreator = VendorInvoiceApiAxiosParamCreator(configuration);
63
+ return {
64
+ /**
65
+ * Submits one or more invoices for a vendor\'s direct fulfillment orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
66
+ * @param {SubmitInvoiceRequest} body
67
+ * @param {*} [options] Override http request option.
68
+ * @throws {RequiredError}
69
+ */
70
+ async submitInvoice(body, options) {
71
+ const localVarAxiosArgs = await localVarAxiosParamCreator.submitInvoice(body, options);
72
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
73
+ },
74
+ };
75
+ };
76
+ /**
77
+ * VendorInvoiceApi - factory interface
78
+ * @export
79
+ */
80
+ export const VendorInvoiceApiFactory = function (configuration, basePath, axios) {
81
+ const localVarFp = VendorInvoiceApiFp(configuration);
82
+ return {
83
+ /**
84
+ * Submits one or more invoices for a vendor\'s direct fulfillment orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
85
+ * @param {SubmitInvoiceRequest} body
86
+ * @param {*} [options] Override http request option.
87
+ * @throws {RequiredError}
88
+ */
89
+ submitInvoice(body, options) {
90
+ return localVarFp.submitInvoice(body, options).then((request) => request(axios, basePath));
91
+ },
92
+ };
93
+ };
94
+ /**
95
+ * VendorInvoiceApi - object-oriented interface
96
+ * @export
97
+ * @class VendorInvoiceApi
98
+ * @extends {BaseAPI}
99
+ */
100
+ export class VendorInvoiceApi extends BaseAPI {
101
+ /**
102
+ * Submits one or more invoices for a vendor\'s direct fulfillment orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
103
+ * @param {VendorInvoiceApiSubmitInvoiceRequest} requestParameters Request parameters.
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ * @memberof VendorInvoiceApi
107
+ */
108
+ submitInvoice(requestParameters, options) {
109
+ return VendorInvoiceApiFp(this.configuration).submitInvoice(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
110
+ }
111
+ }