@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
|
@@ -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
|
|
@@ -20,14 +20,6 @@ import { Configuration } from '../configuration';
|
|
|
20
20
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
import { CreatePaymentMethodResponseClass } from '../models';
|
|
25
|
-
// @ts-ignore
|
|
26
|
-
import { CreatePspPaymentMethodRequestDto } from '../models';
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
import { GetPaymentMethodResponseClass } from '../models';
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
import { ListPaymentMethodsResponseClass } from '../models';
|
|
31
23
|
/**
|
|
32
24
|
* PaymentMethodsApi - axios parameter creator
|
|
33
25
|
* @export
|
|
@@ -36,15 +28,15 @@ export const PaymentMethodsApiAxiosParamCreator = function (configuration?: Conf
|
|
|
36
28
|
return {
|
|
37
29
|
/**
|
|
38
30
|
* This will create payment method in the database as well as in the PSP. The newly created payment method will be set as default payment method will be used by the customer to pay or receive a refund.
|
|
39
|
-
* @summary Create the payment
|
|
40
|
-
* @param {
|
|
31
|
+
* @summary Create the payment method
|
|
32
|
+
* @param {object} body
|
|
41
33
|
* @param {string} [authorization] Bearer Token
|
|
42
34
|
* @param {*} [options] Override http request option.
|
|
43
35
|
* @throws {RequiredError}
|
|
44
36
|
*/
|
|
45
|
-
createPaymentMethod: async (
|
|
46
|
-
// verify required parameter '
|
|
47
|
-
assertParamExists('createPaymentMethod', '
|
|
37
|
+
createPaymentMethod: async (body: object, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
38
|
+
// verify required parameter 'body' is not null or undefined
|
|
39
|
+
assertParamExists('createPaymentMethod', 'body', body)
|
|
48
40
|
const localVarPath = `/paymentservice/v1/payment-methods`;
|
|
49
41
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
50
42
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -74,55 +66,7 @@ export const PaymentMethodsApiAxiosParamCreator = function (configuration?: Conf
|
|
|
74
66
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
75
67
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
76
68
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
77
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
78
|
-
|
|
79
|
-
return {
|
|
80
|
-
url: toPathString(localVarUrlObj),
|
|
81
|
-
options: localVarRequestOptions,
|
|
82
|
-
};
|
|
83
|
-
},
|
|
84
|
-
/**
|
|
85
|
-
* Permanently deletes a payment method. Supply the unique payment method id that was returned when you created the payment method and this will delete it. It will also delete it on the corresponding payment service provider.
|
|
86
|
-
* @summary Delete a payment method
|
|
87
|
-
* @param {number} id Unique identifier for payment method
|
|
88
|
-
* @param {string} [authorization] Bearer Token
|
|
89
|
-
* @param {*} [options] Override http request option.
|
|
90
|
-
* @throws {RequiredError}
|
|
91
|
-
*/
|
|
92
|
-
deletePaymentMethod: async (id: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
93
|
-
// verify required parameter 'id' is not null or undefined
|
|
94
|
-
assertParamExists('deletePaymentMethod', 'id', id)
|
|
95
|
-
const localVarPath = `/paymentservice/v1/payment-methods/{id}`;
|
|
96
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
97
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
98
|
-
let baseOptions;
|
|
99
|
-
let baseAccessToken;
|
|
100
|
-
if (configuration) {
|
|
101
|
-
baseOptions = configuration.baseOptions;
|
|
102
|
-
baseAccessToken = configuration.accessToken;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
106
|
-
const localVarHeaderParameter = {} as any;
|
|
107
|
-
const localVarQueryParameter = {} as any;
|
|
108
|
-
|
|
109
|
-
// authentication bearer required
|
|
110
|
-
// http bearer authentication required
|
|
111
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
112
|
-
|
|
113
|
-
if (id !== undefined) {
|
|
114
|
-
localVarQueryParameter['id'] = id;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
118
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
124
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
125
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
69
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
|
|
126
70
|
|
|
127
71
|
return {
|
|
128
72
|
url: toPathString(localVarUrlObj),
|
|
@@ -131,18 +75,23 @@ export const PaymentMethodsApiAxiosParamCreator = function (configuration?: Conf
|
|
|
131
75
|
},
|
|
132
76
|
/**
|
|
133
77
|
* Retrieves the details of a payment method that was previously created. Supply the unique payment method code that was returned when you created the payment method and Emil Api will return the corresponding payment method information.
|
|
134
|
-
* @summary Retrieve
|
|
135
|
-
* @param {string} code
|
|
78
|
+
* @summary Retrieve the payment method
|
|
79
|
+
* @param {string} code
|
|
80
|
+
* @param {string} code2 Unique identifier for the object.
|
|
81
|
+
* @param {string} expand Fields to expand response by
|
|
136
82
|
* @param {string} [authorization] Bearer Token
|
|
137
|
-
* @param {string} [expand] Fields to expand response by
|
|
138
|
-
* @param {string} [expand2] Fields to expand response by
|
|
139
83
|
* @param {*} [options] Override http request option.
|
|
140
84
|
* @throws {RequiredError}
|
|
141
85
|
*/
|
|
142
|
-
getPaymentMethod: async (code: string,
|
|
86
|
+
getPaymentMethod: async (code: string, code2: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
143
87
|
// verify required parameter 'code' is not null or undefined
|
|
144
88
|
assertParamExists('getPaymentMethod', 'code', code)
|
|
145
|
-
|
|
89
|
+
// verify required parameter 'code2' is not null or undefined
|
|
90
|
+
assertParamExists('getPaymentMethod', 'code2', code2)
|
|
91
|
+
// verify required parameter 'expand' is not null or undefined
|
|
92
|
+
assertParamExists('getPaymentMethod', 'expand', expand)
|
|
93
|
+
const localVarPath = `/paymentservice/v1/payment-methods/{code}`
|
|
94
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
146
95
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
147
96
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
148
97
|
let baseOptions;
|
|
@@ -160,18 +109,14 @@ export const PaymentMethodsApiAxiosParamCreator = function (configuration?: Conf
|
|
|
160
109
|
// http bearer authentication required
|
|
161
110
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
162
111
|
|
|
163
|
-
if (
|
|
164
|
-
localVarQueryParameter['code'] =
|
|
112
|
+
if (code2 !== undefined) {
|
|
113
|
+
localVarQueryParameter['code'] = code2;
|
|
165
114
|
}
|
|
166
115
|
|
|
167
116
|
if (expand !== undefined) {
|
|
168
117
|
localVarQueryParameter['expand'] = expand;
|
|
169
118
|
}
|
|
170
119
|
|
|
171
|
-
if (expand2 !== undefined) {
|
|
172
|
-
localVarQueryParameter['expand'] = expand2;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
120
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
176
121
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
177
122
|
}
|
|
@@ -188,13 +133,13 @@ export const PaymentMethodsApiAxiosParamCreator = function (configuration?: Conf
|
|
|
188
133
|
};
|
|
189
134
|
},
|
|
190
135
|
/**
|
|
191
|
-
* Returns a list of payment methods you
|
|
136
|
+
* Returns a list of payment methods you have previously created. The payment methods are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
192
137
|
* @summary List payment methods
|
|
193
138
|
* @param {string} [authorization] Bearer Token
|
|
194
139
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
195
140
|
* @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.
|
|
196
141
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
197
|
-
* @param {any} [search]
|
|
142
|
+
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
198
143
|
* @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.
|
|
199
144
|
* @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.
|
|
200
145
|
* @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.
|
|
@@ -275,57 +220,45 @@ export const PaymentMethodsApiFp = function(configuration?: Configuration) {
|
|
|
275
220
|
return {
|
|
276
221
|
/**
|
|
277
222
|
* This will create payment method in the database as well as in the PSP. The newly created payment method will be set as default payment method will be used by the customer to pay or receive a refund.
|
|
278
|
-
* @summary Create the payment
|
|
279
|
-
* @param {
|
|
223
|
+
* @summary Create the payment method
|
|
224
|
+
* @param {object} body
|
|
280
225
|
* @param {string} [authorization] Bearer Token
|
|
281
226
|
* @param {*} [options] Override http request option.
|
|
282
227
|
* @throws {RequiredError}
|
|
283
228
|
*/
|
|
284
|
-
async createPaymentMethod(
|
|
285
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createPaymentMethod(
|
|
286
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
287
|
-
},
|
|
288
|
-
/**
|
|
289
|
-
* Permanently deletes a payment method. Supply the unique payment method id that was returned when you created the payment method and this will delete it. It will also delete it on the corresponding payment service provider.
|
|
290
|
-
* @summary Delete a payment method
|
|
291
|
-
* @param {number} id Unique identifier for payment method
|
|
292
|
-
* @param {string} [authorization] Bearer Token
|
|
293
|
-
* @param {*} [options] Override http request option.
|
|
294
|
-
* @throws {RequiredError}
|
|
295
|
-
*/
|
|
296
|
-
async deletePaymentMethod(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
297
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.deletePaymentMethod(id, authorization, options);
|
|
229
|
+
async createPaymentMethod(body: object, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
230
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createPaymentMethod(body, authorization, options);
|
|
298
231
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
299
232
|
},
|
|
300
233
|
/**
|
|
301
234
|
* Retrieves the details of a payment method that was previously created. Supply the unique payment method code that was returned when you created the payment method and Emil Api will return the corresponding payment method information.
|
|
302
|
-
* @summary Retrieve
|
|
303
|
-
* @param {string} code
|
|
235
|
+
* @summary Retrieve the payment method
|
|
236
|
+
* @param {string} code
|
|
237
|
+
* @param {string} code2 Unique identifier for the object.
|
|
238
|
+
* @param {string} expand Fields to expand response by
|
|
304
239
|
* @param {string} [authorization] Bearer Token
|
|
305
|
-
* @param {string} [expand] Fields to expand response by
|
|
306
|
-
* @param {string} [expand2] Fields to expand response by
|
|
307
240
|
* @param {*} [options] Override http request option.
|
|
308
241
|
* @throws {RequiredError}
|
|
309
242
|
*/
|
|
310
|
-
async getPaymentMethod(code: string,
|
|
311
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getPaymentMethod(code,
|
|
243
|
+
async getPaymentMethod(code: string, code2: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
244
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPaymentMethod(code, code2, expand, authorization, options);
|
|
312
245
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
313
246
|
},
|
|
314
247
|
/**
|
|
315
|
-
* Returns a list of payment methods you
|
|
248
|
+
* Returns a list of payment methods you have previously created. The payment methods are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
316
249
|
* @summary List payment methods
|
|
317
250
|
* @param {string} [authorization] Bearer Token
|
|
318
251
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
319
252
|
* @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.
|
|
320
253
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
321
|
-
* @param {any} [search]
|
|
254
|
+
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
322
255
|
* @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.
|
|
323
256
|
* @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.
|
|
324
257
|
* @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.
|
|
325
258
|
* @param {*} [options] Override http request option.
|
|
326
259
|
* @throws {RequiredError}
|
|
327
260
|
*/
|
|
328
|
-
async listPaymentMethods(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
261
|
+
async listPaymentMethods(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>> {
|
|
329
262
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listPaymentMethods(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
330
263
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
331
264
|
},
|
|
@@ -341,54 +274,43 @@ export const PaymentMethodsApiFactory = function (configuration?: Configuration,
|
|
|
341
274
|
return {
|
|
342
275
|
/**
|
|
343
276
|
* This will create payment method in the database as well as in the PSP. The newly created payment method will be set as default payment method will be used by the customer to pay or receive a refund.
|
|
344
|
-
* @summary Create the payment
|
|
345
|
-
* @param {
|
|
277
|
+
* @summary Create the payment method
|
|
278
|
+
* @param {object} body
|
|
346
279
|
* @param {string} [authorization] Bearer Token
|
|
347
280
|
* @param {*} [options] Override http request option.
|
|
348
281
|
* @throws {RequiredError}
|
|
349
282
|
*/
|
|
350
|
-
createPaymentMethod(
|
|
351
|
-
return localVarFp.createPaymentMethod(
|
|
352
|
-
},
|
|
353
|
-
/**
|
|
354
|
-
* Permanently deletes a payment method. Supply the unique payment method id that was returned when you created the payment method and this will delete it. It will also delete it on the corresponding payment service provider.
|
|
355
|
-
* @summary Delete a payment method
|
|
356
|
-
* @param {number} id Unique identifier for payment method
|
|
357
|
-
* @param {string} [authorization] Bearer Token
|
|
358
|
-
* @param {*} [options] Override http request option.
|
|
359
|
-
* @throws {RequiredError}
|
|
360
|
-
*/
|
|
361
|
-
deletePaymentMethod(id: number, authorization?: string, options?: any): AxiosPromise<void> {
|
|
362
|
-
return localVarFp.deletePaymentMethod(id, authorization, options).then((request) => request(axios, basePath));
|
|
283
|
+
createPaymentMethod(body: object, authorization?: string, options?: any): AxiosPromise<void> {
|
|
284
|
+
return localVarFp.createPaymentMethod(body, authorization, options).then((request) => request(axios, basePath));
|
|
363
285
|
},
|
|
364
286
|
/**
|
|
365
287
|
* Retrieves the details of a payment method that was previously created. Supply the unique payment method code that was returned when you created the payment method and Emil Api will return the corresponding payment method information.
|
|
366
|
-
* @summary Retrieve
|
|
367
|
-
* @param {string} code
|
|
288
|
+
* @summary Retrieve the payment method
|
|
289
|
+
* @param {string} code
|
|
290
|
+
* @param {string} code2 Unique identifier for the object.
|
|
291
|
+
* @param {string} expand Fields to expand response by
|
|
368
292
|
* @param {string} [authorization] Bearer Token
|
|
369
|
-
* @param {string} [expand] Fields to expand response by
|
|
370
|
-
* @param {string} [expand2] Fields to expand response by
|
|
371
293
|
* @param {*} [options] Override http request option.
|
|
372
294
|
* @throws {RequiredError}
|
|
373
295
|
*/
|
|
374
|
-
getPaymentMethod(code: string,
|
|
375
|
-
return localVarFp.getPaymentMethod(code,
|
|
296
|
+
getPaymentMethod(code: string, code2: string, expand: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
297
|
+
return localVarFp.getPaymentMethod(code, code2, expand, authorization, options).then((request) => request(axios, basePath));
|
|
376
298
|
},
|
|
377
299
|
/**
|
|
378
|
-
* Returns a list of payment methods you
|
|
300
|
+
* Returns a list of payment methods you have previously created. The payment methods are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
379
301
|
* @summary List payment methods
|
|
380
302
|
* @param {string} [authorization] Bearer Token
|
|
381
303
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
382
304
|
* @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.
|
|
383
305
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
384
|
-
* @param {any} [search]
|
|
306
|
+
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
385
307
|
* @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.
|
|
386
308
|
* @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.
|
|
387
309
|
* @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.
|
|
388
310
|
* @param {*} [options] Override http request option.
|
|
389
311
|
* @throws {RequiredError}
|
|
390
312
|
*/
|
|
391
|
-
listPaymentMethods(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<
|
|
313
|
+
listPaymentMethods(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<void> {
|
|
392
314
|
return localVarFp.listPaymentMethods(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
393
315
|
},
|
|
394
316
|
};
|
|
@@ -402,10 +324,10 @@ export const PaymentMethodsApiFactory = function (configuration?: Configuration,
|
|
|
402
324
|
export interface PaymentMethodsApiCreatePaymentMethodRequest {
|
|
403
325
|
/**
|
|
404
326
|
*
|
|
405
|
-
* @type {
|
|
327
|
+
* @type {object}
|
|
406
328
|
* @memberof PaymentMethodsApiCreatePaymentMethod
|
|
407
329
|
*/
|
|
408
|
-
readonly
|
|
330
|
+
readonly body: object
|
|
409
331
|
|
|
410
332
|
/**
|
|
411
333
|
* Bearer Token
|
|
@@ -415,27 +337,6 @@ export interface PaymentMethodsApiCreatePaymentMethodRequest {
|
|
|
415
337
|
readonly authorization?: string
|
|
416
338
|
}
|
|
417
339
|
|
|
418
|
-
/**
|
|
419
|
-
* Request parameters for deletePaymentMethod operation in PaymentMethodsApi.
|
|
420
|
-
* @export
|
|
421
|
-
* @interface PaymentMethodsApiDeletePaymentMethodRequest
|
|
422
|
-
*/
|
|
423
|
-
export interface PaymentMethodsApiDeletePaymentMethodRequest {
|
|
424
|
-
/**
|
|
425
|
-
* Unique identifier for payment method
|
|
426
|
-
* @type {number}
|
|
427
|
-
* @memberof PaymentMethodsApiDeletePaymentMethod
|
|
428
|
-
*/
|
|
429
|
-
readonly id: number
|
|
430
|
-
|
|
431
|
-
/**
|
|
432
|
-
* Bearer Token
|
|
433
|
-
* @type {string}
|
|
434
|
-
* @memberof PaymentMethodsApiDeletePaymentMethod
|
|
435
|
-
*/
|
|
436
|
-
readonly authorization?: string
|
|
437
|
-
}
|
|
438
|
-
|
|
439
340
|
/**
|
|
440
341
|
* Request parameters for getPaymentMethod operation in PaymentMethodsApi.
|
|
441
342
|
* @export
|
|
@@ -443,32 +344,32 @@ export interface PaymentMethodsApiDeletePaymentMethodRequest {
|
|
|
443
344
|
*/
|
|
444
345
|
export interface PaymentMethodsApiGetPaymentMethodRequest {
|
|
445
346
|
/**
|
|
446
|
-
*
|
|
347
|
+
*
|
|
447
348
|
* @type {string}
|
|
448
349
|
* @memberof PaymentMethodsApiGetPaymentMethod
|
|
449
350
|
*/
|
|
450
351
|
readonly code: string
|
|
451
352
|
|
|
452
353
|
/**
|
|
453
|
-
*
|
|
354
|
+
* Unique identifier for the object.
|
|
454
355
|
* @type {string}
|
|
455
356
|
* @memberof PaymentMethodsApiGetPaymentMethod
|
|
456
357
|
*/
|
|
457
|
-
readonly
|
|
358
|
+
readonly code2: string
|
|
458
359
|
|
|
459
360
|
/**
|
|
460
361
|
* Fields to expand response by
|
|
461
362
|
* @type {string}
|
|
462
363
|
* @memberof PaymentMethodsApiGetPaymentMethod
|
|
463
364
|
*/
|
|
464
|
-
readonly expand
|
|
365
|
+
readonly expand: string
|
|
465
366
|
|
|
466
367
|
/**
|
|
467
|
-
*
|
|
368
|
+
* Bearer Token
|
|
468
369
|
* @type {string}
|
|
469
370
|
* @memberof PaymentMethodsApiGetPaymentMethod
|
|
470
371
|
*/
|
|
471
|
-
readonly
|
|
372
|
+
readonly authorization?: string
|
|
472
373
|
}
|
|
473
374
|
|
|
474
375
|
/**
|
|
@@ -506,7 +407,7 @@ export interface PaymentMethodsApiListPaymentMethodsRequest {
|
|
|
506
407
|
readonly filter?: any
|
|
507
408
|
|
|
508
409
|
/**
|
|
509
|
-
*
|
|
410
|
+
* To search the list by any field, pass search=xxx to fetch the result.
|
|
510
411
|
* @type {any}
|
|
511
412
|
* @memberof PaymentMethodsApiListPaymentMethods
|
|
512
413
|
*/
|
|
@@ -543,42 +444,30 @@ export interface PaymentMethodsApiListPaymentMethodsRequest {
|
|
|
543
444
|
export class PaymentMethodsApi extends BaseAPI {
|
|
544
445
|
/**
|
|
545
446
|
* This will create payment method in the database as well as in the PSP. The newly created payment method will be set as default payment method will be used by the customer to pay or receive a refund.
|
|
546
|
-
* @summary Create the payment
|
|
447
|
+
* @summary Create the payment method
|
|
547
448
|
* @param {PaymentMethodsApiCreatePaymentMethodRequest} requestParameters Request parameters.
|
|
548
449
|
* @param {*} [options] Override http request option.
|
|
549
450
|
* @throws {RequiredError}
|
|
550
451
|
* @memberof PaymentMethodsApi
|
|
551
452
|
*/
|
|
552
453
|
public createPaymentMethod(requestParameters: PaymentMethodsApiCreatePaymentMethodRequest, options?: AxiosRequestConfig) {
|
|
553
|
-
return PaymentMethodsApiFp(this.configuration).createPaymentMethod(requestParameters.
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
/**
|
|
557
|
-
* Permanently deletes a payment method. Supply the unique payment method id that was returned when you created the payment method and this will delete it. It will also delete it on the corresponding payment service provider.
|
|
558
|
-
* @summary Delete a payment method
|
|
559
|
-
* @param {PaymentMethodsApiDeletePaymentMethodRequest} requestParameters Request parameters.
|
|
560
|
-
* @param {*} [options] Override http request option.
|
|
561
|
-
* @throws {RequiredError}
|
|
562
|
-
* @memberof PaymentMethodsApi
|
|
563
|
-
*/
|
|
564
|
-
public deletePaymentMethod(requestParameters: PaymentMethodsApiDeletePaymentMethodRequest, options?: AxiosRequestConfig) {
|
|
565
|
-
return PaymentMethodsApiFp(this.configuration).deletePaymentMethod(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
454
|
+
return PaymentMethodsApiFp(this.configuration).createPaymentMethod(requestParameters.body, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
566
455
|
}
|
|
567
456
|
|
|
568
457
|
/**
|
|
569
458
|
* Retrieves the details of a payment method that was previously created. Supply the unique payment method code that was returned when you created the payment method and Emil Api will return the corresponding payment method information.
|
|
570
|
-
* @summary Retrieve
|
|
459
|
+
* @summary Retrieve the payment method
|
|
571
460
|
* @param {PaymentMethodsApiGetPaymentMethodRequest} requestParameters Request parameters.
|
|
572
461
|
* @param {*} [options] Override http request option.
|
|
573
462
|
* @throws {RequiredError}
|
|
574
463
|
* @memberof PaymentMethodsApi
|
|
575
464
|
*/
|
|
576
465
|
public getPaymentMethod(requestParameters: PaymentMethodsApiGetPaymentMethodRequest, options?: AxiosRequestConfig) {
|
|
577
|
-
return PaymentMethodsApiFp(this.configuration).getPaymentMethod(requestParameters.code, requestParameters.
|
|
466
|
+
return PaymentMethodsApiFp(this.configuration).getPaymentMethod(requestParameters.code, requestParameters.code2, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
578
467
|
}
|
|
579
468
|
|
|
580
469
|
/**
|
|
581
|
-
* Returns a list of payment methods you
|
|
470
|
+
* Returns a list of payment methods you have previously created. The payment methods are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
582
471
|
* @summary List payment methods
|
|
583
472
|
* @param {PaymentMethodsApiListPaymentMethodsRequest} requestParameters Request parameters.
|
|
584
473
|
* @param {*} [options] Override http request option.
|