dodopayments 2.32.1 → 2.32.2
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 +12 -0
- package/bin/migration-config.json +17 -17
- package/client.d.mts +15 -15
- package/client.d.mts.map +1 -1
- package/client.d.ts +15 -15
- package/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/addons.d.mts +4 -4
- package/resources/addons.d.mts.map +1 -1
- package/resources/addons.d.ts +4 -4
- package/resources/addons.d.ts.map +1 -1
- package/resources/addons.js +6 -6
- package/resources/addons.js.map +1 -1
- package/resources/addons.mjs +6 -6
- package/resources/addons.mjs.map +1 -1
- package/resources/brands.d.mts +1 -1
- package/resources/brands.d.mts.map +1 -1
- package/resources/brands.d.ts +1 -1
- package/resources/brands.d.ts.map +1 -1
- package/resources/brands.js +3 -3
- package/resources/brands.js.map +1 -1
- package/resources/brands.mjs +3 -3
- package/resources/brands.mjs.map +1 -1
- package/resources/credit-entitlements/balances.d.mts +69 -69
- package/resources/credit-entitlements/balances.d.mts.map +1 -1
- package/resources/credit-entitlements/balances.d.ts +69 -69
- package/resources/credit-entitlements/balances.d.ts.map +1 -1
- package/resources/credit-entitlements/balances.js +41 -41
- package/resources/credit-entitlements/balances.js.map +1 -1
- package/resources/credit-entitlements/balances.mjs +41 -41
- package/resources/credit-entitlements/balances.mjs.map +1 -1
- package/resources/credit-entitlements/credit-entitlements.d.mts +38 -38
- package/resources/credit-entitlements/credit-entitlements.d.mts.map +1 -1
- package/resources/credit-entitlements/credit-entitlements.d.ts +38 -38
- package/resources/credit-entitlements/credit-entitlements.d.ts.map +1 -1
- package/resources/credit-entitlements/credit-entitlements.js +40 -40
- package/resources/credit-entitlements/credit-entitlements.js.map +1 -1
- package/resources/credit-entitlements/credit-entitlements.mjs +40 -40
- package/resources/credit-entitlements/credit-entitlements.mjs.map +1 -1
- package/resources/credit-entitlements/index.d.mts +2 -2
- package/resources/credit-entitlements/index.d.mts.map +1 -1
- package/resources/credit-entitlements/index.d.ts +2 -2
- package/resources/credit-entitlements/index.d.ts.map +1 -1
- package/resources/customers/customers.d.mts +23 -23
- package/resources/customers/customers.d.mts.map +1 -1
- package/resources/customers/customers.d.ts +23 -23
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +16 -16
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +16 -16
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.mts +1 -1
- package/resources/customers/index.d.mts.map +1 -1
- package/resources/customers/index.d.ts +1 -1
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/wallets/index.d.mts +1 -1
- package/resources/customers/wallets/index.d.mts.map +1 -1
- package/resources/customers/wallets/index.d.ts +1 -1
- package/resources/customers/wallets/index.d.ts.map +1 -1
- package/resources/customers/wallets/ledger-entries.d.mts +8 -8
- package/resources/customers/wallets/ledger-entries.d.mts.map +1 -1
- package/resources/customers/wallets/ledger-entries.d.ts +8 -8
- package/resources/customers/wallets/ledger-entries.d.ts.map +1 -1
- package/resources/customers/wallets/ledger-entries.js +3 -3
- package/resources/customers/wallets/ledger-entries.js.map +1 -1
- package/resources/customers/wallets/ledger-entries.mjs +3 -3
- package/resources/customers/wallets/ledger-entries.mjs.map +1 -1
- package/resources/customers/wallets/wallets.d.mts +1 -1
- package/resources/customers/wallets/wallets.d.mts.map +1 -1
- package/resources/customers/wallets/wallets.d.ts +1 -1
- package/resources/customers/wallets/wallets.d.ts.map +1 -1
- package/resources/discounts.d.mts +27 -27
- package/resources/discounts.d.mts.map +1 -1
- package/resources/discounts.d.ts +27 -27
- package/resources/discounts.d.ts.map +1 -1
- package/resources/discounts.js +15 -15
- package/resources/discounts.js.map +1 -1
- package/resources/discounts.mjs +15 -15
- package/resources/discounts.mjs.map +1 -1
- package/resources/disputes.d.mts +1 -1
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +1 -1
- package/resources/disputes.d.ts.map +1 -1
- package/resources/disputes.js +3 -3
- package/resources/disputes.js.map +1 -1
- package/resources/disputes.mjs +3 -3
- package/resources/disputes.mjs.map +1 -1
- package/resources/entitlements/entitlements.d.mts +15 -15
- package/resources/entitlements/entitlements.d.mts.map +1 -1
- package/resources/entitlements/entitlements.d.ts +15 -15
- package/resources/entitlements/entitlements.d.ts.map +1 -1
- package/resources/entitlements/entitlements.js +15 -15
- package/resources/entitlements/entitlements.js.map +1 -1
- package/resources/entitlements/entitlements.mjs +15 -15
- package/resources/entitlements/entitlements.mjs.map +1 -1
- package/resources/entitlements/files.d.mts +4 -4
- package/resources/entitlements/files.d.mts.map +1 -1
- package/resources/entitlements/files.d.ts +4 -4
- package/resources/entitlements/files.d.ts.map +1 -1
- package/resources/entitlements/files.js +6 -6
- package/resources/entitlements/files.js.map +1 -1
- package/resources/entitlements/files.mjs +6 -6
- package/resources/entitlements/files.mjs.map +1 -1
- package/resources/entitlements/index.d.mts +1 -1
- package/resources/entitlements/index.d.mts.map +1 -1
- package/resources/entitlements/index.d.ts +1 -1
- package/resources/entitlements/index.d.ts.map +1 -1
- package/resources/index.d.mts +15 -15
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +15 -15
- package/resources/index.d.ts.map +1 -1
- package/resources/invoices/payments.d.mts +1 -1
- package/resources/invoices/payments.d.ts +1 -1
- package/resources/invoices/payments.js +4 -4
- package/resources/invoices/payments.mjs +4 -4
- package/resources/license-key-instances.d.mts +14 -14
- package/resources/license-key-instances.d.mts.map +1 -1
- package/resources/license-key-instances.d.ts +14 -14
- package/resources/license-key-instances.d.ts.map +1 -1
- package/resources/license-key-instances.js +12 -12
- package/resources/license-key-instances.js.map +1 -1
- package/resources/license-key-instances.mjs +12 -12
- package/resources/license-key-instances.mjs.map +1 -1
- package/resources/license-keys.d.mts +38 -38
- package/resources/license-keys.d.mts.map +1 -1
- package/resources/license-keys.d.ts +38 -38
- package/resources/license-keys.d.ts.map +1 -1
- package/resources/license-keys.js +16 -16
- package/resources/license-keys.js.map +1 -1
- package/resources/license-keys.mjs +16 -16
- package/resources/license-keys.mjs.map +1 -1
- package/resources/meters.d.mts +8 -8
- package/resources/meters.d.mts.map +1 -1
- package/resources/meters.d.ts +8 -8
- package/resources/meters.d.ts.map +1 -1
- package/resources/meters.js +3 -3
- package/resources/meters.js.map +1 -1
- package/resources/meters.mjs +3 -3
- package/resources/meters.mjs.map +1 -1
- package/resources/payments.d.mts +32 -32
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +32 -32
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +6 -6
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +6 -6
- package/resources/payments.mjs.map +1 -1
- package/resources/product-collections/groups/groups.d.mts +9 -9
- package/resources/product-collections/groups/groups.d.mts.map +1 -1
- package/resources/product-collections/groups/groups.d.ts +9 -9
- package/resources/product-collections/groups/groups.d.ts.map +1 -1
- package/resources/product-collections/groups/groups.js +7 -7
- package/resources/product-collections/groups/groups.js.map +1 -1
- package/resources/product-collections/groups/groups.mjs +7 -7
- package/resources/product-collections/groups/groups.mjs.map +1 -1
- package/resources/product-collections/groups/index.d.mts +2 -2
- package/resources/product-collections/groups/index.d.ts +2 -2
- package/resources/product-collections/groups/items.d.mts +12 -12
- package/resources/product-collections/groups/items.d.mts.map +1 -1
- package/resources/product-collections/groups/items.d.ts +12 -12
- package/resources/product-collections/groups/items.d.ts.map +1 -1
- package/resources/product-collections/groups/items.js +7 -7
- package/resources/product-collections/groups/items.js.map +1 -1
- package/resources/product-collections/groups/items.mjs +7 -7
- package/resources/product-collections/groups/items.mjs.map +1 -1
- package/resources/product-collections/index.d.mts +2 -2
- package/resources/product-collections/index.d.mts.map +1 -1
- package/resources/product-collections/index.d.ts +2 -2
- package/resources/product-collections/index.d.ts.map +1 -1
- package/resources/product-collections/product-collections.d.mts +15 -15
- package/resources/product-collections/product-collections.d.mts.map +1 -1
- package/resources/product-collections/product-collections.d.ts +15 -15
- package/resources/product-collections/product-collections.d.ts.map +1 -1
- package/resources/product-collections/product-collections.js +11 -11
- package/resources/product-collections/product-collections.js.map +1 -1
- package/resources/product-collections/product-collections.mjs +11 -11
- package/resources/product-collections/product-collections.mjs.map +1 -1
- package/resources/products/index.d.mts +2 -2
- package/resources/products/index.d.mts.map +1 -1
- package/resources/products/index.d.ts +2 -2
- package/resources/products/index.d.ts.map +1 -1
- package/resources/products/products.d.mts +21 -21
- package/resources/products/products.d.mts.map +1 -1
- package/resources/products/products.d.ts +21 -21
- package/resources/products/products.d.ts.map +1 -1
- package/resources/products/products.js +6 -6
- package/resources/products/products.js.map +1 -1
- package/resources/products/products.mjs +6 -6
- package/resources/products/products.mjs.map +1 -1
- package/resources/products/short-links.d.mts +11 -11
- package/resources/products/short-links.d.mts.map +1 -1
- package/resources/products/short-links.d.ts +11 -11
- package/resources/products/short-links.d.ts.map +1 -1
- package/resources/products/short-links.js +6 -6
- package/resources/products/short-links.js.map +1 -1
- package/resources/products/short-links.mjs +6 -6
- package/resources/products/short-links.mjs.map +1 -1
- package/resources/refunds.d.mts +24 -24
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +24 -24
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +6 -6
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +6 -6
- package/resources/refunds.mjs.map +1 -1
- package/resources/subscriptions.d.mts +86 -86
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +86 -86
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +23 -23
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +23 -23
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/usage-events.d.mts +61 -61
- package/resources/usage-events.d.mts.map +1 -1
- package/resources/usage-events.d.ts +61 -61
- package/resources/usage-events.d.ts.map +1 -1
- package/resources/usage-events.js +56 -56
- package/resources/usage-events.js.map +1 -1
- package/resources/usage-events.mjs +56 -56
- package/resources/usage-events.mjs.map +1 -1
- package/resources/webhooks/index.d.mts +1 -1
- package/resources/webhooks/index.d.mts.map +1 -1
- package/resources/webhooks/index.d.ts +1 -1
- package/resources/webhooks/index.d.ts.map +1 -1
- package/resources/webhooks/webhooks.d.mts +12 -12
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +12 -12
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js +15 -15
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs +15 -15
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/src/client.ts +18 -18
- package/src/resources/addons.ts +13 -13
- package/src/resources/brands.ts +4 -4
- package/src/resources/credit-entitlements/balances.ts +91 -91
- package/src/resources/credit-entitlements/credit-entitlements.ts +55 -55
- package/src/resources/credit-entitlements/index.ts +3 -3
- package/src/resources/customers/customers.ts +49 -49
- package/src/resources/customers/index.ts +1 -1
- package/src/resources/customers/wallets/index.ts +1 -1
- package/src/resources/customers/wallets/ledger-entries.ts +16 -16
- package/src/resources/customers/wallets/wallets.ts +1 -1
- package/src/resources/discounts.ts +43 -43
- package/src/resources/disputes.ts +4 -4
- package/src/resources/entitlements/entitlements.ts +36 -36
- package/src/resources/entitlements/files.ts +7 -7
- package/src/resources/entitlements/index.ts +1 -1
- package/src/resources/index.ts +18 -18
- package/src/resources/invoices/payments.ts +4 -4
- package/src/resources/license-key-instances.ts +25 -25
- package/src/resources/license-keys.ts +48 -48
- package/src/resources/meters.ts +15 -15
- package/src/resources/payments.ts +59 -59
- package/src/resources/product-collections/groups/groups.ts +16 -16
- package/src/resources/product-collections/groups/index.ts +2 -2
- package/src/resources/product-collections/groups/items.ts +19 -19
- package/src/resources/product-collections/index.ts +2 -2
- package/src/resources/product-collections/product-collections.ts +32 -32
- package/src/resources/products/index.ts +2 -2
- package/src/resources/products/products.ts +33 -33
- package/src/resources/products/short-links.ts +20 -20
- package/src/resources/refunds.ts +36 -36
- package/src/resources/subscriptions.ts +130 -130
- package/src/resources/usage-events.ts +64 -64
- package/src/resources/webhooks/index.ts +1 -1
- package/src/resources/webhooks/webhooks.ts +24 -24
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addons.d.ts","sourceRoot":"","sources":["../src/resources/addons.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,OAAO,kBAAe;AAClC,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EACL,2BAA2B,EAC3B,KAAK,iCAAiC,EACtC,WAAW,EACZ,8BAA2B;AAC5B,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,MAAO,SAAQ,WAAW;IACrC,
|
|
1
|
+
{"version":3,"file":"addons.d.ts","sourceRoot":"","sources":["../src/resources/addons.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,OAAO,kBAAe;AAClC,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EACL,2BAA2B,EAC3B,KAAK,iCAAiC,EACtC,WAAW,EACZ,8BAA2B;AAC5B,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,MAAO,SAAQ,WAAW;IACrC,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,yCAAyC,EAAE,aAAa,CAAC;IAOxE,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC;IAIpF,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC;I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CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAEnC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAC3C;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
package/resources/addons.js
CHANGED
|
@@ -6,6 +6,12 @@ const resource_1 = require("../core/resource.js");
|
|
|
6
6
|
const pagination_1 = require("../core/pagination.js");
|
|
7
7
|
const path_1 = require("../internal/utils/path.js");
|
|
8
8
|
class Addons extends resource_1.APIResource {
|
|
9
|
+
list(query = {}, options) {
|
|
10
|
+
return this._client.getAPIList('/addons', (pagination_1.DefaultPageNumberPagination), {
|
|
11
|
+
query,
|
|
12
|
+
...options,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
9
15
|
create(body, options) {
|
|
10
16
|
return this._client.post('/addons', { body, ...options });
|
|
11
17
|
}
|
|
@@ -15,12 +21,6 @@ class Addons extends resource_1.APIResource {
|
|
|
15
21
|
update(id, body, options) {
|
|
16
22
|
return this._client.patch((0, path_1.path) `/addons/${id}`, { body, ...options });
|
|
17
23
|
}
|
|
18
|
-
list(query = {}, options) {
|
|
19
|
-
return this._client.getAPIList('/addons', (pagination_1.DefaultPageNumberPagination), {
|
|
20
|
-
query,
|
|
21
|
-
...options,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
24
|
updateImages(id, options) {
|
|
25
25
|
return this._client.put((0, path_1.path) `/addons/${id}/images`, options);
|
|
26
26
|
}
|
package/resources/addons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addons.js","sourceRoot":"","sources":["../src/resources/addons.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAI4B;AAE5B,oDAA8C;AAE9C,MAAa,MAAO,SAAQ,sBAAW;IACrC,
|
|
1
|
+
{"version":3,"file":"addons.js","sourceRoot":"","sources":["../src/resources/addons.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAI4B;AAE5B,oDAA8C;AAE9C,MAAa,MAAO,SAAQ,sBAAW;IACrC,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAAA,wCAA0C,CAAA,EAAE;YACpF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,IAAuB,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,YAAY,CAAC,EAAU,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF;AA1BD,wBA0BC"}
|
package/resources/addons.mjs
CHANGED
|
@@ -3,6 +3,12 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
3
3
|
import { DefaultPageNumberPagination, } from "../core/pagination.mjs";
|
|
4
4
|
import { path } from "../internal/utils/path.mjs";
|
|
5
5
|
export class Addons extends APIResource {
|
|
6
|
+
list(query = {}, options) {
|
|
7
|
+
return this._client.getAPIList('/addons', (DefaultPageNumberPagination), {
|
|
8
|
+
query,
|
|
9
|
+
...options,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
6
12
|
create(body, options) {
|
|
7
13
|
return this._client.post('/addons', { body, ...options });
|
|
8
14
|
}
|
|
@@ -12,12 +18,6 @@ export class Addons extends APIResource {
|
|
|
12
18
|
update(id, body, options) {
|
|
13
19
|
return this._client.patch(path `/addons/${id}`, { body, ...options });
|
|
14
20
|
}
|
|
15
|
-
list(query = {}, options) {
|
|
16
|
-
return this._client.getAPIList('/addons', (DefaultPageNumberPagination), {
|
|
17
|
-
query,
|
|
18
|
-
...options,
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
21
|
updateImages(id, options) {
|
|
22
22
|
return this._client.put(path `/addons/${id}/images`, options);
|
|
23
23
|
}
|
package/resources/addons.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addons.mjs","sourceRoot":"","sources":["../src/resources/addons.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EACL,2BAA2B,GAG5B,+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13 +2,13 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
2
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
4
|
export declare class Brands extends APIResource {
|
|
5
|
+
list(options?: RequestOptions): APIPromise<BrandListResponse>;
|
|
5
6
|
create(body: BrandCreateParams, options?: RequestOptions): APIPromise<Brand>;
|
|
6
7
|
/**
|
|
7
8
|
* Thin handler just calls `get_brand` and wraps in `Json(...)`
|
|
8
9
|
*/
|
|
9
10
|
retrieve(id: string, options?: RequestOptions): APIPromise<Brand>;
|
|
10
11
|
update(id: string, body: BrandUpdateParams, options?: RequestOptions): APIPromise<Brand>;
|
|
11
|
-
list(options?: RequestOptions): APIPromise<BrandListResponse>;
|
|
12
12
|
updateImages(id: string, options?: RequestOptions): APIPromise<BrandUpdateImagesResponse>;
|
|
13
13
|
}
|
|
14
14
|
export interface Brand {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brands.d.mts","sourceRoot":"","sources":["../src/resources/brands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,MAAO,SAAQ,WAAW;IACrC,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;IAI5E;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;IAIjE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;IAIxF,
|
|
1
|
+
{"version":3,"file":"brands.d.mts","sourceRoot":"","sources":["../src/resources/brands.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,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;CACrB;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
package/resources/brands.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ import { APIResource } from "../core/resource.js";
|
|
|
2
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
4
|
export declare class Brands extends APIResource {
|
|
5
|
+
list(options?: RequestOptions): APIPromise<BrandListResponse>;
|
|
5
6
|
create(body: BrandCreateParams, options?: RequestOptions): APIPromise<Brand>;
|
|
6
7
|
/**
|
|
7
8
|
* Thin handler just calls `get_brand` and wraps in `Json(...)`
|
|
8
9
|
*/
|
|
9
10
|
retrieve(id: string, options?: RequestOptions): APIPromise<Brand>;
|
|
10
11
|
update(id: string, body: BrandUpdateParams, options?: RequestOptions): APIPromise<Brand>;
|
|
11
|
-
list(options?: RequestOptions): APIPromise<BrandListResponse>;
|
|
12
12
|
updateImages(id: string, options?: RequestOptions): APIPromise<BrandUpdateImagesResponse>;
|
|
13
13
|
}
|
|
14
14
|
export interface Brand {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brands.d.ts","sourceRoot":"","sources":["../src/resources/brands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,MAAO,SAAQ,WAAW;IACrC,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;IAI5E;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;IAIjE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;IAIxF,
|
|
1
|
+
{"version":3,"file":"brands.d.ts","sourceRoot":"","sources":["../src/resources/brands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,c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,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
package/resources/brands.js
CHANGED
|
@@ -5,6 +5,9 @@ exports.Brands = void 0;
|
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
6
|
const path_1 = require("../internal/utils/path.js");
|
|
7
7
|
class Brands extends resource_1.APIResource {
|
|
8
|
+
list(options) {
|
|
9
|
+
return this._client.get('/brands', options);
|
|
10
|
+
}
|
|
8
11
|
create(body, options) {
|
|
9
12
|
return this._client.post('/brands', { body, ...options });
|
|
10
13
|
}
|
|
@@ -17,9 +20,6 @@ class Brands extends resource_1.APIResource {
|
|
|
17
20
|
update(id, body, options) {
|
|
18
21
|
return this._client.patch((0, path_1.path) `/brands/${id}`, { body, ...options });
|
|
19
22
|
}
|
|
20
|
-
list(options) {
|
|
21
|
-
return this._client.get('/brands', options);
|
|
22
|
-
}
|
|
23
23
|
updateImages(id, options) {
|
|
24
24
|
return this._client.put((0, path_1.path) `/brands/${id}/images`, options);
|
|
25
25
|
}
|
package/resources/brands.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brands.js","sourceRoot":"","sources":["../src/resources/brands.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,MAAO,SAAQ,sBAAW;IACrC,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,IAAuB,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,
|
|
1
|
+
{"version":3,"file":"brands.js","sourceRoot":"","sources":["../src/resources/brands.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,MAAO,SAAQ,sBAAW;IACrC,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,IAAuB,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,YAAY,CAAC,EAAU,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF;AAvBD,wBAuBC"}
|
package/resources/brands.mjs
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
3
|
import { path } from "../internal/utils/path.mjs";
|
|
4
4
|
export class Brands extends APIResource {
|
|
5
|
+
list(options) {
|
|
6
|
+
return this._client.get('/brands', options);
|
|
7
|
+
}
|
|
5
8
|
create(body, options) {
|
|
6
9
|
return this._client.post('/brands', { body, ...options });
|
|
7
10
|
}
|
|
@@ -14,9 +17,6 @@ export class Brands extends APIResource {
|
|
|
14
17
|
update(id, body, options) {
|
|
15
18
|
return this._client.patch(path `/brands/${id}`, { body, ...options });
|
|
16
19
|
}
|
|
17
|
-
list(options) {
|
|
18
|
-
return this._client.get('/brands', options);
|
|
19
|
-
}
|
|
20
20
|
updateImages(id, options) {
|
|
21
21
|
return this._client.put(path `/brands/${id}/images`, options);
|
|
22
22
|
}
|
package/resources/brands.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brands.mjs","sourceRoot":"","sources":["../src/resources/brands.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,WAAW,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,IAAuB,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,WAAW,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,
|
|
1
|
+
{"version":3,"file":"brands.mjs","sourceRoot":"","sources":["../src/resources/brands.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,WAAW,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,IAAuB,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,WAAW,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,YAAY,CAAC,EAAU,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,WAAW,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF"}
|
|
@@ -3,26 +3,6 @@ import { APIPromise } from "../../core/api-promise.mjs";
|
|
|
3
3
|
import { DefaultPageNumberPagination, type DefaultPageNumberPaginationParams, PagePromise } from "../../core/pagination.mjs";
|
|
4
4
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
5
|
export declare class Balances extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* Returns the credit balance details for a specific customer and credit
|
|
8
|
-
* entitlement.
|
|
9
|
-
*
|
|
10
|
-
* # Authentication
|
|
11
|
-
*
|
|
12
|
-
* Requires an API key with `Viewer` role or higher.
|
|
13
|
-
*
|
|
14
|
-
* # Path Parameters
|
|
15
|
-
*
|
|
16
|
-
* - `credit_entitlement_id` - The unique identifier of the credit entitlement
|
|
17
|
-
* - `customer_id` - The unique identifier of the customer
|
|
18
|
-
*
|
|
19
|
-
* # Responses
|
|
20
|
-
*
|
|
21
|
-
* - `200 OK` - Returns the customer's balance
|
|
22
|
-
* - `404 Not Found` - Credit entitlement or customer balance not found
|
|
23
|
-
* - `500 Internal Server Error` - Database or server error
|
|
24
|
-
*/
|
|
25
|
-
retrieve(customerID: string, params: BalanceRetrieveParams, options?: RequestOptions): APIPromise<CustomerCreditBalance>;
|
|
26
6
|
/**
|
|
27
7
|
* Returns a paginated list of customer credit balances for the given credit
|
|
28
8
|
* entitlement.
|
|
@@ -49,35 +29,25 @@ export declare class Balances extends APIResource {
|
|
|
49
29
|
*/
|
|
50
30
|
list(creditEntitlementID: string, query?: BalanceListParams | null | undefined, options?: RequestOptions): PagePromise<CustomerCreditBalancesDefaultPageNumberPagination, CustomerCreditBalance>;
|
|
51
31
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
32
|
+
* Returns the credit balance details for a specific customer and credit
|
|
33
|
+
* entitlement.
|
|
54
34
|
*
|
|
55
35
|
* # Authentication
|
|
56
36
|
*
|
|
57
|
-
* Requires an API key with `
|
|
37
|
+
* Requires an API key with `Viewer` role or higher.
|
|
58
38
|
*
|
|
59
39
|
* # Path Parameters
|
|
60
40
|
*
|
|
61
41
|
* - `credit_entitlement_id` - The unique identifier of the credit entitlement
|
|
62
42
|
* - `customer_id` - The unique identifier of the customer
|
|
63
43
|
*
|
|
64
|
-
* # Request Body
|
|
65
|
-
*
|
|
66
|
-
* - `entry_type` - "credit" or "debit"
|
|
67
|
-
* - `amount` - Amount to credit or debit
|
|
68
|
-
* - `reason` - Optional human-readable reason
|
|
69
|
-
* - `expires_at` - Optional expiration for credited amount (only for credit type)
|
|
70
|
-
* - `idempotency_key` - Optional key to prevent duplicate entries
|
|
71
|
-
*
|
|
72
44
|
* # Responses
|
|
73
45
|
*
|
|
74
|
-
* - `
|
|
75
|
-
* - `
|
|
76
|
-
* - `404 Not Found` - Credit entitlement or customer not found
|
|
77
|
-
* - `409 Conflict` - Idempotency key already exists
|
|
46
|
+
* - `200 OK` - Returns the customer's balance
|
|
47
|
+
* - `404 Not Found` - Credit entitlement or customer balance not found
|
|
78
48
|
* - `500 Internal Server Error` - Database or server error
|
|
79
49
|
*/
|
|
80
|
-
|
|
50
|
+
retrieve(customerID: string, params: BalanceRetrieveParams, options?: RequestOptions): APIPromise<CustomerCreditBalance>;
|
|
81
51
|
/**
|
|
82
52
|
* Returns a paginated list of credit grants with optional filtering by status.
|
|
83
53
|
*
|
|
@@ -130,6 +100,36 @@ export declare class Balances extends APIResource {
|
|
|
130
100
|
* - `500 Internal Server Error` - Database or server error
|
|
131
101
|
*/
|
|
132
102
|
listLedger(customerID: string, params: BalanceListLedgerParams, options?: RequestOptions): PagePromise<CreditLedgerEntriesDefaultPageNumberPagination, CreditLedgerEntry>;
|
|
103
|
+
/**
|
|
104
|
+
* For credit entries, a new grant is created. For debit entries, credits are
|
|
105
|
+
* deducted from existing grants using FIFO (oldest first).
|
|
106
|
+
*
|
|
107
|
+
* # Authentication
|
|
108
|
+
*
|
|
109
|
+
* Requires an API key with `Editor` role.
|
|
110
|
+
*
|
|
111
|
+
* # Path Parameters
|
|
112
|
+
*
|
|
113
|
+
* - `credit_entitlement_id` - The unique identifier of the credit entitlement
|
|
114
|
+
* - `customer_id` - The unique identifier of the customer
|
|
115
|
+
*
|
|
116
|
+
* # Request Body
|
|
117
|
+
*
|
|
118
|
+
* - `entry_type` - "credit" or "debit"
|
|
119
|
+
* - `amount` - Amount to credit or debit
|
|
120
|
+
* - `reason` - Optional human-readable reason
|
|
121
|
+
* - `expires_at` - Optional expiration for credited amount (only for credit type)
|
|
122
|
+
* - `idempotency_key` - Optional key to prevent duplicate entries
|
|
123
|
+
*
|
|
124
|
+
* # Responses
|
|
125
|
+
*
|
|
126
|
+
* - `201 Created` - Ledger entry created successfully
|
|
127
|
+
* - `400 Bad Request` - Invalid request (e.g., debit with insufficient balance)
|
|
128
|
+
* - `404 Not Found` - Credit entitlement or customer not found
|
|
129
|
+
* - `409 Conflict` - Idempotency key already exists
|
|
130
|
+
* - `500 Internal Server Error` - Database or server error
|
|
131
|
+
*/
|
|
132
|
+
createLedgerEntry(customerID: string, params: BalanceCreateLedgerEntryParams, options?: RequestOptions): APIPromise<BalanceCreateLedgerEntryResponse>;
|
|
133
133
|
}
|
|
134
134
|
export type CustomerCreditBalancesDefaultPageNumberPagination = DefaultPageNumberPagination<CustomerCreditBalance>;
|
|
135
135
|
export type BalanceListGrantsResponsesDefaultPageNumberPagination = DefaultPageNumberPagination<BalanceListGrantsResponse>;
|
|
@@ -209,17 +209,46 @@ export interface BalanceListGrantsResponse {
|
|
|
209
209
|
parent_grant_id?: string | null;
|
|
210
210
|
source_id?: string | null;
|
|
211
211
|
}
|
|
212
|
+
export interface BalanceListParams extends DefaultPageNumberPaginationParams {
|
|
213
|
+
/**
|
|
214
|
+
* Filter by specific customer ID
|
|
215
|
+
*/
|
|
216
|
+
customer_id?: string;
|
|
217
|
+
}
|
|
212
218
|
export interface BalanceRetrieveParams {
|
|
213
219
|
/**
|
|
214
220
|
* Credit Entitlement ID
|
|
215
221
|
*/
|
|
216
222
|
credit_entitlement_id: string;
|
|
217
223
|
}
|
|
218
|
-
export interface
|
|
224
|
+
export interface BalanceListGrantsParams extends DefaultPageNumberPaginationParams {
|
|
219
225
|
/**
|
|
220
|
-
*
|
|
226
|
+
* Path param: Credit Entitlement ID
|
|
221
227
|
*/
|
|
222
|
-
|
|
228
|
+
credit_entitlement_id: string;
|
|
229
|
+
/**
|
|
230
|
+
* Query param: Filter by grant status: active, expired, depleted
|
|
231
|
+
*/
|
|
232
|
+
status?: 'active' | 'expired' | 'depleted';
|
|
233
|
+
}
|
|
234
|
+
export interface BalanceListLedgerParams extends DefaultPageNumberPaginationParams {
|
|
235
|
+
/**
|
|
236
|
+
* Path param: Credit Entitlement ID
|
|
237
|
+
*/
|
|
238
|
+
credit_entitlement_id: string;
|
|
239
|
+
/**
|
|
240
|
+
* Query param: Filter by end date
|
|
241
|
+
*/
|
|
242
|
+
end_date?: string;
|
|
243
|
+
/**
|
|
244
|
+
* Query param: Filter by start date
|
|
245
|
+
*/
|
|
246
|
+
start_date?: string;
|
|
247
|
+
/**
|
|
248
|
+
* Query param: Filter by transaction type (snake_case: credit_added,
|
|
249
|
+
* credit_deducted, credit_expired, etc.)
|
|
250
|
+
*/
|
|
251
|
+
transaction_type?: string;
|
|
223
252
|
}
|
|
224
253
|
export interface BalanceCreateLedgerEntryParams {
|
|
225
254
|
/**
|
|
@@ -254,36 +283,7 @@ export interface BalanceCreateLedgerEntryParams {
|
|
|
254
283
|
*/
|
|
255
284
|
reason?: string | null;
|
|
256
285
|
}
|
|
257
|
-
export interface BalanceListGrantsParams extends DefaultPageNumberPaginationParams {
|
|
258
|
-
/**
|
|
259
|
-
* Path param: Credit Entitlement ID
|
|
260
|
-
*/
|
|
261
|
-
credit_entitlement_id: string;
|
|
262
|
-
/**
|
|
263
|
-
* Query param: Filter by grant status: active, expired, depleted
|
|
264
|
-
*/
|
|
265
|
-
status?: 'active' | 'expired' | 'depleted';
|
|
266
|
-
}
|
|
267
|
-
export interface BalanceListLedgerParams extends DefaultPageNumberPaginationParams {
|
|
268
|
-
/**
|
|
269
|
-
* Path param: Credit Entitlement ID
|
|
270
|
-
*/
|
|
271
|
-
credit_entitlement_id: string;
|
|
272
|
-
/**
|
|
273
|
-
* Query param: Filter by end date
|
|
274
|
-
*/
|
|
275
|
-
end_date?: string;
|
|
276
|
-
/**
|
|
277
|
-
* Query param: Filter by start date
|
|
278
|
-
*/
|
|
279
|
-
start_date?: string;
|
|
280
|
-
/**
|
|
281
|
-
* Query param: Filter by transaction type (snake_case: credit_added,
|
|
282
|
-
* credit_deducted, credit_expired, etc.)
|
|
283
|
-
*/
|
|
284
|
-
transaction_type?: string;
|
|
285
|
-
}
|
|
286
286
|
export declare namespace Balances {
|
|
287
|
-
export { type CreditLedgerEntry as CreditLedgerEntry, type CustomerCreditBalance as CustomerCreditBalance, type LedgerEntryType as LedgerEntryType, type BalanceCreateLedgerEntryResponse as BalanceCreateLedgerEntryResponse, type BalanceListGrantsResponse as BalanceListGrantsResponse, type CustomerCreditBalancesDefaultPageNumberPagination as CustomerCreditBalancesDefaultPageNumberPagination, type BalanceListGrantsResponsesDefaultPageNumberPagination as BalanceListGrantsResponsesDefaultPageNumberPagination, type CreditLedgerEntriesDefaultPageNumberPagination as CreditLedgerEntriesDefaultPageNumberPagination, type
|
|
287
|
+
export { type CreditLedgerEntry as CreditLedgerEntry, type CustomerCreditBalance as CustomerCreditBalance, type LedgerEntryType as LedgerEntryType, type BalanceCreateLedgerEntryResponse as BalanceCreateLedgerEntryResponse, type BalanceListGrantsResponse as BalanceListGrantsResponse, type CustomerCreditBalancesDefaultPageNumberPagination as CustomerCreditBalancesDefaultPageNumberPagination, type BalanceListGrantsResponsesDefaultPageNumberPagination as BalanceListGrantsResponsesDefaultPageNumberPagination, type CreditLedgerEntriesDefaultPageNumberPagination as CreditLedgerEntriesDefaultPageNumberPagination, type BalanceListParams as BalanceListParams, type BalanceRetrieveParams as BalanceRetrieveParams, type BalanceListGrantsParams as BalanceListGrantsParams, type BalanceListLedgerParams as BalanceListLedgerParams, type BalanceCreateLedgerEntryParams as BalanceCreateLedgerEntryParams, };
|
|
288
288
|
}
|
|
289
289
|
//# sourceMappingURL=balances.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balances.d.mts","sourceRoot":"","sources":["../../src/resources/credit-entitlements/balances.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EACL,2BAA2B,EAC3B,KAAK,iCAAiC,EACtC,WAAW,EACZ,kCAA8B;AAC/B,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"balances.d.mts","sourceRoot":"","sources":["../../src/resources/credit-entitlements/balances.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE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AAqD,EACnH,KAAK,8CAA8C,IAAI,8CAA8C,EACrG,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
|
|
@@ -3,26 +3,6 @@ import { APIPromise } from "../../core/api-promise.js";
|
|
|
3
3
|
import { DefaultPageNumberPagination, type DefaultPageNumberPaginationParams, PagePromise } from "../../core/pagination.js";
|
|
4
4
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
5
|
export declare class Balances extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* Returns the credit balance details for a specific customer and credit
|
|
8
|
-
* entitlement.
|
|
9
|
-
*
|
|
10
|
-
* # Authentication
|
|
11
|
-
*
|
|
12
|
-
* Requires an API key with `Viewer` role or higher.
|
|
13
|
-
*
|
|
14
|
-
* # Path Parameters
|
|
15
|
-
*
|
|
16
|
-
* - `credit_entitlement_id` - The unique identifier of the credit entitlement
|
|
17
|
-
* - `customer_id` - The unique identifier of the customer
|
|
18
|
-
*
|
|
19
|
-
* # Responses
|
|
20
|
-
*
|
|
21
|
-
* - `200 OK` - Returns the customer's balance
|
|
22
|
-
* - `404 Not Found` - Credit entitlement or customer balance not found
|
|
23
|
-
* - `500 Internal Server Error` - Database or server error
|
|
24
|
-
*/
|
|
25
|
-
retrieve(customerID: string, params: BalanceRetrieveParams, options?: RequestOptions): APIPromise<CustomerCreditBalance>;
|
|
26
6
|
/**
|
|
27
7
|
* Returns a paginated list of customer credit balances for the given credit
|
|
28
8
|
* entitlement.
|
|
@@ -49,35 +29,25 @@ export declare class Balances extends APIResource {
|
|
|
49
29
|
*/
|
|
50
30
|
list(creditEntitlementID: string, query?: BalanceListParams | null | undefined, options?: RequestOptions): PagePromise<CustomerCreditBalancesDefaultPageNumberPagination, CustomerCreditBalance>;
|
|
51
31
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
32
|
+
* Returns the credit balance details for a specific customer and credit
|
|
33
|
+
* entitlement.
|
|
54
34
|
*
|
|
55
35
|
* # Authentication
|
|
56
36
|
*
|
|
57
|
-
* Requires an API key with `
|
|
37
|
+
* Requires an API key with `Viewer` role or higher.
|
|
58
38
|
*
|
|
59
39
|
* # Path Parameters
|
|
60
40
|
*
|
|
61
41
|
* - `credit_entitlement_id` - The unique identifier of the credit entitlement
|
|
62
42
|
* - `customer_id` - The unique identifier of the customer
|
|
63
43
|
*
|
|
64
|
-
* # Request Body
|
|
65
|
-
*
|
|
66
|
-
* - `entry_type` - "credit" or "debit"
|
|
67
|
-
* - `amount` - Amount to credit or debit
|
|
68
|
-
* - `reason` - Optional human-readable reason
|
|
69
|
-
* - `expires_at` - Optional expiration for credited amount (only for credit type)
|
|
70
|
-
* - `idempotency_key` - Optional key to prevent duplicate entries
|
|
71
|
-
*
|
|
72
44
|
* # Responses
|
|
73
45
|
*
|
|
74
|
-
* - `
|
|
75
|
-
* - `
|
|
76
|
-
* - `404 Not Found` - Credit entitlement or customer not found
|
|
77
|
-
* - `409 Conflict` - Idempotency key already exists
|
|
46
|
+
* - `200 OK` - Returns the customer's balance
|
|
47
|
+
* - `404 Not Found` - Credit entitlement or customer balance not found
|
|
78
48
|
* - `500 Internal Server Error` - Database or server error
|
|
79
49
|
*/
|
|
80
|
-
|
|
50
|
+
retrieve(customerID: string, params: BalanceRetrieveParams, options?: RequestOptions): APIPromise<CustomerCreditBalance>;
|
|
81
51
|
/**
|
|
82
52
|
* Returns a paginated list of credit grants with optional filtering by status.
|
|
83
53
|
*
|
|
@@ -130,6 +100,36 @@ export declare class Balances extends APIResource {
|
|
|
130
100
|
* - `500 Internal Server Error` - Database or server error
|
|
131
101
|
*/
|
|
132
102
|
listLedger(customerID: string, params: BalanceListLedgerParams, options?: RequestOptions): PagePromise<CreditLedgerEntriesDefaultPageNumberPagination, CreditLedgerEntry>;
|
|
103
|
+
/**
|
|
104
|
+
* For credit entries, a new grant is created. For debit entries, credits are
|
|
105
|
+
* deducted from existing grants using FIFO (oldest first).
|
|
106
|
+
*
|
|
107
|
+
* # Authentication
|
|
108
|
+
*
|
|
109
|
+
* Requires an API key with `Editor` role.
|
|
110
|
+
*
|
|
111
|
+
* # Path Parameters
|
|
112
|
+
*
|
|
113
|
+
* - `credit_entitlement_id` - The unique identifier of the credit entitlement
|
|
114
|
+
* - `customer_id` - The unique identifier of the customer
|
|
115
|
+
*
|
|
116
|
+
* # Request Body
|
|
117
|
+
*
|
|
118
|
+
* - `entry_type` - "credit" or "debit"
|
|
119
|
+
* - `amount` - Amount to credit or debit
|
|
120
|
+
* - `reason` - Optional human-readable reason
|
|
121
|
+
* - `expires_at` - Optional expiration for credited amount (only for credit type)
|
|
122
|
+
* - `idempotency_key` - Optional key to prevent duplicate entries
|
|
123
|
+
*
|
|
124
|
+
* # Responses
|
|
125
|
+
*
|
|
126
|
+
* - `201 Created` - Ledger entry created successfully
|
|
127
|
+
* - `400 Bad Request` - Invalid request (e.g., debit with insufficient balance)
|
|
128
|
+
* - `404 Not Found` - Credit entitlement or customer not found
|
|
129
|
+
* - `409 Conflict` - Idempotency key already exists
|
|
130
|
+
* - `500 Internal Server Error` - Database or server error
|
|
131
|
+
*/
|
|
132
|
+
createLedgerEntry(customerID: string, params: BalanceCreateLedgerEntryParams, options?: RequestOptions): APIPromise<BalanceCreateLedgerEntryResponse>;
|
|
133
133
|
}
|
|
134
134
|
export type CustomerCreditBalancesDefaultPageNumberPagination = DefaultPageNumberPagination<CustomerCreditBalance>;
|
|
135
135
|
export type BalanceListGrantsResponsesDefaultPageNumberPagination = DefaultPageNumberPagination<BalanceListGrantsResponse>;
|
|
@@ -209,17 +209,46 @@ export interface BalanceListGrantsResponse {
|
|
|
209
209
|
parent_grant_id?: string | null;
|
|
210
210
|
source_id?: string | null;
|
|
211
211
|
}
|
|
212
|
+
export interface BalanceListParams extends DefaultPageNumberPaginationParams {
|
|
213
|
+
/**
|
|
214
|
+
* Filter by specific customer ID
|
|
215
|
+
*/
|
|
216
|
+
customer_id?: string;
|
|
217
|
+
}
|
|
212
218
|
export interface BalanceRetrieveParams {
|
|
213
219
|
/**
|
|
214
220
|
* Credit Entitlement ID
|
|
215
221
|
*/
|
|
216
222
|
credit_entitlement_id: string;
|
|
217
223
|
}
|
|
218
|
-
export interface
|
|
224
|
+
export interface BalanceListGrantsParams extends DefaultPageNumberPaginationParams {
|
|
219
225
|
/**
|
|
220
|
-
*
|
|
226
|
+
* Path param: Credit Entitlement ID
|
|
221
227
|
*/
|
|
222
|
-
|
|
228
|
+
credit_entitlement_id: string;
|
|
229
|
+
/**
|
|
230
|
+
* Query param: Filter by grant status: active, expired, depleted
|
|
231
|
+
*/
|
|
232
|
+
status?: 'active' | 'expired' | 'depleted';
|
|
233
|
+
}
|
|
234
|
+
export interface BalanceListLedgerParams extends DefaultPageNumberPaginationParams {
|
|
235
|
+
/**
|
|
236
|
+
* Path param: Credit Entitlement ID
|
|
237
|
+
*/
|
|
238
|
+
credit_entitlement_id: string;
|
|
239
|
+
/**
|
|
240
|
+
* Query param: Filter by end date
|
|
241
|
+
*/
|
|
242
|
+
end_date?: string;
|
|
243
|
+
/**
|
|
244
|
+
* Query param: Filter by start date
|
|
245
|
+
*/
|
|
246
|
+
start_date?: string;
|
|
247
|
+
/**
|
|
248
|
+
* Query param: Filter by transaction type (snake_case: credit_added,
|
|
249
|
+
* credit_deducted, credit_expired, etc.)
|
|
250
|
+
*/
|
|
251
|
+
transaction_type?: string;
|
|
223
252
|
}
|
|
224
253
|
export interface BalanceCreateLedgerEntryParams {
|
|
225
254
|
/**
|
|
@@ -254,36 +283,7 @@ export interface BalanceCreateLedgerEntryParams {
|
|
|
254
283
|
*/
|
|
255
284
|
reason?: string | null;
|
|
256
285
|
}
|
|
257
|
-
export interface BalanceListGrantsParams extends DefaultPageNumberPaginationParams {
|
|
258
|
-
/**
|
|
259
|
-
* Path param: Credit Entitlement ID
|
|
260
|
-
*/
|
|
261
|
-
credit_entitlement_id: string;
|
|
262
|
-
/**
|
|
263
|
-
* Query param: Filter by grant status: active, expired, depleted
|
|
264
|
-
*/
|
|
265
|
-
status?: 'active' | 'expired' | 'depleted';
|
|
266
|
-
}
|
|
267
|
-
export interface BalanceListLedgerParams extends DefaultPageNumberPaginationParams {
|
|
268
|
-
/**
|
|
269
|
-
* Path param: Credit Entitlement ID
|
|
270
|
-
*/
|
|
271
|
-
credit_entitlement_id: string;
|
|
272
|
-
/**
|
|
273
|
-
* Query param: Filter by end date
|
|
274
|
-
*/
|
|
275
|
-
end_date?: string;
|
|
276
|
-
/**
|
|
277
|
-
* Query param: Filter by start date
|
|
278
|
-
*/
|
|
279
|
-
start_date?: string;
|
|
280
|
-
/**
|
|
281
|
-
* Query param: Filter by transaction type (snake_case: credit_added,
|
|
282
|
-
* credit_deducted, credit_expired, etc.)
|
|
283
|
-
*/
|
|
284
|
-
transaction_type?: string;
|
|
285
|
-
}
|
|
286
286
|
export declare namespace Balances {
|
|
287
|
-
export { type CreditLedgerEntry as CreditLedgerEntry, type CustomerCreditBalance as CustomerCreditBalance, type LedgerEntryType as LedgerEntryType, type BalanceCreateLedgerEntryResponse as BalanceCreateLedgerEntryResponse, type BalanceListGrantsResponse as BalanceListGrantsResponse, type CustomerCreditBalancesDefaultPageNumberPagination as CustomerCreditBalancesDefaultPageNumberPagination, type BalanceListGrantsResponsesDefaultPageNumberPagination as BalanceListGrantsResponsesDefaultPageNumberPagination, type CreditLedgerEntriesDefaultPageNumberPagination as CreditLedgerEntriesDefaultPageNumberPagination, type
|
|
287
|
+
export { type CreditLedgerEntry as CreditLedgerEntry, type CustomerCreditBalance as CustomerCreditBalance, type LedgerEntryType as LedgerEntryType, type BalanceCreateLedgerEntryResponse as BalanceCreateLedgerEntryResponse, type BalanceListGrantsResponse as BalanceListGrantsResponse, type CustomerCreditBalancesDefaultPageNumberPagination as CustomerCreditBalancesDefaultPageNumberPagination, type BalanceListGrantsResponsesDefaultPageNumberPagination as BalanceListGrantsResponsesDefaultPageNumberPagination, type CreditLedgerEntriesDefaultPageNumberPagination as CreditLedgerEntriesDefaultPageNumberPagination, type BalanceListParams as BalanceListParams, type BalanceRetrieveParams as BalanceRetrieveParams, type BalanceListGrantsParams as BalanceListGrantsParams, type BalanceListLedgerParams as BalanceListLedgerParams, type BalanceCreateLedgerEntryParams as BalanceCreateLedgerEntryParams, };
|
|
288
288
|
}
|
|
289
289
|
//# sourceMappingURL=balances.d.ts.map
|