@getivy/node-sdk 0.1.0-alpha.8 → 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/CHANGELOG.md +359 -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 +30 -18
- package/index.d.ts +30 -18
- package/index.d.ts.map +1 -1
- package/index.js +21 -8
- package/index.js.map +1 -1
- package/index.mjs +21 -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/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 +11 -8
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -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 +718 -739
- 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.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 +100 -63
- 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/deposits.ts +231 -0
- package/src/resources/fx.ts +119 -0
- package/src/resources/index.ts +31 -28
- package/src/resources/mandates.ts +79 -17
- package/src/resources/orders.ts +1448 -1072
- 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.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 +0 -42
- package/resources/webhooksubscription.js.map +0 -1
- package/resources/webhooksubscription.mjs +0 -38
- package/resources/webhooksubscription.mjs.map +0 -1
- package/src/resources/reports.ts +0 -172
- package/src/resources/webhooksubscription.ts +0 -353
|
@@ -5,14 +5,15 @@ import * as Core from '../core';
|
|
|
5
5
|
|
|
6
6
|
export class Customers extends APIResource {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Create a new Customer representing your Customers. You can use the Customer to
|
|
9
|
+
* simplify the checkout process for returning journeys.
|
|
9
10
|
*/
|
|
10
11
|
create(body: CustomerCreateParams, options?: Core.RequestOptions): Core.APIPromise<CustomerCreateResponse> {
|
|
11
12
|
return this._client.post('/api/service/customer/create', { body, ...options });
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
+
* Retrieve a Customer Object by its id.
|
|
16
17
|
*/
|
|
17
18
|
retrieve(
|
|
18
19
|
body: CustomerRetrieveParams,
|
|
@@ -20,41 +21,195 @@ export class Customers extends APIResource {
|
|
|
20
21
|
): Core.APIPromise<CustomerRetrieveResponse> {
|
|
21
22
|
return this._client.post('/api/service/customer/retrieve', { body, ...options });
|
|
22
23
|
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Search for customers you have previously created using filters, e.g. by email.
|
|
27
|
+
*/
|
|
28
|
+
search(body: CustomerSearchParams, options?: Core.RequestOptions): Core.APIPromise<CustomerSearchResponse> {
|
|
29
|
+
return this._client.post('/api/service/customer/search', { body, ...options });
|
|
30
|
+
}
|
|
23
31
|
}
|
|
24
32
|
|
|
25
|
-
/**
|
|
26
|
-
* Returns the id and email of the created customer
|
|
27
|
-
*/
|
|
28
33
|
export interface CustomerCreateResponse {
|
|
34
|
+
/**
|
|
35
|
+
* The id of the created customer
|
|
36
|
+
*/
|
|
29
37
|
id: string;
|
|
30
38
|
|
|
39
|
+
/**
|
|
40
|
+
* The email address of the created customer
|
|
41
|
+
*/
|
|
31
42
|
email: string;
|
|
32
43
|
}
|
|
33
44
|
|
|
34
|
-
/**
|
|
35
|
-
* Returns the id, email and the merchantId of the customer
|
|
36
|
-
*/
|
|
37
45
|
export interface CustomerRetrieveResponse {
|
|
46
|
+
/**
|
|
47
|
+
* The id of the customer
|
|
48
|
+
*/
|
|
38
49
|
id: string;
|
|
39
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Array of bank accounts remembered by user
|
|
53
|
+
*/
|
|
54
|
+
bankAccounts: Array<CustomerRetrieveResponse.BankAccount>;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The email address of the customer
|
|
58
|
+
*/
|
|
40
59
|
emailAddress: string;
|
|
60
|
+
}
|
|
41
61
|
|
|
42
|
-
|
|
62
|
+
export namespace CustomerRetrieveResponse {
|
|
63
|
+
export interface BankAccount {
|
|
64
|
+
/**
|
|
65
|
+
* Remembered bank details
|
|
66
|
+
*/
|
|
67
|
+
bank: BankAccount.Bank;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Last 4 digits of remembered account number
|
|
71
|
+
*/
|
|
72
|
+
last4digits: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export namespace BankAccount {
|
|
76
|
+
/**
|
|
77
|
+
* Remembered bank details
|
|
78
|
+
*/
|
|
79
|
+
export interface Bank {
|
|
80
|
+
/**
|
|
81
|
+
* The id of the bank
|
|
82
|
+
*/
|
|
83
|
+
id: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The name of the bank
|
|
87
|
+
*/
|
|
88
|
+
name: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* URL address of bank logo image
|
|
92
|
+
*/
|
|
93
|
+
logo?: string;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface CustomerSearchResponse {
|
|
99
|
+
/**
|
|
100
|
+
* The total number of items
|
|
101
|
+
*/
|
|
102
|
+
count: number;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Whether there are more items to retrieve
|
|
106
|
+
*/
|
|
107
|
+
hasNext: boolean;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Array of customer objects matching the search criteria
|
|
111
|
+
*/
|
|
112
|
+
items: Array<CustomerSearchResponse.Item>;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The number of items skipped
|
|
116
|
+
*/
|
|
117
|
+
skip: number;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export namespace CustomerSearchResponse {
|
|
121
|
+
export interface Item {
|
|
122
|
+
/**
|
|
123
|
+
* The id of the customer
|
|
124
|
+
*/
|
|
125
|
+
id: string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Array of bank accounts remembered by user
|
|
129
|
+
*/
|
|
130
|
+
bankAccounts: Array<Item.BankAccount>;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The email address of the customer
|
|
134
|
+
*/
|
|
135
|
+
emailAddress: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export namespace Item {
|
|
139
|
+
export interface BankAccount {
|
|
140
|
+
/**
|
|
141
|
+
* Remembered bank details
|
|
142
|
+
*/
|
|
143
|
+
bank: BankAccount.Bank;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Last 4 digits of remembered account number
|
|
147
|
+
*/
|
|
148
|
+
last4digits: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export namespace BankAccount {
|
|
152
|
+
/**
|
|
153
|
+
* Remembered bank details
|
|
154
|
+
*/
|
|
155
|
+
export interface Bank {
|
|
156
|
+
/**
|
|
157
|
+
* The id of the bank
|
|
158
|
+
*/
|
|
159
|
+
id: string;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The name of the bank
|
|
163
|
+
*/
|
|
164
|
+
name: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* URL address of bank logo image
|
|
168
|
+
*/
|
|
169
|
+
logo?: string;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
43
173
|
}
|
|
44
174
|
|
|
45
175
|
export interface CustomerCreateParams {
|
|
176
|
+
/**
|
|
177
|
+
* The email address of the customer
|
|
178
|
+
*/
|
|
46
179
|
email: string;
|
|
47
180
|
}
|
|
48
181
|
|
|
49
182
|
export interface CustomerRetrieveParams {
|
|
183
|
+
/**
|
|
184
|
+
* The id of the customer
|
|
185
|
+
*/
|
|
50
186
|
id: string;
|
|
51
187
|
}
|
|
52
188
|
|
|
189
|
+
export interface CustomerSearchParams {
|
|
190
|
+
/**
|
|
191
|
+
* Search for customers by email
|
|
192
|
+
*/
|
|
193
|
+
email: string;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* A limit on the number of objects to be returned.
|
|
197
|
+
*/
|
|
198
|
+
limit?: number;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* The number of items to skip
|
|
202
|
+
*/
|
|
203
|
+
skip?: number;
|
|
204
|
+
}
|
|
205
|
+
|
|
53
206
|
export declare namespace Customers {
|
|
54
207
|
export {
|
|
55
208
|
type CustomerCreateResponse as CustomerCreateResponse,
|
|
56
209
|
type CustomerRetrieveResponse as CustomerRetrieveResponse,
|
|
210
|
+
type CustomerSearchResponse as CustomerSearchResponse,
|
|
57
211
|
type CustomerCreateParams as CustomerCreateParams,
|
|
58
212
|
type CustomerRetrieveParams as CustomerRetrieveParams,
|
|
213
|
+
type CustomerSearchParams as CustomerSearchParams,
|
|
59
214
|
};
|
|
60
215
|
}
|
|
@@ -0,0 +1,231 @@
|
|
|
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 Deposits extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves a deposit by its ID.
|
|
9
|
+
*/
|
|
10
|
+
retrieve(
|
|
11
|
+
body: DepositRetrieveParams,
|
|
12
|
+
options?: Core.RequestOptions,
|
|
13
|
+
): Core.APIPromise<DepositRetrieveResponse> {
|
|
14
|
+
return this._client.post('/api/service/deposit/retrieve', { body, ...options });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface DepositRetrieveResponse {
|
|
19
|
+
/**
|
|
20
|
+
* The ID of the deposit
|
|
21
|
+
*/
|
|
22
|
+
id: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The amount of the deposit
|
|
26
|
+
*/
|
|
27
|
+
amount: number;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The currency of the deposit
|
|
31
|
+
*/
|
|
32
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The payee account identifier
|
|
36
|
+
*/
|
|
37
|
+
payee: DepositRetrieveResponse.Payee;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The payer account identifier
|
|
41
|
+
*/
|
|
42
|
+
payer: DepositRetrieveResponse.Payer;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The date and time the deposit was received
|
|
46
|
+
*/
|
|
47
|
+
receivedAt: string;
|
|
48
|
+
|
|
49
|
+
returns: Array<DepositRetrieveResponse.Return>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The status of the deposit
|
|
53
|
+
*/
|
|
54
|
+
status: 'received';
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The ID of the transaction that initiated the deposit
|
|
58
|
+
*/
|
|
59
|
+
transactionId: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The reference that appears on the bank statement
|
|
63
|
+
*/
|
|
64
|
+
bankStatementReference?: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The payment rail used for the deposit
|
|
68
|
+
*/
|
|
69
|
+
rail?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export namespace DepositRetrieveResponse {
|
|
73
|
+
/**
|
|
74
|
+
* The payee account identifier
|
|
75
|
+
*/
|
|
76
|
+
export interface Payee {
|
|
77
|
+
type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
|
|
78
|
+
|
|
79
|
+
bankCode?: Payee.BankCode;
|
|
80
|
+
|
|
81
|
+
bban?: Payee.Bban;
|
|
82
|
+
|
|
83
|
+
iban?: Payee.Iban;
|
|
84
|
+
|
|
85
|
+
sortCode?: Payee.SortCode;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export namespace Payee {
|
|
89
|
+
export interface BankCode {
|
|
90
|
+
accountHolderName: string;
|
|
91
|
+
|
|
92
|
+
accountNumber: string;
|
|
93
|
+
|
|
94
|
+
code: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface Bban {
|
|
98
|
+
accountHolderName: string;
|
|
99
|
+
|
|
100
|
+
bban: string;
|
|
101
|
+
|
|
102
|
+
bic?: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface Iban {
|
|
106
|
+
accountHolderName: string;
|
|
107
|
+
|
|
108
|
+
iban: string;
|
|
109
|
+
|
|
110
|
+
bic?: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface SortCode {
|
|
114
|
+
accountHolderName: string;
|
|
115
|
+
|
|
116
|
+
accountNumber: string;
|
|
117
|
+
|
|
118
|
+
sortCode: string;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* The payer account identifier
|
|
124
|
+
*/
|
|
125
|
+
export interface Payer {
|
|
126
|
+
type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
|
|
127
|
+
|
|
128
|
+
bankCode?: Payer.BankCode;
|
|
129
|
+
|
|
130
|
+
bban?: Payer.Bban;
|
|
131
|
+
|
|
132
|
+
iban?: Payer.Iban;
|
|
133
|
+
|
|
134
|
+
sortCode?: Payer.SortCode;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export namespace Payer {
|
|
138
|
+
export interface BankCode {
|
|
139
|
+
accountHolderName: string;
|
|
140
|
+
|
|
141
|
+
accountNumber: string;
|
|
142
|
+
|
|
143
|
+
code: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface Bban {
|
|
147
|
+
accountHolderName: string;
|
|
148
|
+
|
|
149
|
+
bban: string;
|
|
150
|
+
|
|
151
|
+
bic?: string;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface Iban {
|
|
155
|
+
accountHolderName: string;
|
|
156
|
+
|
|
157
|
+
iban: string;
|
|
158
|
+
|
|
159
|
+
bic?: string;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface SortCode {
|
|
163
|
+
accountHolderName: string;
|
|
164
|
+
|
|
165
|
+
accountNumber: string;
|
|
166
|
+
|
|
167
|
+
sortCode: string;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface Return {
|
|
172
|
+
/**
|
|
173
|
+
* The ID of the return
|
|
174
|
+
*/
|
|
175
|
+
id: string;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* The amount of the return
|
|
179
|
+
*/
|
|
180
|
+
amount: number;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* The date and time the return was created
|
|
184
|
+
*/
|
|
185
|
+
createdAt: string;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The currency of the return
|
|
189
|
+
*/
|
|
190
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* The ID of the associated deposit
|
|
194
|
+
*/
|
|
195
|
+
depositId: string;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* The status of the return
|
|
199
|
+
*/
|
|
200
|
+
status: 'initiated' | 'succeeded' | 'failed' | 'returned';
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* The date and time the return failed if applicable
|
|
204
|
+
*/
|
|
205
|
+
failedAt?: string;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The date and time the return succeeded if applicable
|
|
209
|
+
*/
|
|
210
|
+
succeededAt?: string;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* The ID of the resulting return transaction
|
|
214
|
+
*/
|
|
215
|
+
transactionId?: string;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface DepositRetrieveParams {
|
|
220
|
+
/**
|
|
221
|
+
* The ID of the deposit
|
|
222
|
+
*/
|
|
223
|
+
id: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export declare namespace Deposits {
|
|
227
|
+
export {
|
|
228
|
+
type DepositRetrieveResponse as DepositRetrieveResponse,
|
|
229
|
+
type DepositRetrieveParams as DepositRetrieveParams,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
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 Fx extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve the details of a past fx transfer using the fxId.
|
|
9
|
+
*/
|
|
10
|
+
retrieve(body: FxRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<FxRetrieveResponse> {
|
|
11
|
+
return this._client.post('/api/service/fx/retrieve', { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Retrieve the current exchange rate for a given currency pair. The rate is not
|
|
16
|
+
* guaranteed for any following transactions.
|
|
17
|
+
*/
|
|
18
|
+
retrieveRate(
|
|
19
|
+
body: FxRetrieveRateParams,
|
|
20
|
+
options?: Core.RequestOptions,
|
|
21
|
+
): Core.APIPromise<FxRetrieveRateResponse> {
|
|
22
|
+
return this._client.post('/api/service/fx/retrieve-rate', { body, ...options });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface FxRetrieveResponse {
|
|
27
|
+
/**
|
|
28
|
+
* The fxId attached to the transfer.
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The exchange rate for the given currency pair.
|
|
34
|
+
*/
|
|
35
|
+
rate: string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The source currency code
|
|
39
|
+
*/
|
|
40
|
+
sourceCurrency: 'EUR' | 'GBP';
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The status of the FX transaction.
|
|
44
|
+
*/
|
|
45
|
+
status: 'success' | 'processing' | 'failed';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The target currency code
|
|
49
|
+
*/
|
|
50
|
+
targetCurrency: 'USDC';
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Additional metadata.
|
|
54
|
+
*/
|
|
55
|
+
metadata?: { [key: string]: unknown };
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The amount of source currency to convert.
|
|
59
|
+
*/
|
|
60
|
+
sourceAmount?: string;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The amount of the target currency for the given source amount.
|
|
64
|
+
*/
|
|
65
|
+
targetAmount?: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface FxRetrieveRateResponse {
|
|
69
|
+
/**
|
|
70
|
+
* The current exchange rate for the given currency pair.
|
|
71
|
+
*/
|
|
72
|
+
rate: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The amount of source currency to convert. Only returned if the source amount is
|
|
76
|
+
* provided.
|
|
77
|
+
*/
|
|
78
|
+
sourceAmount?: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The amount of the target currency for the given source amount. Only returned if
|
|
82
|
+
* the source amount is provided.
|
|
83
|
+
*/
|
|
84
|
+
targetAmount?: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface FxRetrieveParams {
|
|
88
|
+
/**
|
|
89
|
+
* The fxId attached to the transfer.
|
|
90
|
+
*/
|
|
91
|
+
fxId: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface FxRetrieveRateParams {
|
|
95
|
+
/**
|
|
96
|
+
* The source currency code.
|
|
97
|
+
*/
|
|
98
|
+
sourceCurrency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The target currency code.
|
|
102
|
+
*/
|
|
103
|
+
targetCurrency: 'EUR' | 'GBP' | 'PLN' | 'USDC' | 'SEK' | 'DKK';
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The amount of source currency to convert. If not provided, only the rate will be
|
|
107
|
+
* returned. Decimal places should be separated by a dot.
|
|
108
|
+
*/
|
|
109
|
+
sourceAmount?: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export declare namespace Fx {
|
|
113
|
+
export {
|
|
114
|
+
type FxRetrieveResponse as FxRetrieveResponse,
|
|
115
|
+
type FxRetrieveRateResponse as FxRetrieveRateResponse,
|
|
116
|
+
type FxRetrieveParams as FxRetrieveParams,
|
|
117
|
+
type FxRetrieveRateParams as FxRetrieveRateParams,
|
|
118
|
+
};
|
|
119
|
+
}
|
package/src/resources/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ export {
|
|
|
10
10
|
type BankListParams,
|
|
11
11
|
type BankSearchParams,
|
|
12
12
|
} from './banks';
|
|
13
|
+
export { BeneficiaryPayouts, type BeneficiaryPayoutCreateResponse } from './beneficiary-payouts';
|
|
13
14
|
export { Capabilities, type CapabilityRetrieveResponse, type CapabilityRetrieveParams } from './capabilities';
|
|
14
15
|
export { Charges, type Charge, type ChargeCreateParams } from './charges';
|
|
15
16
|
export {
|
|
@@ -25,12 +26,23 @@ export {
|
|
|
25
26
|
Customers,
|
|
26
27
|
type CustomerCreateResponse,
|
|
27
28
|
type CustomerRetrieveResponse,
|
|
29
|
+
type CustomerSearchResponse,
|
|
28
30
|
type CustomerCreateParams,
|
|
29
31
|
type CustomerRetrieveParams,
|
|
32
|
+
type CustomerSearchParams,
|
|
30
33
|
} from './customers';
|
|
34
|
+
export { Deposits, type DepositRetrieveResponse, type DepositRetrieveParams } from './deposits';
|
|
35
|
+
export {
|
|
36
|
+
Fx,
|
|
37
|
+
type FxRetrieveResponse,
|
|
38
|
+
type FxRetrieveRateResponse,
|
|
39
|
+
type FxRetrieveParams,
|
|
40
|
+
type FxRetrieveRateParams,
|
|
41
|
+
} from './fx';
|
|
31
42
|
export {
|
|
32
43
|
Mandates,
|
|
33
|
-
type
|
|
44
|
+
type Mandate,
|
|
45
|
+
type MandateLookupResponse,
|
|
34
46
|
type MandateRevokeResponse,
|
|
35
47
|
type MandateRetrieveParams,
|
|
36
48
|
type MandateLookupParams,
|
|
@@ -38,14 +50,17 @@ export {
|
|
|
38
50
|
} from './mandates';
|
|
39
51
|
export {
|
|
40
52
|
Orders,
|
|
53
|
+
type OrderCreateResponse,
|
|
41
54
|
type OrderRetrieveResponse,
|
|
42
|
-
type
|
|
55
|
+
type OrderExpireResponse,
|
|
56
|
+
type OrderCreateParams,
|
|
43
57
|
type OrderRetrieveParams,
|
|
44
|
-
type
|
|
58
|
+
type OrderExpireParams,
|
|
45
59
|
} from './orders';
|
|
46
60
|
export {
|
|
47
61
|
Payouts,
|
|
48
|
-
type
|
|
62
|
+
type Payout,
|
|
63
|
+
type PayoutRetrieveResponse,
|
|
49
64
|
type PayoutListResponse,
|
|
50
65
|
type PayoutCreateParams,
|
|
51
66
|
type PayoutRetrieveParams,
|
|
@@ -53,36 +68,24 @@ export {
|
|
|
53
68
|
} from './payouts';
|
|
54
69
|
export {
|
|
55
70
|
Refunds,
|
|
56
|
-
type
|
|
57
|
-
type
|
|
71
|
+
type Refund,
|
|
72
|
+
type RefundCreateResponse,
|
|
73
|
+
type RefundRetrieveResponse,
|
|
58
74
|
type RefundCreateParams,
|
|
59
|
-
type
|
|
75
|
+
type RefundRetrieveParams,
|
|
60
76
|
} from './refunds';
|
|
61
77
|
export {
|
|
62
|
-
|
|
63
|
-
type
|
|
64
|
-
type
|
|
65
|
-
type
|
|
66
|
-
type
|
|
67
|
-
|
|
68
|
-
type ReportDownloadParams,
|
|
69
|
-
} from './reports';
|
|
78
|
+
Returns,
|
|
79
|
+
type ReturnCreateResponse,
|
|
80
|
+
type ReturnRetrieveResponse,
|
|
81
|
+
type ReturnCreateParams,
|
|
82
|
+
type ReturnRetrieveParams,
|
|
83
|
+
} from './returns';
|
|
70
84
|
export {
|
|
71
85
|
Subaccounts,
|
|
72
86
|
type Subaccount,
|
|
87
|
+
type SubaccountCreateResponse,
|
|
73
88
|
type SubaccountCreateParams,
|
|
74
89
|
type SubaccountRetrieveParams,
|
|
75
90
|
} from './subaccounts';
|
|
76
|
-
export {
|
|
77
|
-
Webhooksubscription,
|
|
78
|
-
type WebhooksubscriptionCreateResponse,
|
|
79
|
-
type WebhooksubscriptionUpdateResponse,
|
|
80
|
-
type WebhooksubscriptionListResponse,
|
|
81
|
-
type WebhooksubscriptionDeleteResponse,
|
|
82
|
-
type WebhooksubscriptionPingResponse,
|
|
83
|
-
type WebhooksubscriptionCreateParams,
|
|
84
|
-
type WebhooksubscriptionUpdateParams,
|
|
85
|
-
type WebhooksubscriptionListParams,
|
|
86
|
-
type WebhooksubscriptionDeleteParams,
|
|
87
|
-
type WebhooksubscriptionPingParams,
|
|
88
|
-
} from './webhooksubscription';
|
|
91
|
+
export { Transactions, type TransactionListResponse, type TransactionListParams } from './transactions';
|