@getivy/node-sdk 0.1.0-alpha.9 → 1.1.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/CHANGELOG.md +334 -0
- package/README.md +16 -26
- package/_shims/index.d.ts +2 -0
- package/_shims/index.js +5 -1
- package/_shims/index.mjs +5 -1
- package/core.d.ts +19 -5
- package/core.d.ts.map +1 -1
- package/core.js +25 -15
- package/core.js.map +1 -1
- package/core.mjs +26 -16
- package/core.mjs.map +1 -1
- package/index.d.mts +36 -18
- package/index.d.ts +36 -18
- package/index.d.ts.map +1 -1
- package/index.js +27 -8
- package/index.js.map +1 -1
- package/index.mjs +27 -8
- package/index.mjs.map +1 -1
- package/package.json +11 -33
- package/resource.d.ts +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/balance.d.ts +8 -5
- package/resources/balance.d.ts.map +1 -1
- package/resources/banks.d.ts +82 -67
- package/resources/banks.d.ts.map +1 -1
- package/resources/beneficiary-payouts.d.ts +61 -0
- package/resources/beneficiary-payouts.d.ts.map +1 -0
- package/resources/beneficiary-payouts.js +16 -0
- package/resources/beneficiary-payouts.js.map +1 -0
- package/resources/beneficiary-payouts.mjs +12 -0
- package/resources/beneficiary-payouts.mjs.map +1 -0
- package/resources/capabilities.d.ts +1 -10
- package/resources/capabilities.d.ts.map +1 -1
- package/resources/charges.d.ts +28 -19
- package/resources/charges.d.ts.map +1 -1
- package/resources/checkoutsession.d.ts +275 -1360
- package/resources/checkoutsession.d.ts.map +1 -1
- package/resources/customers.d.ts +140 -10
- package/resources/customers.d.ts.map +1 -1
- package/resources/customers.js +9 -2
- package/resources/customers.js.map +1 -1
- package/resources/customers.mjs +9 -2
- package/resources/customers.mjs.map +1 -1
- package/resources/data/accounts.d.ts +83 -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 +48 -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 +258 -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 +175 -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/deposits.d.ts +165 -0
- package/resources/deposits.d.ts.map +1 -0
- package/resources/deposits.js +15 -0
- package/resources/deposits.js.map +1 -0
- package/resources/deposits.mjs +11 -0
- package/resources/deposits.mjs.map +1 -0
- package/resources/fx.d.ts +90 -0
- package/resources/fx.d.ts.map +1 -0
- package/resources/fx.js +22 -0
- package/resources/fx.js.map +1 -0
- package/resources/fx.mjs +18 -0
- package/resources/fx.mjs.map +1 -0
- package/resources/index.d.ts +13 -8
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +15 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +7 -2
- package/resources/index.mjs.map +1 -1
- package/resources/mandates.d.ts +55 -17
- package/resources/mandates.d.ts.map +1 -1
- package/resources/orders.d.ts +720 -743
- package/resources/orders.d.ts.map +1 -1
- package/resources/orders.js +13 -3
- package/resources/orders.js.map +1 -1
- package/resources/orders.mjs +13 -3
- package/resources/orders.mjs.map +1 -1
- package/resources/payouts.d.ts +219 -103
- package/resources/payouts.d.ts.map +1 -1
- package/resources/payouts.js +3 -4
- package/resources/payouts.js.map +1 -1
- package/resources/payouts.mjs +3 -4
- package/resources/payouts.mjs.map +1 -1
- package/resources/refunds.d.ts +53 -97
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +8 -12
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +8 -12
- package/resources/refunds.mjs.map +1 -1
- package/resources/returns.d.ts +104 -0
- package/resources/returns.d.ts.map +1 -0
- package/resources/returns.js +21 -0
- package/resources/returns.js.map +1 -0
- package/resources/returns.mjs +17 -0
- package/resources/returns.mjs.map +1 -0
- package/resources/subaccounts.d.ts +15 -5
- package/resources/subaccounts.d.ts.map +1 -1
- package/resources/subaccounts.js.map +1 -1
- package/resources/subaccounts.mjs.map +1 -1
- package/resources/transactions.d.ts +174 -0
- package/resources/transactions.d.ts.map +1 -0
- package/resources/transactions.js +15 -0
- package/resources/transactions.js.map +1 -0
- package/resources/transactions.mjs +11 -0
- package/resources/transactions.mjs.map +1 -0
- package/resources/webhook/index.d.ts +3 -0
- package/resources/webhook/index.d.ts.map +1 -0
- package/resources/webhook/index.js +9 -0
- package/resources/webhook/index.js.map +1 -0
- package/resources/webhook/index.mjs +4 -0
- package/resources/webhook/index.mjs.map +1 -0
- package/resources/webhook/subscription.d.ts +152 -0
- package/resources/webhook/subscription.d.ts.map +1 -0
- package/resources/{webhooksubscription.js → webhook/subscription.js} +6 -6
- package/resources/webhook/subscription.js.map +1 -0
- package/resources/{webhooksubscription.mjs → webhook/subscription.mjs} +4 -4
- package/resources/webhook/subscription.mjs.map +1 -0
- package/resources/webhook/webhook.d.ts +28 -0
- package/resources/webhook/webhook.d.ts.map +1 -0
- package/resources/webhook/webhook.js +45 -0
- package/resources/webhook/webhook.js.map +1 -0
- package/resources/webhook/webhook.mjs +18 -0
- package/resources/webhook/webhook.mjs.map +1 -0
- package/resources/webhook.d.ts +2 -0
- package/resources/webhook.d.ts.map +1 -0
- package/resources/webhook.js +19 -0
- package/resources/webhook.js.map +1 -0
- package/resources/webhook.mjs +3 -0
- package/resources/webhook.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 +44 -16
- package/src/index.ts +111 -60
- package/src/resource.ts +1 -1
- package/src/resources/balance.ts +8 -5
- package/src/resources/banks.ts +130 -67
- package/src/resources/beneficiary-payouts.ts +78 -0
- package/src/resources/capabilities.ts +1 -10
- package/src/resources/charges.ts +30 -21
- package/src/resources/checkoutsession.ts +1224 -3096
- package/src/resources/customers.ts +164 -9
- package/src/resources/data/accounts.ts +113 -0
- package/src/resources/data/balances.ts +60 -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 +1317 -0
- package/src/resources/data/transactions.ts +235 -0
- package/src/resources/data.ts +3 -0
- package/src/resources/deposits.ts +231 -0
- package/src/resources/fx.ts +119 -0
- package/src/resources/index.ts +33 -28
- package/src/resources/mandates.ts +79 -17
- package/src/resources/orders.ts +1449 -1075
- package/src/resources/payouts.ts +273 -103
- package/src/resources/refunds.ts +70 -111
- package/src/resources/returns.ts +140 -0
- package/src/resources/subaccounts.ts +26 -4
- package/src/resources/transactions.ts +234 -0
- package/src/resources/webhook/index.ts +16 -0
- package/src/resources/{webhooksubscription.ts → webhook/subscription.ts} +164 -112
- package/src/resources/webhook/webhook.ts +69 -0
- package/src/resources/webhook.ts +3 -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/resources/reports.d.ts +0 -120
- package/resources/reports.d.ts.map +0 -1
- package/resources/reports.js +0 -31
- package/resources/reports.js.map +0 -1
- package/resources/reports.mjs +0 -27
- package/resources/reports.mjs.map +0 -1
- package/resources/webhooksubscription.d.ts +0 -155
- package/resources/webhooksubscription.d.ts.map +0 -1
- package/resources/webhooksubscription.js.map +0 -1
- package/resources/webhooksubscription.mjs.map +0 -1
- package/src/resources/reports.ts +0 -172
package/src/resources/refunds.ts
CHANGED
|
@@ -2,42 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../resource';
|
|
4
4
|
import * as Core from '../core';
|
|
5
|
-
import * as RefundsAPI from './refunds';
|
|
6
5
|
|
|
7
6
|
export class Refunds extends APIResource {
|
|
8
7
|
/**
|
|
9
|
-
*
|
|
10
|
-
* Ivy
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* Creates a refund for the specified order. The order can be specified either by
|
|
9
|
+
* Ivy's internal `orderId` or by the `referenceId` provided by the merchant during
|
|
10
|
+
* checkout creation. If the refund should only be partial, you can specifiy this
|
|
11
|
+
* with the `amount` parameter.
|
|
13
12
|
*/
|
|
14
|
-
create(body: RefundCreateParams, options?: Core.RequestOptions): Core.APIPromise<
|
|
15
|
-
return this._client.post('/api/service/
|
|
13
|
+
create(body: RefundCreateParams, options?: Core.RequestOptions): Core.APIPromise<RefundCreateResponse> {
|
|
14
|
+
return this._client.post('/api/service/refund/create', { body, ...options });
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
/**
|
|
19
|
-
*
|
|
20
|
-
* either by Ivy\'s internal id ("orderId") or by id provided by the merchant
|
|
21
|
-
* ("referenceId"). If only a partial amount should be refunded the desired amount
|
|
22
|
-
* can be set with the "amount" parameter. Additional information regarding the
|
|
23
|
-
* refund can be provided through the "description" parameter.
|
|
18
|
+
* Returns refund details and Id of refunded order.
|
|
24
19
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
retrieve(
|
|
21
|
+
body: RefundRetrieveParams,
|
|
22
|
+
options?: Core.RequestOptions,
|
|
23
|
+
): Core.APIPromise<RefundRetrieveResponse> {
|
|
24
|
+
return this._client.post('/api/service/refund/retrieve', { body, ...options });
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
27
|
|
|
30
|
-
export interface
|
|
31
|
-
/**
|
|
32
|
-
* The internal Ivy id of the order.
|
|
33
|
-
*/
|
|
28
|
+
export interface Refund {
|
|
34
29
|
orderId: string;
|
|
35
30
|
|
|
36
|
-
/**
|
|
37
|
-
* The order status. This status symbolises the state of the user's payment
|
|
38
|
-
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
39
|
-
* information.
|
|
40
|
-
*/
|
|
41
31
|
orderStatus:
|
|
42
32
|
| 'failed'
|
|
43
33
|
| 'canceled'
|
|
@@ -52,132 +42,101 @@ export interface RefundResponse {
|
|
|
52
42
|
| 'disputed'
|
|
53
43
|
| 'refused';
|
|
54
44
|
|
|
45
|
+
referenceId: string;
|
|
46
|
+
|
|
47
|
+
refundStatus: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface RefundCreateResponse {
|
|
55
51
|
/**
|
|
56
|
-
*
|
|
57
|
-
* retrieve the refund from the order object.
|
|
52
|
+
* The unique Refund id
|
|
58
53
|
*/
|
|
59
|
-
|
|
54
|
+
id: string;
|
|
60
55
|
|
|
61
56
|
/**
|
|
62
|
-
* The
|
|
63
|
-
* truth to trigger actions in your dashboard.
|
|
57
|
+
* The amount of the refund in decimals.
|
|
64
58
|
*/
|
|
65
|
-
|
|
66
|
-
}
|
|
59
|
+
amount: number;
|
|
67
60
|
|
|
68
|
-
export interface RefundBatchResponse {
|
|
69
61
|
/**
|
|
70
|
-
*
|
|
62
|
+
* Refund's currency.
|
|
71
63
|
*/
|
|
72
|
-
|
|
73
|
-
}
|
|
64
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
74
65
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
*/
|
|
85
|
-
error?: string;
|
|
86
|
-
}
|
|
66
|
+
/**
|
|
67
|
+
* The id of the refunded order
|
|
68
|
+
*/
|
|
69
|
+
orderId: string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The current status of this refund.
|
|
73
|
+
*/
|
|
74
|
+
status: 'initiated' | 'pending' | 'succeeded' | 'failed';
|
|
87
75
|
}
|
|
88
76
|
|
|
89
|
-
export interface
|
|
77
|
+
export interface RefundRetrieveResponse {
|
|
90
78
|
/**
|
|
91
|
-
* The
|
|
92
|
-
* the full order amount will be refunded.
|
|
79
|
+
* The unique Refund id
|
|
93
80
|
*/
|
|
94
|
-
|
|
81
|
+
id: string;
|
|
95
82
|
|
|
96
83
|
/**
|
|
97
|
-
*
|
|
98
|
-
* dashboard.
|
|
84
|
+
* The amount of the refund in decimals.
|
|
99
85
|
*/
|
|
100
|
-
|
|
86
|
+
amount: number;
|
|
101
87
|
|
|
102
88
|
/**
|
|
103
|
-
*
|
|
104
|
-
|
|
105
|
-
|
|
89
|
+
* Refund's currency.
|
|
90
|
+
*/
|
|
91
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The id of the refunded order
|
|
95
|
+
*/
|
|
96
|
+
orderId: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The current status of this refund.
|
|
106
100
|
*/
|
|
107
|
-
|
|
101
|
+
status: 'initiated' | 'pending' | 'succeeded' | 'failed';
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface RefundCreateParams {
|
|
105
|
+
amount: number;
|
|
108
106
|
|
|
109
107
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* refund
|
|
113
|
-
* this is a rare occurrence.
|
|
108
|
+
* An optional custom text that will be shown on the customer's payment reference.
|
|
109
|
+
* Input has to be maximum 16 alpha-numeric characters. If not provided, a default
|
|
110
|
+
* Ivy refund referenceId will be shown.
|
|
114
111
|
*/
|
|
115
|
-
|
|
112
|
+
bankStatementReference?: string;
|
|
116
113
|
|
|
117
114
|
/**
|
|
118
|
-
* The internal Ivy id of the order.
|
|
115
|
+
* The internal Ivy id of the order. Must be present in request body if referenceId
|
|
116
|
+
* is not provided
|
|
119
117
|
*/
|
|
120
118
|
orderId?: string;
|
|
121
119
|
|
|
122
120
|
/**
|
|
123
|
-
* The external id set by the merchant during checkout creation.
|
|
121
|
+
* The external id set by the merchant during checkout creation. Required if
|
|
122
|
+
* orderId is not passed.
|
|
124
123
|
*/
|
|
125
124
|
referenceId?: string;
|
|
126
125
|
}
|
|
127
126
|
|
|
128
|
-
export interface
|
|
127
|
+
export interface RefundRetrieveParams {
|
|
129
128
|
/**
|
|
130
|
-
*
|
|
129
|
+
* Id of refund to retrieve details
|
|
131
130
|
*/
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export namespace RefundBatchParams {
|
|
136
|
-
export interface RequestedRefund {
|
|
137
|
-
/**
|
|
138
|
-
* The amount to refund in decimals, e.g. 10.23 for EUR 10.23. If not specified,
|
|
139
|
-
* the full order amount will be refunded.
|
|
140
|
-
*/
|
|
141
|
-
amount?: number;
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* A description for the refund. This will be retrievable in the API and in the Ivy
|
|
145
|
-
* dashboard.
|
|
146
|
-
*/
|
|
147
|
-
description?: string;
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* An optional custom text that will be shown on the customer's payment reference.
|
|
151
|
-
* Input has to be maximum 16 alpha-numeric characters. If not provided, a default
|
|
152
|
-
* Ivy refund referenceId will be shown.
|
|
153
|
-
*/
|
|
154
|
-
displayedPaymentReference?: string;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* The email of the customer. If provided, Ivy may use this email to contact the
|
|
158
|
-
* customer directly in case of issues or need for clarification regarding the
|
|
159
|
-
* refund. If not provided, Ivy will contact the merchant in such cases. However,
|
|
160
|
-
* this is a rare occurrence.
|
|
161
|
-
*/
|
|
162
|
-
email?: string;
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* The internal Ivy id of the order.
|
|
166
|
-
*/
|
|
167
|
-
orderId?: string;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* The external id set by the merchant during checkout creation.
|
|
171
|
-
*/
|
|
172
|
-
referenceId?: string;
|
|
173
|
-
}
|
|
131
|
+
id: string;
|
|
174
132
|
}
|
|
175
133
|
|
|
176
134
|
export declare namespace Refunds {
|
|
177
135
|
export {
|
|
178
|
-
type
|
|
179
|
-
type
|
|
136
|
+
type Refund as Refund,
|
|
137
|
+
type RefundCreateResponse as RefundCreateResponse,
|
|
138
|
+
type RefundRetrieveResponse as RefundRetrieveResponse,
|
|
180
139
|
type RefundCreateParams as RefundCreateParams,
|
|
181
|
-
type
|
|
140
|
+
type RefundRetrieveParams as RefundRetrieveParams,
|
|
182
141
|
};
|
|
183
142
|
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../resource';
|
|
4
|
+
import * as Core from '../core';
|
|
5
|
+
|
|
6
|
+
export class Returns extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a return for a deposit.
|
|
9
|
+
*/
|
|
10
|
+
create(body: ReturnCreateParams, options?: Core.RequestOptions): Core.APIPromise<ReturnCreateResponse> {
|
|
11
|
+
return this._client.post('/api/service/return/create', { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Retrieves a return by its ID.
|
|
16
|
+
*/
|
|
17
|
+
retrieve(
|
|
18
|
+
body: ReturnRetrieveParams,
|
|
19
|
+
options?: Core.RequestOptions,
|
|
20
|
+
): Core.APIPromise<ReturnRetrieveResponse> {
|
|
21
|
+
return this._client.post('/api/service/return/retrieve', { body, ...options });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ReturnCreateResponse {
|
|
26
|
+
/**
|
|
27
|
+
* The ID of the return
|
|
28
|
+
*/
|
|
29
|
+
id: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The amount of the return
|
|
33
|
+
*/
|
|
34
|
+
amount: number;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The date and time the return was created
|
|
38
|
+
*/
|
|
39
|
+
createdAt: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The currency of the return
|
|
43
|
+
*/
|
|
44
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The ID of the associated deposit
|
|
48
|
+
*/
|
|
49
|
+
depositId: string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The status of the return
|
|
53
|
+
*/
|
|
54
|
+
status: 'initiated' | 'succeeded' | 'failed' | 'returned';
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The date and time the return failed if applicable
|
|
58
|
+
*/
|
|
59
|
+
failedAt?: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The date and time the return succeeded if applicable
|
|
63
|
+
*/
|
|
64
|
+
succeededAt?: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The ID of the resulting return transaction
|
|
68
|
+
*/
|
|
69
|
+
transactionId?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface ReturnRetrieveResponse {
|
|
73
|
+
/**
|
|
74
|
+
* The ID of the return
|
|
75
|
+
*/
|
|
76
|
+
id: string;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The amount of the return
|
|
80
|
+
*/
|
|
81
|
+
amount: number;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The date and time the return was created
|
|
85
|
+
*/
|
|
86
|
+
createdAt: string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The currency of the return
|
|
90
|
+
*/
|
|
91
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The ID of the associated deposit
|
|
95
|
+
*/
|
|
96
|
+
depositId: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The status of the return
|
|
100
|
+
*/
|
|
101
|
+
status: 'initiated' | 'succeeded' | 'failed' | 'returned';
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The date and time the return failed if applicable
|
|
105
|
+
*/
|
|
106
|
+
failedAt?: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The date and time the return succeeded if applicable
|
|
110
|
+
*/
|
|
111
|
+
succeededAt?: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The ID of the resulting return transaction
|
|
115
|
+
*/
|
|
116
|
+
transactionId?: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface ReturnCreateParams {
|
|
120
|
+
/**
|
|
121
|
+
* The ID of the associated deposit
|
|
122
|
+
*/
|
|
123
|
+
depositId: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface ReturnRetrieveParams {
|
|
127
|
+
/**
|
|
128
|
+
* The ID of the return
|
|
129
|
+
*/
|
|
130
|
+
id: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export declare namespace Returns {
|
|
134
|
+
export {
|
|
135
|
+
type ReturnCreateResponse as ReturnCreateResponse,
|
|
136
|
+
type ReturnRetrieveResponse as ReturnRetrieveResponse,
|
|
137
|
+
type ReturnCreateParams as ReturnCreateParams,
|
|
138
|
+
type ReturnRetrieveParams as ReturnRetrieveParams,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
@@ -8,7 +8,10 @@ export class Subaccounts extends APIResource {
|
|
|
8
8
|
* Create a Subaccount which can be used to reconcile orders, refunds and payouts
|
|
9
9
|
* more easily.
|
|
10
10
|
*/
|
|
11
|
-
create(
|
|
11
|
+
create(
|
|
12
|
+
body: SubaccountCreateParams,
|
|
13
|
+
options?: Core.RequestOptions,
|
|
14
|
+
): Core.APIPromise<SubaccountCreateResponse> {
|
|
12
15
|
return this._client.post('/api/service/subaccount/create', { body, ...options });
|
|
13
16
|
}
|
|
14
17
|
|
|
@@ -23,17 +26,35 @@ export class Subaccounts extends APIResource {
|
|
|
23
26
|
export interface Subaccount {
|
|
24
27
|
id: string;
|
|
25
28
|
|
|
29
|
+
createdAt: unknown;
|
|
30
|
+
|
|
26
31
|
legalName: string;
|
|
27
32
|
|
|
28
33
|
mcc: string;
|
|
29
34
|
|
|
30
|
-
ownerId:
|
|
35
|
+
ownerId: unknown;
|
|
31
36
|
|
|
32
37
|
status: 'active' | 'inactive';
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
updatedAt: unknown;
|
|
40
|
+
|
|
41
|
+
websiteUrl?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface SubaccountCreateResponse {
|
|
45
|
+
id: string;
|
|
46
|
+
|
|
47
|
+
createdAt: unknown;
|
|
48
|
+
|
|
49
|
+
legalName: string;
|
|
50
|
+
|
|
51
|
+
mcc: string;
|
|
52
|
+
|
|
53
|
+
ownerId: unknown;
|
|
54
|
+
|
|
55
|
+
status: 'active' | 'inactive';
|
|
35
56
|
|
|
36
|
-
updatedAt
|
|
57
|
+
updatedAt: unknown;
|
|
37
58
|
|
|
38
59
|
websiteUrl?: string;
|
|
39
60
|
}
|
|
@@ -67,6 +88,7 @@ export interface SubaccountRetrieveParams {
|
|
|
67
88
|
export declare namespace Subaccounts {
|
|
68
89
|
export {
|
|
69
90
|
type Subaccount as Subaccount,
|
|
91
|
+
type SubaccountCreateResponse as SubaccountCreateResponse,
|
|
70
92
|
type SubaccountCreateParams as SubaccountCreateParams,
|
|
71
93
|
type SubaccountRetrieveParams as SubaccountRetrieveParams,
|
|
72
94
|
};
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../resource';
|
|
4
|
+
import * as Core from '../core';
|
|
5
|
+
|
|
6
|
+
export class Transactions extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve a paginated list of transactions for the specified time period
|
|
9
|
+
*/
|
|
10
|
+
list(body: TransactionListParams, options?: Core.RequestOptions): Core.APIPromise<TransactionListResponse> {
|
|
11
|
+
return this._client.post('/api/service/transaction/list', { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface TransactionListResponse {
|
|
16
|
+
/**
|
|
17
|
+
* Array of transactions
|
|
18
|
+
*/
|
|
19
|
+
data: Array<TransactionListResponse.Data>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Pagination information
|
|
23
|
+
*/
|
|
24
|
+
paging: TransactionListResponse.Paging;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export namespace TransactionListResponse {
|
|
28
|
+
export interface Data {
|
|
29
|
+
/**
|
|
30
|
+
* Transaction identifier
|
|
31
|
+
*/
|
|
32
|
+
id: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Amount of the transaction
|
|
36
|
+
*/
|
|
37
|
+
amount: string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Balance information
|
|
41
|
+
*/
|
|
42
|
+
balance: Data.Balance;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Bank statement reference
|
|
46
|
+
*/
|
|
47
|
+
bankStatementReference: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Creditor account details
|
|
51
|
+
*/
|
|
52
|
+
creditor: Data.Creditor;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* ISO 4217 currency code
|
|
56
|
+
*/
|
|
57
|
+
currency: string;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Debtor account details
|
|
61
|
+
*/
|
|
62
|
+
debtor: Data.Debtor;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Side of the transaction
|
|
66
|
+
*/
|
|
67
|
+
side: 'credit' | 'debit';
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Transaction date as unix timestamp
|
|
71
|
+
*/
|
|
72
|
+
transactionDate: number;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export namespace Data {
|
|
76
|
+
/**
|
|
77
|
+
* Balance information
|
|
78
|
+
*/
|
|
79
|
+
export interface Balance {
|
|
80
|
+
/**
|
|
81
|
+
* Balance after the transaction
|
|
82
|
+
*/
|
|
83
|
+
after: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Balance before the transaction
|
|
87
|
+
*/
|
|
88
|
+
before: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Creditor account details
|
|
93
|
+
*/
|
|
94
|
+
export interface Creditor {
|
|
95
|
+
/**
|
|
96
|
+
* Type of financial address
|
|
97
|
+
*/
|
|
98
|
+
type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
|
|
99
|
+
|
|
100
|
+
bankCode?: Creditor.BankCode;
|
|
101
|
+
|
|
102
|
+
bban?: Creditor.Bban;
|
|
103
|
+
|
|
104
|
+
iban?: Creditor.Iban;
|
|
105
|
+
|
|
106
|
+
sortCode?: Creditor.SortCode;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export namespace Creditor {
|
|
110
|
+
export interface BankCode {
|
|
111
|
+
accountHolderName: string;
|
|
112
|
+
|
|
113
|
+
accountNumber: string;
|
|
114
|
+
|
|
115
|
+
code: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface Bban {
|
|
119
|
+
accountHolderName: string;
|
|
120
|
+
|
|
121
|
+
bban: string;
|
|
122
|
+
|
|
123
|
+
bic?: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface Iban {
|
|
127
|
+
accountHolderName: string;
|
|
128
|
+
|
|
129
|
+
iban: string;
|
|
130
|
+
|
|
131
|
+
bic?: string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface SortCode {
|
|
135
|
+
accountHolderName: string;
|
|
136
|
+
|
|
137
|
+
accountNumber: string;
|
|
138
|
+
|
|
139
|
+
sortCode: string;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Debtor account details
|
|
145
|
+
*/
|
|
146
|
+
export interface Debtor {
|
|
147
|
+
/**
|
|
148
|
+
* Type of financial address
|
|
149
|
+
*/
|
|
150
|
+
type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
|
|
151
|
+
|
|
152
|
+
bankCode?: Debtor.BankCode;
|
|
153
|
+
|
|
154
|
+
bban?: Debtor.Bban;
|
|
155
|
+
|
|
156
|
+
iban?: Debtor.Iban;
|
|
157
|
+
|
|
158
|
+
sortCode?: Debtor.SortCode;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export namespace Debtor {
|
|
162
|
+
export interface BankCode {
|
|
163
|
+
accountHolderName: string;
|
|
164
|
+
|
|
165
|
+
accountNumber: string;
|
|
166
|
+
|
|
167
|
+
code: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface Bban {
|
|
171
|
+
accountHolderName: string;
|
|
172
|
+
|
|
173
|
+
bban: string;
|
|
174
|
+
|
|
175
|
+
bic?: string;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface Iban {
|
|
179
|
+
accountHolderName: string;
|
|
180
|
+
|
|
181
|
+
iban: string;
|
|
182
|
+
|
|
183
|
+
bic?: string;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface SortCode {
|
|
187
|
+
accountHolderName: string;
|
|
188
|
+
|
|
189
|
+
accountNumber: string;
|
|
190
|
+
|
|
191
|
+
sortCode: string;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Pagination information
|
|
198
|
+
*/
|
|
199
|
+
export interface Paging {
|
|
200
|
+
/**
|
|
201
|
+
* Whether there are more transactions available
|
|
202
|
+
*/
|
|
203
|
+
hasNext: boolean;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Cursor for the next page of results
|
|
207
|
+
*/
|
|
208
|
+
nextCursor?: string;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export interface TransactionListParams {
|
|
213
|
+
/**
|
|
214
|
+
* Start timestamp (inclusive) - unix timestamp
|
|
215
|
+
*/
|
|
216
|
+
from: number;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* End timestamp (exclusive) - unix timestamp
|
|
220
|
+
*/
|
|
221
|
+
to: number;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Cursor for pagination
|
|
225
|
+
*/
|
|
226
|
+
afterCursor?: string;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export declare namespace Transactions {
|
|
230
|
+
export {
|
|
231
|
+
type TransactionListResponse as TransactionListResponse,
|
|
232
|
+
type TransactionListParams as TransactionListParams,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Subscription,
|
|
5
|
+
type SubscriptionCreateResponse,
|
|
6
|
+
type SubscriptionUpdateResponse,
|
|
7
|
+
type SubscriptionListResponse,
|
|
8
|
+
type SubscriptionDeleteResponse,
|
|
9
|
+
type SubscriptionPingResponse,
|
|
10
|
+
type SubscriptionCreateParams,
|
|
11
|
+
type SubscriptionUpdateParams,
|
|
12
|
+
type SubscriptionListParams,
|
|
13
|
+
type SubscriptionDeleteParams,
|
|
14
|
+
type SubscriptionPingParams,
|
|
15
|
+
} from './subscription';
|
|
16
|
+
export { Webhook, type WebhookTriggerResponse, type WebhookTriggerParams } from './webhook';
|