@emilgroup/payment-sdk-node 1.13.1-beta.4 → 1.13.1-beta.5
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 +6 -0
- package/README.md +2 -2
- package/api/bank-transaction-api.ts +202 -0
- package/api/refunds-api.ts +480 -0
- package/api.ts +2 -0
- package/dist/api/bank-transaction-api.d.ts +110 -0
- package/dist/api/bank-transaction-api.js +184 -0
- package/dist/api/refunds-api.d.ts +269 -0
- package/dist/api/refunds-api.js +453 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- 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/get-refund-response-class.d.ts +25 -0
- package/dist/models/get-refund-response-class.js +15 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -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/refund-class.d.ts +104 -0
- package/dist/models/refund-class.js +28 -0
- package/models/create-refund-request-dto.ts +30 -0
- package/models/create-refund-response-class.ts +31 -0
- package/models/get-refund-response-class.ts +31 -0
- package/models/index.ts +5 -0
- package/models/list-refunds-response-class.ts +37 -0
- package/models/refund-class.ts +114 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -10,6 +10,7 @@ api/payment-methods-api.ts
|
|
|
10
10
|
api/payment-reminders-api.ts
|
|
11
11
|
api/payment-setup-api.ts
|
|
12
12
|
api/payments-api.ts
|
|
13
|
+
api/refunds-api.ts
|
|
13
14
|
api/tenant-bank-account-api.ts
|
|
14
15
|
api/webhooks-api.ts
|
|
15
16
|
base.ts
|
|
@@ -20,15 +21,20 @@ index.ts
|
|
|
20
21
|
models/bank-transaction-response-class.ts
|
|
21
22
|
models/create-payment-reminder-request-dto.ts
|
|
22
23
|
models/create-payment-request-dto.ts
|
|
24
|
+
models/create-refund-request-dto.ts
|
|
25
|
+
models/create-refund-response-class.ts
|
|
23
26
|
models/create-tenant-bank-account-request-dto.ts
|
|
24
27
|
models/deactivate-payment-reminder-request-dto.ts
|
|
25
28
|
models/get-bank-transactions-response-class.ts
|
|
29
|
+
models/get-refund-response-class.ts
|
|
26
30
|
models/get-request-dto.ts
|
|
27
31
|
models/get-tenant-bank-account-response-class.ts
|
|
28
32
|
models/index.ts
|
|
29
33
|
models/inline-response200.ts
|
|
30
34
|
models/inline-response503.ts
|
|
31
35
|
models/list-bank-transactions-response-class.ts
|
|
36
|
+
models/list-refunds-response-class.ts
|
|
37
|
+
models/refund-class.ts
|
|
32
38
|
models/tenant-bank-account-response-class.ts
|
|
33
39
|
models/transaction-class.ts
|
|
34
40
|
models/update-tenant-bank-account-rest-request-dto.ts
|
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/payment-sdk-node@1.13.1-beta.
|
|
20
|
+
npm install @emilgroup/payment-sdk-node@1.13.1-beta.5 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/payment-sdk-node@1.13.1-beta.
|
|
24
|
+
yarn add @emilgroup/payment-sdk-node@1.13.1-beta.5
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `PaymentsApi`.
|
|
@@ -135,6 +135,51 @@ export const BankTransactionApiAxiosParamCreator = function (configuration?: Con
|
|
|
135
135
|
options: localVarRequestOptions,
|
|
136
136
|
};
|
|
137
137
|
},
|
|
138
|
+
/**
|
|
139
|
+
* Links a bank transaction with an invoice
|
|
140
|
+
* @summary Link Bank Transaction
|
|
141
|
+
* @param {string} code Code of the bank transaction to link
|
|
142
|
+
* @param {string} [authorization] Bearer Token
|
|
143
|
+
* @param {*} [options] Override http request option.
|
|
144
|
+
* @throws {RequiredError}
|
|
145
|
+
*/
|
|
146
|
+
linkBankTransaction: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
147
|
+
// verify required parameter 'code' is not null or undefined
|
|
148
|
+
assertParamExists('linkBankTransaction', 'code', code)
|
|
149
|
+
const localVarPath = `/paymentservice/v1/tenant/bank-transactions/{code}/link`
|
|
150
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
151
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
152
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
153
|
+
let baseOptions;
|
|
154
|
+
let baseAccessToken;
|
|
155
|
+
if (configuration) {
|
|
156
|
+
baseOptions = configuration.baseOptions;
|
|
157
|
+
baseAccessToken = configuration.accessToken;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
161
|
+
const localVarHeaderParameter = {} as any;
|
|
162
|
+
const localVarQueryParameter = {} as any;
|
|
163
|
+
|
|
164
|
+
// authentication bearer required
|
|
165
|
+
// http bearer authentication required
|
|
166
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
167
|
+
|
|
168
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
169
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
175
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
176
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
177
|
+
|
|
178
|
+
return {
|
|
179
|
+
url: toPathString(localVarUrlObj),
|
|
180
|
+
options: localVarRequestOptions,
|
|
181
|
+
};
|
|
182
|
+
},
|
|
138
183
|
/**
|
|
139
184
|
* Returns a list of bank transactions you have previously created. The bank transactions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
140
185
|
* @summary List bank transactions
|
|
@@ -202,6 +247,51 @@ export const BankTransactionApiAxiosParamCreator = function (configuration?: Con
|
|
|
202
247
|
|
|
203
248
|
|
|
204
249
|
|
|
250
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
251
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
252
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
253
|
+
|
|
254
|
+
return {
|
|
255
|
+
url: toPathString(localVarUrlObj),
|
|
256
|
+
options: localVarRequestOptions,
|
|
257
|
+
};
|
|
258
|
+
},
|
|
259
|
+
/**
|
|
260
|
+
* Unlinks an already linked bank transaction
|
|
261
|
+
* @summary Unlink Bank Transaction
|
|
262
|
+
* @param {string} code Code of the bank transaction to unlink
|
|
263
|
+
* @param {string} [authorization] Bearer Token
|
|
264
|
+
* @param {*} [options] Override http request option.
|
|
265
|
+
* @throws {RequiredError}
|
|
266
|
+
*/
|
|
267
|
+
unlinkBankTransaction: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
268
|
+
// verify required parameter 'code' is not null or undefined
|
|
269
|
+
assertParamExists('unlinkBankTransaction', 'code', code)
|
|
270
|
+
const localVarPath = `/paymentservice/v1/tenant/bank-transactions/{code}/unlink`
|
|
271
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
272
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
273
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
274
|
+
let baseOptions;
|
|
275
|
+
let baseAccessToken;
|
|
276
|
+
if (configuration) {
|
|
277
|
+
baseOptions = configuration.baseOptions;
|
|
278
|
+
baseAccessToken = configuration.accessToken;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
282
|
+
const localVarHeaderParameter = {} as any;
|
|
283
|
+
const localVarQueryParameter = {} as any;
|
|
284
|
+
|
|
285
|
+
// authentication bearer required
|
|
286
|
+
// http bearer authentication required
|
|
287
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
288
|
+
|
|
289
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
290
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
205
295
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
206
296
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
207
297
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -246,6 +336,18 @@ export const BankTransactionApiFp = function(configuration?: Configuration) {
|
|
|
246
336
|
const localVarAxiosArgs = await localVarAxiosParamCreator.importBankTransactions(authorization, file, options);
|
|
247
337
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
248
338
|
},
|
|
339
|
+
/**
|
|
340
|
+
* Links a bank transaction with an invoice
|
|
341
|
+
* @summary Link Bank Transaction
|
|
342
|
+
* @param {string} code Code of the bank transaction to link
|
|
343
|
+
* @param {string} [authorization] Bearer Token
|
|
344
|
+
* @param {*} [options] Override http request option.
|
|
345
|
+
* @throws {RequiredError}
|
|
346
|
+
*/
|
|
347
|
+
async linkBankTransaction(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBankTransactionsResponseClass>> {
|
|
348
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.linkBankTransaction(code, authorization, options);
|
|
349
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
350
|
+
},
|
|
249
351
|
/**
|
|
250
352
|
* Returns a list of bank transactions you have previously created. The bank transactions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
251
353
|
* @summary List bank transactions
|
|
@@ -264,6 +366,18 @@ export const BankTransactionApiFp = function(configuration?: Configuration) {
|
|
|
264
366
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listBankTransactions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
265
367
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
266
368
|
},
|
|
369
|
+
/**
|
|
370
|
+
* Unlinks an already linked bank transaction
|
|
371
|
+
* @summary Unlink Bank Transaction
|
|
372
|
+
* @param {string} code Code of the bank transaction to unlink
|
|
373
|
+
* @param {string} [authorization] Bearer Token
|
|
374
|
+
* @param {*} [options] Override http request option.
|
|
375
|
+
* @throws {RequiredError}
|
|
376
|
+
*/
|
|
377
|
+
async unlinkBankTransaction(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBankTransactionsResponseClass>> {
|
|
378
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.unlinkBankTransaction(code, authorization, options);
|
|
379
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
380
|
+
},
|
|
267
381
|
}
|
|
268
382
|
};
|
|
269
383
|
|
|
@@ -297,6 +411,17 @@ export const BankTransactionApiFactory = function (configuration?: Configuration
|
|
|
297
411
|
importBankTransactions(authorization?: string, file?: any, options?: any): AxiosPromise<ListBankTransactionsResponseClass> {
|
|
298
412
|
return localVarFp.importBankTransactions(authorization, file, options).then((request) => request(axios, basePath));
|
|
299
413
|
},
|
|
414
|
+
/**
|
|
415
|
+
* Links a bank transaction with an invoice
|
|
416
|
+
* @summary Link Bank Transaction
|
|
417
|
+
* @param {string} code Code of the bank transaction to link
|
|
418
|
+
* @param {string} [authorization] Bearer Token
|
|
419
|
+
* @param {*} [options] Override http request option.
|
|
420
|
+
* @throws {RequiredError}
|
|
421
|
+
*/
|
|
422
|
+
linkBankTransaction(code: string, authorization?: string, options?: any): AxiosPromise<GetBankTransactionsResponseClass> {
|
|
423
|
+
return localVarFp.linkBankTransaction(code, authorization, options).then((request) => request(axios, basePath));
|
|
424
|
+
},
|
|
300
425
|
/**
|
|
301
426
|
* Returns a list of bank transactions you have previously created. The bank transactions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
302
427
|
* @summary List bank transactions
|
|
@@ -314,6 +439,17 @@ export const BankTransactionApiFactory = function (configuration?: Configuration
|
|
|
314
439
|
listBankTransactions(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: string, filters?: any, options?: any): AxiosPromise<void> {
|
|
315
440
|
return localVarFp.listBankTransactions(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
316
441
|
},
|
|
442
|
+
/**
|
|
443
|
+
* Unlinks an already linked bank transaction
|
|
444
|
+
* @summary Unlink Bank Transaction
|
|
445
|
+
* @param {string} code Code of the bank transaction to unlink
|
|
446
|
+
* @param {string} [authorization] Bearer Token
|
|
447
|
+
* @param {*} [options] Override http request option.
|
|
448
|
+
* @throws {RequiredError}
|
|
449
|
+
*/
|
|
450
|
+
unlinkBankTransaction(code: string, authorization?: string, options?: any): AxiosPromise<GetBankTransactionsResponseClass> {
|
|
451
|
+
return localVarFp.unlinkBankTransaction(code, authorization, options).then((request) => request(axios, basePath));
|
|
452
|
+
},
|
|
317
453
|
};
|
|
318
454
|
};
|
|
319
455
|
|
|
@@ -366,6 +502,27 @@ export interface BankTransactionApiImportBankTransactionsRequest {
|
|
|
366
502
|
readonly file?: any
|
|
367
503
|
}
|
|
368
504
|
|
|
505
|
+
/**
|
|
506
|
+
* Request parameters for linkBankTransaction operation in BankTransactionApi.
|
|
507
|
+
* @export
|
|
508
|
+
* @interface BankTransactionApiLinkBankTransactionRequest
|
|
509
|
+
*/
|
|
510
|
+
export interface BankTransactionApiLinkBankTransactionRequest {
|
|
511
|
+
/**
|
|
512
|
+
* Code of the bank transaction to link
|
|
513
|
+
* @type {string}
|
|
514
|
+
* @memberof BankTransactionApiLinkBankTransaction
|
|
515
|
+
*/
|
|
516
|
+
readonly code: string
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* Bearer Token
|
|
520
|
+
* @type {string}
|
|
521
|
+
* @memberof BankTransactionApiLinkBankTransaction
|
|
522
|
+
*/
|
|
523
|
+
readonly authorization?: string
|
|
524
|
+
}
|
|
525
|
+
|
|
369
526
|
/**
|
|
370
527
|
* Request parameters for listBankTransactions operation in BankTransactionApi.
|
|
371
528
|
* @export
|
|
@@ -429,6 +586,27 @@ export interface BankTransactionApiListBankTransactionsRequest {
|
|
|
429
586
|
readonly filters?: any
|
|
430
587
|
}
|
|
431
588
|
|
|
589
|
+
/**
|
|
590
|
+
* Request parameters for unlinkBankTransaction operation in BankTransactionApi.
|
|
591
|
+
* @export
|
|
592
|
+
* @interface BankTransactionApiUnlinkBankTransactionRequest
|
|
593
|
+
*/
|
|
594
|
+
export interface BankTransactionApiUnlinkBankTransactionRequest {
|
|
595
|
+
/**
|
|
596
|
+
* Code of the bank transaction to unlink
|
|
597
|
+
* @type {string}
|
|
598
|
+
* @memberof BankTransactionApiUnlinkBankTransaction
|
|
599
|
+
*/
|
|
600
|
+
readonly code: string
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Bearer Token
|
|
604
|
+
* @type {string}
|
|
605
|
+
* @memberof BankTransactionApiUnlinkBankTransaction
|
|
606
|
+
*/
|
|
607
|
+
readonly authorization?: string
|
|
608
|
+
}
|
|
609
|
+
|
|
432
610
|
/**
|
|
433
611
|
* BankTransactionApi - object-oriented interface
|
|
434
612
|
* @export
|
|
@@ -460,6 +638,18 @@ export class BankTransactionApi extends BaseAPI {
|
|
|
460
638
|
return BankTransactionApiFp(this.configuration).importBankTransactions(requestParameters.authorization, requestParameters.file, options).then((request) => request(this.axios, this.basePath));
|
|
461
639
|
}
|
|
462
640
|
|
|
641
|
+
/**
|
|
642
|
+
* Links a bank transaction with an invoice
|
|
643
|
+
* @summary Link Bank Transaction
|
|
644
|
+
* @param {BankTransactionApiLinkBankTransactionRequest} requestParameters Request parameters.
|
|
645
|
+
* @param {*} [options] Override http request option.
|
|
646
|
+
* @throws {RequiredError}
|
|
647
|
+
* @memberof BankTransactionApi
|
|
648
|
+
*/
|
|
649
|
+
public linkBankTransaction(requestParameters: BankTransactionApiLinkBankTransactionRequest, options?: AxiosRequestConfig) {
|
|
650
|
+
return BankTransactionApiFp(this.configuration).linkBankTransaction(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
651
|
+
}
|
|
652
|
+
|
|
463
653
|
/**
|
|
464
654
|
* Returns a list of bank transactions you have previously created. The bank transactions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
465
655
|
* @summary List bank transactions
|
|
@@ -471,4 +661,16 @@ export class BankTransactionApi extends BaseAPI {
|
|
|
471
661
|
public listBankTransactions(requestParameters: BankTransactionApiListBankTransactionsRequest = {}, options?: AxiosRequestConfig) {
|
|
472
662
|
return BankTransactionApiFp(this.configuration).listBankTransactions(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
473
663
|
}
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Unlinks an already linked bank transaction
|
|
667
|
+
* @summary Unlink Bank Transaction
|
|
668
|
+
* @param {BankTransactionApiUnlinkBankTransactionRequest} requestParameters Request parameters.
|
|
669
|
+
* @param {*} [options] Override http request option.
|
|
670
|
+
* @throws {RequiredError}
|
|
671
|
+
* @memberof BankTransactionApi
|
|
672
|
+
*/
|
|
673
|
+
public unlinkBankTransaction(requestParameters: BankTransactionApiUnlinkBankTransactionRequest, options?: AxiosRequestConfig) {
|
|
674
|
+
return BankTransactionApiFp(this.configuration).unlinkBankTransaction(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
675
|
+
}
|
|
474
676
|
}
|