@emilgroup/payment-sdk 1.0.0 → 1.3.1
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 +17 -2
- package/README.md +2 -2
- package/api/bank-accounts-api.ts +4 -4
- package/api/bank-transaction-api.ts +565 -0
- package/api/payment-methods-api.ts +4 -4
- package/api/payment-reminders-api.ts +12 -10
- package/api/payments-api.ts +4 -4
- package/api/refunds-api.ts +460 -0
- package/api/tenant-bank-account-api.ts +651 -0
- package/api.ts +6 -2
- package/dist/api/bank-accounts-api.d.ts +4 -4
- package/dist/api/bank-accounts-api.js +3 -3
- package/dist/api/bank-transaction-api.d.ts +318 -0
- package/dist/api/bank-transaction-api.js +539 -0
- package/dist/api/payment-methods-api.d.ts +4 -4
- package/dist/api/payment-methods-api.js +3 -3
- package/dist/api/payment-reminders-api.d.ts +12 -11
- package/dist/api/payment-reminders-api.js +7 -7
- package/dist/api/payments-api.d.ts +4 -4
- package/dist/api/payments-api.js +3 -3
- package/dist/api/refunds-api.d.ts +260 -0
- package/dist/api/refunds-api.js +441 -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.d.ts +3 -1
- package/dist/api.js +3 -1
- package/dist/models/bank-transaction-response-class.d.ts +122 -0
- package/dist/models/create-payment-request-dto.d.ts +3 -3
- package/dist/models/create-refund-request-dto.d.ts +24 -0
- package/dist/models/create-refund-request-dto.js +15 -0
- package/dist/models/create-refund-response-class.d.ts +25 -0
- package/dist/models/create-refund-response-class.js +15 -0
- package/dist/models/create-tenant-bank-account-request-dto.d.ts +42 -0
- package/dist/models/create-tenant-bank-account-request-dto.js +15 -0
- package/dist/models/deactivate-payment-reminder-response-class.d.ts +25 -0
- package/dist/models/deactivate-payment-reminder-response-class.js +15 -0
- package/dist/models/get-bank-transactions-response-class.d.ts +25 -0
- package/dist/models/get-bank-transactions-response-class.js +15 -0
- package/dist/models/{validate-pspconfig-response-class.d.ts → get-refund-response-class.d.ts} +7 -6
- package/dist/models/get-refund-response-class.js +15 -0
- package/dist/models/get-tenant-bank-account-response-class.d.ts +25 -0
- package/dist/models/get-tenant-bank-account-response-class.js +15 -0
- package/dist/models/index.d.ts +14 -1
- package/dist/models/index.js +14 -1
- package/dist/models/inline-response200.d.ts +6 -6
- package/dist/models/inline-response503.d.ts +6 -6
- package/dist/models/link-bank-transaction-request-dto.d.ts +30 -0
- package/dist/models/link-bank-transaction-request-dto.js +15 -0
- package/dist/models/list-bank-transactions-response-class.d.ts +31 -0
- package/dist/models/list-bank-transactions-response-class.js +15 -0
- package/dist/models/list-refunds-response-class.d.ts +31 -0
- package/dist/models/list-refunds-response-class.js +15 -0
- package/dist/models/payment-class.d.ts +1 -1
- package/dist/models/payment-method-class.d.ts +8 -2
- package/dist/models/refund-class.d.ts +104 -0
- package/dist/models/refund-class.js +28 -0
- package/dist/models/tenant-bank-account-response-class.d.ts +66 -0
- package/dist/models/tenant-bank-account-response-class.js +15 -0
- package/dist/models/update-tenant-bank-account-rest-request-dto.d.ts +36 -0
- package/dist/models/update-tenant-bank-account-rest-request-dto.js +15 -0
- package/git_push.sh +1 -1
- package/models/bank-transaction-response-class.ts +128 -0
- package/models/create-payment-request-dto.ts +3 -3
- package/models/create-refund-request-dto.ts +30 -0
- package/models/create-refund-response-class.ts +31 -0
- package/models/create-tenant-bank-account-request-dto.ts +48 -0
- package/models/deactivate-payment-reminder-response-class.ts +31 -0
- package/models/get-bank-transactions-response-class.ts +31 -0
- package/models/{validate-pspconfig-response-class.ts → get-refund-response-class.ts} +7 -6
- package/models/get-tenant-bank-account-response-class.ts +31 -0
- package/models/index.ts +14 -1
- package/models/inline-response200.ts +6 -6
- package/models/inline-response503.ts +6 -6
- package/models/link-bank-transaction-request-dto.ts +36 -0
- package/models/list-bank-transactions-response-class.ts +37 -0
- package/models/list-refunds-response-class.ts +37 -0
- package/models/payment-class.ts +1 -1
- package/models/payment-method-class.ts +8 -2
- package/models/refund-class.ts +114 -0
- package/models/tenant-bank-account-response-class.ts +72 -0
- package/models/update-tenant-bank-account-rest-request-dto.ts +42 -0
- 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/{validate-pspconfig-response-class.js → bank-transaction-response-class.js} +0 -0
|
@@ -25,6 +25,8 @@ import { CreatePaymentReminderRequestDto } from '../models';
|
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
import { DeactivatePaymentReminderRequestDto } from '../models';
|
|
27
27
|
// @ts-ignore
|
|
28
|
+
import { DeactivatePaymentReminderResponseClass } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
28
30
|
import { ListPaymentRemindersResponseClass } from '../models';
|
|
29
31
|
/**
|
|
30
32
|
* PaymentRemindersApi - axios parameter creator
|
|
@@ -80,7 +82,7 @@ export const PaymentRemindersApiAxiosParamCreator = function (configuration?: Co
|
|
|
80
82
|
};
|
|
81
83
|
},
|
|
82
84
|
/**
|
|
83
|
-
*
|
|
85
|
+
* Deactivates the payment reminder
|
|
84
86
|
* @summary Update the payment-reminder
|
|
85
87
|
* @param {string} code Unique identifier for the object.
|
|
86
88
|
* @param {DeactivatePaymentReminderRequestDto} deactivatePaymentReminderRequestDto
|
|
@@ -179,7 +181,7 @@ export const PaymentRemindersApiAxiosParamCreator = function (configuration?: Co
|
|
|
179
181
|
* Returns a list of payment reminders you have previously created. The payment reminders are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
180
182
|
* @summary List payment reminders
|
|
181
183
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
182
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and
|
|
184
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
183
185
|
* @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.
|
|
184
186
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
185
187
|
* @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.
|
|
@@ -269,7 +271,7 @@ export const PaymentRemindersApiFp = function(configuration?: Configuration) {
|
|
|
269
271
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
270
272
|
},
|
|
271
273
|
/**
|
|
272
|
-
*
|
|
274
|
+
* Deactivates the payment reminder
|
|
273
275
|
* @summary Update the payment-reminder
|
|
274
276
|
* @param {string} code Unique identifier for the object.
|
|
275
277
|
* @param {DeactivatePaymentReminderRequestDto} deactivatePaymentReminderRequestDto
|
|
@@ -277,7 +279,7 @@ export const PaymentRemindersApiFp = function(configuration?: Configuration) {
|
|
|
277
279
|
* @param {*} [options] Override http request option.
|
|
278
280
|
* @throws {RequiredError}
|
|
279
281
|
*/
|
|
280
|
-
async deactivatePaymentReminder(code: string, deactivatePaymentReminderRequestDto: DeactivatePaymentReminderRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
282
|
+
async deactivatePaymentReminder(code: string, deactivatePaymentReminderRequestDto: DeactivatePaymentReminderRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeactivatePaymentReminderResponseClass>> {
|
|
281
283
|
const localVarAxiosArgs = await localVarAxiosParamCreator.deactivatePaymentReminder(code, deactivatePaymentReminderRequestDto, authorization, options);
|
|
282
284
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
283
285
|
},
|
|
@@ -297,7 +299,7 @@ export const PaymentRemindersApiFp = function(configuration?: Configuration) {
|
|
|
297
299
|
* Returns a list of payment reminders you have previously created. The payment reminders are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
298
300
|
* @summary List payment reminders
|
|
299
301
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
300
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and
|
|
302
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
301
303
|
* @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.
|
|
302
304
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
303
305
|
* @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.
|
|
@@ -332,7 +334,7 @@ export const PaymentRemindersApiFactory = function (configuration?: Configuratio
|
|
|
332
334
|
return localVarFp.createPaymentReminder(createPaymentReminderRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
333
335
|
},
|
|
334
336
|
/**
|
|
335
|
-
*
|
|
337
|
+
* Deactivates the payment reminder
|
|
336
338
|
* @summary Update the payment-reminder
|
|
337
339
|
* @param {string} code Unique identifier for the object.
|
|
338
340
|
* @param {DeactivatePaymentReminderRequestDto} deactivatePaymentReminderRequestDto
|
|
@@ -340,7 +342,7 @@ export const PaymentRemindersApiFactory = function (configuration?: Configuratio
|
|
|
340
342
|
* @param {*} [options] Override http request option.
|
|
341
343
|
* @throws {RequiredError}
|
|
342
344
|
*/
|
|
343
|
-
deactivatePaymentReminder(code: string, deactivatePaymentReminderRequestDto: DeactivatePaymentReminderRequestDto, authorization?: string, options?: any): AxiosPromise<
|
|
345
|
+
deactivatePaymentReminder(code: string, deactivatePaymentReminderRequestDto: DeactivatePaymentReminderRequestDto, authorization?: string, options?: any): AxiosPromise<DeactivatePaymentReminderResponseClass> {
|
|
344
346
|
return localVarFp.deactivatePaymentReminder(code, deactivatePaymentReminderRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
345
347
|
},
|
|
346
348
|
/**
|
|
@@ -358,7 +360,7 @@ export const PaymentRemindersApiFactory = function (configuration?: Configuratio
|
|
|
358
360
|
* Returns a list of payment reminders you have previously created. The payment reminders are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
359
361
|
* @summary List payment reminders
|
|
360
362
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
361
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and
|
|
363
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
362
364
|
* @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.
|
|
363
365
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
364
366
|
* @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.
|
|
@@ -457,7 +459,7 @@ export interface PaymentRemindersApiListPaymentRemindersRequest {
|
|
|
457
459
|
readonly authorization?: string
|
|
458
460
|
|
|
459
461
|
/**
|
|
460
|
-
* A limit on the number of objects to be returned. Limit ranges between 1 and
|
|
462
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
461
463
|
* @type {any}
|
|
462
464
|
* @memberof PaymentRemindersApiListPaymentReminders
|
|
463
465
|
*/
|
|
@@ -519,7 +521,7 @@ export class PaymentRemindersApi extends BaseAPI {
|
|
|
519
521
|
}
|
|
520
522
|
|
|
521
523
|
/**
|
|
522
|
-
*
|
|
524
|
+
* Deactivates the payment reminder
|
|
523
525
|
* @summary Update the payment-reminder
|
|
524
526
|
* @param {PaymentRemindersApiDeactivatePaymentReminderRequest} requestParameters Request parameters.
|
|
525
527
|
* @param {*} [options] Override http request option.
|
package/api/payments-api.ts
CHANGED
|
@@ -150,7 +150,7 @@ export const PaymentsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
150
150
|
* 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
151
|
* @summary List payments
|
|
152
152
|
* @param {string} [authorization] Bearer Token
|
|
153
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and
|
|
153
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
154
154
|
* @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
155
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
156
156
|
* @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.
|
|
@@ -258,7 +258,7 @@ export const PaymentsApiFp = function(configuration?: Configuration) {
|
|
|
258
258
|
* 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
259
|
* @summary List payments
|
|
260
260
|
* @param {string} [authorization] Bearer Token
|
|
261
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and
|
|
261
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
262
262
|
* @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
263
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
264
264
|
* @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.
|
|
@@ -310,7 +310,7 @@ export const PaymentsApiFactory = function (configuration?: Configuration, baseP
|
|
|
310
310
|
* 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
311
|
* @summary List payments
|
|
312
312
|
* @param {string} [authorization] Bearer Token
|
|
313
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and
|
|
313
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
314
314
|
* @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
315
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
316
316
|
* @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.
|
|
@@ -402,7 +402,7 @@ export interface PaymentsApiListPaymentsRequest {
|
|
|
402
402
|
readonly authorization?: string
|
|
403
403
|
|
|
404
404
|
/**
|
|
405
|
-
* A limit on the number of objects to be returned. Limit ranges between 1 and
|
|
405
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
406
406
|
* @type {any}
|
|
407
407
|
* @memberof PaymentsApiListPayments
|
|
408
408
|
*/
|
|
@@ -0,0 +1,460 @@
|
|
|
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: kontakt@emil.de
|
|
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} [authorization] Bearer Token
|
|
88
|
+
* @param {string} [expand] Fields to expand response by
|
|
89
|
+
* @param {*} [options] Override http request option.
|
|
90
|
+
* @throws {RequiredError}
|
|
91
|
+
*/
|
|
92
|
+
getRefund: async (code: string, code2: string, authorization?: string, expand?: 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
|
+
const localVarPath = `/paymentservice/v1/refunds/{code}`
|
|
98
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
99
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
100
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
101
|
+
let baseOptions;
|
|
102
|
+
let baseAccessToken;
|
|
103
|
+
if (configuration) {
|
|
104
|
+
baseOptions = configuration.baseOptions;
|
|
105
|
+
baseAccessToken = configuration.accessToken;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
109
|
+
const localVarHeaderParameter = {} as any;
|
|
110
|
+
const localVarQueryParameter = {} as any;
|
|
111
|
+
|
|
112
|
+
// authentication bearer required
|
|
113
|
+
// http bearer authentication required
|
|
114
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
115
|
+
|
|
116
|
+
if (code2 !== undefined) {
|
|
117
|
+
localVarQueryParameter['code'] = code2;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (expand !== undefined) {
|
|
121
|
+
localVarQueryParameter['expand'] = expand;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
125
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
131
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
132
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
133
|
+
|
|
134
|
+
return {
|
|
135
|
+
url: toPathString(localVarUrlObj),
|
|
136
|
+
options: localVarRequestOptions,
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
/**
|
|
140
|
+
*
|
|
141
|
+
* @param {string} [authorization] Bearer Token
|
|
142
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
143
|
+
* @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.
|
|
144
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
145
|
+
* @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.
|
|
146
|
+
* @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.
|
|
147
|
+
* @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.
|
|
148
|
+
* @param {*} [options] Override http request option.
|
|
149
|
+
* @throws {RequiredError}
|
|
150
|
+
*/
|
|
151
|
+
listRefunds: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
152
|
+
const localVarPath = `/paymentservice/v1/refunds`;
|
|
153
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
154
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
155
|
+
let baseOptions;
|
|
156
|
+
let baseAccessToken;
|
|
157
|
+
if (configuration) {
|
|
158
|
+
baseOptions = configuration.baseOptions;
|
|
159
|
+
baseAccessToken = configuration.accessToken;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
163
|
+
const localVarHeaderParameter = {} as any;
|
|
164
|
+
const localVarQueryParameter = {} as any;
|
|
165
|
+
|
|
166
|
+
// authentication bearer required
|
|
167
|
+
// http bearer authentication required
|
|
168
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
169
|
+
|
|
170
|
+
if (pageSize !== undefined) {
|
|
171
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (pageToken !== undefined) {
|
|
175
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (filter !== undefined) {
|
|
179
|
+
localVarQueryParameter['filter'] = filter;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (search !== undefined) {
|
|
183
|
+
localVarQueryParameter['search'] = search;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if (order !== undefined) {
|
|
187
|
+
localVarQueryParameter['order'] = order;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (expand !== undefined) {
|
|
191
|
+
localVarQueryParameter['expand'] = expand;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
195
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
201
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
202
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
203
|
+
|
|
204
|
+
return {
|
|
205
|
+
url: toPathString(localVarUrlObj),
|
|
206
|
+
options: localVarRequestOptions,
|
|
207
|
+
};
|
|
208
|
+
},
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* RefundsApi - functional programming interface
|
|
214
|
+
* @export
|
|
215
|
+
*/
|
|
216
|
+
export const RefundsApiFp = function(configuration?: Configuration) {
|
|
217
|
+
const localVarAxiosParamCreator = RefundsApiAxiosParamCreator(configuration)
|
|
218
|
+
return {
|
|
219
|
+
/**
|
|
220
|
+
*
|
|
221
|
+
* @param {CreateRefundRequestDto} createRefundRequestDto
|
|
222
|
+
* @param {string} [authorization] Bearer Token
|
|
223
|
+
* @param {*} [options] Override http request option.
|
|
224
|
+
* @throws {RequiredError}
|
|
225
|
+
*/
|
|
226
|
+
async createRefund(createRefundRequestDto: CreateRefundRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateRefundResponseClass>> {
|
|
227
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createRefund(createRefundRequestDto, authorization, options);
|
|
228
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
229
|
+
},
|
|
230
|
+
/**
|
|
231
|
+
*
|
|
232
|
+
* @param {string} code
|
|
233
|
+
* @param {string} code2 Unique identifier for the object.
|
|
234
|
+
* @param {string} [authorization] Bearer Token
|
|
235
|
+
* @param {string} [expand] Fields to expand response by
|
|
236
|
+
* @param {*} [options] Override http request option.
|
|
237
|
+
* @throws {RequiredError}
|
|
238
|
+
*/
|
|
239
|
+
async getRefund(code: string, code2: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetRefundResponseClass>> {
|
|
240
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getRefund(code, code2, authorization, expand, options);
|
|
241
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
242
|
+
},
|
|
243
|
+
/**
|
|
244
|
+
*
|
|
245
|
+
* @param {string} [authorization] Bearer Token
|
|
246
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
247
|
+
* @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.
|
|
248
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
249
|
+
* @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.
|
|
250
|
+
* @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.
|
|
251
|
+
* @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.
|
|
252
|
+
* @param {*} [options] Override http request option.
|
|
253
|
+
* @throws {RequiredError}
|
|
254
|
+
*/
|
|
255
|
+
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>> {
|
|
256
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listRefunds(authorization, pageSize, pageToken, filter, search, order, expand, options);
|
|
257
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
258
|
+
},
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* RefundsApi - factory interface
|
|
264
|
+
* @export
|
|
265
|
+
*/
|
|
266
|
+
export const RefundsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
267
|
+
const localVarFp = RefundsApiFp(configuration)
|
|
268
|
+
return {
|
|
269
|
+
/**
|
|
270
|
+
*
|
|
271
|
+
* @param {CreateRefundRequestDto} createRefundRequestDto
|
|
272
|
+
* @param {string} [authorization] Bearer Token
|
|
273
|
+
* @param {*} [options] Override http request option.
|
|
274
|
+
* @throws {RequiredError}
|
|
275
|
+
*/
|
|
276
|
+
createRefund(createRefundRequestDto: CreateRefundRequestDto, authorization?: string, options?: any): AxiosPromise<CreateRefundResponseClass> {
|
|
277
|
+
return localVarFp.createRefund(createRefundRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
278
|
+
},
|
|
279
|
+
/**
|
|
280
|
+
*
|
|
281
|
+
* @param {string} code
|
|
282
|
+
* @param {string} code2 Unique identifier for the object.
|
|
283
|
+
* @param {string} [authorization] Bearer Token
|
|
284
|
+
* @param {string} [expand] Fields to expand response by
|
|
285
|
+
* @param {*} [options] Override http request option.
|
|
286
|
+
* @throws {RequiredError}
|
|
287
|
+
*/
|
|
288
|
+
getRefund(code: string, code2: string, authorization?: string, expand?: string, options?: any): AxiosPromise<GetRefundResponseClass> {
|
|
289
|
+
return localVarFp.getRefund(code, code2, authorization, expand, options).then((request) => request(axios, basePath));
|
|
290
|
+
},
|
|
291
|
+
/**
|
|
292
|
+
*
|
|
293
|
+
* @param {string} [authorization] Bearer Token
|
|
294
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
295
|
+
* @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.
|
|
296
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
297
|
+
* @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.
|
|
298
|
+
* @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.
|
|
299
|
+
* @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.
|
|
300
|
+
* @param {*} [options] Override http request option.
|
|
301
|
+
* @throws {RequiredError}
|
|
302
|
+
*/
|
|
303
|
+
listRefunds(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<ListRefundsResponseClass> {
|
|
304
|
+
return localVarFp.listRefunds(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
|
|
305
|
+
},
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Request parameters for createRefund operation in RefundsApi.
|
|
311
|
+
* @export
|
|
312
|
+
* @interface RefundsApiCreateRefundRequest
|
|
313
|
+
*/
|
|
314
|
+
export interface RefundsApiCreateRefundRequest {
|
|
315
|
+
/**
|
|
316
|
+
*
|
|
317
|
+
* @type {CreateRefundRequestDto}
|
|
318
|
+
* @memberof RefundsApiCreateRefund
|
|
319
|
+
*/
|
|
320
|
+
readonly createRefundRequestDto: CreateRefundRequestDto
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Bearer Token
|
|
324
|
+
* @type {string}
|
|
325
|
+
* @memberof RefundsApiCreateRefund
|
|
326
|
+
*/
|
|
327
|
+
readonly authorization?: string
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Request parameters for getRefund operation in RefundsApi.
|
|
332
|
+
* @export
|
|
333
|
+
* @interface RefundsApiGetRefundRequest
|
|
334
|
+
*/
|
|
335
|
+
export interface RefundsApiGetRefundRequest {
|
|
336
|
+
/**
|
|
337
|
+
*
|
|
338
|
+
* @type {string}
|
|
339
|
+
* @memberof RefundsApiGetRefund
|
|
340
|
+
*/
|
|
341
|
+
readonly code: string
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Unique identifier for the object.
|
|
345
|
+
* @type {string}
|
|
346
|
+
* @memberof RefundsApiGetRefund
|
|
347
|
+
*/
|
|
348
|
+
readonly code2: string
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Bearer Token
|
|
352
|
+
* @type {string}
|
|
353
|
+
* @memberof RefundsApiGetRefund
|
|
354
|
+
*/
|
|
355
|
+
readonly authorization?: string
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Fields to expand response by
|
|
359
|
+
* @type {string}
|
|
360
|
+
* @memberof RefundsApiGetRefund
|
|
361
|
+
*/
|
|
362
|
+
readonly expand?: string
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Request parameters for listRefunds operation in RefundsApi.
|
|
367
|
+
* @export
|
|
368
|
+
* @interface RefundsApiListRefundsRequest
|
|
369
|
+
*/
|
|
370
|
+
export interface RefundsApiListRefundsRequest {
|
|
371
|
+
/**
|
|
372
|
+
* Bearer Token
|
|
373
|
+
* @type {string}
|
|
374
|
+
* @memberof RefundsApiListRefunds
|
|
375
|
+
*/
|
|
376
|
+
readonly authorization?: string
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
380
|
+
* @type {any}
|
|
381
|
+
* @memberof RefundsApiListRefunds
|
|
382
|
+
*/
|
|
383
|
+
readonly pageSize?: any
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* 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.
|
|
387
|
+
* @type {any}
|
|
388
|
+
* @memberof RefundsApiListRefunds
|
|
389
|
+
*/
|
|
390
|
+
readonly pageToken?: any
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
394
|
+
* @type {any}
|
|
395
|
+
* @memberof RefundsApiListRefunds
|
|
396
|
+
*/
|
|
397
|
+
readonly filter?: any
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
401
|
+
* @type {any}
|
|
402
|
+
* @memberof RefundsApiListRefunds
|
|
403
|
+
*/
|
|
404
|
+
readonly search?: any
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* 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.
|
|
408
|
+
* @type {any}
|
|
409
|
+
* @memberof RefundsApiListRefunds
|
|
410
|
+
*/
|
|
411
|
+
readonly order?: any
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* 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.
|
|
415
|
+
* @type {any}
|
|
416
|
+
* @memberof RefundsApiListRefunds
|
|
417
|
+
*/
|
|
418
|
+
readonly expand?: any
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* RefundsApi - object-oriented interface
|
|
423
|
+
* @export
|
|
424
|
+
* @class RefundsApi
|
|
425
|
+
* @extends {BaseAPI}
|
|
426
|
+
*/
|
|
427
|
+
export class RefundsApi extends BaseAPI {
|
|
428
|
+
/**
|
|
429
|
+
*
|
|
430
|
+
* @param {RefundsApiCreateRefundRequest} requestParameters Request parameters.
|
|
431
|
+
* @param {*} [options] Override http request option.
|
|
432
|
+
* @throws {RequiredError}
|
|
433
|
+
* @memberof RefundsApi
|
|
434
|
+
*/
|
|
435
|
+
public createRefund(requestParameters: RefundsApiCreateRefundRequest, options?: AxiosRequestConfig) {
|
|
436
|
+
return RefundsApiFp(this.configuration).createRefund(requestParameters.createRefundRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
*
|
|
441
|
+
* @param {RefundsApiGetRefundRequest} requestParameters Request parameters.
|
|
442
|
+
* @param {*} [options] Override http request option.
|
|
443
|
+
* @throws {RequiredError}
|
|
444
|
+
* @memberof RefundsApi
|
|
445
|
+
*/
|
|
446
|
+
public getRefund(requestParameters: RefundsApiGetRefundRequest, options?: AxiosRequestConfig) {
|
|
447
|
+
return RefundsApiFp(this.configuration).getRefund(requestParameters.code, requestParameters.code2, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
*
|
|
452
|
+
* @param {RefundsApiListRefundsRequest} requestParameters Request parameters.
|
|
453
|
+
* @param {*} [options] Override http request option.
|
|
454
|
+
* @throws {RequiredError}
|
|
455
|
+
* @memberof RefundsApi
|
|
456
|
+
*/
|
|
457
|
+
public listRefunds(requestParameters: RefundsApiListRefundsRequest = {}, options?: AxiosRequestConfig) {
|
|
458
|
+
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));
|
|
459
|
+
}
|
|
460
|
+
}
|