@emilgroup/payment-sdk-node 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.
Files changed (118) hide show
  1. package/.openapi-generator/FILES +44 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +68 -0
  5. package/api/bank-accounts-api.ts +167 -0
  6. package/api/payment-methods-api.ts +581 -0
  7. package/api/payment-service-providers-api.ts +165 -0
  8. package/api/payment-setup-api.ts +268 -0
  9. package/api/payments-api.ts +491 -0
  10. package/api/webhooks-api.ts +154 -0
  11. package/api.ts +46 -0
  12. package/base.ts +293 -0
  13. package/common.ts +138 -0
  14. package/configuration.ts +109 -0
  15. package/dist/api/bank-accounts-api.d.ts +96 -0
  16. package/dist/api/bank-accounts-api.js +228 -0
  17. package/dist/api/payment-methods-api.d.ts +327 -0
  18. package/dist/api/payment-methods-api.js +551 -0
  19. package/dist/api/payment-service-providers-api.d.ts +93 -0
  20. package/dist/api/payment-service-providers-api.js +224 -0
  21. package/dist/api/payment-setup-api.d.ts +146 -0
  22. package/dist/api/payment-setup-api.js +313 -0
  23. package/dist/api/payments-api.d.ts +281 -0
  24. package/dist/api/payments-api.js +463 -0
  25. package/dist/api/webhooks-api.d.ts +91 -0
  26. package/dist/api/webhooks-api.js +213 -0
  27. package/dist/api.d.ts +21 -0
  28. package/dist/api.js +41 -0
  29. package/dist/base.d.ts +77 -0
  30. package/dist/base.js +394 -0
  31. package/dist/common.d.ts +66 -0
  32. package/dist/common.js +244 -0
  33. package/dist/configuration.d.ts +90 -0
  34. package/dist/configuration.js +44 -0
  35. package/dist/index.d.ts +15 -0
  36. package/dist/index.js +35 -0
  37. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
  38. package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
  39. package/dist/models/complete-payment-setup-request-dto.d.ts +32 -0
  40. package/dist/models/complete-payment-setup-request-dto.js +15 -0
  41. package/dist/models/complete-payment-setup-response-class.d.ts +25 -0
  42. package/dist/models/complete-payment-setup-response-class.js +15 -0
  43. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +54 -0
  44. package/dist/models/complete-stripe-payment-setup-request-dto.js +15 -0
  45. package/dist/models/create-bank-account-request-dto.d.ts +30 -0
  46. package/dist/models/create-bank-account-request-dto.js +15 -0
  47. package/dist/models/create-payment-method-response-class.d.ts +25 -0
  48. package/dist/models/create-payment-method-response-class.js +15 -0
  49. package/dist/models/create-payment-request-dto.d.ts +42 -0
  50. package/dist/models/create-payment-request-dto.js +15 -0
  51. package/dist/models/create-payment-response-class.d.ts +25 -0
  52. package/dist/models/create-payment-response-class.js +15 -0
  53. package/dist/models/create-psp-payment-method-request-dto.d.ts +53 -0
  54. package/dist/models/create-psp-payment-method-request-dto.js +31 -0
  55. package/dist/models/get-payment-method-response-class.d.ts +25 -0
  56. package/dist/models/get-payment-method-response-class.js +15 -0
  57. package/dist/models/get-payment-response-class.d.ts +25 -0
  58. package/dist/models/get-payment-response-class.js +15 -0
  59. package/dist/models/get-request-dto.d.ts +30 -0
  60. package/dist/models/get-request-dto.js +15 -0
  61. package/dist/models/index.d.ts +25 -0
  62. package/dist/models/index.js +41 -0
  63. package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +24 -0
  64. package/dist/models/initiate-braintree-payment-setup-request-dto.js +15 -0
  65. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +24 -0
  66. package/dist/models/initiate-braintree-payment-setup-response-class.js +15 -0
  67. package/dist/models/initiate-payment-setup-request-dto.d.ts +32 -0
  68. package/dist/models/initiate-payment-setup-request-dto.js +15 -0
  69. package/dist/models/initiate-payment-setup-response-class.d.ts +32 -0
  70. package/dist/models/initiate-payment-setup-response-class.js +15 -0
  71. package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +24 -0
  72. package/dist/models/initiate-stripe-payment-setup-request-dto.js +15 -0
  73. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +30 -0
  74. package/dist/models/initiate-stripe-payment-setup-response-class.js +15 -0
  75. package/dist/models/list-payment-methods-response-class.d.ts +30 -0
  76. package/dist/models/list-payment-methods-response-class.js +15 -0
  77. package/dist/models/list-payments-response-class.d.ts +30 -0
  78. package/dist/models/list-payments-response-class.js +15 -0
  79. package/dist/models/payment-class.d.ts +72 -0
  80. package/dist/models/payment-class.js +15 -0
  81. package/dist/models/payment-method-class.d.ts +60 -0
  82. package/dist/models/payment-method-class.js +15 -0
  83. package/dist/models/sepa-direct-dto.d.ts +24 -0
  84. package/dist/models/sepa-direct-dto.js +15 -0
  85. package/dist/models/validate-pspconfig-request-dto.d.ts +41 -0
  86. package/dist/models/validate-pspconfig-request-dto.js +20 -0
  87. package/dist/models/validate-pspconfig-response-class.d.ts +24 -0
  88. package/dist/models/validate-pspconfig-response-class.js +15 -0
  89. package/git_push.sh +57 -0
  90. package/index.ts +19 -0
  91. package/models/complete-braintree-payment-setup-request-dto.ts +54 -0
  92. package/models/complete-payment-setup-request-dto.ts +38 -0
  93. package/models/complete-payment-setup-response-class.ts +31 -0
  94. package/models/complete-stripe-payment-setup-request-dto.ts +60 -0
  95. package/models/create-bank-account-request-dto.ts +36 -0
  96. package/models/create-payment-method-response-class.ts +31 -0
  97. package/models/create-payment-request-dto.ts +48 -0
  98. package/models/create-payment-response-class.ts +31 -0
  99. package/models/create-psp-payment-method-request-dto.ts +62 -0
  100. package/models/get-payment-method-response-class.ts +31 -0
  101. package/models/get-payment-response-class.ts +31 -0
  102. package/models/get-request-dto.ts +36 -0
  103. package/models/index.ts +25 -0
  104. package/models/initiate-braintree-payment-setup-request-dto.ts +30 -0
  105. package/models/initiate-braintree-payment-setup-response-class.ts +30 -0
  106. package/models/initiate-payment-setup-request-dto.ts +38 -0
  107. package/models/initiate-payment-setup-response-class.ts +38 -0
  108. package/models/initiate-stripe-payment-setup-request-dto.ts +30 -0
  109. package/models/initiate-stripe-payment-setup-response-class.ts +36 -0
  110. package/models/list-payment-methods-response-class.ts +36 -0
  111. package/models/list-payments-response-class.ts +36 -0
  112. package/models/payment-class.ts +78 -0
  113. package/models/payment-method-class.ts +66 -0
  114. package/models/sepa-direct-dto.ts +30 -0
  115. package/models/validate-pspconfig-request-dto.ts +50 -0
  116. package/models/validate-pspconfig-response-class.ts +30 -0
  117. package/package.json +30 -0
  118. package/tsconfig.json +22 -0
