@getivy/node-sdk 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/index.d.mts +0 -6
  3. package/index.d.ts +0 -6
  4. package/index.d.ts.map +1 -1
  5. package/index.js +0 -6
  6. package/index.js.map +1 -1
  7. package/index.mjs +0 -6
  8. package/index.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/beneficiary-payouts.d.ts +8 -6
  11. package/resources/beneficiary-payouts.d.ts.map +1 -1
  12. package/resources/beneficiary-payouts.js +3 -2
  13. package/resources/beneficiary-payouts.js.map +1 -1
  14. package/resources/beneficiary-payouts.mjs +3 -2
  15. package/resources/beneficiary-payouts.mjs.map +1 -1
  16. package/resources/checkoutsession.d.ts +2 -2
  17. package/resources/index.d.ts +0 -2
  18. package/resources/index.d.ts.map +1 -1
  19. package/resources/index.js +1 -5
  20. package/resources/index.js.map +1 -1
  21. package/resources/index.mjs +0 -2
  22. package/resources/index.mjs.map +1 -1
  23. package/resources/orders.d.ts +36 -12
  24. package/resources/orders.d.ts.map +1 -1
  25. package/resources/payouts.d.ts +12 -0
  26. package/resources/payouts.d.ts.map +1 -1
  27. package/resources/refunds.d.ts +9 -1
  28. package/resources/refunds.d.ts.map +1 -1
  29. package/src/index.ts +0 -26
  30. package/src/resources/beneficiary-payouts.ts +8 -6
  31. package/src/resources/checkoutsession.ts +2 -2
  32. package/src/resources/index.ts +0 -10
  33. package/src/resources/orders.ts +51 -9
  34. package/src/resources/payouts.ts +15 -0
  35. package/src/resources/refunds.ts +12 -1
  36. package/src/version.ts +1 -1
  37. package/version.d.ts +1 -1
  38. package/version.js +1 -1
  39. package/version.mjs +1 -1
  40. package/resources/charges.d.ts +0 -82
  41. package/resources/charges.d.ts.map +0 -1
  42. package/resources/charges.js +0 -15
  43. package/resources/charges.js.map +0 -1
  44. package/resources/charges.mjs +0 -11
  45. package/resources/charges.mjs.map +0 -1
  46. package/resources/mandates.d.ts +0 -129
  47. package/resources/mandates.d.ts.map +0 -1
  48. package/resources/mandates.js +0 -27
  49. package/resources/mandates.js.map +0 -1
  50. package/resources/mandates.mjs +0 -23
  51. package/resources/mandates.mjs.map +0 -1
  52. package/src/resources/charges.ts +0 -104
  53. package/src/resources/mandates.ts +0 -197
