@emilgroup/payment-sdk 1.0.0 → 1.4.1-beta.0
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/.openapi-generator/FILES +15 -30
- package/README.md +2 -2
- package/api/bank-accounts-api.ts +21 -25
- package/api/bank-transaction-api.ts +657 -0
- package/api/default-api.ts +1 -1
- package/api/payment-methods-api.ts +42 -46
- package/api/payment-reminders-api.ts +17 -19
- package/api/payment-setup-api.ts +29 -37
- package/api/payments-api.ts +30 -32
- package/api/refunds-api.ts +462 -0
- package/api/tenant-bank-account-api.ts +651 -0
- package/api/webhooks-api.ts +1 -1
- package/api.ts +7 -3
- package/base.ts +2 -1
- package/common.ts +2 -2
- package/configuration.ts +1 -1
- package/dist/api/bank-accounts-api.d.ts +17 -19
- package/dist/api/bank-accounts-api.js +16 -16
- package/dist/api/bank-transaction-api.d.ts +371 -0
- package/dist/api/bank-transaction-api.js +632 -0
- package/dist/api/default-api.d.ts +1 -1
- package/dist/api/default-api.js +1 -1
- package/dist/api/payment-methods-api.d.ts +32 -36
- package/dist/api/payment-methods-api.js +32 -28
- package/dist/api/payment-reminders-api.d.ts +21 -22
- package/dist/api/payment-reminders-api.js +8 -8
- package/dist/api/payment-setup-api.d.ts +19 -23
- package/dist/api/payment-setup-api.js +25 -25
- package/dist/api/payments-api.d.ts +26 -29
- package/dist/api/payments-api.js +20 -16
- package/dist/api/refunds-api.d.ts +260 -0
- package/dist/api/refunds-api.js +443 -0
- package/dist/api/tenant-bank-account-api.d.ts +361 -0
- package/dist/api/tenant-bank-account-api.js +616 -0
- package/dist/api/webhooks-api.d.ts +1 -1
- package/dist/api/webhooks-api.js +1 -1
- package/dist/api.d.ts +4 -2
- package/dist/api.js +4 -2
- package/dist/base.d.ts +1 -1
- package/dist/base.js +2 -1
- package/dist/common.d.ts +2 -2
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/models/bank-transaction-response-class.d.ts +122 -0
- package/dist/models/{bank-account-class.js → bank-transaction-response-class.js} +1 -1
- package/dist/models/create-payment-reminder-request-dto.d.ts +1 -1
- package/dist/models/create-payment-reminder-request-dto.js +1 -1
- package/dist/models/create-payment-request-dto.d.ts +3 -3
- package/dist/models/create-payment-request-dto.js +1 -1
- package/dist/models/{sepa-direct-dto.d.ts → create-refund-request-dto.d.ts} +6 -6
- package/dist/models/{complete-braintree-payment-setup-request-dto.js → create-refund-request-dto.js} +1 -1
- package/dist/models/{validate-pspconfig-response-class.d.ts → create-refund-response-class.d.ts} +8 -7
- package/dist/models/{billing-profile-dto.js → create-refund-response-class.js} +1 -1
- package/dist/models/{billing-profile-limited-response-dto.d.ts → create-tenant-bank-account-request-dto.d.ts} +15 -27
- package/dist/models/{billing-profile-limited-response-dto.js → create-tenant-bank-account-request-dto.js} +1 -1
- package/dist/models/deactivate-payment-reminder-request-dto.d.ts +1 -1
- package/dist/models/deactivate-payment-reminder-request-dto.js +1 -1
- package/dist/models/{get-payment-method-response-class.d.ts → get-bank-transactions-response-class.d.ts} +8 -8
- package/dist/models/get-bank-transactions-response-class.js +15 -0
- package/dist/models/{get-payment-response-class.d.ts → get-refund-response-class.d.ts} +8 -8
- package/dist/models/get-refund-response-class.js +15 -0
- package/dist/models/get-request-dto.d.ts +2 -2
- package/dist/models/get-request-dto.js +1 -1
- package/dist/models/{create-bank-account-request-dto.d.ts → get-tenant-bank-account-response-class.d.ts} +8 -13
- package/dist/models/get-tenant-bank-account-response-class.js +15 -0
- package/dist/models/index.d.ts +12 -29
- package/dist/models/index.js +12 -29
- package/dist/models/inline-response200.d.ts +7 -7
- package/dist/models/inline-response200.js +1 -1
- package/dist/models/inline-response503.d.ts +7 -7
- package/dist/models/inline-response503.js +1 -1
- package/dist/models/{list-payment-methods-response-class.d.ts → list-bank-transactions-response-class.d.ts} +9 -9
- package/dist/models/list-bank-transactions-response-class.js +15 -0
- package/dist/models/{list-payments-response-class.d.ts → list-refunds-response-class.d.ts} +9 -9
- package/dist/models/list-refunds-response-class.js +15 -0
- package/dist/models/refund-class.d.ts +104 -0
- package/dist/models/refund-class.js +28 -0
- package/dist/models/{payment-method-class.d.ts → tenant-bank-account-response-class.d.ts} +25 -19
- package/dist/models/tenant-bank-account-response-class.js +15 -0
- package/dist/models/transaction-class.d.ts +1 -1
- package/dist/models/transaction-class.js +1 -1
- package/dist/models/{symphony-profile-limited-response-dto.d.ts → update-tenant-bank-account-rest-request-dto.d.ts} +12 -18
- package/dist/models/update-tenant-bank-account-rest-request-dto.js +15 -0
- package/dist/models/validate-pspconfig-request-dto.d.ts +2 -9
- package/dist/models/validate-pspconfig-request-dto.js +1 -8
- package/git_push.sh +1 -1
- package/index.ts +1 -1
- package/models/bank-transaction-response-class.ts +128 -0
- package/models/create-payment-reminder-request-dto.ts +1 -1
- package/models/create-payment-request-dto.ts +3 -3
- package/models/{sepa-direct-dto.ts → create-refund-request-dto.ts} +6 -6
- package/models/{validate-pspconfig-response-class.ts → create-refund-response-class.ts} +8 -7
- package/models/{billing-profile-limited-response-dto.ts → create-tenant-bank-account-request-dto.ts} +15 -27
- package/models/deactivate-payment-reminder-request-dto.ts +1 -1
- package/models/{get-payment-method-response-class.ts → get-bank-transactions-response-class.ts} +8 -8
- package/models/{get-payment-response-class.ts → get-refund-response-class.ts} +8 -8
- package/models/get-request-dto.ts +2 -2
- package/models/{create-bank-account-request-dto.ts → get-tenant-bank-account-response-class.ts} +8 -13
- package/models/index.ts +12 -29
- package/models/inline-response200.ts +7 -7
- package/models/inline-response503.ts +7 -7
- package/models/{list-payment-methods-response-class.ts → list-bank-transactions-response-class.ts} +9 -9
- package/models/{list-payments-response-class.ts → list-refunds-response-class.ts} +9 -9
- package/models/refund-class.ts +114 -0
- package/models/{payment-method-class.ts → tenant-bank-account-response-class.ts} +25 -19
- package/models/transaction-class.ts +1 -1
- package/models/{symphony-profile-limited-response-dto.ts → update-tenant-bank-account-rest-request-dto.ts} +12 -18
- package/models/validate-pspconfig-request-dto.ts +2 -12
- package/package.json +1 -2
- package/api/payment-service-providers-api.ts +0 -161
- package/dist/api/payment-service-providers-api.d.ts +0 -93
- package/dist/api/payment-service-providers-api.js +0 -220
- package/dist/models/bank-account-class.d.ts +0 -54
- package/dist/models/billing-profile-dto.d.ts +0 -38
- package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +0 -48
- package/dist/models/complete-payment-setup-request-dto.d.ts +0 -32
- package/dist/models/complete-payment-setup-request-dto.js +0 -15
- package/dist/models/complete-payment-setup-response-class.d.ts +0 -25
- package/dist/models/complete-payment-setup-response-class.js +0 -15
- package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +0 -60
- package/dist/models/complete-stripe-payment-setup-request-dto.js +0 -15
- package/dist/models/create-bank-account-request-dto.js +0 -15
- package/dist/models/create-payment-method-response-class.d.ts +0 -25
- package/dist/models/create-payment-method-response-class.js +0 -15
- package/dist/models/create-payment-response-class.d.ts +0 -25
- package/dist/models/create-payment-response-class.js +0 -15
- package/dist/models/create-psp-payment-method-request-dto.d.ts +0 -61
- package/dist/models/create-psp-payment-method-request-dto.js +0 -32
- package/dist/models/get-payment-method-response-class.js +0 -15
- package/dist/models/get-payment-response-class.js +0 -15
- package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +0 -30
- package/dist/models/initiate-braintree-payment-setup-request-dto.js +0 -15
- package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +0 -24
- package/dist/models/initiate-braintree-payment-setup-response-class.js +0 -15
- package/dist/models/initiate-payment-setup-request-dto.d.ts +0 -44
- package/dist/models/initiate-payment-setup-request-dto.js +0 -15
- package/dist/models/initiate-payment-setup-response-class.d.ts +0 -32
- package/dist/models/initiate-payment-setup-response-class.js +0 -15
- package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +0 -30
- package/dist/models/initiate-stripe-payment-setup-request-dto.js +0 -15
- package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +0 -30
- package/dist/models/initiate-stripe-payment-setup-response-class.js +0 -15
- package/dist/models/list-bank-accounts-response-class.d.ts +0 -31
- package/dist/models/list-bank-accounts-response-class.js +0 -15
- package/dist/models/list-payment-methods-response-class.js +0 -15
- package/dist/models/list-payment-reminders-response-class.d.ts +0 -31
- package/dist/models/list-payment-reminders-response-class.js +0 -15
- package/dist/models/list-payments-response-class.js +0 -15
- package/dist/models/payment-class.d.ts +0 -103
- package/dist/models/payment-class.js +0 -15
- package/dist/models/payment-method-class.js +0 -15
- package/dist/models/payment-reminder-class.d.ts +0 -112
- package/dist/models/payment-reminder-class.js +0 -36
- package/dist/models/sepa-direct-dto.js +0 -15
- package/dist/models/symphony-profile-limited-response-dto.js +0 -15
- package/dist/models/validate-pspconfig-response-class.js +0 -15
- package/models/bank-account-class.ts +0 -60
- package/models/billing-profile-dto.ts +0 -44
- package/models/complete-braintree-payment-setup-request-dto.ts +0 -54
- package/models/complete-payment-setup-request-dto.ts +0 -38
- package/models/complete-payment-setup-response-class.ts +0 -31
- package/models/complete-stripe-payment-setup-request-dto.ts +0 -66
- package/models/create-payment-method-response-class.ts +0 -31
- package/models/create-payment-response-class.ts +0 -31
- package/models/create-psp-payment-method-request-dto.ts +0 -70
- package/models/initiate-braintree-payment-setup-request-dto.ts +0 -36
- package/models/initiate-braintree-payment-setup-response-class.ts +0 -30
- package/models/initiate-payment-setup-request-dto.ts +0 -50
- package/models/initiate-payment-setup-response-class.ts +0 -38
- package/models/initiate-stripe-payment-setup-request-dto.ts +0 -36
- package/models/initiate-stripe-payment-setup-response-class.ts +0 -36
- package/models/list-bank-accounts-response-class.ts +0 -37
- package/models/list-payment-reminders-response-class.ts +0 -37
- package/models/payment-class.ts +0 -109
- package/models/payment-reminder-class.ts +0 -122
package/api/payments-api.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0
|
|
8
|
-
* Contact:
|
|
8
|
+
* Contact: z
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
11
|
* https://openapi-generator.tech
|
|
@@ -22,12 +22,6 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
|
|
|
22
22
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
import { CreatePaymentRequestDto } from '../models';
|
|
25
|
-
// @ts-ignore
|
|
26
|
-
import { CreatePaymentResponseClass } from '../models';
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
import { GetPaymentResponseClass } from '../models';
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
import { ListPaymentsResponseClass } from '../models';
|
|
31
25
|
/**
|
|
32
26
|
* PaymentsApi - axios parameter creator
|
|
33
27
|
* @export
|
|
@@ -92,15 +86,19 @@ export const PaymentsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
92
86
|
* Retrieves the details of a payment that was previously created. Supply the unique payment code that was returned when you created the payment and Emil Api will return the corresponding payment information.
|
|
93
87
|
* @summary Retrieve a payment
|
|
94
88
|
* @param {string} code Unique identifier for the object.
|
|
89
|
+
* @param {string} expand Fields to expand response by
|
|
90
|
+
* @param {string} expand2 Fields to expand response by
|
|
95
91
|
* @param {string} [authorization] Bearer Token
|
|
96
|
-
* @param {string} [expand] Fields to expand response by
|
|
97
|
-
* @param {string} [expand2] Fields to expand response by
|
|
98
92
|
* @param {*} [options] Override http request option.
|
|
99
93
|
* @throws {RequiredError}
|
|
100
94
|
*/
|
|
101
|
-
getPayment: async (code: string,
|
|
95
|
+
getPayment: async (code: string, expand: string, expand2: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
102
96
|
// verify required parameter 'code' is not null or undefined
|
|
103
97
|
assertParamExists('getPayment', 'code', code)
|
|
98
|
+
// verify required parameter 'expand' is not null or undefined
|
|
99
|
+
assertParamExists('getPayment', 'expand', expand)
|
|
100
|
+
// verify required parameter 'expand2' is not null or undefined
|
|
101
|
+
assertParamExists('getPayment', 'expand2', expand2)
|
|
104
102
|
const localVarPath = `/paymentservice/v1/payments/{code}`;
|
|
105
103
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
106
104
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -150,7 +148,7 @@ export const PaymentsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
150
148
|
* Returns a list of payments you’ve previously created. The payments are returned in sorted order, with the oldest payment appearing first. For more information about pagination, read the Pagination documentation.
|
|
151
149
|
* @summary List payments
|
|
152
150
|
* @param {string} [authorization] Bearer Token
|
|
153
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and
|
|
151
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
154
152
|
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
155
153
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
156
154
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
@@ -236,7 +234,7 @@ export const PaymentsApiFp = function(configuration?: Configuration) {
|
|
|
236
234
|
* @param {*} [options] Override http request option.
|
|
237
235
|
* @throws {RequiredError}
|
|
238
236
|
*/
|
|
239
|
-
async createPayment(idempotencyKey: string, createPaymentRequestDto: CreatePaymentRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
237
|
+
async createPayment(idempotencyKey: string, createPaymentRequestDto: CreatePaymentRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
240
238
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createPayment(idempotencyKey, createPaymentRequestDto, authorization, options);
|
|
241
239
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
242
240
|
},
|
|
@@ -244,21 +242,21 @@ export const PaymentsApiFp = function(configuration?: Configuration) {
|
|
|
244
242
|
* Retrieves the details of a payment that was previously created. Supply the unique payment code that was returned when you created the payment and Emil Api will return the corresponding payment information.
|
|
245
243
|
* @summary Retrieve a payment
|
|
246
244
|
* @param {string} code Unique identifier for the object.
|
|
245
|
+
* @param {string} expand Fields to expand response by
|
|
246
|
+
* @param {string} expand2 Fields to expand response by
|
|
247
247
|
* @param {string} [authorization] Bearer Token
|
|
248
|
-
* @param {string} [expand] Fields to expand response by
|
|
249
|
-
* @param {string} [expand2] Fields to expand response by
|
|
250
248
|
* @param {*} [options] Override http request option.
|
|
251
249
|
* @throws {RequiredError}
|
|
252
250
|
*/
|
|
253
|
-
async getPayment(code: string,
|
|
254
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getPayment(code,
|
|
251
|
+
async getPayment(code: string, expand: string, expand2: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
252
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPayment(code, expand, expand2, authorization, options);
|
|
255
253
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
256
254
|
},
|
|
257
255
|
/**
|
|
258
256
|
* Returns a list of payments you’ve previously created. The payments are returned in sorted order, with the oldest payment appearing first. For more information about pagination, read the Pagination documentation.
|
|
259
257
|
* @summary List payments
|
|
260
258
|
* @param {string} [authorization] Bearer Token
|
|
261
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and
|
|
259
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
262
260
|
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
263
261
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
264
262
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
@@ -267,7 +265,7 @@ export const PaymentsApiFp = function(configuration?: Configuration) {
|
|
|
267
265
|
* @param {*} [options] Override http request option.
|
|
268
266
|
* @throws {RequiredError}
|
|
269
267
|
*/
|
|
270
|
-
async listPayments(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
268
|
+
async listPayments(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
271
269
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listPayments(authorization, pageSize, pageToken, filter, search, order, expand, options);
|
|
272
270
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
273
271
|
},
|
|
@@ -290,27 +288,27 @@ export const PaymentsApiFactory = function (configuration?: Configuration, baseP
|
|
|
290
288
|
* @param {*} [options] Override http request option.
|
|
291
289
|
* @throws {RequiredError}
|
|
292
290
|
*/
|
|
293
|
-
createPayment(idempotencyKey: string, createPaymentRequestDto: CreatePaymentRequestDto, authorization?: string, options?: any): AxiosPromise<
|
|
291
|
+
createPayment(idempotencyKey: string, createPaymentRequestDto: CreatePaymentRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
|
|
294
292
|
return localVarFp.createPayment(idempotencyKey, createPaymentRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
295
293
|
},
|
|
296
294
|
/**
|
|
297
295
|
* Retrieves the details of a payment that was previously created. Supply the unique payment code that was returned when you created the payment and Emil Api will return the corresponding payment information.
|
|
298
296
|
* @summary Retrieve a payment
|
|
299
297
|
* @param {string} code Unique identifier for the object.
|
|
298
|
+
* @param {string} expand Fields to expand response by
|
|
299
|
+
* @param {string} expand2 Fields to expand response by
|
|
300
300
|
* @param {string} [authorization] Bearer Token
|
|
301
|
-
* @param {string} [expand] Fields to expand response by
|
|
302
|
-
* @param {string} [expand2] Fields to expand response by
|
|
303
301
|
* @param {*} [options] Override http request option.
|
|
304
302
|
* @throws {RequiredError}
|
|
305
303
|
*/
|
|
306
|
-
getPayment(code: string,
|
|
307
|
-
return localVarFp.getPayment(code,
|
|
304
|
+
getPayment(code: string, expand: string, expand2: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
305
|
+
return localVarFp.getPayment(code, expand, expand2, authorization, options).then((request) => request(axios, basePath));
|
|
308
306
|
},
|
|
309
307
|
/**
|
|
310
308
|
* Returns a list of payments you’ve previously created. The payments are returned in sorted order, with the oldest payment appearing first. For more information about pagination, read the Pagination documentation.
|
|
311
309
|
* @summary List payments
|
|
312
310
|
* @param {string} [authorization] Bearer Token
|
|
313
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and
|
|
311
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
314
312
|
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
315
313
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
316
314
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
@@ -319,7 +317,7 @@ export const PaymentsApiFactory = function (configuration?: Configuration, baseP
|
|
|
319
317
|
* @param {*} [options] Override http request option.
|
|
320
318
|
* @throws {RequiredError}
|
|
321
319
|
*/
|
|
322
|
-
listPayments(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<
|
|
320
|
+
listPayments(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<void> {
|
|
323
321
|
return localVarFp.listPayments(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
|
|
324
322
|
},
|
|
325
323
|
};
|
|
@@ -367,25 +365,25 @@ export interface PaymentsApiGetPaymentRequest {
|
|
|
367
365
|
readonly code: string
|
|
368
366
|
|
|
369
367
|
/**
|
|
370
|
-
*
|
|
368
|
+
* Fields to expand response by
|
|
371
369
|
* @type {string}
|
|
372
370
|
* @memberof PaymentsApiGetPayment
|
|
373
371
|
*/
|
|
374
|
-
readonly
|
|
372
|
+
readonly expand: string
|
|
375
373
|
|
|
376
374
|
/**
|
|
377
375
|
* Fields to expand response by
|
|
378
376
|
* @type {string}
|
|
379
377
|
* @memberof PaymentsApiGetPayment
|
|
380
378
|
*/
|
|
381
|
-
readonly
|
|
379
|
+
readonly expand2: string
|
|
382
380
|
|
|
383
381
|
/**
|
|
384
|
-
*
|
|
382
|
+
* Bearer Token
|
|
385
383
|
* @type {string}
|
|
386
384
|
* @memberof PaymentsApiGetPayment
|
|
387
385
|
*/
|
|
388
|
-
readonly
|
|
386
|
+
readonly authorization?: string
|
|
389
387
|
}
|
|
390
388
|
|
|
391
389
|
/**
|
|
@@ -402,7 +400,7 @@ export interface PaymentsApiListPaymentsRequest {
|
|
|
402
400
|
readonly authorization?: string
|
|
403
401
|
|
|
404
402
|
/**
|
|
405
|
-
* A limit on the number of objects to be returned. Limit ranges between 1 and
|
|
403
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
406
404
|
* @type {any}
|
|
407
405
|
* @memberof PaymentsApiListPayments
|
|
408
406
|
*/
|
|
@@ -472,7 +470,7 @@ export class PaymentsApi extends BaseAPI {
|
|
|
472
470
|
* @memberof PaymentsApi
|
|
473
471
|
*/
|
|
474
472
|
public getPayment(requestParameters: PaymentsApiGetPaymentRequest, options?: AxiosRequestConfig) {
|
|
475
|
-
return PaymentsApiFp(this.configuration).getPayment(requestParameters.code, requestParameters.
|
|
473
|
+
return PaymentsApiFp(this.configuration).getPayment(requestParameters.code, requestParameters.expand, requestParameters.expand2, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
476
474
|
}
|
|
477
475
|
|
|
478
476
|
/**
|
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Emil Payment Service
|
|
5
|
+
* This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
* Contact: z
|
|
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
|
+
|
|
15
|
+
|
|
16
|
+
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
17
|
+
import { Configuration } from '../configuration';
|
|
18
|
+
// Some imports not used depending on template conditions
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import { CreateRefundRequestDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { CreateRefundResponseClass } from '../models';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { GetRefundResponseClass } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
import { ListRefundsResponseClass } from '../models';
|
|
31
|
+
/**
|
|
32
|
+
* RefundsApi - axios parameter creator
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export const RefundsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
36
|
+
return {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @param {CreateRefundRequestDto} createRefundRequestDto
|
|
40
|
+
* @param {string} [authorization] Bearer Token
|
|
41
|
+
* @param {*} [options] Override http request option.
|
|
42
|
+
* @throws {RequiredError}
|
|
43
|
+
*/
|
|
44
|
+
createRefund: async (createRefundRequestDto: CreateRefundRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
45
|
+
// verify required parameter 'createRefundRequestDto' is not null or undefined
|
|
46
|
+
assertParamExists('createRefund', 'createRefundRequestDto', createRefundRequestDto)
|
|
47
|
+
const localVarPath = `/paymentservice/v1/refunds`;
|
|
48
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
49
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
50
|
+
let baseOptions;
|
|
51
|
+
let baseAccessToken;
|
|
52
|
+
if (configuration) {
|
|
53
|
+
baseOptions = configuration.baseOptions;
|
|
54
|
+
baseAccessToken = configuration.accessToken;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
58
|
+
const localVarHeaderParameter = {} as any;
|
|
59
|
+
const localVarQueryParameter = {} as any;
|
|
60
|
+
|
|
61
|
+
// authentication bearer required
|
|
62
|
+
// http bearer authentication required
|
|
63
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
64
|
+
|
|
65
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
66
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
72
|
+
|
|
73
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
74
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
75
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
76
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createRefundRequestDto, localVarRequestOptions, configuration)
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
url: toPathString(localVarUrlObj),
|
|
80
|
+
options: localVarRequestOptions,
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @param {string} code
|
|
86
|
+
* @param {string} code2 Unique identifier for the object.
|
|
87
|
+
* @param {string} expand Fields to expand response by
|
|
88
|
+
* @param {string} [authorization] Bearer Token
|
|
89
|
+
* @param {*} [options] Override http request option.
|
|
90
|
+
* @throws {RequiredError}
|
|
91
|
+
*/
|
|
92
|
+
getRefund: async (code: string, code2: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
93
|
+
// verify required parameter 'code' is not null or undefined
|
|
94
|
+
assertParamExists('getRefund', 'code', code)
|
|
95
|
+
// verify required parameter 'code2' is not null or undefined
|
|
96
|
+
assertParamExists('getRefund', 'code2', code2)
|
|
97
|
+
// verify required parameter 'expand' is not null or undefined
|
|
98
|
+
assertParamExists('getRefund', 'expand', expand)
|
|
99
|
+
const localVarPath = `/paymentservice/v1/refunds/{code}`
|
|
100
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
101
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
102
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
103
|
+
let baseOptions;
|
|
104
|
+
let baseAccessToken;
|
|
105
|
+
if (configuration) {
|
|
106
|
+
baseOptions = configuration.baseOptions;
|
|
107
|
+
baseAccessToken = configuration.accessToken;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
111
|
+
const localVarHeaderParameter = {} as any;
|
|
112
|
+
const localVarQueryParameter = {} as any;
|
|
113
|
+
|
|
114
|
+
// authentication bearer required
|
|
115
|
+
// http bearer authentication required
|
|
116
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
117
|
+
|
|
118
|
+
if (code2 !== undefined) {
|
|
119
|
+
localVarQueryParameter['code'] = code2;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (expand !== undefined) {
|
|
123
|
+
localVarQueryParameter['expand'] = expand;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
127
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
133
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
134
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
135
|
+
|
|
136
|
+
return {
|
|
137
|
+
url: toPathString(localVarUrlObj),
|
|
138
|
+
options: localVarRequestOptions,
|
|
139
|
+
};
|
|
140
|
+
},
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
* @param {string} [authorization] Bearer Token
|
|
144
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
145
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
146
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
147
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
148
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
149
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
150
|
+
* @param {*} [options] Override http request option.
|
|
151
|
+
* @throws {RequiredError}
|
|
152
|
+
*/
|
|
153
|
+
listRefunds: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
154
|
+
const localVarPath = `/paymentservice/v1/refunds`;
|
|
155
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
156
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
157
|
+
let baseOptions;
|
|
158
|
+
let baseAccessToken;
|
|
159
|
+
if (configuration) {
|
|
160
|
+
baseOptions = configuration.baseOptions;
|
|
161
|
+
baseAccessToken = configuration.accessToken;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
165
|
+
const localVarHeaderParameter = {} as any;
|
|
166
|
+
const localVarQueryParameter = {} as any;
|
|
167
|
+
|
|
168
|
+
// authentication bearer required
|
|
169
|
+
// http bearer authentication required
|
|
170
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
171
|
+
|
|
172
|
+
if (pageSize !== undefined) {
|
|
173
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (pageToken !== undefined) {
|
|
177
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
if (filter !== undefined) {
|
|
181
|
+
localVarQueryParameter['filter'] = filter;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (search !== undefined) {
|
|
185
|
+
localVarQueryParameter['search'] = search;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (order !== undefined) {
|
|
189
|
+
localVarQueryParameter['order'] = order;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (expand !== undefined) {
|
|
193
|
+
localVarQueryParameter['expand'] = expand;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
197
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
203
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
204
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
205
|
+
|
|
206
|
+
return {
|
|
207
|
+
url: toPathString(localVarUrlObj),
|
|
208
|
+
options: localVarRequestOptions,
|
|
209
|
+
};
|
|
210
|
+
},
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* RefundsApi - functional programming interface
|
|
216
|
+
* @export
|
|
217
|
+
*/
|
|
218
|
+
export const RefundsApiFp = function(configuration?: Configuration) {
|
|
219
|
+
const localVarAxiosParamCreator = RefundsApiAxiosParamCreator(configuration)
|
|
220
|
+
return {
|
|
221
|
+
/**
|
|
222
|
+
*
|
|
223
|
+
* @param {CreateRefundRequestDto} createRefundRequestDto
|
|
224
|
+
* @param {string} [authorization] Bearer Token
|
|
225
|
+
* @param {*} [options] Override http request option.
|
|
226
|
+
* @throws {RequiredError}
|
|
227
|
+
*/
|
|
228
|
+
async createRefund(createRefundRequestDto: CreateRefundRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateRefundResponseClass>> {
|
|
229
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createRefund(createRefundRequestDto, authorization, options);
|
|
230
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
231
|
+
},
|
|
232
|
+
/**
|
|
233
|
+
*
|
|
234
|
+
* @param {string} code
|
|
235
|
+
* @param {string} code2 Unique identifier for the object.
|
|
236
|
+
* @param {string} expand Fields to expand response by
|
|
237
|
+
* @param {string} [authorization] Bearer Token
|
|
238
|
+
* @param {*} [options] Override http request option.
|
|
239
|
+
* @throws {RequiredError}
|
|
240
|
+
*/
|
|
241
|
+
async getRefund(code: string, code2: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetRefundResponseClass>> {
|
|
242
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getRefund(code, code2, expand, authorization, options);
|
|
243
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
244
|
+
},
|
|
245
|
+
/**
|
|
246
|
+
*
|
|
247
|
+
* @param {string} [authorization] Bearer Token
|
|
248
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
249
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
250
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
251
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
252
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
253
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
254
|
+
* @param {*} [options] Override http request option.
|
|
255
|
+
* @throws {RequiredError}
|
|
256
|
+
*/
|
|
257
|
+
async listRefunds(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListRefundsResponseClass>> {
|
|
258
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listRefunds(authorization, pageSize, pageToken, filter, search, order, expand, options);
|
|
259
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
260
|
+
},
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* RefundsApi - factory interface
|
|
266
|
+
* @export
|
|
267
|
+
*/
|
|
268
|
+
export const RefundsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
269
|
+
const localVarFp = RefundsApiFp(configuration)
|
|
270
|
+
return {
|
|
271
|
+
/**
|
|
272
|
+
*
|
|
273
|
+
* @param {CreateRefundRequestDto} createRefundRequestDto
|
|
274
|
+
* @param {string} [authorization] Bearer Token
|
|
275
|
+
* @param {*} [options] Override http request option.
|
|
276
|
+
* @throws {RequiredError}
|
|
277
|
+
*/
|
|
278
|
+
createRefund(createRefundRequestDto: CreateRefundRequestDto, authorization?: string, options?: any): AxiosPromise<CreateRefundResponseClass> {
|
|
279
|
+
return localVarFp.createRefund(createRefundRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
280
|
+
},
|
|
281
|
+
/**
|
|
282
|
+
*
|
|
283
|
+
* @param {string} code
|
|
284
|
+
* @param {string} code2 Unique identifier for the object.
|
|
285
|
+
* @param {string} expand Fields to expand response by
|
|
286
|
+
* @param {string} [authorization] Bearer Token
|
|
287
|
+
* @param {*} [options] Override http request option.
|
|
288
|
+
* @throws {RequiredError}
|
|
289
|
+
*/
|
|
290
|
+
getRefund(code: string, code2: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetRefundResponseClass> {
|
|
291
|
+
return localVarFp.getRefund(code, code2, expand, authorization, options).then((request) => request(axios, basePath));
|
|
292
|
+
},
|
|
293
|
+
/**
|
|
294
|
+
*
|
|
295
|
+
* @param {string} [authorization] Bearer Token
|
|
296
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
297
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
298
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
299
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
300
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
301
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
302
|
+
* @param {*} [options] Override http request option.
|
|
303
|
+
* @throws {RequiredError}
|
|
304
|
+
*/
|
|
305
|
+
listRefunds(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<ListRefundsResponseClass> {
|
|
306
|
+
return localVarFp.listRefunds(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
|
|
307
|
+
},
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Request parameters for createRefund operation in RefundsApi.
|
|
313
|
+
* @export
|
|
314
|
+
* @interface RefundsApiCreateRefundRequest
|
|
315
|
+
*/
|
|
316
|
+
export interface RefundsApiCreateRefundRequest {
|
|
317
|
+
/**
|
|
318
|
+
*
|
|
319
|
+
* @type {CreateRefundRequestDto}
|
|
320
|
+
* @memberof RefundsApiCreateRefund
|
|
321
|
+
*/
|
|
322
|
+
readonly createRefundRequestDto: CreateRefundRequestDto
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Bearer Token
|
|
326
|
+
* @type {string}
|
|
327
|
+
* @memberof RefundsApiCreateRefund
|
|
328
|
+
*/
|
|
329
|
+
readonly authorization?: string
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Request parameters for getRefund operation in RefundsApi.
|
|
334
|
+
* @export
|
|
335
|
+
* @interface RefundsApiGetRefundRequest
|
|
336
|
+
*/
|
|
337
|
+
export interface RefundsApiGetRefundRequest {
|
|
338
|
+
/**
|
|
339
|
+
*
|
|
340
|
+
* @type {string}
|
|
341
|
+
* @memberof RefundsApiGetRefund
|
|
342
|
+
*/
|
|
343
|
+
readonly code: string
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Unique identifier for the object.
|
|
347
|
+
* @type {string}
|
|
348
|
+
* @memberof RefundsApiGetRefund
|
|
349
|
+
*/
|
|
350
|
+
readonly code2: string
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Fields to expand response by
|
|
354
|
+
* @type {string}
|
|
355
|
+
* @memberof RefundsApiGetRefund
|
|
356
|
+
*/
|
|
357
|
+
readonly expand: string
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Bearer Token
|
|
361
|
+
* @type {string}
|
|
362
|
+
* @memberof RefundsApiGetRefund
|
|
363
|
+
*/
|
|
364
|
+
readonly authorization?: string
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Request parameters for listRefunds operation in RefundsApi.
|
|
369
|
+
* @export
|
|
370
|
+
* @interface RefundsApiListRefundsRequest
|
|
371
|
+
*/
|
|
372
|
+
export interface RefundsApiListRefundsRequest {
|
|
373
|
+
/**
|
|
374
|
+
* Bearer Token
|
|
375
|
+
* @type {string}
|
|
376
|
+
* @memberof RefundsApiListRefunds
|
|
377
|
+
*/
|
|
378
|
+
readonly authorization?: string
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
382
|
+
* @type {any}
|
|
383
|
+
* @memberof RefundsApiListRefunds
|
|
384
|
+
*/
|
|
385
|
+
readonly pageSize?: any
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
389
|
+
* @type {any}
|
|
390
|
+
* @memberof RefundsApiListRefunds
|
|
391
|
+
*/
|
|
392
|
+
readonly pageToken?: any
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
396
|
+
* @type {any}
|
|
397
|
+
* @memberof RefundsApiListRefunds
|
|
398
|
+
*/
|
|
399
|
+
readonly filter?: any
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
403
|
+
* @type {any}
|
|
404
|
+
* @memberof RefundsApiListRefunds
|
|
405
|
+
*/
|
|
406
|
+
readonly search?: any
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
410
|
+
* @type {any}
|
|
411
|
+
* @memberof RefundsApiListRefunds
|
|
412
|
+
*/
|
|
413
|
+
readonly order?: any
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
417
|
+
* @type {any}
|
|
418
|
+
* @memberof RefundsApiListRefunds
|
|
419
|
+
*/
|
|
420
|
+
readonly expand?: any
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* RefundsApi - object-oriented interface
|
|
425
|
+
* @export
|
|
426
|
+
* @class RefundsApi
|
|
427
|
+
* @extends {BaseAPI}
|
|
428
|
+
*/
|
|
429
|
+
export class RefundsApi extends BaseAPI {
|
|
430
|
+
/**
|
|
431
|
+
*
|
|
432
|
+
* @param {RefundsApiCreateRefundRequest} requestParameters Request parameters.
|
|
433
|
+
* @param {*} [options] Override http request option.
|
|
434
|
+
* @throws {RequiredError}
|
|
435
|
+
* @memberof RefundsApi
|
|
436
|
+
*/
|
|
437
|
+
public createRefund(requestParameters: RefundsApiCreateRefundRequest, options?: AxiosRequestConfig) {
|
|
438
|
+
return RefundsApiFp(this.configuration).createRefund(requestParameters.createRefundRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
*
|
|
443
|
+
* @param {RefundsApiGetRefundRequest} requestParameters Request parameters.
|
|
444
|
+
* @param {*} [options] Override http request option.
|
|
445
|
+
* @throws {RequiredError}
|
|
446
|
+
* @memberof RefundsApi
|
|
447
|
+
*/
|
|
448
|
+
public getRefund(requestParameters: RefundsApiGetRefundRequest, options?: AxiosRequestConfig) {
|
|
449
|
+
return RefundsApiFp(this.configuration).getRefund(requestParameters.code, requestParameters.code2, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
*
|
|
454
|
+
* @param {RefundsApiListRefundsRequest} requestParameters Request parameters.
|
|
455
|
+
* @param {*} [options] Override http request option.
|
|
456
|
+
* @throws {RequiredError}
|
|
457
|
+
* @memberof RefundsApi
|
|
458
|
+
*/
|
|
459
|
+
public listRefunds(requestParameters: RefundsApiListRefundsRequest = {}, options?: AxiosRequestConfig) {
|
|
460
|
+
return RefundsApiFp(this.configuration).listRefunds(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
461
|
+
}
|
|
462
|
+
}
|