@getivy/node-sdk 0.1.0-alpha.3 → 0.1.0-alpha.31
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/CHANGELOG.md +328 -0
- package/README.md +15 -27
- package/_shims/index.d.ts +2 -0
- package/_shims/index.js +5 -1
- package/_shims/index.mjs +5 -1
- package/core.d.ts +12 -1
- package/core.d.ts.map +1 -1
- package/core.js +20 -11
- package/core.js.map +1 -1
- package/core.mjs +21 -12
- package/core.mjs.map +1 -1
- package/index.d.mts +8 -2
- package/index.d.ts +8 -2
- package/index.d.ts.map +1 -1
- package/index.js +6 -0
- package/index.js.map +1 -1
- package/index.mjs +6 -0
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/balance.d.ts +2 -2
- package/resources/balance.d.ts.map +1 -1
- package/resources/banks.d.ts +53 -5
- package/resources/banks.d.ts.map +1 -1
- package/resources/charges.d.ts +3 -16
- package/resources/charges.d.ts.map +1 -1
- package/resources/checkoutsession.d.ts +397 -1577
- package/resources/checkoutsession.d.ts.map +1 -1
- package/resources/customers.d.ts +56 -6
- package/resources/customers.d.ts.map +1 -1
- package/resources/customers.js +3 -2
- package/resources/customers.js.map +1 -1
- package/resources/customers.mjs +3 -2
- package/resources/customers.mjs.map +1 -1
- package/resources/data/accounts.d.ts +104 -0
- package/resources/data/accounts.d.ts.map +1 -0
- package/resources/data/accounts.js +15 -0
- package/resources/data/accounts.js.map +1 -0
- package/resources/data/accounts.mjs +11 -0
- package/resources/data/accounts.mjs.map +1 -0
- package/resources/data/balances.d.ts +45 -0
- package/resources/data/balances.d.ts.map +1 -0
- package/resources/data/balances.js +15 -0
- package/resources/data/balances.js.map +1 -0
- package/resources/data/balances.mjs +11 -0
- package/resources/data/balances.mjs.map +1 -0
- package/resources/data/consent.d.ts +80 -0
- package/resources/data/consent.d.ts.map +1 -0
- package/resources/data/consent.js +21 -0
- package/resources/data/consent.js.map +1 -0
- package/resources/data/consent.mjs +17 -0
- package/resources/data/consent.mjs.map +1 -0
- package/resources/data/data.d.ts +26 -0
- package/resources/data/data.d.ts.map +1 -0
- package/resources/data/data.js +55 -0
- package/resources/data/data.js.map +1 -0
- package/resources/data/data.mjs +28 -0
- package/resources/data/data.mjs.map +1 -0
- package/resources/data/index.d.ts +7 -0
- package/resources/data/index.d.ts.map +1 -0
- package/resources/data/index.js +17 -0
- package/resources/data/index.js.map +1 -0
- package/resources/data/index.mjs +8 -0
- package/resources/data/index.mjs.map +1 -0
- package/resources/data/session.d.ts +234 -0
- package/resources/data/session.d.ts.map +1 -0
- package/resources/data/session.js +21 -0
- package/resources/data/session.js.map +1 -0
- package/resources/data/session.mjs +17 -0
- package/resources/data/session.mjs.map +1 -0
- package/resources/data/transactions.d.ts +54 -0
- package/resources/data/transactions.d.ts.map +1 -0
- package/resources/data/transactions.js +16 -0
- package/resources/data/transactions.js.map +1 -0
- package/resources/data/transactions.mjs +12 -0
- package/resources/data/transactions.mjs.map +1 -0
- package/resources/data.d.ts +2 -0
- package/resources/data.d.ts.map +1 -0
- package/resources/data.js +19 -0
- package/resources/data.js.map +1 -0
- package/resources/data.mjs +3 -0
- package/resources/data.mjs.map +1 -0
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/orders.d.ts +255 -405
- package/resources/orders.d.ts.map +1 -1
- package/resources/orders.js +10 -6
- package/resources/orders.js.map +1 -1
- package/resources/orders.mjs +10 -6
- package/resources/orders.mjs.map +1 -1
- package/resources/payouts.d.ts +2 -2
- package/resources/payouts.d.ts.map +1 -1
- package/resources/refunds.d.ts +1 -1
- package/resources/refunds.d.ts.map +1 -1
- package/resources/reports.d.ts +2 -2
- package/resources/reports.d.ts.map +1 -1
- package/resources/webhooksubscription.d.ts +155 -0
- package/resources/webhooksubscription.d.ts.map +1 -0
- package/resources/webhooksubscription.js +42 -0
- package/resources/webhooksubscription.js.map +1 -0
- package/resources/webhooksubscription.mjs +38 -0
- package/resources/webhooksubscription.mjs.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +18 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/_shims/index.d.ts +2 -0
- package/src/_shims/index.js +5 -1
- package/src/_shims/index.mjs +5 -1
- package/src/core.ts +39 -12
- package/src/index.ts +38 -4
- package/src/resources/balance.ts +2 -2
- package/src/resources/banks.ts +92 -5
- package/src/resources/charges.ts +3 -16
- package/src/resources/checkoutsession.ts +2338 -6557
- package/src/resources/customers.ts +61 -6
- package/src/resources/data/accounts.ts +134 -0
- package/src/resources/data/balances.ts +57 -0
- package/src/resources/data/consent.ts +110 -0
- package/src/resources/data/data.ts +75 -0
- package/src/resources/data/index.ts +20 -0
- package/src/resources/data/session.ts +1299 -0
- package/src/resources/data/transactions.ts +71 -0
- package/src/resources/data.ts +3 -0
- package/src/resources/index.ts +16 -2
- package/src/resources/orders.ts +812 -1970
- package/src/resources/payouts.ts +2 -2
- package/src/resources/refunds.ts +0 -1
- package/src/resources/reports.ts +2 -2
- package/src/resources/webhooksubscription.ts +353 -0
- package/src/resources.ts +1 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/src/_shims/index.mjs
CHANGED
|
@@ -3,5 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as shims from './registry.mjs';
|
|
5
5
|
import * as auto from "./auto/runtime";
|
|
6
|
-
|
|
6
|
+
export const init = () => {
|
|
7
|
+
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
|
|
8
|
+
};
|
|
7
9
|
export * from './registry.mjs';
|
|
10
|
+
|
|
11
|
+
init();
|
package/src/core.ts
CHANGED
|
@@ -16,7 +16,12 @@ import {
|
|
|
16
16
|
type RequestInit,
|
|
17
17
|
type Response,
|
|
18
18
|
type HeadersInit,
|
|
19
|
+
init,
|
|
19
20
|
} from './_shims/index';
|
|
21
|
+
|
|
22
|
+
// try running side effects outside of _shims/index to workaround https://github.com/vercel/next.js/issues/76881
|
|
23
|
+
init();
|
|
24
|
+
|
|
20
25
|
export { type Response };
|
|
21
26
|
import { BlobLike, isBlobLike, isMultipartBody } from './uploads';
|
|
22
27
|
export {
|
|
@@ -28,6 +33,20 @@ export {
|
|
|
28
33
|
|
|
29
34
|
export type Fetch = (url: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
30
35
|
|
|
36
|
+
/**
|
|
37
|
+
* An alias to the builtin `Array` type so we can
|
|
38
|
+
* easily alias it in import statements if there are name clashes.
|
|
39
|
+
*/
|
|
40
|
+
type _Array<T> = Array<T>;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* An alias to the builtin `Record` type so we can
|
|
44
|
+
* easily alias it in import statements if there are name clashes.
|
|
45
|
+
*/
|
|
46
|
+
type _Record<K extends keyof any, T> = Record<K, T>;
|
|
47
|
+
|
|
48
|
+
export type { _Array as Array, _Record as Record };
|
|
49
|
+
|
|
31
50
|
type PromiseOrValue<T> = T | Promise<T>;
|
|
32
51
|
|
|
33
52
|
type APIResponseProps = {
|
|
@@ -48,8 +67,8 @@ async function defaultParseResponse<T>(props: APIResponseProps): Promise<T> {
|
|
|
48
67
|
}
|
|
49
68
|
|
|
50
69
|
const contentType = response.headers.get('content-type');
|
|
51
|
-
const
|
|
52
|
-
|
|
70
|
+
const mediaType = contentType?.split(';')[0]?.trim();
|
|
71
|
+
const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');
|
|
53
72
|
if (isJSON) {
|
|
54
73
|
const json = await response.json();
|
|
55
74
|
|
|
@@ -277,9 +296,10 @@ export abstract class APIClient {
|
|
|
277
296
|
}
|
|
278
297
|
|
|
279
298
|
buildRequest<Req>(
|
|
280
|
-
|
|
299
|
+
inputOptions: FinalRequestOptions<Req>,
|
|
281
300
|
{ retryCount = 0 }: { retryCount?: number } = {},
|
|
282
301
|
): { req: RequestInit; url: string; timeout: number } {
|
|
302
|
+
const options = { ...inputOptions };
|
|
283
303
|
const { method, path, query, headers: headers = {} } = options;
|
|
284
304
|
|
|
285
305
|
const body =
|
|
@@ -292,9 +312,9 @@ export abstract class APIClient {
|
|
|
292
312
|
|
|
293
313
|
const url = this.buildURL(path!, query);
|
|
294
314
|
if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
|
|
295
|
-
|
|
315
|
+
options.timeout = options.timeout ?? this.timeout;
|
|
296
316
|
const httpAgent = options.httpAgent ?? this.httpAgent ?? getDefaultAgent(url);
|
|
297
|
-
const minAgentTimeout = timeout + 1000;
|
|
317
|
+
const minAgentTimeout = options.timeout + 1000;
|
|
298
318
|
if (
|
|
299
319
|
typeof (httpAgent as any)?.options?.timeout === 'number' &&
|
|
300
320
|
minAgentTimeout > ((httpAgent as any).options.timeout ?? 0)
|
|
@@ -307,8 +327,8 @@ export abstract class APIClient {
|
|
|
307
327
|
}
|
|
308
328
|
|
|
309
329
|
if (this.idempotencyHeader && method !== 'get') {
|
|
310
|
-
if (!
|
|
311
|
-
headers[this.idempotencyHeader] =
|
|
330
|
+
if (!inputOptions.idempotencyKey) inputOptions.idempotencyKey = this.defaultIdempotencyKey();
|
|
331
|
+
headers[this.idempotencyHeader] = inputOptions.idempotencyKey;
|
|
312
332
|
}
|
|
313
333
|
|
|
314
334
|
const reqHeaders = this.buildHeaders({ options, headers, contentLength, retryCount });
|
|
@@ -323,7 +343,7 @@ export abstract class APIClient {
|
|
|
323
343
|
signal: options.signal ?? null,
|
|
324
344
|
};
|
|
325
345
|
|
|
326
|
-
return { req, url, timeout };
|
|
346
|
+
return { req, url, timeout: options.timeout };
|
|
327
347
|
}
|
|
328
348
|
|
|
329
349
|
private buildHeaders({
|
|
@@ -351,15 +371,22 @@ export abstract class APIClient {
|
|
|
351
371
|
delete reqHeaders['content-type'];
|
|
352
372
|
}
|
|
353
373
|
|
|
354
|
-
// Don't set
|
|
355
|
-
//
|
|
356
|
-
//
|
|
374
|
+
// Don't set theses headers if they were already set or removed through default headers or by the caller.
|
|
375
|
+
// We check `defaultHeaders` and `headers`, which can contain nulls, instead of `reqHeaders` to account
|
|
376
|
+
// for the removal case.
|
|
357
377
|
if (
|
|
358
378
|
getHeader(defaultHeaders, 'x-stainless-retry-count') === undefined &&
|
|
359
379
|
getHeader(headers, 'x-stainless-retry-count') === undefined
|
|
360
380
|
) {
|
|
361
381
|
reqHeaders['x-stainless-retry-count'] = String(retryCount);
|
|
362
382
|
}
|
|
383
|
+
if (
|
|
384
|
+
getHeader(defaultHeaders, 'x-stainless-timeout') === undefined &&
|
|
385
|
+
getHeader(headers, 'x-stainless-timeout') === undefined &&
|
|
386
|
+
options.timeout
|
|
387
|
+
) {
|
|
388
|
+
reqHeaders['x-stainless-timeout'] = String(Math.trunc(options.timeout / 1000));
|
|
389
|
+
}
|
|
363
390
|
|
|
364
391
|
this.validateHeaders(reqHeaders, headers);
|
|
365
392
|
|
|
@@ -387,7 +414,7 @@ export abstract class APIClient {
|
|
|
387
414
|
!headers ? {}
|
|
388
415
|
: Symbol.iterator in headers ?
|
|
389
416
|
Object.fromEntries(Array.from(headers as Iterable<string[]>).map((header) => [...header]))
|
|
390
|
-
: { ...headers }
|
|
417
|
+
: { ...(headers as any as Record<string, string>) }
|
|
391
418
|
);
|
|
392
419
|
}
|
|
393
420
|
|
package/src/index.ts
CHANGED
|
@@ -42,10 +42,10 @@ import {
|
|
|
42
42
|
Mandates,
|
|
43
43
|
} from './resources/mandates';
|
|
44
44
|
import {
|
|
45
|
+
OrderCreateParams,
|
|
46
|
+
OrderCreateResponse,
|
|
45
47
|
OrderRetrieveParams,
|
|
46
48
|
OrderRetrieveResponse,
|
|
47
|
-
OrderUpdateParams,
|
|
48
|
-
OrderUpdateResponse,
|
|
49
49
|
Orders,
|
|
50
50
|
} from './resources/orders';
|
|
51
51
|
import {
|
|
@@ -78,6 +78,20 @@ import {
|
|
|
78
78
|
SubaccountRetrieveParams,
|
|
79
79
|
Subaccounts,
|
|
80
80
|
} from './resources/subaccounts';
|
|
81
|
+
import {
|
|
82
|
+
Webhooksubscription,
|
|
83
|
+
WebhooksubscriptionCreateParams,
|
|
84
|
+
WebhooksubscriptionCreateResponse,
|
|
85
|
+
WebhooksubscriptionDeleteParams,
|
|
86
|
+
WebhooksubscriptionDeleteResponse,
|
|
87
|
+
WebhooksubscriptionListParams,
|
|
88
|
+
WebhooksubscriptionListResponse,
|
|
89
|
+
WebhooksubscriptionPingParams,
|
|
90
|
+
WebhooksubscriptionPingResponse,
|
|
91
|
+
WebhooksubscriptionUpdateParams,
|
|
92
|
+
WebhooksubscriptionUpdateResponse,
|
|
93
|
+
} from './resources/webhooksubscription';
|
|
94
|
+
import { Data } from './resources/data/data';
|
|
81
95
|
|
|
82
96
|
const environments = {
|
|
83
97
|
production: 'https://api.getivy.de',
|
|
@@ -217,6 +231,7 @@ export class Ivy extends Core.APIClient {
|
|
|
217
231
|
|
|
218
232
|
banks: API.Banks = new API.Banks(this);
|
|
219
233
|
checkoutsession: API.Checkoutsession = new API.Checkoutsession(this);
|
|
234
|
+
data: API.Data = new API.Data(this);
|
|
220
235
|
customers: API.Customers = new API.Customers(this);
|
|
221
236
|
orders: API.Orders = new API.Orders(this);
|
|
222
237
|
charges: API.Charges = new API.Charges(this);
|
|
@@ -227,6 +242,7 @@ export class Ivy extends Core.APIClient {
|
|
|
227
242
|
reports: API.Reports = new API.Reports(this);
|
|
228
243
|
subaccounts: API.Subaccounts = new API.Subaccounts(this);
|
|
229
244
|
balance: API.Balance = new API.Balance(this);
|
|
245
|
+
webhooksubscription: API.Webhooksubscription = new API.Webhooksubscription(this);
|
|
230
246
|
|
|
231
247
|
protected override defaultQuery(): Core.DefaultQuery | undefined {
|
|
232
248
|
return this._options.defaultQuery;
|
|
@@ -266,6 +282,7 @@ export class Ivy extends Core.APIClient {
|
|
|
266
282
|
|
|
267
283
|
Ivy.Banks = Banks;
|
|
268
284
|
Ivy.Checkoutsession = Checkoutsession;
|
|
285
|
+
Ivy.Data = Data;
|
|
269
286
|
Ivy.Customers = Customers;
|
|
270
287
|
Ivy.Orders = Orders;
|
|
271
288
|
Ivy.Charges = Charges;
|
|
@@ -276,6 +293,7 @@ Ivy.Payouts = Payouts;
|
|
|
276
293
|
Ivy.Reports = Reports;
|
|
277
294
|
Ivy.Subaccounts = Subaccounts;
|
|
278
295
|
Ivy.Balance = Balance;
|
|
296
|
+
Ivy.Webhooksubscription = Webhooksubscription;
|
|
279
297
|
export declare namespace Ivy {
|
|
280
298
|
export type RequestOptions = Core.RequestOptions;
|
|
281
299
|
|
|
@@ -299,6 +317,8 @@ export declare namespace Ivy {
|
|
|
299
317
|
type CheckoutsessionExpireParams as CheckoutsessionExpireParams,
|
|
300
318
|
};
|
|
301
319
|
|
|
320
|
+
export { Data as Data };
|
|
321
|
+
|
|
302
322
|
export {
|
|
303
323
|
Customers as Customers,
|
|
304
324
|
type CustomerCreateResponse as CustomerCreateResponse,
|
|
@@ -309,10 +329,10 @@ export declare namespace Ivy {
|
|
|
309
329
|
|
|
310
330
|
export {
|
|
311
331
|
Orders as Orders,
|
|
332
|
+
type OrderCreateResponse as OrderCreateResponse,
|
|
312
333
|
type OrderRetrieveResponse as OrderRetrieveResponse,
|
|
313
|
-
type
|
|
334
|
+
type OrderCreateParams as OrderCreateParams,
|
|
314
335
|
type OrderRetrieveParams as OrderRetrieveParams,
|
|
315
|
-
type OrderUpdateParams as OrderUpdateParams,
|
|
316
336
|
};
|
|
317
337
|
|
|
318
338
|
export { Charges as Charges, type Charge as Charge, type ChargeCreateParams as ChargeCreateParams };
|
|
@@ -371,6 +391,20 @@ export declare namespace Ivy {
|
|
|
371
391
|
type BalanceRetrieveResponse as BalanceRetrieveResponse,
|
|
372
392
|
type BalanceRetrieveParams as BalanceRetrieveParams,
|
|
373
393
|
};
|
|
394
|
+
|
|
395
|
+
export {
|
|
396
|
+
Webhooksubscription as Webhooksubscription,
|
|
397
|
+
type WebhooksubscriptionCreateResponse as WebhooksubscriptionCreateResponse,
|
|
398
|
+
type WebhooksubscriptionUpdateResponse as WebhooksubscriptionUpdateResponse,
|
|
399
|
+
type WebhooksubscriptionListResponse as WebhooksubscriptionListResponse,
|
|
400
|
+
type WebhooksubscriptionDeleteResponse as WebhooksubscriptionDeleteResponse,
|
|
401
|
+
type WebhooksubscriptionPingResponse as WebhooksubscriptionPingResponse,
|
|
402
|
+
type WebhooksubscriptionCreateParams as WebhooksubscriptionCreateParams,
|
|
403
|
+
type WebhooksubscriptionUpdateParams as WebhooksubscriptionUpdateParams,
|
|
404
|
+
type WebhooksubscriptionListParams as WebhooksubscriptionListParams,
|
|
405
|
+
type WebhooksubscriptionDeleteParams as WebhooksubscriptionDeleteParams,
|
|
406
|
+
type WebhooksubscriptionPingParams as WebhooksubscriptionPingParams,
|
|
407
|
+
};
|
|
374
408
|
}
|
|
375
409
|
|
|
376
410
|
export { toFile, fileFromPath } from './uploads';
|
package/src/resources/balance.ts
CHANGED
|
@@ -33,12 +33,12 @@ export namespace BalanceRetrieveResponse {
|
|
|
33
33
|
/**
|
|
34
34
|
* The currency of the balance
|
|
35
35
|
*/
|
|
36
|
-
currency: 'EUR' | 'GBP' | 'PLN';
|
|
36
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export interface BalanceRetrieveParams {
|
|
41
|
-
currency: 'EUR' | 'GBP' | 'PLN';
|
|
41
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export declare namespace Balance {
|
package/src/resources/banks.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface BankRetrieveResponse {
|
|
|
38
38
|
*/
|
|
39
39
|
id: string;
|
|
40
40
|
|
|
41
|
-
currencies: Array<'EUR' | 'GBP' | 'PLN'>;
|
|
41
|
+
currencies: Array<'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK'>;
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* If true, the bank is part of the set of default banks for a given market.
|
|
@@ -307,6 +307,20 @@ export interface BankRetrieveResponse {
|
|
|
307
307
|
*/
|
|
308
308
|
name: string;
|
|
309
309
|
|
|
310
|
+
/**
|
|
311
|
+
* The payment schemes supported by the bank.
|
|
312
|
+
*/
|
|
313
|
+
supportedPaymentSchemes: Array<
|
|
314
|
+
| 'SEPA_INSTANT'
|
|
315
|
+
| 'FASTER_PAYMENTS'
|
|
316
|
+
| 'SEPA'
|
|
317
|
+
| 'ELIXIR'
|
|
318
|
+
| 'EXPRESS_ELIXIR'
|
|
319
|
+
| 'SEK_ACCOUNT_TO_ACCOUNT'
|
|
320
|
+
| 'SUMCLEARING'
|
|
321
|
+
| 'STRAKSCLEARING'
|
|
322
|
+
>;
|
|
323
|
+
|
|
310
324
|
/**
|
|
311
325
|
* If true, the bank is only available in test (sandbox) mode.
|
|
312
326
|
*/
|
|
@@ -335,6 +349,21 @@ export interface BankListResponse {
|
|
|
335
349
|
* A list of banks.
|
|
336
350
|
*/
|
|
337
351
|
banks: Array<BankListResponse.Bank>;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* The total number of banks
|
|
355
|
+
*/
|
|
356
|
+
count: number;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Whether there are more banks to retrieve
|
|
360
|
+
*/
|
|
361
|
+
hasNext: boolean;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* The number of banks skipped
|
|
365
|
+
*/
|
|
366
|
+
skip: number;
|
|
338
367
|
}
|
|
339
368
|
|
|
340
369
|
export namespace BankListResponse {
|
|
@@ -347,7 +376,7 @@ export namespace BankListResponse {
|
|
|
347
376
|
*/
|
|
348
377
|
id: string;
|
|
349
378
|
|
|
350
|
-
currencies: Array<'EUR' | 'GBP' | 'PLN'>;
|
|
379
|
+
currencies: Array<'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK'>;
|
|
351
380
|
|
|
352
381
|
/**
|
|
353
382
|
* If true, the bank is part of the set of default banks for a given market.
|
|
@@ -616,6 +645,20 @@ export namespace BankListResponse {
|
|
|
616
645
|
*/
|
|
617
646
|
name: string;
|
|
618
647
|
|
|
648
|
+
/**
|
|
649
|
+
* The payment schemes supported by the bank.
|
|
650
|
+
*/
|
|
651
|
+
supportedPaymentSchemes: Array<
|
|
652
|
+
| 'SEPA_INSTANT'
|
|
653
|
+
| 'FASTER_PAYMENTS'
|
|
654
|
+
| 'SEPA'
|
|
655
|
+
| 'ELIXIR'
|
|
656
|
+
| 'EXPRESS_ELIXIR'
|
|
657
|
+
| 'SEK_ACCOUNT_TO_ACCOUNT'
|
|
658
|
+
| 'SUMCLEARING'
|
|
659
|
+
| 'STRAKSCLEARING'
|
|
660
|
+
>;
|
|
661
|
+
|
|
619
662
|
/**
|
|
620
663
|
* If true, the bank is only available in test (sandbox) mode.
|
|
621
664
|
*/
|
|
@@ -645,6 +688,21 @@ export interface BankSearchResponse {
|
|
|
645
688
|
* A list of banks.
|
|
646
689
|
*/
|
|
647
690
|
banks: Array<BankSearchResponse.Bank>;
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* The total number of banks
|
|
694
|
+
*/
|
|
695
|
+
count: number;
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Whether there are more banks to retrieve
|
|
699
|
+
*/
|
|
700
|
+
hasNext: boolean;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* The number of banks skipped
|
|
704
|
+
*/
|
|
705
|
+
skip: number;
|
|
648
706
|
}
|
|
649
707
|
|
|
650
708
|
export namespace BankSearchResponse {
|
|
@@ -657,7 +715,7 @@ export namespace BankSearchResponse {
|
|
|
657
715
|
*/
|
|
658
716
|
id: string;
|
|
659
717
|
|
|
660
|
-
currencies: Array<'EUR' | 'GBP' | 'PLN'>;
|
|
718
|
+
currencies: Array<'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK'>;
|
|
661
719
|
|
|
662
720
|
/**
|
|
663
721
|
* If true, the bank is part of the set of default banks for a given market.
|
|
@@ -926,6 +984,20 @@ export namespace BankSearchResponse {
|
|
|
926
984
|
*/
|
|
927
985
|
name: string;
|
|
928
986
|
|
|
987
|
+
/**
|
|
988
|
+
* The payment schemes supported by the bank.
|
|
989
|
+
*/
|
|
990
|
+
supportedPaymentSchemes: Array<
|
|
991
|
+
| 'SEPA_INSTANT'
|
|
992
|
+
| 'FASTER_PAYMENTS'
|
|
993
|
+
| 'SEPA'
|
|
994
|
+
| 'ELIXIR'
|
|
995
|
+
| 'EXPRESS_ELIXIR'
|
|
996
|
+
| 'SEK_ACCOUNT_TO_ACCOUNT'
|
|
997
|
+
| 'SUMCLEARING'
|
|
998
|
+
| 'STRAKSCLEARING'
|
|
999
|
+
>;
|
|
1000
|
+
|
|
929
1001
|
/**
|
|
930
1002
|
* If true, the bank is only available in test (sandbox) mode.
|
|
931
1003
|
*/
|
|
@@ -964,7 +1036,7 @@ export interface BankListParams {
|
|
|
964
1036
|
/**
|
|
965
1037
|
* ISO 4217 currency code. Filter banks with provided currency only.
|
|
966
1038
|
*/
|
|
967
|
-
currency?: 'EUR' | 'GBP' | 'PLN';
|
|
1039
|
+
currency?: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
968
1040
|
|
|
969
1041
|
/**
|
|
970
1042
|
* If provided the list will show banks in this group only. Groups are e.g.
|
|
@@ -972,6 +1044,11 @@ export interface BankListParams {
|
|
|
972
1044
|
*/
|
|
973
1045
|
group?: string;
|
|
974
1046
|
|
|
1047
|
+
/**
|
|
1048
|
+
* The maximum number of banks to return (default 1000)
|
|
1049
|
+
*/
|
|
1050
|
+
limit?: number;
|
|
1051
|
+
|
|
975
1052
|
/**
|
|
976
1053
|
* ISO 3166-1 alpha-2 country code. Filter banks with provided market only.
|
|
977
1054
|
*/
|
|
@@ -1231,6 +1308,11 @@ export interface BankListParams {
|
|
|
1231
1308
|
* The internal checkout session id. For internal use only.
|
|
1232
1309
|
*/
|
|
1233
1310
|
sessionId?: string;
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* The number of banks to skip
|
|
1314
|
+
*/
|
|
1315
|
+
skip?: number;
|
|
1234
1316
|
}
|
|
1235
1317
|
|
|
1236
1318
|
export interface BankSearchParams {
|
|
@@ -1243,7 +1325,7 @@ export interface BankSearchParams {
|
|
|
1243
1325
|
/**
|
|
1244
1326
|
* ISO 4217 currency code. Filter banks with provided currency only.
|
|
1245
1327
|
*/
|
|
1246
|
-
currency?: 'EUR' | 'GBP' | 'PLN';
|
|
1328
|
+
currency?: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
1247
1329
|
|
|
1248
1330
|
/**
|
|
1249
1331
|
* If provided the list will show banks in this group only. Groups are e.g.
|
|
@@ -1522,6 +1604,11 @@ export interface BankSearchParams {
|
|
|
1522
1604
|
* The internal checkout session id. For internal use only.
|
|
1523
1605
|
*/
|
|
1524
1606
|
sessionId?: string;
|
|
1607
|
+
|
|
1608
|
+
/**
|
|
1609
|
+
* The number of banks to skip
|
|
1610
|
+
*/
|
|
1611
|
+
skip?: number;
|
|
1525
1612
|
}
|
|
1526
1613
|
|
|
1527
1614
|
export declare namespace Banks {
|
package/src/resources/charges.ts
CHANGED
|
@@ -47,7 +47,7 @@ export interface ChargeCreateParams {
|
|
|
47
47
|
referenceId: string;
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
|
-
* Additional data to be stored with the charge.
|
|
50
|
+
* @deprecated Additional data to be stored with the charge.
|
|
51
51
|
*/
|
|
52
52
|
metadata?: ChargeCreateParams.Metadata;
|
|
53
53
|
|
|
@@ -62,37 +62,24 @@ export namespace ChargeCreateParams {
|
|
|
62
62
|
* The price to be charged.
|
|
63
63
|
*/
|
|
64
64
|
export interface Price {
|
|
65
|
-
currency: 'EUR' | 'GBP' | 'PLN';
|
|
65
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* The total amount to be paid.
|
|
69
69
|
*/
|
|
70
70
|
total: number;
|
|
71
71
|
|
|
72
|
-
/**
|
|
73
|
-
* The shipping amount.
|
|
74
|
-
*/
|
|
75
72
|
shipping?: number;
|
|
76
73
|
|
|
77
|
-
/**
|
|
78
|
-
* The subtotal amount, i.e. the total amount without VAT and shipping.
|
|
79
|
-
*/
|
|
80
74
|
subTotal?: number;
|
|
81
75
|
|
|
82
|
-
/**
|
|
83
|
-
* The total net amount, i.e. the total amount without VAT. This value is rounded
|
|
84
|
-
* to 2 decimal places for the actual transfer.
|
|
85
|
-
*/
|
|
86
76
|
totalNet?: number;
|
|
87
77
|
|
|
88
|
-
/**
|
|
89
|
-
* The VAT amount.
|
|
90
|
-
*/
|
|
91
78
|
vat?: number;
|
|
92
79
|
}
|
|
93
80
|
|
|
94
81
|
/**
|
|
95
|
-
* Additional data to be stored with the charge.
|
|
82
|
+
* @deprecated Additional data to be stored with the charge.
|
|
96
83
|
*/
|
|
97
84
|
export interface Metadata {
|
|
98
85
|
/**
|