@getivy/node-sdk 1.0.0 → 1.2.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 (119) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/index.d.mts +6 -6
  3. package/index.d.ts +6 -6
  4. package/index.d.ts.map +1 -1
  5. package/index.js +6 -6
  6. package/index.js.map +1 -1
  7. package/index.mjs +6 -6
  8. package/index.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/data/accounts.d.ts +83 -0
  11. package/resources/data/accounts.d.ts.map +1 -0
  12. package/resources/data/accounts.js +15 -0
  13. package/resources/data/accounts.js.map +1 -0
  14. package/resources/data/accounts.mjs +11 -0
  15. package/resources/data/accounts.mjs.map +1 -0
  16. package/resources/data/balances.d.ts +48 -0
  17. package/resources/data/balances.d.ts.map +1 -0
  18. package/resources/data/balances.js +15 -0
  19. package/resources/data/balances.js.map +1 -0
  20. package/resources/data/balances.mjs +11 -0
  21. package/resources/data/balances.mjs.map +1 -0
  22. package/resources/data/consent.d.ts +80 -0
  23. package/resources/data/consent.d.ts.map +1 -0
  24. package/resources/data/consent.js +21 -0
  25. package/resources/data/consent.js.map +1 -0
  26. package/resources/data/consent.mjs +17 -0
  27. package/resources/data/consent.mjs.map +1 -0
  28. package/resources/data/data.d.ts +26 -0
  29. package/resources/data/data.d.ts.map +1 -0
  30. package/resources/data/data.js +55 -0
  31. package/resources/data/data.js.map +1 -0
  32. package/resources/data/data.mjs +28 -0
  33. package/resources/data/data.mjs.map +1 -0
  34. package/resources/data/index.d.ts +7 -0
  35. package/resources/data/index.d.ts.map +1 -0
  36. package/resources/data/index.js +17 -0
  37. package/resources/data/index.js.map +1 -0
  38. package/resources/data/index.mjs +8 -0
  39. package/resources/data/index.mjs.map +1 -0
  40. package/resources/data/session.d.ts +258 -0
  41. package/resources/data/session.d.ts.map +1 -0
  42. package/resources/data/session.js +21 -0
  43. package/resources/data/session.js.map +1 -0
  44. package/resources/data/session.mjs +17 -0
  45. package/resources/data/session.mjs.map +1 -0
  46. package/resources/data/transactions.d.ts +175 -0
  47. package/resources/data/transactions.d.ts.map +1 -0
  48. package/resources/data/transactions.js +16 -0
  49. package/resources/data/transactions.js.map +1 -0
  50. package/resources/data/transactions.mjs +12 -0
  51. package/resources/data/transactions.mjs.map +1 -0
  52. package/resources/data.d.ts +2 -0
  53. package/resources/data.d.ts.map +1 -0
  54. package/resources/data.js +19 -0
  55. package/resources/data.js.map +1 -0
  56. package/resources/data.mjs +3 -0
  57. package/resources/data.mjs.map +1 -0
  58. package/resources/index.d.ts +2 -2
  59. package/resources/index.d.ts.map +1 -1
  60. package/resources/index.js +5 -5
  61. package/resources/index.js.map +1 -1
  62. package/resources/index.mjs +2 -2
  63. package/resources/index.mjs.map +1 -1
  64. package/resources/webhook/index.d.ts +3 -0
  65. package/resources/webhook/index.d.ts.map +1 -0
  66. package/resources/webhook/index.js +9 -0
  67. package/resources/webhook/index.js.map +1 -0
  68. package/resources/webhook/index.mjs +4 -0
  69. package/resources/webhook/index.mjs.map +1 -0
  70. package/resources/webhook/subscription.d.ts +152 -0
  71. package/resources/webhook/subscription.d.ts.map +1 -0
  72. package/resources/webhook/subscription.js +42 -0
  73. package/resources/webhook/subscription.js.map +1 -0
  74. package/resources/webhook/subscription.mjs +38 -0
  75. package/resources/webhook/subscription.mjs.map +1 -0
  76. package/resources/webhook/webhook.d.ts +28 -0
  77. package/resources/webhook/webhook.d.ts.map +1 -0
  78. package/resources/webhook/webhook.js +45 -0
  79. package/resources/webhook/webhook.js.map +1 -0
  80. package/resources/webhook/webhook.mjs +18 -0
  81. package/resources/webhook/webhook.mjs.map +1 -0
  82. package/resources/webhook.d.ts +2 -0
  83. package/resources/webhook.d.ts.map +1 -0
  84. package/resources/webhook.js +19 -0
  85. package/resources/webhook.js.map +1 -0
  86. package/resources/webhook.mjs +3 -0
  87. package/resources/webhook.mjs.map +1 -0
  88. package/src/index.ts +14 -26
  89. package/src/resources/data/accounts.ts +113 -0
  90. package/src/resources/data/balances.ts +60 -0
  91. package/src/resources/data/consent.ts +110 -0
  92. package/src/resources/data/data.ts +75 -0
  93. package/src/resources/data/index.ts +20 -0
  94. package/src/resources/data/session.ts +1317 -0
  95. package/src/resources/data/transactions.ts +235 -0
  96. package/src/resources/data.ts +3 -0
  97. package/src/resources/index.ts +2 -10
  98. package/src/resources/webhook/index.ts +16 -0
  99. package/src/resources/webhook/subscription.ts +405 -0
  100. package/src/resources/webhook/webhook.ts +69 -0
  101. package/src/resources/webhook.ts +3 -0
  102. package/src/version.ts +1 -1
  103. package/version.d.ts +1 -1
  104. package/version.js +1 -1
  105. package/version.mjs +1 -1
  106. package/resources/charges.d.ts +0 -82
  107. package/resources/charges.d.ts.map +0 -1
  108. package/resources/charges.js +0 -15
  109. package/resources/charges.js.map +0 -1
  110. package/resources/charges.mjs +0 -11
  111. package/resources/charges.mjs.map +0 -1
  112. package/resources/mandates.d.ts +0 -129
  113. package/resources/mandates.d.ts.map +0 -1
  114. package/resources/mandates.js +0 -27
  115. package/resources/mandates.js.map +0 -1
  116. package/resources/mandates.mjs +0 -23
  117. package/resources/mandates.mjs.map +0 -1
  118. package/src/resources/charges.ts +0 -104
  119. package/src/resources/mandates.ts +0 -197
