@flexprice/sdk 1.0.1 → 1.0.14
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.
- package/LICENSE +663 -0
- package/dist/ApiClient.js +455 -505
- package/dist/api/AuthApi.js +56 -72
- package/dist/api/CustomersApi.js +273 -301
- package/dist/api/EntitlementsApi.js +200 -224
- package/dist/api/EnvironmentsApi.js +129 -149
- package/dist/api/EventsApi.js +151 -184
- package/dist/api/FeaturesApi.js +167 -189
- package/dist/api/IntegrationsApi.js +121 -141
- package/dist/api/InvoicesApi.js +352 -377
- package/dist/api/PaymentsApi.js +202 -226
- package/dist/api/PlansApi.js +165 -187
- package/dist/api/PricesApi.js +166 -188
- package/dist/api/SecretsApi.js +88 -106
- package/dist/api/SubscriptionsApi.js +277 -307
- package/dist/api/TasksApi.js +168 -190
- package/dist/api/TenantsApi.js +114 -134
- package/dist/api/UsersApi.js +22 -36
- package/dist/api/WalletsApi.js +330 -322
- package/dist/index.js +1029 -1153
- package/dist/model/DtoAddress.js +67 -84
- package/dist/model/DtoAggregatedEntitlement.js +48 -65
- package/dist/model/DtoAggregatedFeature.js +60 -89
- package/dist/model/DtoAuthResponse.js +49 -66
- package/dist/model/DtoBillingPeriodInfo.js +49 -66
- package/dist/model/DtoBulkIngestEventRequest.js +49 -88
- package/dist/model/DtoCreateAPIKeyRequest.js +59 -89
- package/dist/model/DtoCreateAPIKeyResponse.js +44 -61
- package/dist/model/DtoCreateCustomerRequest.js +95 -125
- package/dist/model/DtoCreateEntitlementRequest.js +72 -102
- package/dist/model/DtoCreateEnvironmentRequest.js +49 -79
- package/dist/model/DtoCreateFeatureRequest.js +96 -112
- package/dist/model/DtoCreateIntegrationRequest.js +52 -82
- package/dist/model/DtoCreateInvoiceLineItemRequest.js +104 -136
- package/dist/model/DtoCreateInvoiceRequest.js +152 -179
- package/dist/model/DtoCreateMeterRequest.js +78 -117
- package/dist/model/DtoCreatePaymentRequest.js +84 -114
- package/dist/model/DtoCreatePlanEntitlementRequest.js +72 -102
- package/dist/model/DtoCreatePlanPriceRequest.js +141 -180
- package/dist/model/DtoCreatePlanRequest.js +83 -131
- package/dist/model/DtoCreatePriceRequest.js +141 -180
- package/dist/model/DtoCreatePriceTier.js +51 -81
- package/dist/model/DtoCreateSubscriptionRequest.js +115 -136
- package/dist/model/DtoCreateTaskRequest.js +68 -98
- package/dist/model/DtoCreateTenantRequest.js +50 -80
- package/dist/model/DtoCreateWalletRequest.js +110 -121
- package/dist/model/DtoCustomerEntitlementsResponse.js +49 -78
- package/dist/model/DtoCustomerInvoiceSummary.js +66 -83
- package/dist/model/DtoCustomerMultiCurrencyInvoiceSummary.js +56 -85
- package/dist/model/DtoCustomerResponse.js +135 -152
- package/dist/model/DtoCustomerUsageSummaryResponse.js +67 -96
- package/dist/model/DtoEntitlementResponse.js +127 -144
- package/dist/model/DtoEntitlementSource.js +69 -86
- package/dist/model/DtoEnvironmentResponse.js +61 -78
- package/dist/model/DtoEvent.js +83 -88
- package/dist/model/DtoFeatureResponse.js +129 -146
- package/dist/model/DtoFeatureUsageSummary.js +66 -95
- package/dist/model/DtoGetEventsRequest.js +193 -0
- package/dist/model/DtoGetEventsResponse.js +75 -88
- package/dist/model/DtoGetPreviewInvoiceRequest.js +55 -85
- package/dist/model/DtoGetUsageByMeterRequest.js +75 -105
- package/dist/model/DtoGetUsageBySubscriptionRequest.js +57 -87
- package/dist/model/DtoGetUsageBySubscriptionResponse.js +72 -101
- package/dist/model/DtoGetUsageRequest.js +86 -116
- package/dist/model/DtoGetUsageResponse.js +56 -85
- package/dist/model/DtoIngestEventRequest.js +78 -108
- package/dist/model/DtoInvoiceLineItemResponse.js +161 -178
- package/dist/model/DtoInvoiceResponse.js +250 -279
- package/dist/model/DtoLinkedIntegrationsResponse.js +35 -52
- package/dist/model/DtoListCustomersResponse.js +51 -80
- package/dist/model/DtoListEntitlementsResponse.js +51 -80
- package/dist/model/DtoListEnvironmentsResponse.js +52 -81
- package/dist/model/DtoListFeaturesResponse.js +51 -80
- package/dist/model/DtoListInvoicesResponse.js +51 -80
- package/dist/model/DtoListPaymentsResponse.js +51 -80
- package/dist/model/DtoListPlansResponse.js +51 -80
- package/dist/model/DtoListPricesResponse.js +51 -80
- package/dist/model/DtoListSecretsResponse.js +51 -80
- package/dist/model/DtoListSubscriptionPausesResponse.js +46 -75
- package/dist/model/DtoListSubscriptionsResponse.js +51 -80
- package/dist/model/DtoListTasksResponse.js +51 -80
- package/dist/model/DtoListWalletTransactionsResponse.js +51 -80
- package/dist/model/DtoLoginRequest.js +56 -86
- package/dist/model/DtoMeterResponse.js +99 -128
- package/dist/model/DtoPauseSubscriptionRequest.js +69 -99
- package/dist/model/DtoPaymentAttemptResponse.js +86 -103
- package/dist/model/DtoPaymentResponse.js +164 -181
- package/dist/model/DtoPlanResponse.js +124 -162
- package/dist/model/DtoPriceResponse.js +182 -221
- package/dist/model/DtoResumeSubscriptionRequest.js +46 -76
- package/dist/model/DtoSecretResponse.js +91 -108
- package/dist/model/DtoSignUpRequest.js +61 -91
- package/dist/model/DtoSubscriptionPauseResponse.js +135 -152
- package/dist/model/DtoSubscriptionResponse.js +270 -299
- package/dist/model/DtoSubscriptionUsageByMetersResponse.js +73 -90
- package/dist/model/DtoTaskResponse.js +141 -158
- package/dist/model/DtoTenantBillingDetails.js +57 -74
- package/dist/model/DtoTenantBillingUsage.js +51 -80
- package/dist/model/DtoTenantResponse.js +69 -86
- package/dist/model/DtoTopUpWalletRequest.js +89 -126
- package/dist/model/DtoUpdateCustomerRequest.js +89 -106
- package/dist/model/DtoUpdateEntitlementRequest.js +48 -65
- package/dist/model/DtoUpdateEnvironmentRequest.js +42 -59
- package/dist/model/DtoUpdateFeatureRequest.js +80 -76
- package/dist/model/DtoUpdatePaymentRequest.js +40 -57
- package/dist/model/DtoUpdatePaymentStatusRequest.js +41 -71
- package/dist/model/DtoUpdatePlanEntitlementRequest.js +78 -108
- package/dist/model/DtoUpdatePlanPriceRequest.js +147 -186
- package/dist/model/DtoUpdatePlanRequest.js +77 -115
- package/dist/model/DtoUpdatePriceRequest.js +47 -64
- package/dist/model/DtoUpdateTaskStatusRequest.js +38 -68
- package/dist/model/DtoUpdateTenantRequest.js +49 -54
- package/dist/model/DtoUpdateWalletRequest.js +65 -82
- package/dist/model/DtoUsageResult.js +38 -55
- package/dist/model/DtoUserResponse.js +51 -68
- package/dist/model/DtoWalletBalanceResponse.js +159 -176
- package/dist/model/DtoWalletResponse.js +120 -137
- package/dist/model/DtoWalletTransactionResponse.js +111 -128
- package/dist/model/ErrorsErrorDetail.js +47 -64
- package/dist/model/ErrorsErrorResponse.js +40 -57
- package/dist/model/MeterAggregation.js +39 -56
- package/dist/model/MeterFilter.js +42 -59
- package/dist/model/PriceJSONBTransformQuantity.js +38 -55
- package/dist/model/PricePrice.js +173 -212
- package/dist/model/PricePriceTier.js +38 -55
- package/dist/model/PriceTransformQuantity.js +38 -55
- package/dist/model/SubscriptionSubscriptionLineItem.js +165 -182
- package/dist/model/SubscriptionSubscriptionPause.js +135 -152
- package/dist/model/TypesAggregationType.js +36 -51
- package/dist/model/TypesAutoTopupTrigger.js +24 -41
- package/dist/model/TypesBillingCadence.js +24 -41
- package/dist/model/TypesBillingCycle.js +41 -0
- package/dist/model/TypesBillingModel.js +30 -46
- package/dist/model/TypesBillingPeriod.js +48 -61
- package/dist/model/TypesBillingTier.js +24 -41
- package/dist/model/TypesEntityType.js +30 -46
- package/dist/model/TypesFeatureType.js +30 -46
- package/dist/model/TypesFileType.js +24 -41
- package/dist/model/TypesInvoiceBillingReason.js +36 -51
- package/dist/model/TypesInvoiceCadence.js +24 -41
- package/dist/model/TypesInvoiceStatus.js +30 -46
- package/dist/model/TypesInvoiceType.js +30 -46
- package/dist/model/TypesPaginationResponse.js +38 -55
- package/dist/model/TypesPauseMode.js +30 -46
- package/dist/model/TypesPauseStatus.js +42 -56
- package/dist/model/TypesPaymentDestinationType.js +18 -36
- package/dist/model/TypesPaymentMethodType.js +36 -51
- package/dist/model/TypesPaymentStatus.js +48 -61
- package/dist/model/TypesPriceType.js +24 -41
- package/dist/model/TypesResetUsage.js +24 -41
- package/dist/model/TypesResumeMode.js +30 -46
- package/dist/model/TypesSecretProvider.js +30 -46
- package/dist/model/TypesSecretType.js +30 -46
- package/dist/model/TypesStatus.js +30 -46
- package/dist/model/TypesSubscriptionStatus.js +60 -71
- package/dist/model/TypesTaskStatus.js +36 -51
- package/dist/model/TypesTaskType.js +24 -41
- package/dist/model/TypesTransactionReason.js +60 -71
- package/dist/model/TypesTransactionStatus.js +30 -46
- package/dist/model/TypesTransactionType.js +24 -41
- package/dist/model/TypesWalletConfig.js +36 -53
- package/dist/model/TypesWalletConfigPriceType.js +30 -46
- package/dist/model/TypesWalletStatus.js +30 -46
- package/dist/model/TypesWalletTxReferenceType.js +30 -51
- package/dist/model/TypesWalletType.js +24 -41
- package/dist/model/TypesWindowSize.js +30 -46
- package/package.json +1 -1
- package/dist/api/MetersApi.js +0 -287
- package/dist/model/DtoUpdateMeterRequest.js +0 -110
package/dist/api/InvoicesApi.js
CHANGED
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var _DtoCreateInvoiceRequest = _interopRequireDefault(require("../model/DtoCreateInvoiceRequest"));
|
|
9
|
-
var _DtoCustomerMultiCurrencyInvoiceSummary = _interopRequireDefault(require("../model/DtoCustomerMultiCurrencyInvoiceSummary"));
|
|
10
|
-
var _DtoGetPreviewInvoiceRequest = _interopRequireDefault(require("../model/DtoGetPreviewInvoiceRequest"));
|
|
11
|
-
var _DtoInvoiceResponse = _interopRequireDefault(require("../model/DtoInvoiceResponse"));
|
|
12
|
-
var _DtoListInvoicesResponse = _interopRequireDefault(require("../model/DtoListInvoicesResponse"));
|
|
13
|
-
var _DtoUpdatePaymentStatusRequest = _interopRequireDefault(require("../model/DtoUpdatePaymentStatusRequest"));
|
|
14
|
-
var _ErrorsErrorResponse = _interopRequireDefault(require("../model/ErrorsErrorResponse"));
|
|
15
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
17
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
18
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
19
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
20
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
1
|
+
/**
|
|
22
2
|
* FlexPrice API
|
|
23
3
|
* FlexPrice API Service
|
|
24
4
|
*
|
|
@@ -30,12 +10,22 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
10
|
* Do not edit the class manually.
|
|
31
11
|
*
|
|
32
12
|
*/
|
|
13
|
+
|
|
14
|
+
import ApiClient from "../ApiClient";
|
|
15
|
+
import DtoCreateInvoiceRequest from '../model/DtoCreateInvoiceRequest';
|
|
16
|
+
import DtoCustomerMultiCurrencyInvoiceSummary from '../model/DtoCustomerMultiCurrencyInvoiceSummary';
|
|
17
|
+
import DtoGetPreviewInvoiceRequest from '../model/DtoGetPreviewInvoiceRequest';
|
|
18
|
+
import DtoInvoiceResponse from '../model/DtoInvoiceResponse';
|
|
19
|
+
import DtoListInvoicesResponse from '../model/DtoListInvoicesResponse';
|
|
20
|
+
import DtoUpdatePaymentStatusRequest from '../model/DtoUpdatePaymentStatusRequest';
|
|
21
|
+
import ErrorsErrorResponse from '../model/ErrorsErrorResponse';
|
|
22
|
+
|
|
33
23
|
/**
|
|
34
24
|
* Invoices service.
|
|
35
25
|
* @module api/InvoicesApi
|
|
36
26
|
* @version 1.0
|
|
37
27
|
*/
|
|
38
|
-
|
|
28
|
+
export default class InvoicesApi {
|
|
39
29
|
/**
|
|
40
30
|
* Constructs a new InvoicesApi.
|
|
41
31
|
* @alias module:api/InvoicesApi
|
|
@@ -43,9 +33,8 @@ var InvoicesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
43
33
|
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
44
34
|
* default to {@link module:ApiClient#instance} if unspecified.
|
|
45
35
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
36
|
+
constructor(apiClient) {
|
|
37
|
+
this.apiClient = apiClient || ApiClient.instance;
|
|
49
38
|
}
|
|
50
39
|
|
|
51
40
|
/**
|
|
@@ -63,382 +52,368 @@ var InvoicesApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
63
52
|
* @param {module:api/InvoicesApi~customersIdInvoicesSummaryGetCallback} callback The callback function, accepting three arguments: error, data, response
|
|
64
53
|
* data is of type: {@link module:model/DtoCustomerMultiCurrencyInvoiceSummary}
|
|
65
54
|
*/
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if (id === undefined || id === null) {
|
|
72
|
-
throw new Error("Missing the required parameter 'id' when calling customersIdInvoicesSummaryGet");
|
|
73
|
-
}
|
|
74
|
-
var pathParams = {
|
|
75
|
-
'id': id
|
|
76
|
-
};
|
|
77
|
-
var queryParams = {};
|
|
78
|
-
var headerParams = {};
|
|
79
|
-
var formParams = {};
|
|
80
|
-
var authNames = ['ApiKeyAuth'];
|
|
81
|
-
var contentTypes = [];
|
|
82
|
-
var accepts = ['application/json'];
|
|
83
|
-
var returnType = _DtoCustomerMultiCurrencyInvoiceSummary["default"];
|
|
84
|
-
return this.apiClient.callApi('/customers/{id}/invoices/summary', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
55
|
+
customersIdInvoicesSummaryGet(id, callback) {
|
|
56
|
+
let postBody = null;
|
|
57
|
+
// verify the required parameter 'id' is set
|
|
58
|
+
if (id === undefined || id === null) {
|
|
59
|
+
throw new Error("Missing the required parameter 'id' when calling customersIdInvoicesSummaryGet");
|
|
85
60
|
}
|
|
61
|
+
let pathParams = {
|
|
62
|
+
'id': id
|
|
63
|
+
};
|
|
64
|
+
let queryParams = {};
|
|
65
|
+
let headerParams = {};
|
|
66
|
+
let formParams = {};
|
|
67
|
+
let authNames = ['ApiKeyAuth'];
|
|
68
|
+
let contentTypes = [];
|
|
69
|
+
let accepts = ['application/json'];
|
|
70
|
+
let returnType = DtoCustomerMultiCurrencyInvoiceSummary;
|
|
71
|
+
return this.apiClient.callApi('/customers/{id}/invoices/summary', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
72
|
+
}
|
|
86
73
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
74
|
+
/**
|
|
75
|
+
* Callback function to receive the result of the invoicesGet operation.
|
|
76
|
+
* @callback module:api/InvoicesApi~invoicesGetCallback
|
|
77
|
+
* @param {String} error Error message, if any.
|
|
78
|
+
* @param {module:model/DtoListInvoicesResponse} data The data returned by the service call.
|
|
79
|
+
* @param {String} response The complete HTTP response.
|
|
80
|
+
*/
|
|
94
81
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
82
|
+
/**
|
|
83
|
+
* List invoices
|
|
84
|
+
* List invoices with optional filtering
|
|
85
|
+
* @param {Object} opts Optional parameters
|
|
86
|
+
* @param {Number} [amountDueGt]
|
|
87
|
+
* @param {Number} [amountRemainingGt]
|
|
88
|
+
* @param {String} [customerId]
|
|
89
|
+
* @param {String} [endTime]
|
|
90
|
+
* @param {String} [expand]
|
|
91
|
+
* @param {Array.<String>} [invoiceIds]
|
|
92
|
+
* @param {Array.<module:model/String>} [invoiceStatus]
|
|
93
|
+
* @param {module:model/String} [invoiceType]
|
|
94
|
+
* @param {Number} [limit]
|
|
95
|
+
* @param {Number} [offset]
|
|
96
|
+
* @param {module:model/String} [order]
|
|
97
|
+
* @param {Array.<module:model/String>} [paymentStatus]
|
|
98
|
+
* @param {String} [sort]
|
|
99
|
+
* @param {String} [startTime]
|
|
100
|
+
* @param {module:model/String} [status]
|
|
101
|
+
* @param {String} [subscriptionId]
|
|
102
|
+
* @param {module:api/InvoicesApi~invoicesGetCallback} callback The callback function, accepting three arguments: error, data, response
|
|
103
|
+
* data is of type: {@link module:model/DtoListInvoicesResponse}
|
|
104
|
+
*/
|
|
105
|
+
invoicesGet(opts, callback) {
|
|
106
|
+
opts = opts || {};
|
|
107
|
+
let postBody = null;
|
|
108
|
+
let pathParams = {};
|
|
109
|
+
let queryParams = {
|
|
110
|
+
'amount_due_gt': opts['amountDueGt'],
|
|
111
|
+
'amount_remaining_gt': opts['amountRemainingGt'],
|
|
112
|
+
'customer_id': opts['customerId'],
|
|
113
|
+
'end_time': opts['endTime'],
|
|
114
|
+
'expand': opts['expand'],
|
|
115
|
+
'invoice_ids': this.apiClient.buildCollectionParam(opts['invoiceIds'], 'csv'),
|
|
116
|
+
'invoice_status': this.apiClient.buildCollectionParam(opts['invoiceStatus'], 'csv'),
|
|
117
|
+
'invoice_type': opts['invoiceType'],
|
|
118
|
+
'limit': opts['limit'],
|
|
119
|
+
'offset': opts['offset'],
|
|
120
|
+
'order': opts['order'],
|
|
121
|
+
'payment_status': this.apiClient.buildCollectionParam(opts['paymentStatus'], 'csv'),
|
|
122
|
+
'sort': opts['sort'],
|
|
123
|
+
'start_time': opts['startTime'],
|
|
124
|
+
'status': opts['status'],
|
|
125
|
+
'subscription_id': opts['subscriptionId']
|
|
126
|
+
};
|
|
127
|
+
let headerParams = {};
|
|
128
|
+
let formParams = {};
|
|
129
|
+
let authNames = [];
|
|
130
|
+
let contentTypes = [];
|
|
131
|
+
let accepts = ['application/json'];
|
|
132
|
+
let returnType = DtoListInvoicesResponse;
|
|
133
|
+
return this.apiClient.callApi('/invoices', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
134
|
+
}
|
|
148
135
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
136
|
+
/**
|
|
137
|
+
* Callback function to receive the result of the invoicesIdFinalizePost operation.
|
|
138
|
+
* @callback module:api/InvoicesApi~invoicesIdFinalizePostCallback
|
|
139
|
+
* @param {String} error Error message, if any.
|
|
140
|
+
* @param {Object.<String, {String: Object}>} data The data returned by the service call.
|
|
141
|
+
* @param {String} response The complete HTTP response.
|
|
142
|
+
*/
|
|
156
143
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
if (id === undefined || id === null) {
|
|
170
|
-
throw new Error("Missing the required parameter 'id' when calling invoicesIdFinalizePost");
|
|
171
|
-
}
|
|
172
|
-
var pathParams = {
|
|
173
|
-
'id': id
|
|
174
|
-
};
|
|
175
|
-
var queryParams = {};
|
|
176
|
-
var headerParams = {};
|
|
177
|
-
var formParams = {};
|
|
178
|
-
var authNames = [];
|
|
179
|
-
var contentTypes = [];
|
|
180
|
-
var accepts = ['application/json'];
|
|
181
|
-
var returnType = {
|
|
182
|
-
'String': Object
|
|
183
|
-
};
|
|
184
|
-
return this.apiClient.callApi('/invoices/{id}/finalize', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
144
|
+
/**
|
|
145
|
+
* Finalize an invoice
|
|
146
|
+
* Finalize a draft invoice
|
|
147
|
+
* @param {String} id Invoice ID
|
|
148
|
+
* @param {module:api/InvoicesApi~invoicesIdFinalizePostCallback} callback The callback function, accepting three arguments: error, data, response
|
|
149
|
+
* data is of type: {@link Object.<String, {String: Object}>}
|
|
150
|
+
*/
|
|
151
|
+
invoicesIdFinalizePost(id, callback) {
|
|
152
|
+
let postBody = null;
|
|
153
|
+
// verify the required parameter 'id' is set
|
|
154
|
+
if (id === undefined || id === null) {
|
|
155
|
+
throw new Error("Missing the required parameter 'id' when calling invoicesIdFinalizePost");
|
|
185
156
|
}
|
|
157
|
+
let pathParams = {
|
|
158
|
+
'id': id
|
|
159
|
+
};
|
|
160
|
+
let queryParams = {};
|
|
161
|
+
let headerParams = {};
|
|
162
|
+
let formParams = {};
|
|
163
|
+
let authNames = [];
|
|
164
|
+
let contentTypes = [];
|
|
165
|
+
let accepts = ['application/json'];
|
|
166
|
+
let returnType = {
|
|
167
|
+
'String': Object
|
|
168
|
+
};
|
|
169
|
+
return this.apiClient.callApi('/invoices/{id}/finalize', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
170
|
+
}
|
|
186
171
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
172
|
+
/**
|
|
173
|
+
* Callback function to receive the result of the invoicesIdGet operation.
|
|
174
|
+
* @callback module:api/InvoicesApi~invoicesIdGetCallback
|
|
175
|
+
* @param {String} error Error message, if any.
|
|
176
|
+
* @param {module:model/DtoInvoiceResponse} data The data returned by the service call.
|
|
177
|
+
* @param {String} response The complete HTTP response.
|
|
178
|
+
*/
|
|
194
179
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
if (id === undefined || id === null) {
|
|
208
|
-
throw new Error("Missing the required parameter 'id' when calling invoicesIdGet");
|
|
209
|
-
}
|
|
210
|
-
var pathParams = {
|
|
211
|
-
'id': id
|
|
212
|
-
};
|
|
213
|
-
var queryParams = {};
|
|
214
|
-
var headerParams = {};
|
|
215
|
-
var formParams = {};
|
|
216
|
-
var authNames = [];
|
|
217
|
-
var contentTypes = [];
|
|
218
|
-
var accepts = ['application/json'];
|
|
219
|
-
var returnType = _DtoInvoiceResponse["default"];
|
|
220
|
-
return this.apiClient.callApi('/invoices/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
180
|
+
/**
|
|
181
|
+
* Get an invoice by ID
|
|
182
|
+
* Get detailed information about an invoice
|
|
183
|
+
* @param {String} id Invoice ID
|
|
184
|
+
* @param {module:api/InvoicesApi~invoicesIdGetCallback} callback The callback function, accepting three arguments: error, data, response
|
|
185
|
+
* data is of type: {@link module:model/DtoInvoiceResponse}
|
|
186
|
+
*/
|
|
187
|
+
invoicesIdGet(id, callback) {
|
|
188
|
+
let postBody = null;
|
|
189
|
+
// verify the required parameter 'id' is set
|
|
190
|
+
if (id === undefined || id === null) {
|
|
191
|
+
throw new Error("Missing the required parameter 'id' when calling invoicesIdGet");
|
|
221
192
|
}
|
|
193
|
+
let pathParams = {
|
|
194
|
+
'id': id
|
|
195
|
+
};
|
|
196
|
+
let queryParams = {};
|
|
197
|
+
let headerParams = {};
|
|
198
|
+
let formParams = {};
|
|
199
|
+
let authNames = [];
|
|
200
|
+
let contentTypes = [];
|
|
201
|
+
let accepts = ['application/json'];
|
|
202
|
+
let returnType = DtoInvoiceResponse;
|
|
203
|
+
return this.apiClient.callApi('/invoices/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
204
|
+
}
|
|
222
205
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
206
|
+
/**
|
|
207
|
+
* Callback function to receive the result of the invoicesIdPaymentAttemptPost operation.
|
|
208
|
+
* @callback module:api/InvoicesApi~invoicesIdPaymentAttemptPostCallback
|
|
209
|
+
* @param {String} error Error message, if any.
|
|
210
|
+
* @param {Object.<String, {String: Object}>} data The data returned by the service call.
|
|
211
|
+
* @param {String} response The complete HTTP response.
|
|
212
|
+
*/
|
|
230
213
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
if (id === undefined || id === null) {
|
|
244
|
-
throw new Error("Missing the required parameter 'id' when calling invoicesIdPaymentAttemptPost");
|
|
245
|
-
}
|
|
246
|
-
var pathParams = {
|
|
247
|
-
'id': id
|
|
248
|
-
};
|
|
249
|
-
var queryParams = {};
|
|
250
|
-
var headerParams = {};
|
|
251
|
-
var formParams = {};
|
|
252
|
-
var authNames = [];
|
|
253
|
-
var contentTypes = [];
|
|
254
|
-
var accepts = ['application/json'];
|
|
255
|
-
var returnType = {
|
|
256
|
-
'String': Object
|
|
257
|
-
};
|
|
258
|
-
return this.apiClient.callApi('/invoices/{id}/payment/attempt', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
214
|
+
/**
|
|
215
|
+
* Attempt payment for an invoice
|
|
216
|
+
* Attempt to pay an invoice using customer's available wallets
|
|
217
|
+
* @param {String} id Invoice ID
|
|
218
|
+
* @param {module:api/InvoicesApi~invoicesIdPaymentAttemptPostCallback} callback The callback function, accepting three arguments: error, data, response
|
|
219
|
+
* data is of type: {@link Object.<String, {String: Object}>}
|
|
220
|
+
*/
|
|
221
|
+
invoicesIdPaymentAttemptPost(id, callback) {
|
|
222
|
+
let postBody = null;
|
|
223
|
+
// verify the required parameter 'id' is set
|
|
224
|
+
if (id === undefined || id === null) {
|
|
225
|
+
throw new Error("Missing the required parameter 'id' when calling invoicesIdPaymentAttemptPost");
|
|
259
226
|
}
|
|
227
|
+
let pathParams = {
|
|
228
|
+
'id': id
|
|
229
|
+
};
|
|
230
|
+
let queryParams = {};
|
|
231
|
+
let headerParams = {};
|
|
232
|
+
let formParams = {};
|
|
233
|
+
let authNames = [];
|
|
234
|
+
let contentTypes = [];
|
|
235
|
+
let accepts = ['application/json'];
|
|
236
|
+
let returnType = {
|
|
237
|
+
'String': Object
|
|
238
|
+
};
|
|
239
|
+
return this.apiClient.callApi('/invoices/{id}/payment/attempt', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
240
|
+
}
|
|
260
241
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
242
|
+
/**
|
|
243
|
+
* Callback function to receive the result of the invoicesIdPaymentPut operation.
|
|
244
|
+
* @callback module:api/InvoicesApi~invoicesIdPaymentPutCallback
|
|
245
|
+
* @param {String} error Error message, if any.
|
|
246
|
+
* @param {module:model/DtoInvoiceResponse} data The data returned by the service call.
|
|
247
|
+
* @param {String} response The complete HTTP response.
|
|
248
|
+
*/
|
|
268
249
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
if (id === undefined || id === null) {
|
|
283
|
-
throw new Error("Missing the required parameter 'id' when calling invoicesIdPaymentPut");
|
|
284
|
-
}
|
|
285
|
-
// verify the required parameter 'request' is set
|
|
286
|
-
if (request === undefined || request === null) {
|
|
287
|
-
throw new Error("Missing the required parameter 'request' when calling invoicesIdPaymentPut");
|
|
288
|
-
}
|
|
289
|
-
var pathParams = {
|
|
290
|
-
'id': id
|
|
291
|
-
};
|
|
292
|
-
var queryParams = {};
|
|
293
|
-
var headerParams = {};
|
|
294
|
-
var formParams = {};
|
|
295
|
-
var authNames = ['ApiKeyAuth'];
|
|
296
|
-
var contentTypes = ['application/json'];
|
|
297
|
-
var accepts = ['application/json'];
|
|
298
|
-
var returnType = _DtoInvoiceResponse["default"];
|
|
299
|
-
return this.apiClient.callApi('/invoices/{id}/payment', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
250
|
+
/**
|
|
251
|
+
* Update invoice payment status
|
|
252
|
+
* Update the payment status of an invoice
|
|
253
|
+
* @param {String} id Invoice ID
|
|
254
|
+
* @param {module:model/DtoUpdatePaymentStatusRequest} request Payment Status Update Request
|
|
255
|
+
* @param {module:api/InvoicesApi~invoicesIdPaymentPutCallback} callback The callback function, accepting three arguments: error, data, response
|
|
256
|
+
* data is of type: {@link module:model/DtoInvoiceResponse}
|
|
257
|
+
*/
|
|
258
|
+
invoicesIdPaymentPut(id, request, callback) {
|
|
259
|
+
let postBody = request;
|
|
260
|
+
// verify the required parameter 'id' is set
|
|
261
|
+
if (id === undefined || id === null) {
|
|
262
|
+
throw new Error("Missing the required parameter 'id' when calling invoicesIdPaymentPut");
|
|
300
263
|
}
|
|
264
|
+
// verify the required parameter 'request' is set
|
|
265
|
+
if (request === undefined || request === null) {
|
|
266
|
+
throw new Error("Missing the required parameter 'request' when calling invoicesIdPaymentPut");
|
|
267
|
+
}
|
|
268
|
+
let pathParams = {
|
|
269
|
+
'id': id
|
|
270
|
+
};
|
|
271
|
+
let queryParams = {};
|
|
272
|
+
let headerParams = {};
|
|
273
|
+
let formParams = {};
|
|
274
|
+
let authNames = ['ApiKeyAuth'];
|
|
275
|
+
let contentTypes = ['application/json'];
|
|
276
|
+
let accepts = ['application/json'];
|
|
277
|
+
let returnType = DtoInvoiceResponse;
|
|
278
|
+
return this.apiClient.callApi('/invoices/{id}/payment', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
279
|
+
}
|
|
301
280
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
281
|
+
/**
|
|
282
|
+
* Callback function to receive the result of the invoicesIdPdfGet operation.
|
|
283
|
+
* @callback module:api/InvoicesApi~invoicesIdPdfGetCallback
|
|
284
|
+
* @param {String} error Error message, if any.
|
|
285
|
+
* @param {File} data The data returned by the service call.
|
|
286
|
+
* @param {String} response The complete HTTP response.
|
|
287
|
+
*/
|
|
309
288
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
var pathParams = {
|
|
326
|
-
'id': id
|
|
327
|
-
};
|
|
328
|
-
var queryParams = {};
|
|
329
|
-
var headerParams = {};
|
|
330
|
-
var formParams = {};
|
|
331
|
-
var authNames = [];
|
|
332
|
-
var contentTypes = [];
|
|
333
|
-
var accepts = ['*/*'];
|
|
334
|
-
var returnType = File;
|
|
335
|
-
return this.apiClient.callApi('/invoices/{id}/pdf', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
289
|
+
/**
|
|
290
|
+
* Get PDF for an invoice
|
|
291
|
+
* Retrieve the PDF document for a specific invoice by its ID
|
|
292
|
+
* @param {String} id Invoice ID
|
|
293
|
+
* @param {Object} opts Optional parameters
|
|
294
|
+
* @param {Boolean} [url] Return presigned URL from s3 instead of PDF
|
|
295
|
+
* @param {module:api/InvoicesApi~invoicesIdPdfGetCallback} callback The callback function, accepting three arguments: error, data, response
|
|
296
|
+
* data is of type: {@link File}
|
|
297
|
+
*/
|
|
298
|
+
invoicesIdPdfGet(id, opts, callback) {
|
|
299
|
+
opts = opts || {};
|
|
300
|
+
let postBody = null;
|
|
301
|
+
// verify the required parameter 'id' is set
|
|
302
|
+
if (id === undefined || id === null) {
|
|
303
|
+
throw new Error("Missing the required parameter 'id' when calling invoicesIdPdfGet");
|
|
336
304
|
}
|
|
305
|
+
let pathParams = {
|
|
306
|
+
'id': id
|
|
307
|
+
};
|
|
308
|
+
let queryParams = {
|
|
309
|
+
'url': opts['url']
|
|
310
|
+
};
|
|
311
|
+
let headerParams = {};
|
|
312
|
+
let formParams = {};
|
|
313
|
+
let authNames = [];
|
|
314
|
+
let contentTypes = [];
|
|
315
|
+
let accepts = ['*/*'];
|
|
316
|
+
let returnType = File;
|
|
317
|
+
return this.apiClient.callApi('/invoices/{id}/pdf', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
318
|
+
}
|
|
337
319
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
320
|
+
/**
|
|
321
|
+
* Callback function to receive the result of the invoicesIdVoidPost operation.
|
|
322
|
+
* @callback module:api/InvoicesApi~invoicesIdVoidPostCallback
|
|
323
|
+
* @param {String} error Error message, if any.
|
|
324
|
+
* @param {Object.<String, {String: Object}>} data The data returned by the service call.
|
|
325
|
+
* @param {String} response The complete HTTP response.
|
|
326
|
+
*/
|
|
345
327
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
if (id === undefined || id === null) {
|
|
359
|
-
throw new Error("Missing the required parameter 'id' when calling invoicesIdVoidPost");
|
|
360
|
-
}
|
|
361
|
-
var pathParams = {
|
|
362
|
-
'id': id
|
|
363
|
-
};
|
|
364
|
-
var queryParams = {};
|
|
365
|
-
var headerParams = {};
|
|
366
|
-
var formParams = {};
|
|
367
|
-
var authNames = [];
|
|
368
|
-
var contentTypes = [];
|
|
369
|
-
var accepts = ['application/json'];
|
|
370
|
-
var returnType = {
|
|
371
|
-
'String': Object
|
|
372
|
-
};
|
|
373
|
-
return this.apiClient.callApi('/invoices/{id}/void', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
328
|
+
/**
|
|
329
|
+
* Void an invoice
|
|
330
|
+
* Void an invoice that hasn't been paid
|
|
331
|
+
* @param {String} id Invoice ID
|
|
332
|
+
* @param {module:api/InvoicesApi~invoicesIdVoidPostCallback} callback The callback function, accepting three arguments: error, data, response
|
|
333
|
+
* data is of type: {@link Object.<String, {String: Object}>}
|
|
334
|
+
*/
|
|
335
|
+
invoicesIdVoidPost(id, callback) {
|
|
336
|
+
let postBody = null;
|
|
337
|
+
// verify the required parameter 'id' is set
|
|
338
|
+
if (id === undefined || id === null) {
|
|
339
|
+
throw new Error("Missing the required parameter 'id' when calling invoicesIdVoidPost");
|
|
374
340
|
}
|
|
341
|
+
let pathParams = {
|
|
342
|
+
'id': id
|
|
343
|
+
};
|
|
344
|
+
let queryParams = {};
|
|
345
|
+
let headerParams = {};
|
|
346
|
+
let formParams = {};
|
|
347
|
+
let authNames = [];
|
|
348
|
+
let contentTypes = [];
|
|
349
|
+
let accepts = ['application/json'];
|
|
350
|
+
let returnType = {
|
|
351
|
+
'String': Object
|
|
352
|
+
};
|
|
353
|
+
return this.apiClient.callApi('/invoices/{id}/void', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
354
|
+
}
|
|
375
355
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
356
|
+
/**
|
|
357
|
+
* Callback function to receive the result of the invoicesPost operation.
|
|
358
|
+
* @callback module:api/InvoicesApi~invoicesPostCallback
|
|
359
|
+
* @param {String} error Error message, if any.
|
|
360
|
+
* @param {module:model/DtoInvoiceResponse} data The data returned by the service call.
|
|
361
|
+
* @param {String} response The complete HTTP response.
|
|
362
|
+
*/
|
|
383
363
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
if (invoice === undefined || invoice === null) {
|
|
397
|
-
throw new Error("Missing the required parameter 'invoice' when calling invoicesPost");
|
|
398
|
-
}
|
|
399
|
-
var pathParams = {};
|
|
400
|
-
var queryParams = {};
|
|
401
|
-
var headerParams = {};
|
|
402
|
-
var formParams = {};
|
|
403
|
-
var authNames = [];
|
|
404
|
-
var contentTypes = ['application/json'];
|
|
405
|
-
var accepts = ['application/json'];
|
|
406
|
-
var returnType = _DtoInvoiceResponse["default"];
|
|
407
|
-
return this.apiClient.callApi('/invoices', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
364
|
+
/**
|
|
365
|
+
* Create a new invoice
|
|
366
|
+
* Create a new invoice with the provided details
|
|
367
|
+
* @param {module:model/DtoCreateInvoiceRequest} invoice Invoice details
|
|
368
|
+
* @param {module:api/InvoicesApi~invoicesPostCallback} callback The callback function, accepting three arguments: error, data, response
|
|
369
|
+
* data is of type: {@link module:model/DtoInvoiceResponse}
|
|
370
|
+
*/
|
|
371
|
+
invoicesPost(invoice, callback) {
|
|
372
|
+
let postBody = invoice;
|
|
373
|
+
// verify the required parameter 'invoice' is set
|
|
374
|
+
if (invoice === undefined || invoice === null) {
|
|
375
|
+
throw new Error("Missing the required parameter 'invoice' when calling invoicesPost");
|
|
408
376
|
}
|
|
377
|
+
let pathParams = {};
|
|
378
|
+
let queryParams = {};
|
|
379
|
+
let headerParams = {};
|
|
380
|
+
let formParams = {};
|
|
381
|
+
let authNames = [];
|
|
382
|
+
let contentTypes = ['application/json'];
|
|
383
|
+
let accepts = ['application/json'];
|
|
384
|
+
let returnType = DtoInvoiceResponse;
|
|
385
|
+
return this.apiClient.callApi('/invoices', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
386
|
+
}
|
|
409
387
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
388
|
+
/**
|
|
389
|
+
* Callback function to receive the result of the invoicesPreviewPost operation.
|
|
390
|
+
* @callback module:api/InvoicesApi~invoicesPreviewPostCallback
|
|
391
|
+
* @param {String} error Error message, if any.
|
|
392
|
+
* @param {module:model/DtoInvoiceResponse} data The data returned by the service call.
|
|
393
|
+
* @param {String} response The complete HTTP response.
|
|
394
|
+
*/
|
|
417
395
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
if (request === undefined || request === null) {
|
|
431
|
-
throw new Error("Missing the required parameter 'request' when calling invoicesPreviewPost");
|
|
432
|
-
}
|
|
433
|
-
var pathParams = {};
|
|
434
|
-
var queryParams = {};
|
|
435
|
-
var headerParams = {};
|
|
436
|
-
var formParams = {};
|
|
437
|
-
var authNames = [];
|
|
438
|
-
var contentTypes = ['application/json'];
|
|
439
|
-
var accepts = ['application/json'];
|
|
440
|
-
var returnType = _DtoInvoiceResponse["default"];
|
|
441
|
-
return this.apiClient.callApi('/invoices/preview', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
396
|
+
/**
|
|
397
|
+
* Get a preview invoice
|
|
398
|
+
* Get a preview invoice
|
|
399
|
+
* @param {module:model/DtoGetPreviewInvoiceRequest} request Preview Invoice Request
|
|
400
|
+
* @param {module:api/InvoicesApi~invoicesPreviewPostCallback} callback The callback function, accepting three arguments: error, data, response
|
|
401
|
+
* data is of type: {@link module:model/DtoInvoiceResponse}
|
|
402
|
+
*/
|
|
403
|
+
invoicesPreviewPost(request, callback) {
|
|
404
|
+
let postBody = request;
|
|
405
|
+
// verify the required parameter 'request' is set
|
|
406
|
+
if (request === undefined || request === null) {
|
|
407
|
+
throw new Error("Missing the required parameter 'request' when calling invoicesPreviewPost");
|
|
442
408
|
}
|
|
443
|
-
|
|
444
|
-
}
|
|
409
|
+
let pathParams = {};
|
|
410
|
+
let queryParams = {};
|
|
411
|
+
let headerParams = {};
|
|
412
|
+
let formParams = {};
|
|
413
|
+
let authNames = [];
|
|
414
|
+
let contentTypes = ['application/json'];
|
|
415
|
+
let accepts = ['application/json'];
|
|
416
|
+
let returnType = DtoInvoiceResponse;
|
|
417
|
+
return this.apiClient.callApi('/invoices/preview', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
418
|
+
}
|
|
419
|
+
}
|