@flexprice/sdk 1.0.17 → 1.0.28
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/README.md +281 -200
- package/package.json +29 -41
- package/LICENSE +0 -663
- package/dist/ApiClient.js +0 -653
- package/dist/api/AuthApi.js +0 -100
- package/dist/api/CustomersApi.js +0 -376
- package/dist/api/EntitlementsApi.js +0 -267
- package/dist/api/EnvironmentsApi.js +0 -184
- package/dist/api/EventsApi.js +0 -238
- package/dist/api/FeaturesApi.js +0 -263
- package/dist/api/IntegrationsApi.js +0 -169
- package/dist/api/InvoicesApi.js +0 -419
- package/dist/api/PaymentsApi.js +0 -272
- package/dist/api/PlansApi.js +0 -226
- package/dist/api/PricesApi.js +0 -228
- package/dist/api/SecretsApi.js +0 -137
- package/dist/api/SubscriptionsApi.js +0 -353
- package/dist/api/TasksApi.js +0 -232
- package/dist/api/TenantsApi.js +0 -162
- package/dist/api/UsersApi.js +0 -61
- package/dist/api/WalletsApi.js +0 -392
- package/dist/index.js +0 -1102
- package/dist/model/DtoAddress.js +0 -132
- package/dist/model/DtoAggregatedEntitlement.js +0 -106
- package/dist/model/DtoAggregatedFeature.js +0 -109
- package/dist/model/DtoAuthResponse.js +0 -96
- package/dist/model/DtoBillingPeriodInfo.js +0 -97
- package/dist/model/DtoBulkIngestEventRequest.js +0 -91
- package/dist/model/DtoCreateAPIKeyRequest.js +0 -117
- package/dist/model/DtoCreateAPIKeyResponse.js +0 -86
- package/dist/model/DtoCreateCustomerRequest.js +0 -188
- package/dist/model/DtoCreateEntitlementRequest.js +0 -150
- package/dist/model/DtoCreateEnvironmentRequest.js +0 -96
- package/dist/model/DtoCreateFeatureRequest.js +0 -177
- package/dist/model/DtoCreateIntegrationRequest.js +0 -105
- package/dist/model/DtoCreateInvoiceLineItemRequest.js +0 -206
- package/dist/model/DtoCreateInvoiceRequest.js +0 -289
- package/dist/model/DtoCreateMeterRequest.js +0 -144
- package/dist/model/DtoCreatePaymentRequest.js +0 -172
- package/dist/model/DtoCreatePlanEntitlementRequest.js +0 -150
- package/dist/model/DtoCreatePlanPriceRequest.js +0 -279
- package/dist/model/DtoCreatePlanRequest.js +0 -148
- package/dist/model/DtoCreatePriceRequest.js +0 -279
- package/dist/model/DtoCreatePriceTier.js +0 -102
- package/dist/model/DtoCreateSubscriptionRequest.js +0 -223
- package/dist/model/DtoCreateTaskRequest.js +0 -137
- package/dist/model/DtoCreateTenantRequest.js +0 -96
- package/dist/model/DtoCreateWalletRequest.js +0 -205
- package/dist/model/DtoCustomerEntitlementsResponse.js +0 -93
- package/dist/model/DtoCustomerInvoiceSummary.js +0 -148
- package/dist/model/DtoCustomerMultiCurrencyInvoiceSummary.js +0 -105
- package/dist/model/DtoCustomerResponse.js +0 -283
- package/dist/model/DtoCustomerUsageSummaryResponse.js +0 -121
- package/dist/model/DtoEntitlementResponse.js +0 -259
- package/dist/model/DtoEntitlementSource.js +0 -144
- package/dist/model/DtoEnvironmentResponse.js +0 -120
- package/dist/model/DtoEvent.js +0 -154
- package/dist/model/DtoFeatureResponse.js +0 -258
- package/dist/model/DtoFeatureUsageSummary.js +0 -135
- package/dist/model/DtoGetEventsRequest.js +0 -219
- package/dist/model/DtoGetEventsResponse.js +0 -129
- package/dist/model/DtoGetPreviewInvoiceRequest.js +0 -106
- package/dist/model/DtoGetUsageAnalyticsRequest.js +0 -152
- package/dist/model/DtoGetUsageAnalyticsResponse.js +0 -101
- package/dist/model/DtoGetUsageByMeterRequest.js +0 -149
- package/dist/model/DtoGetUsageBySubscriptionRequest.js +0 -114
- package/dist/model/DtoGetUsageBySubscriptionResponse.js +0 -137
- package/dist/model/DtoGetUsageRequest.js +0 -173
- package/dist/model/DtoGetUsageResponse.js +0 -110
- package/dist/model/DtoIngestEventRequest.js +0 -156
- package/dist/model/DtoInvoiceLineItemResponse.js +0 -326
- package/dist/model/DtoInvoiceResponse.js +0 -450
- package/dist/model/DtoLinkedIntegrationsResponse.js +0 -72
- package/dist/model/DtoListCustomersResponse.js +0 -95
- package/dist/model/DtoListEntitlementsResponse.js +0 -95
- package/dist/model/DtoListEnvironmentsResponse.js +0 -105
- package/dist/model/DtoListFeaturesResponse.js +0 -95
- package/dist/model/DtoListInvoicesResponse.js +0 -95
- package/dist/model/DtoListPaymentsResponse.js +0 -95
- package/dist/model/DtoListPlansResponse.js +0 -95
- package/dist/model/DtoListPricesResponse.js +0 -95
- package/dist/model/DtoListSecretsResponse.js +0 -95
- package/dist/model/DtoListSubscriptionPausesResponse.js +0 -89
- package/dist/model/DtoListSubscriptionsResponse.js +0 -95
- package/dist/model/DtoListTasksResponse.js +0 -95
- package/dist/model/DtoListWalletTransactionsResponse.js +0 -95
- package/dist/model/DtoLoginRequest.js +0 -108
- package/dist/model/DtoMeterResponse.js +0 -188
- package/dist/model/DtoPauseSubscriptionRequest.js +0 -141
- package/dist/model/DtoPaymentAttemptResponse.js +0 -174
- package/dist/model/DtoPaymentResponse.js +0 -314
- package/dist/model/DtoPlanResponse.js +0 -231
- package/dist/model/DtoPriceResponse.js +0 -373
- package/dist/model/DtoResumeSubscriptionRequest.js +0 -97
- package/dist/model/DtoSecretResponse.js +0 -183
- package/dist/model/DtoSignUpRequest.js +0 -118
- package/dist/model/DtoSubscriptionPauseResponse.js +0 -283
- package/dist/model/DtoSubscriptionResponse.js +0 -489
- package/dist/model/DtoSubscriptionUsageByMetersResponse.js +0 -148
- package/dist/model/DtoTaskResponse.js +0 -294
- package/dist/model/DtoTenantBillingDetails.js +0 -110
- package/dist/model/DtoTenantBillingUsage.js +0 -95
- package/dist/model/DtoTenantResponse.js +0 -134
- package/dist/model/DtoTopUpWalletRequest.js +0 -148
- package/dist/model/DtoUpdateCustomerRequest.js +0 -178
- package/dist/model/DtoUpdateEntitlementRequest.js +0 -105
- package/dist/model/DtoUpdateEnvironmentRequest.js +0 -84
- package/dist/model/DtoUpdateFeatureRequest.js +0 -139
- package/dist/model/DtoUpdatePaymentRequest.js +0 -82
- package/dist/model/DtoUpdatePaymentStatusRequest.js +0 -87
- package/dist/model/DtoUpdatePlanEntitlementRequest.js +0 -163
- package/dist/model/DtoUpdatePlanPriceRequest.js +0 -292
- package/dist/model/DtoUpdatePlanRequest.js +0 -138
- package/dist/model/DtoUpdatePriceRequest.js +0 -94
- package/dist/model/DtoUpdateTaskStatusRequest.js +0 -79
- package/dist/model/DtoUpdateTenantRequest.js +0 -86
- package/dist/model/DtoUpdateWalletRequest.js +0 -133
- package/dist/model/DtoUsageAnalyticItem.js +0 -190
- package/dist/model/DtoUsageAnalyticPoint.js +0 -88
- package/dist/model/DtoUsageResult.js +0 -80
- package/dist/model/DtoUserResponse.js +0 -98
- package/dist/model/DtoWalletBalanceResponse.js +0 -336
- package/dist/model/DtoWalletResponse.js +0 -235
- package/dist/model/DtoWalletTransactionResponse.js +0 -221
- package/dist/model/ErrorsErrorDetail.js +0 -94
- package/dist/model/ErrorsErrorResponse.js +0 -82
- package/dist/model/GithubComFlexpriceFlexpriceInternalTypesValue.js +0 -112
- package/dist/model/MeterAggregation.js +0 -82
- package/dist/model/MeterFilter.js +0 -86
- package/dist/model/PriceJSONBTransformQuantity.js +0 -82
- package/dist/model/PricePrice.js +0 -359
- package/dist/model/PricePriceTier.js +0 -87
- package/dist/model/PriceTransformQuantity.js +0 -82
- package/dist/model/SubscriptionSubscriptionLineItem.js +0 -338
- package/dist/model/SubscriptionSubscriptionPause.js +0 -283
- package/dist/model/TypesAggregationType.js +0 -53
- package/dist/model/TypesAutoTopupTrigger.js +0 -41
- package/dist/model/TypesBillingCadence.js +0 -41
- package/dist/model/TypesBillingCycle.js +0 -41
- package/dist/model/TypesBillingModel.js +0 -47
- package/dist/model/TypesBillingPeriod.js +0 -65
- package/dist/model/TypesBillingTier.js +0 -41
- package/dist/model/TypesCustomerFilter.js +0 -230
- package/dist/model/TypesDataType.js +0 -53
- package/dist/model/TypesEntityType.js +0 -47
- package/dist/model/TypesFeatureFilter.js +0 -243
- package/dist/model/TypesFeatureType.js +0 -47
- package/dist/model/TypesFileType.js +0 -41
- package/dist/model/TypesFilterCondition.js +0 -104
- package/dist/model/TypesFilterOperatorType.js +0 -77
- package/dist/model/TypesInvoiceBillingReason.js +0 -53
- package/dist/model/TypesInvoiceCadence.js +0 -41
- package/dist/model/TypesInvoiceStatus.js +0 -47
- package/dist/model/TypesInvoiceType.js +0 -47
- package/dist/model/TypesPaginationResponse.js +0 -84
- package/dist/model/TypesPauseMode.js +0 -47
- package/dist/model/TypesPauseStatus.js +0 -59
- package/dist/model/TypesPaymentDestinationType.js +0 -35
- package/dist/model/TypesPaymentMethodType.js +0 -53
- package/dist/model/TypesPaymentStatus.js +0 -65
- package/dist/model/TypesPriceType.js +0 -41
- package/dist/model/TypesResetUsage.js +0 -41
- package/dist/model/TypesResumeMode.js +0 -47
- package/dist/model/TypesSecretProvider.js +0 -47
- package/dist/model/TypesSecretType.js +0 -47
- package/dist/model/TypesSortCondition.js +0 -81
- package/dist/model/TypesSortDirection.js +0 -41
- package/dist/model/TypesStatus.js +0 -47
- package/dist/model/TypesSubscriptionStatus.js +0 -77
- package/dist/model/TypesTaskStatus.js +0 -53
- package/dist/model/TypesTaskType.js +0 -41
- package/dist/model/TypesTransactionReason.js +0 -77
- package/dist/model/TypesTransactionStatus.js +0 -47
- package/dist/model/TypesTransactionType.js +0 -41
- package/dist/model/TypesWalletConfig.js +0 -74
- package/dist/model/TypesWalletConfigPriceType.js +0 -47
- package/dist/model/TypesWalletStatus.js +0 -47
- package/dist/model/TypesWalletTxReferenceType.js +0 -47
- package/dist/model/TypesWalletType.js +0 -41
- package/dist/model/TypesWindowSize.js +0 -83
package/dist/api/InvoicesApi.js
DELETED
|
@@ -1,419 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FlexPrice API
|
|
3
|
-
* FlexPrice API Service
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*
|
|
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
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Invoices service.
|
|
25
|
-
* @module api/InvoicesApi
|
|
26
|
-
* @version 1.0
|
|
27
|
-
*/
|
|
28
|
-
export default class InvoicesApi {
|
|
29
|
-
/**
|
|
30
|
-
* Constructs a new InvoicesApi.
|
|
31
|
-
* @alias module:api/InvoicesApi
|
|
32
|
-
* @class
|
|
33
|
-
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
34
|
-
* default to {@link module:ApiClient#instance} if unspecified.
|
|
35
|
-
*/
|
|
36
|
-
constructor(apiClient) {
|
|
37
|
-
this.apiClient = apiClient || ApiClient.instance;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Callback function to receive the result of the customersIdInvoicesSummaryGet operation.
|
|
42
|
-
* @callback module:api/InvoicesApi~customersIdInvoicesSummaryGetCallback
|
|
43
|
-
* @param {String} error Error message, if any.
|
|
44
|
-
* @param {module:model/DtoCustomerMultiCurrencyInvoiceSummary} data The data returned by the service call.
|
|
45
|
-
* @param {String} response The complete HTTP response.
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Get a customer invoice summary
|
|
50
|
-
* Get a customer invoice summary
|
|
51
|
-
* @param {String} id Customer ID
|
|
52
|
-
* @param {module:api/InvoicesApi~customersIdInvoicesSummaryGetCallback} callback The callback function, accepting three arguments: error, data, response
|
|
53
|
-
* data is of type: {@link module:model/DtoCustomerMultiCurrencyInvoiceSummary}
|
|
54
|
-
*/
|
|
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");
|
|
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
|
-
}
|
|
73
|
-
|
|
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
|
-
*/
|
|
81
|
-
|
|
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
|
-
}
|
|
135
|
-
|
|
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
|
-
*/
|
|
143
|
-
|
|
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");
|
|
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
|
-
}
|
|
171
|
-
|
|
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
|
-
*/
|
|
179
|
-
|
|
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");
|
|
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
|
-
}
|
|
205
|
-
|
|
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
|
-
*/
|
|
213
|
-
|
|
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");
|
|
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
|
-
}
|
|
241
|
-
|
|
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
|
-
*/
|
|
249
|
-
|
|
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");
|
|
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
|
-
}
|
|
280
|
-
|
|
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
|
-
*/
|
|
288
|
-
|
|
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");
|
|
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
|
-
}
|
|
319
|
-
|
|
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
|
-
*/
|
|
327
|
-
|
|
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");
|
|
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
|
-
}
|
|
355
|
-
|
|
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
|
-
*/
|
|
363
|
-
|
|
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");
|
|
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
|
-
}
|
|
387
|
-
|
|
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
|
-
*/
|
|
395
|
-
|
|
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");
|
|
408
|
-
}
|
|
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
|
-
}
|
package/dist/api/PaymentsApi.js
DELETED
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FlexPrice API
|
|
3
|
-
* FlexPrice API Service
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
import ApiClient from "../ApiClient";
|
|
15
|
-
import DtoCreatePaymentRequest from '../model/DtoCreatePaymentRequest';
|
|
16
|
-
import DtoListPaymentsResponse from '../model/DtoListPaymentsResponse';
|
|
17
|
-
import DtoPaymentResponse from '../model/DtoPaymentResponse';
|
|
18
|
-
import DtoUpdatePaymentRequest from '../model/DtoUpdatePaymentRequest';
|
|
19
|
-
import ErrorsErrorResponse from '../model/ErrorsErrorResponse';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Payments service.
|
|
23
|
-
* @module api/PaymentsApi
|
|
24
|
-
* @version 1.0
|
|
25
|
-
*/
|
|
26
|
-
export default class PaymentsApi {
|
|
27
|
-
/**
|
|
28
|
-
* Constructs a new PaymentsApi.
|
|
29
|
-
* @alias module:api/PaymentsApi
|
|
30
|
-
* @class
|
|
31
|
-
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
32
|
-
* default to {@link module:ApiClient#instance} if unspecified.
|
|
33
|
-
*/
|
|
34
|
-
constructor(apiClient) {
|
|
35
|
-
this.apiClient = apiClient || ApiClient.instance;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Callback function to receive the result of the paymentsGet operation.
|
|
40
|
-
* @callback module:api/PaymentsApi~paymentsGetCallback
|
|
41
|
-
* @param {String} error Error message, if any.
|
|
42
|
-
* @param {module:model/DtoListPaymentsResponse} data The data returned by the service call.
|
|
43
|
-
* @param {String} response The complete HTTP response.
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* List payments
|
|
48
|
-
* List payments with the specified filter
|
|
49
|
-
* @param {Object} opts Optional parameters
|
|
50
|
-
* @param {String} [currency]
|
|
51
|
-
* @param {String} [destinationId]
|
|
52
|
-
* @param {String} [destinationType]
|
|
53
|
-
* @param {String} [endTime]
|
|
54
|
-
* @param {String} [expand]
|
|
55
|
-
* @param {Number} [limit]
|
|
56
|
-
* @param {Number} [offset]
|
|
57
|
-
* @param {module:model/String} [order]
|
|
58
|
-
* @param {String} [paymentGateway]
|
|
59
|
-
* @param {Array.<String>} [paymentIds]
|
|
60
|
-
* @param {String} [paymentMethodType]
|
|
61
|
-
* @param {String} [paymentStatus]
|
|
62
|
-
* @param {String} [sort]
|
|
63
|
-
* @param {String} [startTime]
|
|
64
|
-
* @param {module:model/String} [status]
|
|
65
|
-
* @param {module:api/PaymentsApi~paymentsGetCallback} callback The callback function, accepting three arguments: error, data, response
|
|
66
|
-
* data is of type: {@link module:model/DtoListPaymentsResponse}
|
|
67
|
-
*/
|
|
68
|
-
paymentsGet(opts, callback) {
|
|
69
|
-
opts = opts || {};
|
|
70
|
-
let postBody = null;
|
|
71
|
-
let pathParams = {};
|
|
72
|
-
let queryParams = {
|
|
73
|
-
'currency': opts['currency'],
|
|
74
|
-
'destination_id': opts['destinationId'],
|
|
75
|
-
'destination_type': opts['destinationType'],
|
|
76
|
-
'end_time': opts['endTime'],
|
|
77
|
-
'expand': opts['expand'],
|
|
78
|
-
'limit': opts['limit'],
|
|
79
|
-
'offset': opts['offset'],
|
|
80
|
-
'order': opts['order'],
|
|
81
|
-
'payment_gateway': opts['paymentGateway'],
|
|
82
|
-
'payment_ids': this.apiClient.buildCollectionParam(opts['paymentIds'], 'csv'),
|
|
83
|
-
'payment_method_type': opts['paymentMethodType'],
|
|
84
|
-
'payment_status': opts['paymentStatus'],
|
|
85
|
-
'sort': opts['sort'],
|
|
86
|
-
'start_time': opts['startTime'],
|
|
87
|
-
'status': opts['status']
|
|
88
|
-
};
|
|
89
|
-
let headerParams = {};
|
|
90
|
-
let formParams = {};
|
|
91
|
-
let authNames = ['ApiKeyAuth'];
|
|
92
|
-
let contentTypes = [];
|
|
93
|
-
let accepts = ['application/json'];
|
|
94
|
-
let returnType = DtoListPaymentsResponse;
|
|
95
|
-
return this.apiClient.callApi('/payments', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Callback function to receive the result of the paymentsIdDelete operation.
|
|
100
|
-
* @callback module:api/PaymentsApi~paymentsIdDeleteCallback
|
|
101
|
-
* @param {String} error Error message, if any.
|
|
102
|
-
* @param {Object.<String, {String: Object}>} data The data returned by the service call.
|
|
103
|
-
* @param {String} response The complete HTTP response.
|
|
104
|
-
*/
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Delete a payment
|
|
108
|
-
* Delete a payment
|
|
109
|
-
* @param {String} id Payment ID
|
|
110
|
-
* @param {module:api/PaymentsApi~paymentsIdDeleteCallback} callback The callback function, accepting three arguments: error, data, response
|
|
111
|
-
* data is of type: {@link Object.<String, {String: Object}>}
|
|
112
|
-
*/
|
|
113
|
-
paymentsIdDelete(id, callback) {
|
|
114
|
-
let postBody = null;
|
|
115
|
-
// verify the required parameter 'id' is set
|
|
116
|
-
if (id === undefined || id === null) {
|
|
117
|
-
throw new Error("Missing the required parameter 'id' when calling paymentsIdDelete");
|
|
118
|
-
}
|
|
119
|
-
let pathParams = {
|
|
120
|
-
'id': id
|
|
121
|
-
};
|
|
122
|
-
let queryParams = {};
|
|
123
|
-
let headerParams = {};
|
|
124
|
-
let formParams = {};
|
|
125
|
-
let authNames = ['ApiKeyAuth'];
|
|
126
|
-
let contentTypes = [];
|
|
127
|
-
let accepts = ['application/json'];
|
|
128
|
-
let returnType = {
|
|
129
|
-
'String': Object
|
|
130
|
-
};
|
|
131
|
-
return this.apiClient.callApi('/payments/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Callback function to receive the result of the paymentsIdGet operation.
|
|
136
|
-
* @callback module:api/PaymentsApi~paymentsIdGetCallback
|
|
137
|
-
* @param {String} error Error message, if any.
|
|
138
|
-
* @param {module:model/DtoPaymentResponse} data The data returned by the service call.
|
|
139
|
-
* @param {String} response The complete HTTP response.
|
|
140
|
-
*/
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Get a payment by ID
|
|
144
|
-
* Get a payment by ID
|
|
145
|
-
* @param {String} id Payment ID
|
|
146
|
-
* @param {module:api/PaymentsApi~paymentsIdGetCallback} callback The callback function, accepting three arguments: error, data, response
|
|
147
|
-
* data is of type: {@link module:model/DtoPaymentResponse}
|
|
148
|
-
*/
|
|
149
|
-
paymentsIdGet(id, callback) {
|
|
150
|
-
let postBody = null;
|
|
151
|
-
// verify the required parameter 'id' is set
|
|
152
|
-
if (id === undefined || id === null) {
|
|
153
|
-
throw new Error("Missing the required parameter 'id' when calling paymentsIdGet");
|
|
154
|
-
}
|
|
155
|
-
let pathParams = {
|
|
156
|
-
'id': id
|
|
157
|
-
};
|
|
158
|
-
let queryParams = {};
|
|
159
|
-
let headerParams = {};
|
|
160
|
-
let formParams = {};
|
|
161
|
-
let authNames = ['ApiKeyAuth'];
|
|
162
|
-
let contentTypes = [];
|
|
163
|
-
let accepts = ['application/json'];
|
|
164
|
-
let returnType = DtoPaymentResponse;
|
|
165
|
-
return this.apiClient.callApi('/payments/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Callback function to receive the result of the paymentsIdProcessPost operation.
|
|
170
|
-
* @callback module:api/PaymentsApi~paymentsIdProcessPostCallback
|
|
171
|
-
* @param {String} error Error message, if any.
|
|
172
|
-
* @param {module:model/DtoPaymentResponse} data The data returned by the service call.
|
|
173
|
-
* @param {String} response The complete HTTP response.
|
|
174
|
-
*/
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Process a payment
|
|
178
|
-
* Process a payment
|
|
179
|
-
* @param {String} id Payment ID
|
|
180
|
-
* @param {module:api/PaymentsApi~paymentsIdProcessPostCallback} callback The callback function, accepting three arguments: error, data, response
|
|
181
|
-
* data is of type: {@link module:model/DtoPaymentResponse}
|
|
182
|
-
*/
|
|
183
|
-
paymentsIdProcessPost(id, callback) {
|
|
184
|
-
let postBody = null;
|
|
185
|
-
// verify the required parameter 'id' is set
|
|
186
|
-
if (id === undefined || id === null) {
|
|
187
|
-
throw new Error("Missing the required parameter 'id' when calling paymentsIdProcessPost");
|
|
188
|
-
}
|
|
189
|
-
let pathParams = {
|
|
190
|
-
'id': id
|
|
191
|
-
};
|
|
192
|
-
let queryParams = {};
|
|
193
|
-
let headerParams = {};
|
|
194
|
-
let formParams = {};
|
|
195
|
-
let authNames = ['ApiKeyAuth'];
|
|
196
|
-
let contentTypes = [];
|
|
197
|
-
let accepts = ['application/json'];
|
|
198
|
-
let returnType = DtoPaymentResponse;
|
|
199
|
-
return this.apiClient.callApi('/payments/{id}/process', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Callback function to receive the result of the paymentsIdPut operation.
|
|
204
|
-
* @callback module:api/PaymentsApi~paymentsIdPutCallback
|
|
205
|
-
* @param {String} error Error message, if any.
|
|
206
|
-
* @param {module:model/DtoPaymentResponse} data The data returned by the service call.
|
|
207
|
-
* @param {String} response The complete HTTP response.
|
|
208
|
-
*/
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Update a payment
|
|
212
|
-
* Update a payment with the specified configuration
|
|
213
|
-
* @param {String} id Payment ID
|
|
214
|
-
* @param {module:model/DtoUpdatePaymentRequest} payment Payment configuration
|
|
215
|
-
* @param {module:api/PaymentsApi~paymentsIdPutCallback} callback The callback function, accepting three arguments: error, data, response
|
|
216
|
-
* data is of type: {@link module:model/DtoPaymentResponse}
|
|
217
|
-
*/
|
|
218
|
-
paymentsIdPut(id, payment, callback) {
|
|
219
|
-
let postBody = payment;
|
|
220
|
-
// verify the required parameter 'id' is set
|
|
221
|
-
if (id === undefined || id === null) {
|
|
222
|
-
throw new Error("Missing the required parameter 'id' when calling paymentsIdPut");
|
|
223
|
-
}
|
|
224
|
-
// verify the required parameter 'payment' is set
|
|
225
|
-
if (payment === undefined || payment === null) {
|
|
226
|
-
throw new Error("Missing the required parameter 'payment' when calling paymentsIdPut");
|
|
227
|
-
}
|
|
228
|
-
let pathParams = {
|
|
229
|
-
'id': id
|
|
230
|
-
};
|
|
231
|
-
let queryParams = {};
|
|
232
|
-
let headerParams = {};
|
|
233
|
-
let formParams = {};
|
|
234
|
-
let authNames = ['ApiKeyAuth'];
|
|
235
|
-
let contentTypes = ['application/json'];
|
|
236
|
-
let accepts = ['application/json'];
|
|
237
|
-
let returnType = DtoPaymentResponse;
|
|
238
|
-
return this.apiClient.callApi('/payments/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* Callback function to receive the result of the paymentsPost operation.
|
|
243
|
-
* @callback module:api/PaymentsApi~paymentsPostCallback
|
|
244
|
-
* @param {String} error Error message, if any.
|
|
245
|
-
* @param {module:model/DtoPaymentResponse} data The data returned by the service call.
|
|
246
|
-
* @param {String} response The complete HTTP response.
|
|
247
|
-
*/
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* Create a new payment
|
|
251
|
-
* Create a new payment with the specified configuration
|
|
252
|
-
* @param {module:model/DtoCreatePaymentRequest} payment Payment configuration
|
|
253
|
-
* @param {module:api/PaymentsApi~paymentsPostCallback} callback The callback function, accepting three arguments: error, data, response
|
|
254
|
-
* data is of type: {@link module:model/DtoPaymentResponse}
|
|
255
|
-
*/
|
|
256
|
-
paymentsPost(payment, callback) {
|
|
257
|
-
let postBody = payment;
|
|
258
|
-
// verify the required parameter 'payment' is set
|
|
259
|
-
if (payment === undefined || payment === null) {
|
|
260
|
-
throw new Error("Missing the required parameter 'payment' when calling paymentsPost");
|
|
261
|
-
}
|
|
262
|
-
let pathParams = {};
|
|
263
|
-
let queryParams = {};
|
|
264
|
-
let headerParams = {};
|
|
265
|
-
let formParams = {};
|
|
266
|
-
let authNames = ['ApiKeyAuth'];
|
|
267
|
-
let contentTypes = ['application/json'];
|
|
268
|
-
let accepts = ['application/json'];
|
|
269
|
-
let returnType = DtoPaymentResponse;
|
|
270
|
-
return this.apiClient.callApi('/payments', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
271
|
-
}
|
|
272
|
-
}
|