@emilgroup/payment-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +58 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +51 -0
- package/api/bank-accounts-api.ts +337 -0
- package/api/default-api.ts +120 -0
- package/api/payment-methods-api.ts +577 -0
- package/api/payment-reminders-api.ts +556 -0
- package/api/payment-service-providers-api.ts +161 -0
- package/api/payment-setup-api.ts +264 -0
- package/api/payments-api.ts +489 -0
- package/api/webhooks-api.ts +150 -0
- package/api.ts +41 -0
- package/base.ts +251 -0
- package/common.ts +198 -0
- package/configuration.ts +101 -0
- package/dist/api/bank-accounts-api.d.ts +197 -0
- package/dist/api/bank-accounts-api.js +347 -0
- package/dist/api/default-api.d.ts +66 -0
- package/dist/api/default-api.js +196 -0
- package/dist/api/payment-methods-api.d.ts +327 -0
- package/dist/api/payment-methods-api.js +547 -0
- package/dist/api/payment-reminders-api.d.ts +317 -0
- package/dist/api/payment-reminders-api.js +538 -0
- package/dist/api/payment-service-providers-api.d.ts +93 -0
- package/dist/api/payment-service-providers-api.js +220 -0
- package/dist/api/payment-setup-api.d.ts +146 -0
- package/dist/api/payment-setup-api.js +309 -0
- package/dist/api/payments-api.d.ts +281 -0
- package/dist/api/payments-api.js +461 -0
- package/dist/api/webhooks-api.d.ts +91 -0
- package/dist/api/webhooks-api.js +209 -0
- package/dist/api.d.ts +19 -0
- package/dist/api.js +37 -0
- package/dist/base.d.ts +74 -0
- package/dist/base.js +298 -0
- package/dist/common.d.ts +91 -0
- package/dist/common.js +276 -0
- package/dist/configuration.d.ts +83 -0
- package/dist/configuration.js +44 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +36 -0
- package/dist/models/bank-account-class.d.ts +54 -0
- package/dist/models/bank-account-class.js +15 -0
- package/dist/models/billing-profile-dto.d.ts +38 -0
- package/dist/models/billing-profile-dto.js +15 -0
- package/dist/models/billing-profile-limited-response-dto.d.ts +54 -0
- package/dist/models/billing-profile-limited-response-dto.js +15 -0
- package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
- package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
- package/dist/models/complete-payment-setup-request-dto.d.ts +32 -0
- package/dist/models/complete-payment-setup-request-dto.js +15 -0
- package/dist/models/complete-payment-setup-response-class.d.ts +25 -0
- package/dist/models/complete-payment-setup-response-class.js +15 -0
- package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +60 -0
- package/dist/models/complete-stripe-payment-setup-request-dto.js +15 -0
- package/dist/models/create-bank-account-request-dto.d.ts +30 -0
- package/dist/models/create-bank-account-request-dto.js +15 -0
- package/dist/models/create-payment-method-response-class.d.ts +25 -0
- package/dist/models/create-payment-method-response-class.js +15 -0
- package/dist/models/create-payment-reminder-request-dto.d.ts +65 -0
- package/dist/models/create-payment-reminder-request-dto.js +26 -0
- package/dist/models/create-payment-request-dto.d.ts +72 -0
- package/dist/models/create-payment-request-dto.js +15 -0
- package/dist/models/create-payment-response-class.d.ts +25 -0
- package/dist/models/create-payment-response-class.js +15 -0
- package/dist/models/create-psp-payment-method-request-dto.d.ts +61 -0
- package/dist/models/create-psp-payment-method-request-dto.js +32 -0
- package/dist/models/deactivate-payment-reminder-request-dto.d.ts +30 -0
- package/dist/models/deactivate-payment-reminder-request-dto.js +21 -0
- package/dist/models/get-payment-method-response-class.d.ts +25 -0
- package/dist/models/get-payment-method-response-class.js +15 -0
- package/dist/models/get-payment-response-class.d.ts +25 -0
- package/dist/models/get-payment-response-class.js +15 -0
- package/dist/models/get-request-dto.d.ts +30 -0
- package/dist/models/get-request-dto.js +15 -0
- package/dist/models/index.d.ts +37 -0
- package/dist/models/index.js +53 -0
- package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +30 -0
- package/dist/models/initiate-braintree-payment-setup-request-dto.js +15 -0
- package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +24 -0
- package/dist/models/initiate-braintree-payment-setup-response-class.js +15 -0
- package/dist/models/initiate-payment-setup-request-dto.d.ts +44 -0
- package/dist/models/initiate-payment-setup-request-dto.js +15 -0
- package/dist/models/initiate-payment-setup-response-class.d.ts +32 -0
- package/dist/models/initiate-payment-setup-response-class.js +15 -0
- package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +30 -0
- package/dist/models/initiate-stripe-payment-setup-request-dto.js +15 -0
- package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +30 -0
- package/dist/models/initiate-stripe-payment-setup-response-class.js +15 -0
- package/dist/models/inline-response200.d.ts +54 -0
- package/dist/models/inline-response200.js +15 -0
- package/dist/models/inline-response503.d.ts +54 -0
- package/dist/models/inline-response503.js +15 -0
- package/dist/models/list-bank-accounts-response-class.d.ts +31 -0
- package/dist/models/list-bank-accounts-response-class.js +15 -0
- package/dist/models/list-payment-methods-response-class.d.ts +31 -0
- package/dist/models/list-payment-methods-response-class.js +15 -0
- package/dist/models/list-payment-reminders-response-class.d.ts +31 -0
- package/dist/models/list-payment-reminders-response-class.js +15 -0
- package/dist/models/list-payments-response-class.d.ts +31 -0
- package/dist/models/list-payments-response-class.js +15 -0
- package/dist/models/payment-class.d.ts +103 -0
- package/dist/models/payment-class.js +15 -0
- package/dist/models/payment-method-class.d.ts +60 -0
- package/dist/models/payment-method-class.js +15 -0
- package/dist/models/payment-reminder-class.d.ts +112 -0
- package/dist/models/payment-reminder-class.js +36 -0
- package/dist/models/sepa-direct-dto.d.ts +24 -0
- package/dist/models/sepa-direct-dto.js +15 -0
- package/dist/models/symphony-profile-limited-response-dto.d.ts +42 -0
- package/dist/models/symphony-profile-limited-response-dto.js +15 -0
- package/dist/models/transaction-class.d.ts +54 -0
- package/dist/models/transaction-class.js +15 -0
- package/dist/models/validate-pspconfig-request-dto.d.ts +43 -0
- package/dist/models/validate-pspconfig-request-dto.js +22 -0
- package/dist/models/validate-pspconfig-response-class.d.ts +24 -0
- package/dist/models/validate-pspconfig-response-class.js +15 -0
- package/git_push.sh +57 -0
- package/index.ts +19 -0
- package/models/bank-account-class.ts +60 -0
- package/models/billing-profile-dto.ts +44 -0
- package/models/billing-profile-limited-response-dto.ts +60 -0
- package/models/complete-braintree-payment-setup-request-dto.ts +54 -0
- package/models/complete-payment-setup-request-dto.ts +38 -0
- package/models/complete-payment-setup-response-class.ts +31 -0
- package/models/complete-stripe-payment-setup-request-dto.ts +66 -0
- package/models/create-bank-account-request-dto.ts +36 -0
- package/models/create-payment-method-response-class.ts +31 -0
- package/models/create-payment-reminder-request-dto.ts +74 -0
- package/models/create-payment-request-dto.ts +78 -0
- package/models/create-payment-response-class.ts +31 -0
- package/models/create-psp-payment-method-request-dto.ts +70 -0
- package/models/deactivate-payment-reminder-request-dto.ts +39 -0
- package/models/get-payment-method-response-class.ts +31 -0
- package/models/get-payment-response-class.ts +31 -0
- package/models/get-request-dto.ts +36 -0
- package/models/index.ts +37 -0
- package/models/initiate-braintree-payment-setup-request-dto.ts +36 -0
- package/models/initiate-braintree-payment-setup-response-class.ts +30 -0
- package/models/initiate-payment-setup-request-dto.ts +50 -0
- package/models/initiate-payment-setup-response-class.ts +38 -0
- package/models/initiate-stripe-payment-setup-request-dto.ts +36 -0
- package/models/initiate-stripe-payment-setup-response-class.ts +36 -0
- package/models/inline-response200.ts +48 -0
- package/models/inline-response503.ts +48 -0
- package/models/list-bank-accounts-response-class.ts +37 -0
- package/models/list-payment-methods-response-class.ts +37 -0
- package/models/list-payment-reminders-response-class.ts +37 -0
- package/models/list-payments-response-class.ts +37 -0
- package/models/payment-class.ts +109 -0
- package/models/payment-method-class.ts +66 -0
- package/models/payment-reminder-class.ts +122 -0
- package/models/sepa-direct-dto.ts +30 -0
- package/models/symphony-profile-limited-response-dto.ts +48 -0
- package/models/transaction-class.ts +60 -0
- package/models/validate-pspconfig-request-dto.ts +52 -0
- package/models/validate-pspconfig-response-class.ts +30 -0
- package/package.json +27 -0
- package/tsconfig.json +22 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Emil Payment Service
|
|
5
|
+
* This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
* Contact: kontakt@emil.de
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
17
|
+
import { Configuration } from '../configuration';
|
|
18
|
+
// Some imports not used depending on template conditions
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import { ValidatePSPConfigRequestDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { ValidatePSPConfigResponseClass } from '../models';
|
|
27
|
+
/**
|
|
28
|
+
* PaymentServiceProvidersApi - axios parameter creator
|
|
29
|
+
* @export
|
|
30
|
+
*/
|
|
31
|
+
export const PaymentServiceProvidersApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
32
|
+
return {
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param {ValidatePSPConfigRequestDto} validatePSPConfigRequestDto
|
|
36
|
+
* @param {string} [authorization] Bearer Token
|
|
37
|
+
* @param {*} [options] Override http request option.
|
|
38
|
+
* @throws {RequiredError}
|
|
39
|
+
*/
|
|
40
|
+
validateConfiguration: async (validatePSPConfigRequestDto: ValidatePSPConfigRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
41
|
+
// verify required parameter 'validatePSPConfigRequestDto' is not null or undefined
|
|
42
|
+
assertParamExists('validateConfiguration', 'validatePSPConfigRequestDto', validatePSPConfigRequestDto)
|
|
43
|
+
const localVarPath = `/paymentservice/v1/psps/validate`;
|
|
44
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
45
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
46
|
+
let baseOptions;
|
|
47
|
+
let baseAccessToken;
|
|
48
|
+
if (configuration) {
|
|
49
|
+
baseOptions = configuration.baseOptions;
|
|
50
|
+
baseAccessToken = configuration.accessToken;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
54
|
+
const localVarHeaderParameter = {} as any;
|
|
55
|
+
const localVarQueryParameter = {} as any;
|
|
56
|
+
|
|
57
|
+
// authentication bearer required
|
|
58
|
+
// http bearer authentication required
|
|
59
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
60
|
+
|
|
61
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
62
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
68
|
+
|
|
69
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
70
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
71
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
72
|
+
localVarRequestOptions.data = serializeDataIfNeeded(validatePSPConfigRequestDto, localVarRequestOptions, configuration)
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
url: toPathString(localVarUrlObj),
|
|
76
|
+
options: localVarRequestOptions,
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* PaymentServiceProvidersApi - functional programming interface
|
|
84
|
+
* @export
|
|
85
|
+
*/
|
|
86
|
+
export const PaymentServiceProvidersApiFp = function(configuration?: Configuration) {
|
|
87
|
+
const localVarAxiosParamCreator = PaymentServiceProvidersApiAxiosParamCreator(configuration)
|
|
88
|
+
return {
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @param {ValidatePSPConfigRequestDto} validatePSPConfigRequestDto
|
|
92
|
+
* @param {string} [authorization] Bearer Token
|
|
93
|
+
* @param {*} [options] Override http request option.
|
|
94
|
+
* @throws {RequiredError}
|
|
95
|
+
*/
|
|
96
|
+
async validateConfiguration(validatePSPConfigRequestDto: ValidatePSPConfigRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ValidatePSPConfigResponseClass>> {
|
|
97
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.validateConfiguration(validatePSPConfigRequestDto, authorization, options);
|
|
98
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
99
|
+
},
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* PaymentServiceProvidersApi - factory interface
|
|
105
|
+
* @export
|
|
106
|
+
*/
|
|
107
|
+
export const PaymentServiceProvidersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
108
|
+
const localVarFp = PaymentServiceProvidersApiFp(configuration)
|
|
109
|
+
return {
|
|
110
|
+
/**
|
|
111
|
+
*
|
|
112
|
+
* @param {ValidatePSPConfigRequestDto} validatePSPConfigRequestDto
|
|
113
|
+
* @param {string} [authorization] Bearer Token
|
|
114
|
+
* @param {*} [options] Override http request option.
|
|
115
|
+
* @throws {RequiredError}
|
|
116
|
+
*/
|
|
117
|
+
validateConfiguration(validatePSPConfigRequestDto: ValidatePSPConfigRequestDto, authorization?: string, options?: any): AxiosPromise<ValidatePSPConfigResponseClass> {
|
|
118
|
+
return localVarFp.validateConfiguration(validatePSPConfigRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Request parameters for validateConfiguration operation in PaymentServiceProvidersApi.
|
|
125
|
+
* @export
|
|
126
|
+
* @interface PaymentServiceProvidersApiValidateConfigurationRequest
|
|
127
|
+
*/
|
|
128
|
+
export interface PaymentServiceProvidersApiValidateConfigurationRequest {
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
* @type {ValidatePSPConfigRequestDto}
|
|
132
|
+
* @memberof PaymentServiceProvidersApiValidateConfiguration
|
|
133
|
+
*/
|
|
134
|
+
readonly validatePSPConfigRequestDto: ValidatePSPConfigRequestDto
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Bearer Token
|
|
138
|
+
* @type {string}
|
|
139
|
+
* @memberof PaymentServiceProvidersApiValidateConfiguration
|
|
140
|
+
*/
|
|
141
|
+
readonly authorization?: string
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* PaymentServiceProvidersApi - object-oriented interface
|
|
146
|
+
* @export
|
|
147
|
+
* @class PaymentServiceProvidersApi
|
|
148
|
+
* @extends {BaseAPI}
|
|
149
|
+
*/
|
|
150
|
+
export class PaymentServiceProvidersApi extends BaseAPI {
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
* @param {PaymentServiceProvidersApiValidateConfigurationRequest} requestParameters Request parameters.
|
|
154
|
+
* @param {*} [options] Override http request option.
|
|
155
|
+
* @throws {RequiredError}
|
|
156
|
+
* @memberof PaymentServiceProvidersApi
|
|
157
|
+
*/
|
|
158
|
+
public validateConfiguration(requestParameters: PaymentServiceProvidersApiValidateConfigurationRequest, options?: AxiosRequestConfig) {
|
|
159
|
+
return PaymentServiceProvidersApiFp(this.configuration).validateConfiguration(requestParameters.validatePSPConfigRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Emil Payment Service
|
|
5
|
+
* This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
* Contact: kontakt@emil.de
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
17
|
+
import { Configuration } from '../configuration';
|
|
18
|
+
// Some imports not used depending on template conditions
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import { CompletePaymentSetupRequestDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { CompletePaymentSetupResponseClass } from '../models';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { InitiatePaymentSetupRequestDto } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
import { InitiatePaymentSetupResponseClass } from '../models';
|
|
31
|
+
/**
|
|
32
|
+
* PaymentSetupApi - axios parameter creator
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export const PaymentSetupApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
36
|
+
return {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @param {CompletePaymentSetupRequestDto} completePaymentSetupRequestDto
|
|
40
|
+
* @param {string} [authorization] Bearer Token
|
|
41
|
+
* @param {*} [options] Override http request option.
|
|
42
|
+
* @throws {RequiredError}
|
|
43
|
+
*/
|
|
44
|
+
completePaymentSetup: async (completePaymentSetupRequestDto: CompletePaymentSetupRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
45
|
+
// verify required parameter 'completePaymentSetupRequestDto' is not null or undefined
|
|
46
|
+
assertParamExists('completePaymentSetup', 'completePaymentSetupRequestDto', completePaymentSetupRequestDto)
|
|
47
|
+
const localVarPath = `/paymentservice/v1/payment-setup/complete`;
|
|
48
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
49
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
50
|
+
let baseOptions;
|
|
51
|
+
let baseAccessToken;
|
|
52
|
+
if (configuration) {
|
|
53
|
+
baseOptions = configuration.baseOptions;
|
|
54
|
+
baseAccessToken = configuration.accessToken;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
58
|
+
const localVarHeaderParameter = {} as any;
|
|
59
|
+
const localVarQueryParameter = {} as any;
|
|
60
|
+
|
|
61
|
+
// authentication bearer required
|
|
62
|
+
// http bearer authentication required
|
|
63
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
64
|
+
|
|
65
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
66
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
72
|
+
|
|
73
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
74
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
75
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
76
|
+
localVarRequestOptions.data = serializeDataIfNeeded(completePaymentSetupRequestDto, localVarRequestOptions, configuration)
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
url: toPathString(localVarUrlObj),
|
|
80
|
+
options: localVarRequestOptions,
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @param {InitiatePaymentSetupRequestDto} initiatePaymentSetupRequestDto
|
|
86
|
+
* @param {string} [authorization] Bearer Token
|
|
87
|
+
* @param {*} [options] Override http request option.
|
|
88
|
+
* @throws {RequiredError}
|
|
89
|
+
*/
|
|
90
|
+
initiatePaymentSetup: async (initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
91
|
+
// verify required parameter 'initiatePaymentSetupRequestDto' is not null or undefined
|
|
92
|
+
assertParamExists('initiatePaymentSetup', 'initiatePaymentSetupRequestDto', initiatePaymentSetupRequestDto)
|
|
93
|
+
const localVarPath = `/paymentservice/v1/payment-setup/initiate`;
|
|
94
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
95
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
96
|
+
let baseOptions;
|
|
97
|
+
let baseAccessToken;
|
|
98
|
+
if (configuration) {
|
|
99
|
+
baseOptions = configuration.baseOptions;
|
|
100
|
+
baseAccessToken = configuration.accessToken;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
104
|
+
const localVarHeaderParameter = {} as any;
|
|
105
|
+
const localVarQueryParameter = {} as any;
|
|
106
|
+
|
|
107
|
+
// authentication bearer required
|
|
108
|
+
// http bearer authentication required
|
|
109
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
110
|
+
|
|
111
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
112
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
118
|
+
|
|
119
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
120
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
121
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
122
|
+
localVarRequestOptions.data = serializeDataIfNeeded(initiatePaymentSetupRequestDto, localVarRequestOptions, configuration)
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
url: toPathString(localVarUrlObj),
|
|
126
|
+
options: localVarRequestOptions,
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* PaymentSetupApi - functional programming interface
|
|
134
|
+
* @export
|
|
135
|
+
*/
|
|
136
|
+
export const PaymentSetupApiFp = function(configuration?: Configuration) {
|
|
137
|
+
const localVarAxiosParamCreator = PaymentSetupApiAxiosParamCreator(configuration)
|
|
138
|
+
return {
|
|
139
|
+
/**
|
|
140
|
+
*
|
|
141
|
+
* @param {CompletePaymentSetupRequestDto} completePaymentSetupRequestDto
|
|
142
|
+
* @param {string} [authorization] Bearer Token
|
|
143
|
+
* @param {*} [options] Override http request option.
|
|
144
|
+
* @throws {RequiredError}
|
|
145
|
+
*/
|
|
146
|
+
async completePaymentSetup(completePaymentSetupRequestDto: CompletePaymentSetupRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CompletePaymentSetupResponseClass>> {
|
|
147
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.completePaymentSetup(completePaymentSetupRequestDto, authorization, options);
|
|
148
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
*
|
|
152
|
+
* @param {InitiatePaymentSetupRequestDto} initiatePaymentSetupRequestDto
|
|
153
|
+
* @param {string} [authorization] Bearer Token
|
|
154
|
+
* @param {*} [options] Override http request option.
|
|
155
|
+
* @throws {RequiredError}
|
|
156
|
+
*/
|
|
157
|
+
async initiatePaymentSetup(initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiatePaymentSetupResponseClass>> {
|
|
158
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.initiatePaymentSetup(initiatePaymentSetupRequestDto, authorization, options);
|
|
159
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
160
|
+
},
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* PaymentSetupApi - factory interface
|
|
166
|
+
* @export
|
|
167
|
+
*/
|
|
168
|
+
export const PaymentSetupApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
169
|
+
const localVarFp = PaymentSetupApiFp(configuration)
|
|
170
|
+
return {
|
|
171
|
+
/**
|
|
172
|
+
*
|
|
173
|
+
* @param {CompletePaymentSetupRequestDto} completePaymentSetupRequestDto
|
|
174
|
+
* @param {string} [authorization] Bearer Token
|
|
175
|
+
* @param {*} [options] Override http request option.
|
|
176
|
+
* @throws {RequiredError}
|
|
177
|
+
*/
|
|
178
|
+
completePaymentSetup(completePaymentSetupRequestDto: CompletePaymentSetupRequestDto, authorization?: string, options?: any): AxiosPromise<CompletePaymentSetupResponseClass> {
|
|
179
|
+
return localVarFp.completePaymentSetup(completePaymentSetupRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
180
|
+
},
|
|
181
|
+
/**
|
|
182
|
+
*
|
|
183
|
+
* @param {InitiatePaymentSetupRequestDto} initiatePaymentSetupRequestDto
|
|
184
|
+
* @param {string} [authorization] Bearer Token
|
|
185
|
+
* @param {*} [options] Override http request option.
|
|
186
|
+
* @throws {RequiredError}
|
|
187
|
+
*/
|
|
188
|
+
initiatePaymentSetup(initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto, authorization?: string, options?: any): AxiosPromise<InitiatePaymentSetupResponseClass> {
|
|
189
|
+
return localVarFp.initiatePaymentSetup(initiatePaymentSetupRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
190
|
+
},
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Request parameters for completePaymentSetup operation in PaymentSetupApi.
|
|
196
|
+
* @export
|
|
197
|
+
* @interface PaymentSetupApiCompletePaymentSetupRequest
|
|
198
|
+
*/
|
|
199
|
+
export interface PaymentSetupApiCompletePaymentSetupRequest {
|
|
200
|
+
/**
|
|
201
|
+
*
|
|
202
|
+
* @type {CompletePaymentSetupRequestDto}
|
|
203
|
+
* @memberof PaymentSetupApiCompletePaymentSetup
|
|
204
|
+
*/
|
|
205
|
+
readonly completePaymentSetupRequestDto: CompletePaymentSetupRequestDto
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Bearer Token
|
|
209
|
+
* @type {string}
|
|
210
|
+
* @memberof PaymentSetupApiCompletePaymentSetup
|
|
211
|
+
*/
|
|
212
|
+
readonly authorization?: string
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Request parameters for initiatePaymentSetup operation in PaymentSetupApi.
|
|
217
|
+
* @export
|
|
218
|
+
* @interface PaymentSetupApiInitiatePaymentSetupRequest
|
|
219
|
+
*/
|
|
220
|
+
export interface PaymentSetupApiInitiatePaymentSetupRequest {
|
|
221
|
+
/**
|
|
222
|
+
*
|
|
223
|
+
* @type {InitiatePaymentSetupRequestDto}
|
|
224
|
+
* @memberof PaymentSetupApiInitiatePaymentSetup
|
|
225
|
+
*/
|
|
226
|
+
readonly initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Bearer Token
|
|
230
|
+
* @type {string}
|
|
231
|
+
* @memberof PaymentSetupApiInitiatePaymentSetup
|
|
232
|
+
*/
|
|
233
|
+
readonly authorization?: string
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* PaymentSetupApi - object-oriented interface
|
|
238
|
+
* @export
|
|
239
|
+
* @class PaymentSetupApi
|
|
240
|
+
* @extends {BaseAPI}
|
|
241
|
+
*/
|
|
242
|
+
export class PaymentSetupApi extends BaseAPI {
|
|
243
|
+
/**
|
|
244
|
+
*
|
|
245
|
+
* @param {PaymentSetupApiCompletePaymentSetupRequest} requestParameters Request parameters.
|
|
246
|
+
* @param {*} [options] Override http request option.
|
|
247
|
+
* @throws {RequiredError}
|
|
248
|
+
* @memberof PaymentSetupApi
|
|
249
|
+
*/
|
|
250
|
+
public completePaymentSetup(requestParameters: PaymentSetupApiCompletePaymentSetupRequest, options?: AxiosRequestConfig) {
|
|
251
|
+
return PaymentSetupApiFp(this.configuration).completePaymentSetup(requestParameters.completePaymentSetupRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
*
|
|
256
|
+
* @param {PaymentSetupApiInitiatePaymentSetupRequest} requestParameters Request parameters.
|
|
257
|
+
* @param {*} [options] Override http request option.
|
|
258
|
+
* @throws {RequiredError}
|
|
259
|
+
* @memberof PaymentSetupApi
|
|
260
|
+
*/
|
|
261
|
+
public initiatePaymentSetup(requestParameters: PaymentSetupApiInitiatePaymentSetupRequest, options?: AxiosRequestConfig) {
|
|
262
|
+
return PaymentSetupApiFp(this.configuration).initiatePaymentSetup(requestParameters.initiatePaymentSetupRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
263
|
+
}
|
|
264
|
+
}
|