@@ -0,0 +1,69 @@
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
+ import * as SubscriptionAPI from './subscription';
6
+ import {
7
+ Subscription,
8
+ SubscriptionCreateParams,
9
+ SubscriptionCreateResponse,
10
+ SubscriptionDeleteParams,
11
+ SubscriptionDeleteResponse,
12
+ SubscriptionListParams,
13
+ SubscriptionListResponse,
14
+ SubscriptionPingParams,
15
+ SubscriptionPingResponse,
16
+ SubscriptionUpdateParams,
17
+ SubscriptionUpdateResponse,
18
+ } from './subscription';
19
+
20
+ export class Webhook extends APIResource {
21
+ subscription: SubscriptionAPI.Subscription = new SubscriptionAPI.Subscription(this._client);
22
+
23
+ /**
24
+ * This endpoint allows you to trigger a specific webhook by its ID.
25
+ */
26
+ trigger(
27
+ body: WebhookTriggerParams,
28
+ options?: Core.RequestOptions,
29
+ ): Core.APIPromise<WebhookTriggerResponse> {
30
+ return this._client.post('/api/service/webhook/trigger', { body, ...options });
31
+ }
32
+ }
33
+
34
+ export interface WebhookTriggerResponse {
35
+ /**
36
+ * Indicates whether the webhook was successfully triggered
37
+ */
38
+ success: boolean;
39
+ }
40
+
41
+ export interface WebhookTriggerParams {
42
+ /**
43
+ * The unique identifier for the webhook to trigger.
44
+ */
45
+ id: unknown;
46
+ }
47
+
48
+ Webhook.Subscription = Subscription;
49
+
50
+ export declare namespace Webhook {
51
+ export {
52
+ type WebhookTriggerResponse as WebhookTriggerResponse,
53
+ type WebhookTriggerParams as WebhookTriggerParams,
54
+ };
55
+
56
+ export {
57
+ Subscription as Subscription,
58
+ type SubscriptionCreateResponse as SubscriptionCreateResponse,
59
+ type SubscriptionUpdateResponse as SubscriptionUpdateResponse,
60
+ type SubscriptionListResponse as SubscriptionListResponse,
61
+ type SubscriptionDeleteResponse as SubscriptionDeleteResponse,
62
+ type SubscriptionPingResponse as SubscriptionPingResponse,
63
+ type SubscriptionCreateParams as SubscriptionCreateParams,
64
+ type SubscriptionUpdateParams as SubscriptionUpdateParams,
65
+ type SubscriptionListParams as SubscriptionListParams,
66
+ type SubscriptionDeleteParams as SubscriptionDeleteParams,
67
+ type SubscriptionPingParams as SubscriptionPingParams,
68
+ };
69
+ }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './webhook/index';
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.0.0'; // x-release-please-version
1
+ export const VERSION = '1.2.0'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.0";
1
+ export declare const VERSION = "1.2.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.0.0'; // x-release-please-version
4
+ exports.VERSION = '1.2.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.0.0'; // x-release-please-version
1
+ export const VERSION = '1.2.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,82 +0,0 @@
1
- import { APIResource } from "../resource.js";
2
- import * as Core from "../core.js";
3
- export declare class Charges extends APIResource {
4
- /**
5
- * Creates a Direct Debit Charge with a valid mandate.
6
- */
7
- create(body: ChargeCreateParams, options?: Core.RequestOptions): Core.APIPromise<Charge>;
8
- }
9
- export interface Charge {
10
- /**
11
- * The unique identifier of the created charge
12
- */
13
- id: string;
14
- /**
15
- * The mandate id used for the charge
16
- */
17
- mandateId: string;
18
- /**
19
- * The order id associated with the charge
20
- */
21
- orderId?: unknown;
22
- /**
23
- * The subaccount id used for the charge
24
- */
25
- subaccountId?: string;
26
- }
27
- export interface ChargeCreateParams {
28
- /**
29
- * A unique key to ensure the charge is not processed twice.
30
- */
31
- idempotencyKey: string;
32
- /**
33
- * A valid mandate id of the customer's bank account. This can be retrieved from
34
- * the `mandate_setup_succeeded` event.
35
- */
36
- mandateId: string;
37
- /**
38
- * Additional data to be stored with the charge.
39
- */
40
- metadata: ChargeCreateParams.Metadata;
41
- /**
42
- * The price to be charged.
43
- */
44
- price: ChargeCreateParams.Price;
45
- /**
46
- * An internal reference id which will be stored with the charge & corresponding
47
- * order. Needs to be unique per merchant per order and can be up to 200
48
- * characters. We recommend to use your internal order id here.
49
- */
50
- referenceId: string;
51
- /**
52
- * The subaccount id to be used for the charge.
53
- */
54
- subaccountId?: string;
55
- }
56
- export declare namespace ChargeCreateParams {
57
- /**
58
- * Additional data to be stored with the charge.
59
- */
60
- interface Metadata {
61
- /**
62
- * A token to verify incoming webhooks. Used in the shopware plugin. Limited to 200
63
- * characters.
64
- */
65
- verificationToken?: string;
66
- }
67
- /**
68
- * The price to be charged.
69
- */
70
- interface Price {
71
- currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
72
- total: number;
73
- shipping?: number;
74
- subTotal?: number;
75
- totalNet?: number;
76
- vat?: number;
77
- }
78
- }
79
- export declare namespace Charges {
80
- export { type Charge as Charge, type ChargeCreateParams as ChargeCreateParams };
81
- }
82
- //# sourceMappingURL=charges.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"charges.d.ts","sourceRoot":"","sources":["../src/resources/charges.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;CAGzF;AAED,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,EAAE,kBAAkB,CAAC,QAAQ,CAAC;IAEtC;;OAEG;IACH,KAAK,EAAE,kBAAkB,CAAC,KAAK,CAAC;IAEhC;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,yBAAiB,kBAAkB,CAAC;IAClC;;OAEG;IACH,UAAiB,QAAQ;QACvB;;;WAGG;QACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B;IAED;;OAEG;IACH,UAAiB,KAAK;QACpB,QAAQ,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;QAEhD,KAAK,EAAE,MAAM,CAAC;QAEd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,MAAM,IAAI,MAAM,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CACjF"}
@@ -1,15 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Charges = void 0;
5
- const resource_1 = require("../resource.js");
6
- class Charges extends resource_1.APIResource {
7
- /**
8
- * Creates a Direct Debit Charge with a valid mandate.
9
- */
10
- create(body, options) {
11
- return this._client.post('/api/service/charge/create', { body, ...options });
12
- }
13
- }
14
- exports.Charges = Charges;
15
- //# sourceMappingURL=charges.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"charges.js","sourceRoot":"","sources":["../src/resources/charges.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAwB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF;AAPD,0BAOC"}
@@ -1,11 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../resource.mjs";
3
- export class Charges extends APIResource {
4
- /**
5
- * Creates a Direct Debit Charge with a valid mandate.
6
- */
7
- create(body, options) {
8
- return this._client.post('/api/service/charge/create', { body, ...options });
9
- }
10
- }
11
- //# sourceMappingURL=charges.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"charges.mjs","sourceRoot":"","sources":["../src/resources/charges.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAwB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF"}
@@ -1,129 +0,0 @@
1
- import { APIResource } from "../resource.js";
2
- import * as Core from "../core.js";
3
- export declare class Mandates extends APIResource {
4
- /**
5
- * Retrieves a direct debit mandate with mandate id.
6
- */
7
- retrieve(body: MandateRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<Mandate>;
8
- /**
9
- * Returns a Direct Debit Mandate when a valid mandate referenceId is given.
10
- */
11
- lookup(body: MandateLookupParams, options?: Core.RequestOptions): Core.APIPromise<MandateLookupResponse>;
12
- /**
13
- * Revokes a Direct Debit Mandate with a valid mandate id.
14
- */
15
- revoke(body: MandateRevokeParams, options?: Core.RequestOptions): Core.APIPromise<MandateRevokeResponse>;
16
- }
17
- export interface Mandate {
18
- id: string;
19
- creditor: Mandate.Creditor;
20
- debtor: Mandate.Debtor;
21
- reference: string;
22
- referenceId: string;
23
- signature: Mandate.Signature;
24
- status: 'pending' | 'active' | 'inactive';
25
- revokedAt?: unknown;
26
- userNotificationEmail?: string;
27
- }
28
- export declare namespace Mandate {
29
- interface Creditor {
30
- id: string;
31
- address: Creditor.Address;
32
- name: string;
33
- }
34
- namespace Creditor {
35
- interface Address {
36
- city: string;
37
- country: string;
38
- postalCode: string;
39
- street: string;
40
- }
41
- }
42
- interface Debtor {
43
- account: Debtor.Account;
44
- }
45
- namespace Debtor {
46
- interface Account {
47
- accountHolderName: string;
48
- iban: string;
49
- bic?: string;
50
- }
51
- }
52
- interface Signature {
53
- token: string;
54
- ip: string;
55
- signedAt: unknown;
56
- }
57
- }
58
- export interface MandateLookupResponse {
59
- id: string;
60
- creditor: MandateLookupResponse.Creditor;
61
- debtor: MandateLookupResponse.Debtor;
62
- reference: string;
63
- referenceId: string;
64
- signature: MandateLookupResponse.Signature;
65
- status: 'pending' | 'active' | 'inactive';
66
- revokedAt?: unknown;
67
- userNotificationEmail?: string;
68
- }
69
- export declare namespace MandateLookupResponse {
70
- interface Creditor {
71
- id: string;
72
- address: Creditor.Address;
73
- name: string;
74
- }
75
- namespace Creditor {
76
- interface Address {
77
- city: string;
78
- country: string;
79
- postalCode: string;
80
- street: string;
81
- }
82
- }
83
- interface Debtor {
84
- account: Debtor.Account;
85
- }
86
- namespace Debtor {
87
- interface Account {
88
- accountHolderName: string;
89
- iban: string;
90
- bic?: string;
91
- }
92
- }
93
- interface Signature {
94
- token: string;
95
- ip: string;
96
- signedAt: unknown;
97
- }
98
- }
99
- export interface MandateRevokeResponse {
100
- /**
101
- * Indicates whether the mandate was successfully revoked
102
- */
103
- success: boolean;
104
- }
105
- export interface MandateRetrieveParams {
106
- /**
107
- * A valid mandate id. This can be retrieved from the `mandate_setup_succeeded`
108
- * event.
109
- */
110
- id: string;
111
- }
112
- export interface MandateLookupParams {
113
- /**
114
- * A valid mandate reference id. This is set by the merchant during the checkout
115
- * session when the mandate setup is initiated.
116
- */
117
- referenceId: string;
118
- }
119
- export interface MandateRevokeParams {
120
- /**
121
- * A valid mandate id. This can be retrieved from the `mandate_setup_succeeded`
122
- * event.
123
- */
124
- id: string;
125
- }
126
- export declare namespace Mandates {
127
- export { type Mandate as Mandate, type MandateLookupResponse as MandateLookupResponse, type MandateRevokeResponse as MandateRevokeResponse, type MandateRetrieveParams as MandateRetrieveParams, type MandateLookupParams as MandateLookupParams, type MandateRevokeParams as MandateRevokeParams, };
128
- }
129
- //# sourceMappingURL=mandates.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mandates.d.ts","sourceRoot":"","sources":["../src/resources/mandates.ts"],"names":[],"mappings":"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"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Mandates = void 0;
5
- const resource_1 = require("../resource.js");
6
- class Mandates extends resource_1.APIResource {
7
- /**
8
- * Retrieves a direct debit mandate with mandate id.
9
- */
10
- retrieve(body, options) {
11
- return this._client.post('/api/service/mandate/retrieve', { body, ...options });
12
- }
13
- /**
14
- * Returns a Direct Debit Mandate when a valid mandate referenceId is given.
15
- */
16
- lookup(body, options) {
17
- return this._client.post('/api/service/mandate/lookup', { body, ...options });
18
- }
19
- /**
20
- * Revokes a Direct Debit Mandate with a valid mandate id.
21
- */
22
- revoke(body, options) {
23
- return this._client.post('/api/service/mandate/revoke', { body, ...options });
24
- }
25
- }
26
- exports.Mandates = Mandates;
27
- //# sourceMappingURL=mandates.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mandates.js","sourceRoot":"","sources":["../src/resources/mandates.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,QAAS,SAAQ,sBAAW;IACvC;;OAEG;IACH,QAAQ,CAAC,IAA2B,EAAE,OAA6B;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;CACF;AArBD,4BAqBC"}
@@ -1,23 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../resource.mjs";
3
- export class Mandates extends APIResource {
4
- /**
5
- * Retrieves a direct debit mandate with mandate id.
6
- */
7
- retrieve(body, options) {
8
- return this._client.post('/api/service/mandate/retrieve', { body, ...options });
9
- }
10
- /**
11
- * Returns a Direct Debit Mandate when a valid mandate referenceId is given.
12
- */
13
- lookup(body, options) {
14
- return this._client.post('/api/service/mandate/lookup', { body, ...options });
15
- }
16
- /**
17
- * Revokes a Direct Debit Mandate with a valid mandate id.
18
- */
19
- revoke(body, options) {
20
- return this._client.post('/api/service/mandate/revoke', { body, ...options });
21
- }
22
- }
23
- //# sourceMappingURL=mandates.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mandates.mjs","sourceRoot":"","sources":["../src/resources/mandates.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,QAAQ,CAAC,IAA2B,EAAE,OAA6B;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;CACF"}
@@ -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
- }