@@ -0,0 +1,165 @@
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
+ *
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
+ // URLSearchParams not necessarily used
28
+ // @ts-ignore
29
+ import { URL, URLSearchParams } from 'url';
30
+ const FormData = require('form-data');
31
+ /**
32
+ * PaymentServiceProvidersApi - axios parameter creator
33
+ * @export
34
+ */
35
+ export const PaymentServiceProvidersApiAxiosParamCreator = function (configuration?: Configuration) {
36
+ return {
37
+ /**
38
+ *
39
+ * @param {ValidatePSPConfigRequestDto} validatePSPConfigRequestDto
40
+ * @param {string} [authorization] Bearer Token
41
+ * @param {*} [options] Override http request option.
42
+ * @throws {RequiredError}
43
+ */
44
+ validateConfiguration: async (validatePSPConfigRequestDto: ValidatePSPConfigRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
45
+ // verify required parameter 'validatePSPConfigRequestDto' is not null or undefined
46
+ assertParamExists('validateConfiguration', 'validatePSPConfigRequestDto', validatePSPConfigRequestDto)
47
+ const localVarPath = `/paymentservice/v1/psps/validate`;
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(validatePSPConfigRequestDto, localVarRequestOptions, configuration)
77
+
78
+ return {
79
+ url: toPathString(localVarUrlObj),
80
+ options: localVarRequestOptions,
81
+ };
82
+ },
83
+ }
84
+ };
85
+
86
+ /**
87
+ * PaymentServiceProvidersApi - functional programming interface
88
+ * @export
89
+ */
90
+ export const PaymentServiceProvidersApiFp = function(configuration?: Configuration) {
91
+ const localVarAxiosParamCreator = PaymentServiceProvidersApiAxiosParamCreator(configuration)
92
+ return {
93
+ /**
94
+ *
95
+ * @param {ValidatePSPConfigRequestDto} validatePSPConfigRequestDto
96
+ * @param {string} [authorization] Bearer Token
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ async validateConfiguration(validatePSPConfigRequestDto: ValidatePSPConfigRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ValidatePSPConfigResponseClass>> {
101
+ const localVarAxiosArgs = await localVarAxiosParamCreator.validateConfiguration(validatePSPConfigRequestDto, authorization, options);
102
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
103
+ },
104
+ }
105
+ };
106
+
107
+ /**
108
+ * PaymentServiceProvidersApi - factory interface
109
+ * @export
110
+ */
111
+ export const PaymentServiceProvidersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
112
+ const localVarFp = PaymentServiceProvidersApiFp(configuration)
113
+ return {
114
+ /**
115
+ *
116
+ * @param {ValidatePSPConfigRequestDto} validatePSPConfigRequestDto
117
+ * @param {string} [authorization] Bearer Token
118
+ * @param {*} [options] Override http request option.
119
+ * @throws {RequiredError}
120
+ */
121
+ validateConfiguration(validatePSPConfigRequestDto: ValidatePSPConfigRequestDto, authorization?: string, options?: any): AxiosPromise<ValidatePSPConfigResponseClass> {
122
+ return localVarFp.validateConfiguration(validatePSPConfigRequestDto, authorization, options).then((request) => request(axios, basePath));
123
+ },
124
+ };
125
+ };
126
+
127
+ /**
128
+ * Request parameters for validateConfiguration operation in PaymentServiceProvidersApi.
129
+ * @export
130
+ * @interface PaymentServiceProvidersApiValidateConfigurationRequest
131
+ */
132
+ export interface PaymentServiceProvidersApiValidateConfigurationRequest {
133
+ /**
134
+ *
135
+ * @type {ValidatePSPConfigRequestDto}
136
+ * @memberof PaymentServiceProvidersApiValidateConfiguration
137
+ */
138
+ readonly validatePSPConfigRequestDto: ValidatePSPConfigRequestDto
139
+
140
+ /**
141
+ * Bearer Token
142
+ * @type {string}
143
+ * @memberof PaymentServiceProvidersApiValidateConfiguration
144
+ */
145
+ readonly authorization?: string
146
+ }
147
+
148
+ /**
149
+ * PaymentServiceProvidersApi - object-oriented interface
150
+ * @export
151
+ * @class PaymentServiceProvidersApi
152
+ * @extends {BaseAPI}
153
+ */
154
+ export class PaymentServiceProvidersApi extends BaseAPI {
155
+ /**
156
+ *
157
+ * @param {PaymentServiceProvidersApiValidateConfigurationRequest} requestParameters Request parameters.
158
+ * @param {*} [options] Override http request option.
159
+ * @throws {RequiredError}
160
+ * @memberof PaymentServiceProvidersApi
161
+ */
162
+ public validateConfiguration(requestParameters: PaymentServiceProvidersApiValidateConfigurationRequest, options?: AxiosRequestConfig) {
163
+ return PaymentServiceProvidersApiFp(this.configuration).validateConfiguration(requestParameters.validatePSPConfigRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
164
+ }
165
+ }
@@ -0,0 +1,268 @@
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
+ *
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
+ // URLSearchParams not necessarily used
32
+ // @ts-ignore
33
+ import { URL, URLSearchParams } from 'url';
34
+ const FormData = require('form-data');
35
+ /**
36
+ * PaymentSetupApi - axios parameter creator
37
+ * @export
38
+ */
39
+ export const PaymentSetupApiAxiosParamCreator = function (configuration?: Configuration) {
40
+ return {
41
+ /**
42
+ *
43
+ * @param {CompletePaymentSetupRequestDto} completePaymentSetupRequestDto
44
+ * @param {string} [authorization] Bearer Token
45
+ * @param {*} [options] Override http request option.
46
+ * @throws {RequiredError}
47
+ */
48
+ completePaymentSetup: async (completePaymentSetupRequestDto: CompletePaymentSetupRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
49
+ // verify required parameter 'completePaymentSetupRequestDto' is not null or undefined
50
+ assertParamExists('completePaymentSetup', 'completePaymentSetupRequestDto', completePaymentSetupRequestDto)
51
+ const localVarPath = `/paymentservice/v1/payment-setup/complete`;
52
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
53
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
54
+ let baseOptions;
55
+ let baseAccessToken;
56
+ if (configuration) {
57
+ baseOptions = configuration.baseOptions;
58
+ baseAccessToken = configuration.accessToken;
59
+ }
60
+
61
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
62
+ const localVarHeaderParameter = {} as any;
63
+ const localVarQueryParameter = {} as any;
64
+
65
+ // authentication bearer required
66
+ // http bearer authentication required
67
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
68
+
69
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
70
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
71
+ }
72
+
73
+
74
+
75
+ localVarHeaderParameter['Content-Type'] = 'application/json';
76
+
77
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
78
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
79
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
80
+ localVarRequestOptions.data = serializeDataIfNeeded(completePaymentSetupRequestDto, localVarRequestOptions, configuration)
81
+
82
+ return {
83
+ url: toPathString(localVarUrlObj),
84
+ options: localVarRequestOptions,
85
+ };
86
+ },
87
+ /**
88
+ *
89
+ * @param {InitiatePaymentSetupRequestDto} initiatePaymentSetupRequestDto
90
+ * @param {string} [authorization] Bearer Token
91
+ * @param {*} [options] Override http request option.
92
+ * @throws {RequiredError}
93
+ */
94
+ initiatePaymentSetup: async (initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
95
+ // verify required parameter 'initiatePaymentSetupRequestDto' is not null or undefined
96
+ assertParamExists('initiatePaymentSetup', 'initiatePaymentSetupRequestDto', initiatePaymentSetupRequestDto)
97
+ const localVarPath = `/paymentservice/v1/payment-setup/initiate`;
98
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
99
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
100
+ let baseOptions;
101
+ let baseAccessToken;
102
+ if (configuration) {
103
+ baseOptions = configuration.baseOptions;
104
+ baseAccessToken = configuration.accessToken;
105
+ }
106
+
107
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
108
+ const localVarHeaderParameter = {} as any;
109
+ const localVarQueryParameter = {} as any;
110
+
111
+ // authentication bearer required
112
+ // http bearer authentication required
113
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
114
+
115
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
116
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
117
+ }
118
+
119
+
120
+
121
+ localVarHeaderParameter['Content-Type'] = 'application/json';
122
+
123
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
124
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
125
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
126
+ localVarRequestOptions.data = serializeDataIfNeeded(initiatePaymentSetupRequestDto, localVarRequestOptions, configuration)
127
+
128
+ return {
129
+ url: toPathString(localVarUrlObj),
130
+ options: localVarRequestOptions,
131
+ };
132
+ },
133
+ }
134
+ };
135
+
136
+ /**
137
+ * PaymentSetupApi - functional programming interface
138
+ * @export
139
+ */
140
+ export const PaymentSetupApiFp = function(configuration?: Configuration) {
141
+ const localVarAxiosParamCreator = PaymentSetupApiAxiosParamCreator(configuration)
142
+ return {
143
+ /**
144
+ *
145
+ * @param {CompletePaymentSetupRequestDto} completePaymentSetupRequestDto
146
+ * @param {string} [authorization] Bearer Token
147
+ * @param {*} [options] Override http request option.
148
+ * @throws {RequiredError}
149
+ */
150
+ async completePaymentSetup(completePaymentSetupRequestDto: CompletePaymentSetupRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CompletePaymentSetupResponseClass>> {
151
+ const localVarAxiosArgs = await localVarAxiosParamCreator.completePaymentSetup(completePaymentSetupRequestDto, authorization, options);
152
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
153
+ },
154
+ /**
155
+ *
156
+ * @param {InitiatePaymentSetupRequestDto} initiatePaymentSetupRequestDto
157
+ * @param {string} [authorization] Bearer Token
158
+ * @param {*} [options] Override http request option.
159
+ * @throws {RequiredError}
160
+ */
161
+ async initiatePaymentSetup(initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiatePaymentSetupResponseClass>> {
162
+ const localVarAxiosArgs = await localVarAxiosParamCreator.initiatePaymentSetup(initiatePaymentSetupRequestDto, authorization, options);
163
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
164
+ },
165
+ }
166
+ };
167
+
168
+ /**
169
+ * PaymentSetupApi - factory interface
170
+ * @export
171
+ */
172
+ export const PaymentSetupApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
173
+ const localVarFp = PaymentSetupApiFp(configuration)
174
+ return {
175
+ /**
176
+ *
177
+ * @param {CompletePaymentSetupRequestDto} completePaymentSetupRequestDto
178
+ * @param {string} [authorization] Bearer Token
179
+ * @param {*} [options] Override http request option.
180
+ * @throws {RequiredError}
181
+ */
182
+ completePaymentSetup(completePaymentSetupRequestDto: CompletePaymentSetupRequestDto, authorization?: string, options?: any): AxiosPromise<CompletePaymentSetupResponseClass> {
183
+ return localVarFp.completePaymentSetup(completePaymentSetupRequestDto, authorization, options).then((request) => request(axios, basePath));
184
+ },
185
+ /**
186
+ *
187
+ * @param {InitiatePaymentSetupRequestDto} initiatePaymentSetupRequestDto
188
+ * @param {string} [authorization] Bearer Token
189
+ * @param {*} [options] Override http request option.
190
+ * @throws {RequiredError}
191
+ */
192
+ initiatePaymentSetup(initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto, authorization?: string, options?: any): AxiosPromise<InitiatePaymentSetupResponseClass> {
193
+ return localVarFp.initiatePaymentSetup(initiatePaymentSetupRequestDto, authorization, options).then((request) => request(axios, basePath));
194
+ },
195
+ };
196
+ };
197
+
198
+ /**
199
+ * Request parameters for completePaymentSetup operation in PaymentSetupApi.
200
+ * @export
201
+ * @interface PaymentSetupApiCompletePaymentSetupRequest
202
+ */
203
+ export interface PaymentSetupApiCompletePaymentSetupRequest {
204
+ /**
205
+ *
206
+ * @type {CompletePaymentSetupRequestDto}
207
+ * @memberof PaymentSetupApiCompletePaymentSetup
208
+ */
209
+ readonly completePaymentSetupRequestDto: CompletePaymentSetupRequestDto
210
+
211
+ /**
212
+ * Bearer Token
213
+ * @type {string}
214
+ * @memberof PaymentSetupApiCompletePaymentSetup
215
+ */
216
+ readonly authorization?: string
217
+ }
218
+
219
+ /**
220
+ * Request parameters for initiatePaymentSetup operation in PaymentSetupApi.
221
+ * @export
222
+ * @interface PaymentSetupApiInitiatePaymentSetupRequest
223
+ */
224
+ export interface PaymentSetupApiInitiatePaymentSetupRequest {
225
+ /**
226
+ *
227
+ * @type {InitiatePaymentSetupRequestDto}
228
+ * @memberof PaymentSetupApiInitiatePaymentSetup
229
+ */
230
+ readonly initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto
231
+
232
+ /**
233
+ * Bearer Token
234
+ * @type {string}
235
+ * @memberof PaymentSetupApiInitiatePaymentSetup
236
+ */
237
+ readonly authorization?: string
238
+ }
239
+
240
+ /**
241
+ * PaymentSetupApi - object-oriented interface
242
+ * @export
243
+ * @class PaymentSetupApi
244
+ * @extends {BaseAPI}
245
+ */
246
+ export class PaymentSetupApi extends BaseAPI {
247
+ /**
248
+ *
249
+ * @param {PaymentSetupApiCompletePaymentSetupRequest} requestParameters Request parameters.
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ * @memberof PaymentSetupApi
253
+ */
254
+ public completePaymentSetup(requestParameters: PaymentSetupApiCompletePaymentSetupRequest, options?: AxiosRequestConfig) {
255
+ return PaymentSetupApiFp(this.configuration).completePaymentSetup(requestParameters.completePaymentSetupRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
256
+ }
257
+
258
+ /**
259
+ *
260
+ * @param {PaymentSetupApiInitiatePaymentSetupRequest} requestParameters Request parameters.
261
+ * @param {*} [options] Override http request option.
262
+ * @throws {RequiredError}
263
+ * @memberof PaymentSetupApi
264
+ */
265
+ public initiatePaymentSetup(requestParameters: PaymentSetupApiInitiatePaymentSetupRequest, options?: AxiosRequestConfig) {
266
+ return PaymentSetupApiFp(this.configuration).initiatePaymentSetup(requestParameters.initiatePaymentSetupRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
267
+ }
268
+ }