@@ -1,104 +0,0 @@
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 Charges extends APIResource {
7
- /**
8
- * Creates a Direct Debit Charge with a valid mandate.
9
- */
10
- create(body: ChargeCreateParams, options?: Core.RequestOptions): Core.APIPromise<Charge> {
11
- return this._client.post('/api/service/charge/create', { body, ...options });
12
- }
13
- }
14
-
15
- export interface Charge {
16
- /**
17
- * The unique identifier of the created charge
18
- */
19
- id: string;
20
-
21
- /**
22
- * The mandate id used for the charge
23
- */
24
- mandateId: string;
25
-
26
- /**
27
- * The order id associated with the charge
28
- */
29
- orderId?: unknown;
30
-
31
- /**
32
- * The subaccount id used for the charge
33
- */
34
- subaccountId?: string;
35
- }
36
-
37
- export interface ChargeCreateParams {
38
- /**
39
- * A unique key to ensure the charge is not processed twice.
40
- */
41
- idempotencyKey: string;
42
-
43
- /**
44
- * A valid mandate id of the customer's bank account. This can be retrieved from
45
- * the `mandate_setup_succeeded` event.
46
- */
47
- mandateId: string;
48
-
49
- /**
50
- * Additional data to be stored with the charge.
51
- */
52
- metadata: ChargeCreateParams.Metadata;
53
-
54
- /**
55
- * The price to be charged.
56
- */
57
- price: ChargeCreateParams.Price;
58
-
59
- /**
60
- * An internal reference id which will be stored with the charge & corresponding
61
- * order. Needs to be unique per merchant per order and can be up to 200
62
- * characters. We recommend to use your internal order id here.
63
- */
64
- referenceId: string;
65
-
66
- /**
67
- * The subaccount id to be used for the charge.
68
- */
69
- subaccountId?: string;
70
- }
71
-
72
- export namespace ChargeCreateParams {
73
- /**
74
- * Additional data to be stored with the charge.
75
- */
76
- export interface Metadata {
77
- /**
78
- * A token to verify incoming webhooks. Used in the shopware plugin. Limited to 200
79
- * characters.
80
- */
81
- verificationToken?: string;
82
- }
83
-
84
- /**
85
- * The price to be charged.
86
- */
87
- export interface Price {
88
- currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
89
-
90
- total: number;
91
-
92
- shipping?: number;
93
-
94
- subTotal?: number;
95
-
96
- totalNet?: number;
97
-
98
- vat?: number;
99
- }
100
- }
101
-
102
- export declare namespace Charges {
103
- export { type Charge as Charge, type ChargeCreateParams as ChargeCreateParams };
104
- }
@@ -1,197 +0,0 @@
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 Mandates extends APIResource {
7
- /**
8
- * Retrieves a direct debit mandate with mandate id.
9
- */
10
- retrieve(body: MandateRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<Mandate> {
11
- return this._client.post('/api/service/mandate/retrieve', { body, ...options });
12
- }
13
-
14
- /**
15
- * Returns a Direct Debit Mandate when a valid mandate referenceId is given.
16
- */
17
- lookup(body: MandateLookupParams, options?: Core.RequestOptions): Core.APIPromise<MandateLookupResponse> {
18
- return this._client.post('/api/service/mandate/lookup', { body, ...options });
19
- }
20
-
21
- /**
22
- * Revokes a Direct Debit Mandate with a valid mandate id.
23
- */
24
- revoke(body: MandateRevokeParams, options?: Core.RequestOptions): Core.APIPromise<MandateRevokeResponse> {
25
- return this._client.post('/api/service/mandate/revoke', { body, ...options });
26
- }
27
- }
28
-
29
- export interface Mandate {
30
- id: string;
31
-
32
- creditor: Mandate.Creditor;
33
-
34
- debtor: Mandate.Debtor;
35
-
36
- reference: string;
37
-
38
- referenceId: string;
39
-
40
- signature: Mandate.Signature;
41
-
42
- status: 'pending' | 'active' | 'inactive';
43
-
44
- revokedAt?: unknown;
45
-
46
- userNotificationEmail?: string;
47
- }
48
-
49
- export namespace Mandate {
50
- export interface Creditor {
51
- id: string;
52
-
53
- address: Creditor.Address;
54
-
55
- name: string;
56
- }
57
-
58
- export namespace Creditor {
59
- export interface Address {
60
- city: string;
61
-
62
- country: string;
63
-
64
- postalCode: string;
65
-
66
- street: string;
67
- }
68
- }
69
-
70
- export interface Debtor {
71
- account: Debtor.Account;
72
- }
73
-
74
- export namespace Debtor {
75
- export interface Account {
76
- accountHolderName: string;
77
-
78
- iban: string;
79
-
80
- bic?: string;
81
- }
82
- }
83
-
84
- export interface Signature {
85
- token: string;
86
-
87
- ip: string;
88
-
89
- signedAt: unknown;
90
- }
91
- }
92
-
93
- export interface MandateLookupResponse {
94
- id: string;
95
-
96
- creditor: MandateLookupResponse.Creditor;
97
-
98
- debtor: MandateLookupResponse.Debtor;
99
-
100
- reference: string;
101
-
102
- referenceId: string;
103
-
104
- signature: MandateLookupResponse.Signature;
105
-
106
- status: 'pending' | 'active' | 'inactive';
107
-
108
- revokedAt?: unknown;
109
-
110
- userNotificationEmail?: string;
111
- }
112
-
113
- export namespace MandateLookupResponse {
114
- export interface Creditor {
115
- id: string;
116
-
117
- address: Creditor.Address;
118
-
119
- name: string;
120
- }
121
-
122
- export namespace Creditor {
123
- export interface Address {
124
- city: string;
125
-
126
- country: string;
127
-
128
- postalCode: string;
129
-
130
- street: string;
131
- }
132
- }
133
-
134
- export interface Debtor {
135
- account: Debtor.Account;
136
- }
137
-
138
- export namespace Debtor {
139
- export interface Account {
140
- accountHolderName: string;
141
-
142
- iban: string;
143
-
144
- bic?: string;
145
- }
146
- }
147
-
148
- export interface Signature {
149
- token: string;
150
-
151
- ip: string;
152
-
153
- signedAt: unknown;
154
- }
155
- }
156
-
157
- export interface MandateRevokeResponse {
158
- /**
159
- * Indicates whether the mandate was successfully revoked
160
- */
161
- success: boolean;
162
- }
163
-
164
- export interface MandateRetrieveParams {
165
- /**
166
- * A valid mandate id. This can be retrieved from the `mandate_setup_succeeded`
167
- * event.
168
- */
169
- id: string;
170
- }
171
-
172
- export interface MandateLookupParams {
173
- /**
174
- * A valid mandate reference id. This is set by the merchant during the checkout
175
- * session when the mandate setup is initiated.
176
- */
177
- referenceId: string;
178
- }
179
-
180
- export interface MandateRevokeParams {
181
- /**
182
- * A valid mandate id. This can be retrieved from the `mandate_setup_succeeded`
183
- * event.
184
- */
185
- id: string;
186
- }
187
-
188
- export declare namespace Mandates {
189
- export {
190
- type Mandate as Mandate,
191
- type MandateLookupResponse as MandateLookupResponse,
192
- type MandateRevokeResponse as MandateRevokeResponse,
193
- type MandateRetrieveParams as MandateRetrieveParams,
194
- type MandateLookupParams as MandateLookupParams,
195
- type MandateRevokeParams as MandateRevokeParams,
196
- };
197
- }