@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,58 @@
|
|
|
1
|
+
.gitignore
|
|
2
|
+
.npmignore
|
|
3
|
+
.openapi-generator-ignore
|
|
4
|
+
README.md
|
|
5
|
+
api.ts
|
|
6
|
+
api/bank-accounts-api.ts
|
|
7
|
+
api/default-api.ts
|
|
8
|
+
api/payment-methods-api.ts
|
|
9
|
+
api/payment-reminders-api.ts
|
|
10
|
+
api/payment-service-providers-api.ts
|
|
11
|
+
api/payment-setup-api.ts
|
|
12
|
+
api/payments-api.ts
|
|
13
|
+
api/webhooks-api.ts
|
|
14
|
+
base.ts
|
|
15
|
+
common.ts
|
|
16
|
+
configuration.ts
|
|
17
|
+
git_push.sh
|
|
18
|
+
index.ts
|
|
19
|
+
models/bank-account-class.ts
|
|
20
|
+
models/billing-profile-dto.ts
|
|
21
|
+
models/billing-profile-limited-response-dto.ts
|
|
22
|
+
models/complete-braintree-payment-setup-request-dto.ts
|
|
23
|
+
models/complete-payment-setup-request-dto.ts
|
|
24
|
+
models/complete-payment-setup-response-class.ts
|
|
25
|
+
models/complete-stripe-payment-setup-request-dto.ts
|
|
26
|
+
models/create-bank-account-request-dto.ts
|
|
27
|
+
models/create-payment-method-response-class.ts
|
|
28
|
+
models/create-payment-reminder-request-dto.ts
|
|
29
|
+
models/create-payment-request-dto.ts
|
|
30
|
+
models/create-payment-response-class.ts
|
|
31
|
+
models/create-psp-payment-method-request-dto.ts
|
|
32
|
+
models/deactivate-payment-reminder-request-dto.ts
|
|
33
|
+
models/get-payment-method-response-class.ts
|
|
34
|
+
models/get-payment-response-class.ts
|
|
35
|
+
models/get-request-dto.ts
|
|
36
|
+
models/index.ts
|
|
37
|
+
models/initiate-braintree-payment-setup-request-dto.ts
|
|
38
|
+
models/initiate-braintree-payment-setup-response-class.ts
|
|
39
|
+
models/initiate-payment-setup-request-dto.ts
|
|
40
|
+
models/initiate-payment-setup-response-class.ts
|
|
41
|
+
models/initiate-stripe-payment-setup-request-dto.ts
|
|
42
|
+
models/initiate-stripe-payment-setup-response-class.ts
|
|
43
|
+
models/inline-response200.ts
|
|
44
|
+
models/inline-response503.ts
|
|
45
|
+
models/list-bank-accounts-response-class.ts
|
|
46
|
+
models/list-payment-methods-response-class.ts
|
|
47
|
+
models/list-payment-reminders-response-class.ts
|
|
48
|
+
models/list-payments-response-class.ts
|
|
49
|
+
models/payment-class.ts
|
|
50
|
+
models/payment-method-class.ts
|
|
51
|
+
models/payment-reminder-class.ts
|
|
52
|
+
models/sepa-direct-dto.ts
|
|
53
|
+
models/symphony-profile-limited-response-dto.ts
|
|
54
|
+
models/transaction-class.ts
|
|
55
|
+
models/validate-pspconfig-request-dto.ts
|
|
56
|
+
models/validate-pspconfig-response-class.ts
|
|
57
|
+
package.json
|
|
58
|
+
tsconfig.json
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5.4.0
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# OpenAPI Generator Ignore
|
|
2
|
+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
3
|
+
|
|
4
|
+
# Use this file to prevent files from being overwritten by the generator.
|
|
5
|
+
# The patterns follow closely to .gitignore or .dockerignore.
|
|
6
|
+
|
|
7
|
+
# As an example, the C# client generator defines ApiClient.cs.
|
|
8
|
+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
9
|
+
#ApiClient.cs
|
|
10
|
+
|
|
11
|
+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
12
|
+
#foo/*/qux
|
|
13
|
+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
14
|
+
|
|
15
|
+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
16
|
+
#foo/**/qux
|
|
17
|
+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
18
|
+
|
|
19
|
+
# You can also negate patterns with an exclamation (!).
|
|
20
|
+
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
21
|
+
#docs/*.md
|
|
22
|
+
# Then explicitly reverse the ignore rule for a single file:
|
|
23
|
+
#!docs/README.md
|
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Emil Payment SDK
|
|
2
|
+
|
|
3
|
+
This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated module can be used with client-based applications (i.e. React).
|
|
4
|
+
|
|
5
|
+
Language level
|
|
6
|
+
* ES5 - you must have a Promises/A+ library installed
|
|
7
|
+
* ES6
|
|
8
|
+
|
|
9
|
+
Module system
|
|
10
|
+
* CommonJS
|
|
11
|
+
* ES6 module system
|
|
12
|
+
|
|
13
|
+
Although this package can be used in both TypeScript and JavaScript, it is intended to be used with TypeScript. The definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)). For more information, you can go to [Emil Api documentation](https://emil.stoplight.io/docs/emil-api/).
|
|
14
|
+
|
|
15
|
+
## Consuming
|
|
16
|
+
|
|
17
|
+
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
npm install @emilgroup/payment-sdk@1.0.0 --save
|
|
21
|
+
```
|
|
22
|
+
or
|
|
23
|
+
```
|
|
24
|
+
yarn add @emilgroup/payment-sdk@1.0.0
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
And then you can import `PaymentsApi`.
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { PaymentsApi } from '@emilgroup/payment-sdk'
|
|
31
|
+
|
|
32
|
+
const paymentsApi = new PaymentsApi();
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
To use authentication protected endpoints, you have to first authorize. To do so, use the `authorize` function in `PaymentsApi`:
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
async function listPayments(): Promise<Void> {
|
|
39
|
+
try {
|
|
40
|
+
const paymentsApi = new PaymentsApi();
|
|
41
|
+
|
|
42
|
+
await paymentsApi.authorize('username', 'password');
|
|
43
|
+
|
|
44
|
+
const { data: { items } } = await paymentsApi.listPayments();
|
|
45
|
+
|
|
46
|
+
console.log(items);
|
|
47
|
+
} catch(error) {
|
|
48
|
+
// process error
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
@@ -0,0 +1,337 @@
|
|
|
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 { CreateBankAccountRequestDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { ListBankAccountsResponseClass } from '../models';
|
|
27
|
+
/**
|
|
28
|
+
* BankAccountsApi - axios parameter creator
|
|
29
|
+
* @export
|
|
30
|
+
*/
|
|
31
|
+
export const BankAccountsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
32
|
+
return {
|
|
33
|
+
/**
|
|
34
|
+
* Creates a bank account for a specified account.
|
|
35
|
+
* @summary Create a bank account
|
|
36
|
+
* @param {CreateBankAccountRequestDto} createBankAccountRequestDto
|
|
37
|
+
* @param {string} [authorization] Bearer Token
|
|
38
|
+
* @param {*} [options] Override http request option.
|
|
39
|
+
* @throws {RequiredError}
|
|
40
|
+
*/
|
|
41
|
+
createBankAccount: async (createBankAccountRequestDto: CreateBankAccountRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
42
|
+
// verify required parameter 'createBankAccountRequestDto' is not null or undefined
|
|
43
|
+
assertParamExists('createBankAccount', 'createBankAccountRequestDto', createBankAccountRequestDto)
|
|
44
|
+
const localVarPath = `/paymentservice/v1/bank-accounts`;
|
|
45
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
46
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
47
|
+
let baseOptions;
|
|
48
|
+
let baseAccessToken;
|
|
49
|
+
if (configuration) {
|
|
50
|
+
baseOptions = configuration.baseOptions;
|
|
51
|
+
baseAccessToken = configuration.accessToken;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
55
|
+
const localVarHeaderParameter = {} as any;
|
|
56
|
+
const localVarQueryParameter = {} as any;
|
|
57
|
+
|
|
58
|
+
// authentication bearer required
|
|
59
|
+
// http bearer authentication required
|
|
60
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
61
|
+
|
|
62
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
63
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
69
|
+
|
|
70
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
71
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
72
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
73
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createBankAccountRequestDto, localVarRequestOptions, configuration)
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
url: toPathString(localVarUrlObj),
|
|
77
|
+
options: localVarRequestOptions,
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
/**
|
|
81
|
+
* Returns a list of bank accounts you’ve previously created. The bank accounts are returned in sorted order, with the oldest payment appearing first. For more information about pagination, read the Pagination documentation.
|
|
82
|
+
* @summary List bank accounts
|
|
83
|
+
* @param {string} [authorization] Bearer Token
|
|
84
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
85
|
+
* @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.
|
|
86
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
87
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
88
|
+
* @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.
|
|
89
|
+
* @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.
|
|
90
|
+
* @param {*} [options] Override http request option.
|
|
91
|
+
* @throws {RequiredError}
|
|
92
|
+
*/
|
|
93
|
+
listBankAccounts: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
94
|
+
const localVarPath = `/paymentservice/v1/bank-accounts`;
|
|
95
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
96
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
97
|
+
let baseOptions;
|
|
98
|
+
let baseAccessToken;
|
|
99
|
+
if (configuration) {
|
|
100
|
+
baseOptions = configuration.baseOptions;
|
|
101
|
+
baseAccessToken = configuration.accessToken;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
105
|
+
const localVarHeaderParameter = {} as any;
|
|
106
|
+
const localVarQueryParameter = {} as any;
|
|
107
|
+
|
|
108
|
+
// authentication bearer required
|
|
109
|
+
// http bearer authentication required
|
|
110
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
111
|
+
|
|
112
|
+
if (pageSize !== undefined) {
|
|
113
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (pageToken !== undefined) {
|
|
117
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (filter !== undefined) {
|
|
121
|
+
localVarQueryParameter['filter'] = filter;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (search !== undefined) {
|
|
125
|
+
localVarQueryParameter['search'] = search;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (order !== undefined) {
|
|
129
|
+
localVarQueryParameter['order'] = order;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (expand !== undefined) {
|
|
133
|
+
localVarQueryParameter['expand'] = expand;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
137
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
143
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
144
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
145
|
+
|
|
146
|
+
return {
|
|
147
|
+
url: toPathString(localVarUrlObj),
|
|
148
|
+
options: localVarRequestOptions,
|
|
149
|
+
};
|
|
150
|
+
},
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* BankAccountsApi - functional programming interface
|
|
156
|
+
* @export
|
|
157
|
+
*/
|
|
158
|
+
export const BankAccountsApiFp = function(configuration?: Configuration) {
|
|
159
|
+
const localVarAxiosParamCreator = BankAccountsApiAxiosParamCreator(configuration)
|
|
160
|
+
return {
|
|
161
|
+
/**
|
|
162
|
+
* Creates a bank account for a specified account.
|
|
163
|
+
* @summary Create a bank account
|
|
164
|
+
* @param {CreateBankAccountRequestDto} createBankAccountRequestDto
|
|
165
|
+
* @param {string} [authorization] Bearer Token
|
|
166
|
+
* @param {*} [options] Override http request option.
|
|
167
|
+
* @throws {RequiredError}
|
|
168
|
+
*/
|
|
169
|
+
async createBankAccount(createBankAccountRequestDto: CreateBankAccountRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
170
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createBankAccount(createBankAccountRequestDto, authorization, options);
|
|
171
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
172
|
+
},
|
|
173
|
+
/**
|
|
174
|
+
* Returns a list of bank accounts you’ve previously created. The bank accounts are returned in sorted order, with the oldest payment appearing first. For more information about pagination, read the Pagination documentation.
|
|
175
|
+
* @summary List bank accounts
|
|
176
|
+
* @param {string} [authorization] Bearer Token
|
|
177
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
178
|
+
* @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.
|
|
179
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
180
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
181
|
+
* @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.
|
|
182
|
+
* @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.
|
|
183
|
+
* @param {*} [options] Override http request option.
|
|
184
|
+
* @throws {RequiredError}
|
|
185
|
+
*/
|
|
186
|
+
async listBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBankAccountsResponseClass>> {
|
|
187
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listBankAccounts(authorization, pageSize, pageToken, filter, search, order, expand, options);
|
|
188
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
189
|
+
},
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* BankAccountsApi - factory interface
|
|
195
|
+
* @export
|
|
196
|
+
*/
|
|
197
|
+
export const BankAccountsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
198
|
+
const localVarFp = BankAccountsApiFp(configuration)
|
|
199
|
+
return {
|
|
200
|
+
/**
|
|
201
|
+
* Creates a bank account for a specified account.
|
|
202
|
+
* @summary Create a bank account
|
|
203
|
+
* @param {CreateBankAccountRequestDto} createBankAccountRequestDto
|
|
204
|
+
* @param {string} [authorization] Bearer Token
|
|
205
|
+
* @param {*} [options] Override http request option.
|
|
206
|
+
* @throws {RequiredError}
|
|
207
|
+
*/
|
|
208
|
+
createBankAccount(createBankAccountRequestDto: CreateBankAccountRequestDto, authorization?: string, options?: any): AxiosPromise<object> {
|
|
209
|
+
return localVarFp.createBankAccount(createBankAccountRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
210
|
+
},
|
|
211
|
+
/**
|
|
212
|
+
* Returns a list of bank accounts you’ve previously created. The bank accounts are returned in sorted order, with the oldest payment appearing first. For more information about pagination, read the Pagination documentation.
|
|
213
|
+
* @summary List bank accounts
|
|
214
|
+
* @param {string} [authorization] Bearer Token
|
|
215
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
216
|
+
* @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.
|
|
217
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
218
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
219
|
+
* @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.
|
|
220
|
+
* @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.
|
|
221
|
+
* @param {*} [options] Override http request option.
|
|
222
|
+
* @throws {RequiredError}
|
|
223
|
+
*/
|
|
224
|
+
listBankAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<ListBankAccountsResponseClass> {
|
|
225
|
+
return localVarFp.listBankAccounts(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
|
|
226
|
+
},
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Request parameters for createBankAccount operation in BankAccountsApi.
|
|
232
|
+
* @export
|
|
233
|
+
* @interface BankAccountsApiCreateBankAccountRequest
|
|
234
|
+
*/
|
|
235
|
+
export interface BankAccountsApiCreateBankAccountRequest {
|
|
236
|
+
/**
|
|
237
|
+
*
|
|
238
|
+
* @type {CreateBankAccountRequestDto}
|
|
239
|
+
* @memberof BankAccountsApiCreateBankAccount
|
|
240
|
+
*/
|
|
241
|
+
readonly createBankAccountRequestDto: CreateBankAccountRequestDto
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Bearer Token
|
|
245
|
+
* @type {string}
|
|
246
|
+
* @memberof BankAccountsApiCreateBankAccount
|
|
247
|
+
*/
|
|
248
|
+
readonly authorization?: string
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Request parameters for listBankAccounts operation in BankAccountsApi.
|
|
253
|
+
* @export
|
|
254
|
+
* @interface BankAccountsApiListBankAccountsRequest
|
|
255
|
+
*/
|
|
256
|
+
export interface BankAccountsApiListBankAccountsRequest {
|
|
257
|
+
/**
|
|
258
|
+
* Bearer Token
|
|
259
|
+
* @type {string}
|
|
260
|
+
* @memberof BankAccountsApiListBankAccounts
|
|
261
|
+
*/
|
|
262
|
+
readonly authorization?: string
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
266
|
+
* @type {any}
|
|
267
|
+
* @memberof BankAccountsApiListBankAccounts
|
|
268
|
+
*/
|
|
269
|
+
readonly pageSize?: any
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* 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.
|
|
273
|
+
* @type {any}
|
|
274
|
+
* @memberof BankAccountsApiListBankAccounts
|
|
275
|
+
*/
|
|
276
|
+
readonly pageToken?: any
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
280
|
+
* @type {any}
|
|
281
|
+
* @memberof BankAccountsApiListBankAccounts
|
|
282
|
+
*/
|
|
283
|
+
readonly filter?: any
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
287
|
+
* @type {any}
|
|
288
|
+
* @memberof BankAccountsApiListBankAccounts
|
|
289
|
+
*/
|
|
290
|
+
readonly search?: any
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* 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.
|
|
294
|
+
* @type {any}
|
|
295
|
+
* @memberof BankAccountsApiListBankAccounts
|
|
296
|
+
*/
|
|
297
|
+
readonly order?: any
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* 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.
|
|
301
|
+
* @type {any}
|
|
302
|
+
* @memberof BankAccountsApiListBankAccounts
|
|
303
|
+
*/
|
|
304
|
+
readonly expand?: any
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* BankAccountsApi - object-oriented interface
|
|
309
|
+
* @export
|
|
310
|
+
* @class BankAccountsApi
|
|
311
|
+
* @extends {BaseAPI}
|
|
312
|
+
*/
|
|
313
|
+
export class BankAccountsApi extends BaseAPI {
|
|
314
|
+
/**
|
|
315
|
+
* Creates a bank account for a specified account.
|
|
316
|
+
* @summary Create a bank account
|
|
317
|
+
* @param {BankAccountsApiCreateBankAccountRequest} requestParameters Request parameters.
|
|
318
|
+
* @param {*} [options] Override http request option.
|
|
319
|
+
* @throws {RequiredError}
|
|
320
|
+
* @memberof BankAccountsApi
|
|
321
|
+
*/
|
|
322
|
+
public createBankAccount(requestParameters: BankAccountsApiCreateBankAccountRequest, options?: AxiosRequestConfig) {
|
|
323
|
+
return BankAccountsApiFp(this.configuration).createBankAccount(requestParameters.createBankAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Returns a list of bank accounts you’ve previously created. The bank accounts are returned in sorted order, with the oldest payment appearing first. For more information about pagination, read the Pagination documentation.
|
|
328
|
+
* @summary List bank accounts
|
|
329
|
+
* @param {BankAccountsApiListBankAccountsRequest} requestParameters Request parameters.
|
|
330
|
+
* @param {*} [options] Override http request option.
|
|
331
|
+
* @throws {RequiredError}
|
|
332
|
+
* @memberof BankAccountsApi
|
|
333
|
+
*/
|
|
334
|
+
public listBankAccounts(requestParameters: BankAccountsApiListBankAccountsRequest = {}, options?: AxiosRequestConfig) {
|
|
335
|
+
return BankAccountsApiFp(this.configuration).listBankAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
336
|
+
}
|
|
337
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
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 { InlineResponse200 } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { InlineResponse503 } from '../models';
|
|
27
|
+
/**
|
|
28
|
+
* DefaultApi - axios parameter creator
|
|
29
|
+
* @export
|
|
30
|
+
*/
|
|
31
|
+
export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
32
|
+
return {
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param {*} [options] Override http request option.
|
|
36
|
+
* @throws {RequiredError}
|
|
37
|
+
*/
|
|
38
|
+
check: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
39
|
+
const localVarPath = `/paymentservice/health`;
|
|
40
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
41
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
42
|
+
let baseOptions;
|
|
43
|
+
let baseAccessToken;
|
|
44
|
+
if (configuration) {
|
|
45
|
+
baseOptions = configuration.baseOptions;
|
|
46
|
+
baseAccessToken = configuration.accessToken;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
50
|
+
const localVarHeaderParameter = {} as any;
|
|
51
|
+
const localVarQueryParameter = {} as any;
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
56
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
57
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
url: toPathString(localVarUrlObj),
|
|
61
|
+
options: localVarRequestOptions,
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* DefaultApi - functional programming interface
|
|
69
|
+
* @export
|
|
70
|
+
*/
|
|
71
|
+
export const DefaultApiFp = function(configuration?: Configuration) {
|
|
72
|
+
const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
|
|
73
|
+
return {
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @param {*} [options] Override http request option.
|
|
77
|
+
* @throws {RequiredError}
|
|
78
|
+
*/
|
|
79
|
+
async check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>> {
|
|
80
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.check(options);
|
|
81
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
82
|
+
},
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* DefaultApi - factory interface
|
|
88
|
+
* @export
|
|
89
|
+
*/
|
|
90
|
+
export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
91
|
+
const localVarFp = DefaultApiFp(configuration)
|
|
92
|
+
return {
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @param {*} [options] Override http request option.
|
|
96
|
+
* @throws {RequiredError}
|
|
97
|
+
*/
|
|
98
|
+
check(options?: any): AxiosPromise<InlineResponse200> {
|
|
99
|
+
return localVarFp.check(options).then((request) => request(axios, basePath));
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* DefaultApi - object-oriented interface
|
|
106
|
+
* @export
|
|
107
|
+
* @class DefaultApi
|
|
108
|
+
* @extends {BaseAPI}
|
|
109
|
+
*/
|
|
110
|
+
export class DefaultApi extends BaseAPI {
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* @param {*} [options] Override http request option.
|
|
114
|
+
* @throws {RequiredError}
|
|
115
|
+
* @memberof DefaultApi
|
|
116
|
+
*/
|
|
117
|
+
public check(options?: AxiosRequestConfig) {
|
|
118
|
+
return DefaultApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
|
|
119
|
+
}
|
|
120
|
+
}
|