@emilgroup/payment-sdk 1.4.1-beta.3 → 1.4.1-beta.30
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 +10 -27
- package/README.md +2 -2
- package/api/bank-accounts-api.ts +497 -43
- package/api/bank-transaction-api.ts +89 -53
- package/api/default-api.ts +1 -1
- package/api/payment-methods-api.ts +62 -173
- package/api/payment-reminders-api.ts +21 -25
- package/api/payment-setup-api.ts +29 -37
- package/api/payments-api.ts +54 -59
- package/api/refunds-api.ts +20 -18
- package/api/tenant-bank-account-api.ts +71 -61
- package/api/webhooks-api.ts +1 -1
- package/api.ts +1 -1
- package/base.ts +6 -2
- package/common.ts +2 -2
- package/configuration.ts +1 -1
- package/dist/api/bank-accounts-api.d.ts +295 -45
- package/dist/api/bank-accounts-api.js +412 -24
- package/dist/api/bank-transaction-api.d.ts +65 -45
- package/dist/api/bank-transaction-api.js +55 -40
- 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 +48 -107
- package/dist/api/payment-methods-api.js +51 -143
- package/dist/api/payment-reminders-api.d.ts +25 -27
- package/dist/api/payment-reminders-api.js +12 -12
- 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 +46 -49
- package/dist/api/payments-api.js +43 -41
- package/dist/api/refunds-api.d.ts +15 -15
- package/dist/api/refunds-api.js +15 -13
- package/dist/api/tenant-bank-account-api.d.ts +70 -57
- package/dist/api/tenant-bank-account-api.js +56 -42
- package/dist/api/webhooks-api.d.ts +1 -1
- package/dist/api/webhooks-api.js +1 -1
- package/dist/api.d.ts +1 -1
- package/dist/api.js +1 -1
- package/dist/base.d.ts +2 -1
- package/dist/base.js +5 -2
- 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-account-class.d.ts +23 -4
- package/dist/models/bank-account-class.js +1 -1
- package/dist/models/bank-transaction-response-class.d.ts +7 -1
- package/dist/models/bank-transaction-response-class.js +1 -1
- package/dist/models/create-bank-account-request-dto.d.ts +15 -3
- package/dist/models/create-bank-account-request-dto.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 +4 -4
- package/dist/models/create-payment-request-dto.js +1 -1
- package/dist/models/create-refund-request-dto.d.ts +1 -1
- package/dist/models/create-refund-request-dto.js +1 -1
- package/dist/models/create-refund-response-class.d.ts +1 -1
- package/dist/models/create-refund-response-class.js +1 -1
- package/dist/models/create-tenant-bank-account-request-dto.d.ts +1 -1
- package/dist/models/create-tenant-bank-account-request-dto.js +1 -1
- package/dist/models/create-tenant-bank-account-response-class.d.ts +25 -0
- package/dist/models/{complete-payment-setup-request-dto.js → create-tenant-bank-account-response-class.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-bank-account-response-class.d.ts +25 -0
- package/dist/models/{billing-profile-dto.js → get-bank-account-response-class.js} +1 -1
- package/dist/models/get-bank-transactions-response-class.d.ts +1 -1
- package/dist/models/get-bank-transactions-response-class.js +1 -1
- package/dist/models/get-refund-response-class.d.ts +1 -1
- package/dist/models/get-refund-response-class.js +1 -1
- package/dist/models/get-request-dto.d.ts +2 -2
- package/dist/models/get-request-dto.js +1 -1
- package/dist/models/get-tenant-bank-account-response-class.d.ts +1 -1
- package/dist/models/get-tenant-bank-account-response-class.js +1 -1
- package/dist/models/index.d.ts +10 -27
- package/dist/models/index.js +10 -27
- package/dist/models/inline-response200.d.ts +1 -1
- package/dist/models/inline-response200.js +1 -1
- package/dist/models/inline-response503.d.ts +1 -1
- package/dist/models/inline-response503.js +1 -1
- package/dist/models/link-bank-transaction-request-dto-rest.d.ts +24 -0
- package/dist/models/{complete-braintree-payment-setup-request-dto.js → link-bank-transaction-request-dto-rest.js} +1 -1
- package/dist/models/list-bank-transactions-response-class.d.ts +1 -1
- package/dist/models/list-bank-transactions-response-class.js +1 -1
- package/dist/models/list-refunds-response-class.d.ts +1 -1
- package/dist/models/list-refunds-response-class.js +1 -1
- package/dist/models/list-tenant-bank-account-response-class.d.ts +31 -0
- package/dist/models/{billing-profile-limited-response-dto.js → list-tenant-bank-account-response-class.js} +1 -1
- package/dist/models/primary-bank-account-response-class.d.ts +42 -0
- package/dist/models/primary-bank-account-response-class.js +15 -0
- package/dist/models/refund-class.d.ts +2 -1
- package/dist/models/refund-class.js +3 -2
- package/dist/models/set-primary-bank-account-request-dto-rest.d.ts +24 -0
- package/dist/models/set-primary-bank-account-request-dto-rest.js +15 -0
- package/dist/models/tenant-bank-account-response-class.d.ts +1 -1
- package/dist/models/tenant-bank-account-response-class.js +1 -1
- package/dist/models/transaction-class.d.ts +1 -1
- package/dist/models/transaction-class.js +1 -1
- package/dist/models/unlink-bank-transaction-request-dto-rest.d.ts +24 -0
- package/dist/models/unlink-bank-transaction-request-dto-rest.js +15 -0
- package/dist/models/update-bank-account-request-dto-rest.d.ts +30 -0
- package/dist/models/update-bank-account-request-dto-rest.js +15 -0
- package/dist/models/update-bank-account-request-dto.d.ts +36 -0
- package/dist/models/update-bank-account-request-dto.js +15 -0
- package/dist/models/update-bank-account-response-class.d.ts +25 -0
- package/dist/models/update-bank-account-response-class.js +15 -0
- package/dist/models/update-tenant-bank-account-rest-request-dto.d.ts +1 -1
- package/dist/models/update-tenant-bank-account-rest-request-dto.js +1 -1
- package/dist/models/validate-pspconfig-request-dto.d.ts +2 -9
- package/dist/models/validate-pspconfig-request-dto.js +1 -8
- package/index.ts +1 -1
- package/models/bank-account-class.ts +23 -4
- package/models/bank-transaction-response-class.ts +7 -1
- package/models/create-bank-account-request-dto.ts +15 -3
- package/models/create-payment-reminder-request-dto.ts +1 -1
- package/models/create-payment-request-dto.ts +4 -4
- package/models/create-refund-request-dto.ts +1 -1
- package/models/create-refund-response-class.ts +1 -1
- package/models/create-tenant-bank-account-request-dto.ts +1 -1
- package/models/create-tenant-bank-account-response-class.ts +31 -0
- package/models/deactivate-payment-reminder-request-dto.ts +1 -1
- package/models/get-bank-account-response-class.ts +31 -0
- package/models/get-bank-transactions-response-class.ts +1 -1
- package/models/get-refund-response-class.ts +1 -1
- package/models/get-request-dto.ts +2 -2
- package/models/get-tenant-bank-account-response-class.ts +1 -1
- package/models/index.ts +10 -27
- package/models/inline-response200.ts +1 -1
- package/models/inline-response503.ts +1 -1
- package/models/link-bank-transaction-request-dto-rest.ts +30 -0
- package/models/list-bank-transactions-response-class.ts +1 -1
- package/models/list-refunds-response-class.ts +1 -1
- package/models/list-tenant-bank-account-response-class.ts +37 -0
- package/models/primary-bank-account-response-class.ts +48 -0
- package/models/refund-class.ts +3 -2
- package/models/set-primary-bank-account-request-dto-rest.ts +30 -0
- package/models/tenant-bank-account-response-class.ts +1 -1
- package/models/transaction-class.ts +1 -1
- package/models/unlink-bank-transaction-request-dto-rest.ts +30 -0
- package/models/update-bank-account-request-dto-rest.ts +36 -0
- package/models/update-bank-account-request-dto.ts +42 -0
- package/models/update-bank-account-response-class.ts +31 -0
- package/models/update-tenant-bank-account-rest-request-dto.ts +1 -1
- package/models/validate-pspconfig-request-dto.ts +2 -12
- package/package.json +1 -1
- package/dist/models/billing-profile-dto.d.ts +0 -38
- package/dist/models/billing-profile-limited-response-dto.d.ts +0 -54
- 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-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-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/deactivate-payment-reminder-response-class.d.ts +0 -25
- package/dist/models/deactivate-payment-reminder-response-class.js +0 -15
- package/dist/models/get-payment-method-response-class.d.ts +0 -25
- package/dist/models/get-payment-method-response-class.js +0 -15
- package/dist/models/get-payment-response-class.d.ts +0 -25
- 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.d.ts +0 -31
- 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.d.ts +0 -31
- 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.d.ts +0 -66
- 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.d.ts +0 -24
- package/dist/models/sepa-direct-dto.js +0 -15
- package/dist/models/symphony-profile-limited-response-dto.d.ts +0 -42
- package/dist/models/symphony-profile-limited-response-dto.js +0 -15
- package/models/billing-profile-dto.ts +0 -44
- package/models/billing-profile-limited-response-dto.ts +0 -60
- 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/deactivate-payment-reminder-response-class.ts +0 -31
- package/models/get-payment-method-response-class.ts +0 -31
- package/models/get-payment-response-class.ts +0 -31
- 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-methods-response-class.ts +0 -37
- package/models/list-payment-reminders-response-class.ts +0 -37
- package/models/list-payments-response-class.ts +0 -37
- package/models/payment-class.ts +0 -109
- package/models/payment-method-class.ts +0 -72
- package/models/payment-reminder-class.ts +0 -122
- package/models/sepa-direct-dto.ts +0 -30
- package/models/symphony-profile-limited-response-dto.ts +0 -48
package/api/payments-api.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Emil Payment Service
|
|
5
|
-
* This service directly communicates with the various Payment Service Providers (PSPs)
|
|
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
8
|
* Contact: kontakt@emil.de
|
|
@@ -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
|
|
@@ -36,7 +30,7 @@ export const PaymentsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
36
30
|
return {
|
|
37
31
|
/**
|
|
38
32
|
* Creates a payment for a specified account. This function is idempotent.
|
|
39
|
-
* @summary Create
|
|
33
|
+
* @summary Create the payment
|
|
40
34
|
* @param {string} idempotencyKey Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
41
35
|
* @param {CreatePaymentRequestDto} createPaymentRequestDto
|
|
42
36
|
* @param {string} [authorization] Bearer Token
|
|
@@ -89,19 +83,24 @@ export const PaymentsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
89
83
|
};
|
|
90
84
|
},
|
|
91
85
|
/**
|
|
92
|
-
* Retrieves the details of
|
|
93
|
-
* @summary Retrieve
|
|
94
|
-
* @param {string} code
|
|
86
|
+
* Retrieves the details of the payment that was previously created. Supply the unique payment code that was returned when you created it and Emil Api will return the corresponding payment information.
|
|
87
|
+
* @summary Retrieve the payment
|
|
88
|
+
* @param {string} code
|
|
89
|
+
* @param {string} code2 Unique identifier for the object.
|
|
90
|
+
* @param {string} expand 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, code2: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
102
96
|
// verify required parameter 'code' is not null or undefined
|
|
103
97
|
assertParamExists('getPayment', 'code', code)
|
|
104
|
-
|
|
98
|
+
// verify required parameter 'code2' is not null or undefined
|
|
99
|
+
assertParamExists('getPayment', 'code2', code2)
|
|
100
|
+
// verify required parameter 'expand' is not null or undefined
|
|
101
|
+
assertParamExists('getPayment', 'expand', expand)
|
|
102
|
+
const localVarPath = `/paymentservice/v1/payments/{code}`
|
|
103
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
105
104
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
106
105
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
107
106
|
let baseOptions;
|
|
@@ -119,18 +118,14 @@ export const PaymentsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
119
118
|
// http bearer authentication required
|
|
120
119
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
121
120
|
|
|
122
|
-
if (
|
|
123
|
-
localVarQueryParameter['code'] =
|
|
121
|
+
if (code2 !== undefined) {
|
|
122
|
+
localVarQueryParameter['code'] = code2;
|
|
124
123
|
}
|
|
125
124
|
|
|
126
125
|
if (expand !== undefined) {
|
|
127
126
|
localVarQueryParameter['expand'] = expand;
|
|
128
127
|
}
|
|
129
128
|
|
|
130
|
-
if (expand2 !== undefined) {
|
|
131
|
-
localVarQueryParameter['expand'] = expand2;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
129
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
135
130
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
136
131
|
}
|
|
@@ -147,13 +142,13 @@ export const PaymentsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
147
142
|
};
|
|
148
143
|
},
|
|
149
144
|
/**
|
|
150
|
-
* Returns a list of payments you
|
|
145
|
+
* Returns a list of payments you have previously created. The payments are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
151
146
|
* @summary List payments
|
|
152
147
|
* @param {string} [authorization] Bearer Token
|
|
153
148
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
154
149
|
* @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
150
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
156
|
-
* @param {any} [search]
|
|
151
|
+
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
157
152
|
* @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.
|
|
158
153
|
* @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.
|
|
159
154
|
* @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
|
|
@@ -234,46 +229,46 @@ export const PaymentsApiFp = function(configuration?: Configuration) {
|
|
|
234
229
|
return {
|
|
235
230
|
/**
|
|
236
231
|
* Creates a payment for a specified account. This function is idempotent.
|
|
237
|
-
* @summary Create
|
|
232
|
+
* @summary Create the payment
|
|
238
233
|
* @param {string} idempotencyKey Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
239
234
|
* @param {CreatePaymentRequestDto} createPaymentRequestDto
|
|
240
235
|
* @param {string} [authorization] Bearer Token
|
|
241
236
|
* @param {*} [options] Override http request option.
|
|
242
237
|
* @throws {RequiredError}
|
|
243
238
|
*/
|
|
244
|
-
async createPayment(idempotencyKey: string, createPaymentRequestDto: CreatePaymentRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
239
|
+
async createPayment(idempotencyKey: string, createPaymentRequestDto: CreatePaymentRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
245
240
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createPayment(idempotencyKey, createPaymentRequestDto, authorization, options);
|
|
246
241
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
247
242
|
},
|
|
248
243
|
/**
|
|
249
|
-
* Retrieves the details of
|
|
250
|
-
* @summary Retrieve
|
|
251
|
-
* @param {string} code
|
|
244
|
+
* Retrieves the details of the payment that was previously created. Supply the unique payment code that was returned when you created it and Emil Api will return the corresponding payment information.
|
|
245
|
+
* @summary Retrieve the payment
|
|
246
|
+
* @param {string} code
|
|
247
|
+
* @param {string} code2 Unique identifier for the object.
|
|
248
|
+
* @param {string} expand Fields to expand response by
|
|
252
249
|
* @param {string} [authorization] Bearer Token
|
|
253
|
-
* @param {string} [expand] Fields to expand response by
|
|
254
|
-
* @param {string} [expand2] Fields to expand response by
|
|
255
250
|
* @param {*} [options] Override http request option.
|
|
256
251
|
* @throws {RequiredError}
|
|
257
252
|
*/
|
|
258
|
-
async getPayment(code: string,
|
|
259
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getPayment(code,
|
|
253
|
+
async getPayment(code: string, code2: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
254
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPayment(code, code2, expand, authorization, options);
|
|
260
255
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
261
256
|
},
|
|
262
257
|
/**
|
|
263
|
-
* Returns a list of payments you
|
|
258
|
+
* Returns a list of payments you have previously created. The payments are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
264
259
|
* @summary List payments
|
|
265
260
|
* @param {string} [authorization] Bearer Token
|
|
266
261
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
267
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.
|
|
268
263
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
269
|
-
* @param {any} [search]
|
|
264
|
+
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
270
265
|
* @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.
|
|
271
266
|
* @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.
|
|
272
267
|
* @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
|
|
273
268
|
* @param {*} [options] Override http request option.
|
|
274
269
|
* @throws {RequiredError}
|
|
275
270
|
*/
|
|
276
|
-
async listPayments(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
271
|
+
async listPayments(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
277
272
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listPayments(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
278
273
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
279
274
|
},
|
|
@@ -289,44 +284,44 @@ export const PaymentsApiFactory = function (configuration?: Configuration, baseP
|
|
|
289
284
|
return {
|
|
290
285
|
/**
|
|
291
286
|
* Creates a payment for a specified account. This function is idempotent.
|
|
292
|
-
* @summary Create
|
|
287
|
+
* @summary Create the payment
|
|
293
288
|
* @param {string} idempotencyKey Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
294
289
|
* @param {CreatePaymentRequestDto} createPaymentRequestDto
|
|
295
290
|
* @param {string} [authorization] Bearer Token
|
|
296
291
|
* @param {*} [options] Override http request option.
|
|
297
292
|
* @throws {RequiredError}
|
|
298
293
|
*/
|
|
299
|
-
createPayment(idempotencyKey: string, createPaymentRequestDto: CreatePaymentRequestDto, authorization?: string, options?: any): AxiosPromise<
|
|
294
|
+
createPayment(idempotencyKey: string, createPaymentRequestDto: CreatePaymentRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
|
|
300
295
|
return localVarFp.createPayment(idempotencyKey, createPaymentRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
301
296
|
},
|
|
302
297
|
/**
|
|
303
|
-
* Retrieves the details of
|
|
304
|
-
* @summary Retrieve
|
|
305
|
-
* @param {string} code
|
|
298
|
+
* Retrieves the details of the payment that was previously created. Supply the unique payment code that was returned when you created it and Emil Api will return the corresponding payment information.
|
|
299
|
+
* @summary Retrieve the payment
|
|
300
|
+
* @param {string} code
|
|
301
|
+
* @param {string} code2 Unique identifier for the object.
|
|
302
|
+
* @param {string} expand Fields to expand response by
|
|
306
303
|
* @param {string} [authorization] Bearer Token
|
|
307
|
-
* @param {string} [expand] Fields to expand response by
|
|
308
|
-
* @param {string} [expand2] Fields to expand response by
|
|
309
304
|
* @param {*} [options] Override http request option.
|
|
310
305
|
* @throws {RequiredError}
|
|
311
306
|
*/
|
|
312
|
-
getPayment(code: string,
|
|
313
|
-
return localVarFp.getPayment(code,
|
|
307
|
+
getPayment(code: string, code2: string, expand: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
308
|
+
return localVarFp.getPayment(code, code2, expand, authorization, options).then((request) => request(axios, basePath));
|
|
314
309
|
},
|
|
315
310
|
/**
|
|
316
|
-
* Returns a list of payments you
|
|
311
|
+
* Returns a list of payments you have previously created. The payments are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
317
312
|
* @summary List payments
|
|
318
313
|
* @param {string} [authorization] Bearer Token
|
|
319
314
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
320
315
|
* @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.
|
|
321
316
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
322
|
-
* @param {any} [search]
|
|
317
|
+
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
323
318
|
* @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.
|
|
324
319
|
* @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.
|
|
325
320
|
* @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
|
|
326
321
|
* @param {*} [options] Override http request option.
|
|
327
322
|
* @throws {RequiredError}
|
|
328
323
|
*/
|
|
329
|
-
listPayments(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<
|
|
324
|
+
listPayments(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<void> {
|
|
330
325
|
return localVarFp.listPayments(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
331
326
|
},
|
|
332
327
|
};
|
|
@@ -367,32 +362,32 @@ export interface PaymentsApiCreatePaymentRequest {
|
|
|
367
362
|
*/
|
|
368
363
|
export interface PaymentsApiGetPaymentRequest {
|
|
369
364
|
/**
|
|
370
|
-
*
|
|
365
|
+
*
|
|
371
366
|
* @type {string}
|
|
372
367
|
* @memberof PaymentsApiGetPayment
|
|
373
368
|
*/
|
|
374
369
|
readonly code: string
|
|
375
370
|
|
|
376
371
|
/**
|
|
377
|
-
*
|
|
372
|
+
* Unique identifier for the object.
|
|
378
373
|
* @type {string}
|
|
379
374
|
* @memberof PaymentsApiGetPayment
|
|
380
375
|
*/
|
|
381
|
-
readonly
|
|
376
|
+
readonly code2: string
|
|
382
377
|
|
|
383
378
|
/**
|
|
384
379
|
* Fields to expand response by
|
|
385
380
|
* @type {string}
|
|
386
381
|
* @memberof PaymentsApiGetPayment
|
|
387
382
|
*/
|
|
388
|
-
readonly expand
|
|
383
|
+
readonly expand: string
|
|
389
384
|
|
|
390
385
|
/**
|
|
391
|
-
*
|
|
386
|
+
* Bearer Token
|
|
392
387
|
* @type {string}
|
|
393
388
|
* @memberof PaymentsApiGetPayment
|
|
394
389
|
*/
|
|
395
|
-
readonly
|
|
390
|
+
readonly authorization?: string
|
|
396
391
|
}
|
|
397
392
|
|
|
398
393
|
/**
|
|
@@ -430,7 +425,7 @@ export interface PaymentsApiListPaymentsRequest {
|
|
|
430
425
|
readonly filter?: any
|
|
431
426
|
|
|
432
427
|
/**
|
|
433
|
-
*
|
|
428
|
+
* To search the list by any field, pass search=xxx to fetch the result.
|
|
434
429
|
* @type {any}
|
|
435
430
|
* @memberof PaymentsApiListPayments
|
|
436
431
|
*/
|
|
@@ -467,7 +462,7 @@ export interface PaymentsApiListPaymentsRequest {
|
|
|
467
462
|
export class PaymentsApi extends BaseAPI {
|
|
468
463
|
/**
|
|
469
464
|
* Creates a payment for a specified account. This function is idempotent.
|
|
470
|
-
* @summary Create
|
|
465
|
+
* @summary Create the payment
|
|
471
466
|
* @param {PaymentsApiCreatePaymentRequest} requestParameters Request parameters.
|
|
472
467
|
* @param {*} [options] Override http request option.
|
|
473
468
|
* @throws {RequiredError}
|
|
@@ -478,19 +473,19 @@ export class PaymentsApi extends BaseAPI {
|
|
|
478
473
|
}
|
|
479
474
|
|
|
480
475
|
/**
|
|
481
|
-
* Retrieves the details of
|
|
482
|
-
* @summary Retrieve
|
|
476
|
+
* Retrieves the details of the payment that was previously created. Supply the unique payment code that was returned when you created it and Emil Api will return the corresponding payment information.
|
|
477
|
+
* @summary Retrieve the payment
|
|
483
478
|
* @param {PaymentsApiGetPaymentRequest} requestParameters Request parameters.
|
|
484
479
|
* @param {*} [options] Override http request option.
|
|
485
480
|
* @throws {RequiredError}
|
|
486
481
|
* @memberof PaymentsApi
|
|
487
482
|
*/
|
|
488
483
|
public getPayment(requestParameters: PaymentsApiGetPaymentRequest, options?: AxiosRequestConfig) {
|
|
489
|
-
return PaymentsApiFp(this.configuration).getPayment(requestParameters.code, requestParameters.
|
|
484
|
+
return PaymentsApiFp(this.configuration).getPayment(requestParameters.code, requestParameters.code2, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
490
485
|
}
|
|
491
486
|
|
|
492
487
|
/**
|
|
493
|
-
* Returns a list of payments you
|
|
488
|
+
* Returns a list of payments you have previously created. The payments are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
494
489
|
* @summary List payments
|
|
495
490
|
* @param {PaymentsApiListPaymentsRequest} requestParameters Request parameters.
|
|
496
491
|
* @param {*} [options] Override http request option.
|
package/api/refunds-api.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Emil Payment Service
|
|
5
|
-
* This service directly communicates with the various Payment Service Providers (PSPs)
|
|
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
8
|
* Contact: kontakt@emil.de
|
|
@@ -84,16 +84,18 @@ export const RefundsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
84
84
|
*
|
|
85
85
|
* @param {string} code
|
|
86
86
|
* @param {string} code2 Unique identifier for the object.
|
|
87
|
+
* @param {string} expand Fields to expand response by
|
|
87
88
|
* @param {string} [authorization] Bearer Token
|
|
88
|
-
* @param {string} [expand] Fields to expand response by
|
|
89
89
|
* @param {*} [options] Override http request option.
|
|
90
90
|
* @throws {RequiredError}
|
|
91
91
|
*/
|
|
92
|
-
getRefund: async (code: string, code2: string,
|
|
92
|
+
getRefund: async (code: string, code2: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
93
93
|
// verify required parameter 'code' is not null or undefined
|
|
94
94
|
assertParamExists('getRefund', 'code', code)
|
|
95
95
|
// verify required parameter 'code2' is not null or undefined
|
|
96
96
|
assertParamExists('getRefund', 'code2', code2)
|
|
97
|
+
// verify required parameter 'expand' is not null or undefined
|
|
98
|
+
assertParamExists('getRefund', 'expand', expand)
|
|
97
99
|
const localVarPath = `/paymentservice/v1/refunds/{code}`
|
|
98
100
|
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
99
101
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -142,7 +144,7 @@ export const RefundsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
142
144
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
143
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.
|
|
144
146
|
* @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]
|
|
147
|
+
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
146
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.
|
|
147
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.
|
|
148
150
|
* @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
|
|
@@ -236,13 +238,13 @@ export const RefundsApiFp = function(configuration?: Configuration) {
|
|
|
236
238
|
*
|
|
237
239
|
* @param {string} code
|
|
238
240
|
* @param {string} code2 Unique identifier for the object.
|
|
241
|
+
* @param {string} expand Fields to expand response by
|
|
239
242
|
* @param {string} [authorization] Bearer Token
|
|
240
|
-
* @param {string} [expand] Fields to expand response by
|
|
241
243
|
* @param {*} [options] Override http request option.
|
|
242
244
|
* @throws {RequiredError}
|
|
243
245
|
*/
|
|
244
|
-
async getRefund(code: string, code2: string,
|
|
245
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getRefund(code, code2,
|
|
246
|
+
async getRefund(code: string, code2: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetRefundResponseClass>> {
|
|
247
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getRefund(code, code2, expand, authorization, options);
|
|
246
248
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
247
249
|
},
|
|
248
250
|
/**
|
|
@@ -251,7 +253,7 @@ export const RefundsApiFp = function(configuration?: Configuration) {
|
|
|
251
253
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
252
254
|
* @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.
|
|
253
255
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
254
|
-
* @param {any} [search]
|
|
256
|
+
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
255
257
|
* @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.
|
|
256
258
|
* @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.
|
|
257
259
|
* @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
|
|
@@ -286,13 +288,13 @@ export const RefundsApiFactory = function (configuration?: Configuration, basePa
|
|
|
286
288
|
*
|
|
287
289
|
* @param {string} code
|
|
288
290
|
* @param {string} code2 Unique identifier for the object.
|
|
291
|
+
* @param {string} expand Fields to expand response by
|
|
289
292
|
* @param {string} [authorization] Bearer Token
|
|
290
|
-
* @param {string} [expand] Fields to expand response by
|
|
291
293
|
* @param {*} [options] Override http request option.
|
|
292
294
|
* @throws {RequiredError}
|
|
293
295
|
*/
|
|
294
|
-
getRefund(code: string, code2: string,
|
|
295
|
-
return localVarFp.getRefund(code, code2,
|
|
296
|
+
getRefund(code: string, code2: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetRefundResponseClass> {
|
|
297
|
+
return localVarFp.getRefund(code, code2, expand, authorization, options).then((request) => request(axios, basePath));
|
|
296
298
|
},
|
|
297
299
|
/**
|
|
298
300
|
*
|
|
@@ -300,7 +302,7 @@ export const RefundsApiFactory = function (configuration?: Configuration, basePa
|
|
|
300
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
|
-
* @param {any} [search]
|
|
305
|
+
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
304
306
|
* @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.
|
|
305
307
|
* @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.
|
|
306
308
|
* @param {any} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
|
|
@@ -355,18 +357,18 @@ export interface RefundsApiGetRefundRequest {
|
|
|
355
357
|
readonly code2: string
|
|
356
358
|
|
|
357
359
|
/**
|
|
358
|
-
*
|
|
360
|
+
* Fields to expand response by
|
|
359
361
|
* @type {string}
|
|
360
362
|
* @memberof RefundsApiGetRefund
|
|
361
363
|
*/
|
|
362
|
-
readonly
|
|
364
|
+
readonly expand: string
|
|
363
365
|
|
|
364
366
|
/**
|
|
365
|
-
*
|
|
367
|
+
* Bearer Token
|
|
366
368
|
* @type {string}
|
|
367
369
|
* @memberof RefundsApiGetRefund
|
|
368
370
|
*/
|
|
369
|
-
readonly
|
|
371
|
+
readonly authorization?: string
|
|
370
372
|
}
|
|
371
373
|
|
|
372
374
|
/**
|
|
@@ -404,7 +406,7 @@ export interface RefundsApiListRefundsRequest {
|
|
|
404
406
|
readonly filter?: any
|
|
405
407
|
|
|
406
408
|
/**
|
|
407
|
-
*
|
|
409
|
+
* To search the list by any field, pass search=xxx to fetch the result.
|
|
408
410
|
* @type {any}
|
|
409
411
|
* @memberof RefundsApiListRefunds
|
|
410
412
|
*/
|
|
@@ -458,7 +460,7 @@ export class RefundsApi extends BaseAPI {
|
|
|
458
460
|
* @memberof RefundsApi
|
|
459
461
|
*/
|
|
460
462
|
public getRefund(requestParameters: RefundsApiGetRefundRequest, options?: AxiosRequestConfig) {
|
|
461
|
-
return RefundsApiFp(this.configuration).getRefund(requestParameters.code, requestParameters.code2, requestParameters.
|
|
463
|
+
return RefundsApiFp(this.configuration).getRefund(requestParameters.code, requestParameters.code2, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
462
464
|
}
|
|
463
465
|
|
|
464
466
|
/**
|