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":"balances.d.ts","sourceRoot":"","sources":["../../src/resources/credit-entitlements/balances.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EACL,2BAA2B,EAC3B,KAAK,iCAAiC,EACtC,WAAW,EACZ,iCAA8B;AAC/B,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"balances.d.ts","sourceRoot":"","sources":["../../src/resources/credit-entitlements/balances.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EACL,2BAA2B,EAC3B,KAAK,iCAAiC,EACtC,WAAW,EACZ,iCAA8B;AAC/B,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,IAAI,CACF,mBAAmB,EAAE,MAAM,EAC3B,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,iDAAiD,EAAE,qBAAqB,CAAC;IAQxF;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,CACN,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,qBAAqB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAQpC;;;;;;;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MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,EAAE,eAAe,CAAC;IAE5B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;;OAGG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAE5C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,iDAAiD,IAAI,iDAAiD,EAC3G,KAAK,qDAAqD,IAAI,qDAAqD,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"}
|
|
@@ -6,29 +6,6 @@ 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 Balances extends resource_1.APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Returns the credit balance details for a specific customer and credit
|
|
11
|
-
* entitlement.
|
|
12
|
-
*
|
|
13
|
-
* # Authentication
|
|
14
|
-
*
|
|
15
|
-
* Requires an API key with `Viewer` role or higher.
|
|
16
|
-
*
|
|
17
|
-
* # Path Parameters
|
|
18
|
-
*
|
|
19
|
-
* - `credit_entitlement_id` - The unique identifier of the credit entitlement
|
|
20
|
-
* - `customer_id` - The unique identifier of the customer
|
|
21
|
-
*
|
|
22
|
-
* # Responses
|
|
23
|
-
*
|
|
24
|
-
* - `200 OK` - Returns the customer's balance
|
|
25
|
-
* - `404 Not Found` - Credit entitlement or customer balance not found
|
|
26
|
-
* - `500 Internal Server Error` - Database or server error
|
|
27
|
-
*/
|
|
28
|
-
retrieve(customerID, params, options) {
|
|
29
|
-
const { credit_entitlement_id } = params;
|
|
30
|
-
return this._client.get((0, path_1.path) `/credit-entitlements/${credit_entitlement_id}/balances/${customerID}`, options);
|
|
31
|
-
}
|
|
32
9
|
/**
|
|
33
10
|
* Returns a paginated list of customer credit balances for the given credit
|
|
34
11
|
* entitlement.
|
|
@@ -57,37 +34,27 @@ class Balances extends resource_1.APIResource {
|
|
|
57
34
|
return this._client.getAPIList((0, path_1.path) `/credit-entitlements/${creditEntitlementID}/balances`, (pagination_1.DefaultPageNumberPagination), { query, ...options });
|
|
58
35
|
}
|
|
59
36
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
37
|
+
* Returns the credit balance details for a specific customer and credit
|
|
38
|
+
* entitlement.
|
|
62
39
|
*
|
|
63
40
|
* # Authentication
|
|
64
41
|
*
|
|
65
|
-
* Requires an API key with `
|
|
42
|
+
* Requires an API key with `Viewer` role or higher.
|
|
66
43
|
*
|
|
67
44
|
* # Path Parameters
|
|
68
45
|
*
|
|
69
46
|
* - `credit_entitlement_id` - The unique identifier of the credit entitlement
|
|
70
47
|
* - `customer_id` - The unique identifier of the customer
|
|
71
48
|
*
|
|
72
|
-
* # Request Body
|
|
73
|
-
*
|
|
74
|
-
* - `entry_type` - "credit" or "debit"
|
|
75
|
-
* - `amount` - Amount to credit or debit
|
|
76
|
-
* - `reason` - Optional human-readable reason
|
|
77
|
-
* - `expires_at` - Optional expiration for credited amount (only for credit type)
|
|
78
|
-
* - `idempotency_key` - Optional key to prevent duplicate entries
|
|
79
|
-
*
|
|
80
49
|
* # Responses
|
|
81
50
|
*
|
|
82
|
-
* - `
|
|
83
|
-
* - `
|
|
84
|
-
* - `404 Not Found` - Credit entitlement or customer not found
|
|
85
|
-
* - `409 Conflict` - Idempotency key already exists
|
|
51
|
+
* - `200 OK` - Returns the customer's balance
|
|
52
|
+
* - `404 Not Found` - Credit entitlement or customer balance not found
|
|
86
53
|
* - `500 Internal Server Error` - Database or server error
|
|
87
54
|
*/
|
|
88
|
-
|
|
89
|
-
const { credit_entitlement_id
|
|
90
|
-
return this._client.
|
|
55
|
+
retrieve(customerID, params, options) {
|
|
56
|
+
const { credit_entitlement_id } = params;
|
|
57
|
+
return this._client.get((0, path_1.path) `/credit-entitlements/${credit_entitlement_id}/balances/${customerID}`, options);
|
|
91
58
|
}
|
|
92
59
|
/**
|
|
93
60
|
* Returns a paginated list of credit grants with optional filtering by status.
|
|
@@ -147,6 +114,39 @@ class Balances extends resource_1.APIResource {
|
|
|
147
114
|
const { credit_entitlement_id, ...query } = params;
|
|
148
115
|
return this._client.getAPIList((0, path_1.path) `/credit-entitlements/${credit_entitlement_id}/balances/${customerID}/ledger`, (pagination_1.DefaultPageNumberPagination), { query, ...options });
|
|
149
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* For credit entries, a new grant is created. For debit entries, credits are
|
|
119
|
+
* deducted from existing grants using FIFO (oldest first).
|
|
120
|
+
*
|
|
121
|
+
* # Authentication
|
|
122
|
+
*
|
|
123
|
+
* Requires an API key with `Editor` role.
|
|
124
|
+
*
|
|
125
|
+
* # Path Parameters
|
|
126
|
+
*
|
|
127
|
+
* - `credit_entitlement_id` - The unique identifier of the credit entitlement
|
|
128
|
+
* - `customer_id` - The unique identifier of the customer
|
|
129
|
+
*
|
|
130
|
+
* # Request Body
|
|
131
|
+
*
|
|
132
|
+
* - `entry_type` - "credit" or "debit"
|
|
133
|
+
* - `amount` - Amount to credit or debit
|
|
134
|
+
* - `reason` - Optional human-readable reason
|
|
135
|
+
* - `expires_at` - Optional expiration for credited amount (only for credit type)
|
|
136
|
+
* - `idempotency_key` - Optional key to prevent duplicate entries
|
|
137
|
+
*
|
|
138
|
+
* # Responses
|
|
139
|
+
*
|
|
140
|
+
* - `201 Created` - Ledger entry created successfully
|
|
141
|
+
* - `400 Bad Request` - Invalid request (e.g., debit with insufficient balance)
|
|
142
|
+
* - `404 Not Found` - Credit entitlement or customer not found
|
|
143
|
+
* - `409 Conflict` - Idempotency key already exists
|
|
144
|
+
* - `500 Internal Server Error` - Database or server error
|
|
145
|
+
*/
|
|
146
|
+
createLedgerEntry(customerID, params, options) {
|
|
147
|
+
const { credit_entitlement_id, ...body } = params;
|
|
148
|
+
return this._client.post((0, path_1.path) `/credit-entitlements/${credit_entitlement_id}/balances/${customerID}/ledger-entries`, { body, ...options });
|
|
149
|
+
}
|
|
150
150
|
}
|
|
151
151
|
exports.Balances = Balances;
|
|
152
152
|
//# sourceMappingURL=balances.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balances.js","sourceRoot":"","sources":["../../src/resources/credit-entitlements/balances.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAI+B;AAE/B,uDAAiD;AAEjD,MAAa,QAAS,SAAQ,sBAAW;IACvC
|
|
1
|
+
{"version":3,"file":"balances.js","sourceRoot":"","sources":["../../src/resources/credit-entitlements/balances.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAI+B;AAE/B,uDAAiD;AAEjD,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,IAAI,CACF,mBAA2B,EAC3B,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,wBAAwB,mBAAmB,WAAW,EAC1D,CAAA,wCAAkD,CAAA,EAClD,EAAE,KAAK,EAAE,G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B,IAAA,WAAI,EAAA,wBAAwB,qBAAqB,aAAa,UAAU,iBAAiB,EACzF,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CACrB,CAAC;IACJ,CAAC;CACF;AAxLD,4BAwLC"}
|
|
@@ -3,29 +3,6 @@ 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 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, params, options) {
|
|
26
|
-
const { credit_entitlement_id } = params;
|
|
27
|
-
return this._client.get(path `/credit-entitlements/${credit_entitlement_id}/balances/${customerID}`, options);
|
|
28
|
-
}
|
|
29
6
|
/**
|
|
30
7
|
* Returns a paginated list of customer credit balances for the given credit
|
|
31
8
|
* entitlement.
|
|
@@ -54,37 +31,27 @@ export class Balances extends APIResource {
|
|
|
54
31
|
return this._client.getAPIList(path `/credit-entitlements/${creditEntitlementID}/balances`, (DefaultPageNumberPagination), { query, ...options });
|
|
55
32
|
}
|
|
56
33
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
34
|
+
* Returns the credit balance details for a specific customer and credit
|
|
35
|
+
* entitlement.
|
|
59
36
|
*
|
|
60
37
|
* # Authentication
|
|
61
38
|
*
|
|
62
|
-
* Requires an API key with `
|
|
39
|
+
* Requires an API key with `Viewer` role or higher.
|
|
63
40
|
*
|
|
64
41
|
* # Path Parameters
|
|
65
42
|
*
|
|
66
43
|
* - `credit_entitlement_id` - The unique identifier of the credit entitlement
|
|
67
44
|
* - `customer_id` - The unique identifier of the customer
|
|
68
45
|
*
|
|
69
|
-
* # Request Body
|
|
70
|
-
*
|
|
71
|
-
* - `entry_type` - "credit" or "debit"
|
|
72
|
-
* - `amount` - Amount to credit or debit
|
|
73
|
-
* - `reason` - Optional human-readable reason
|
|
74
|
-
* - `expires_at` - Optional expiration for credited amount (only for credit type)
|
|
75
|
-
* - `idempotency_key` - Optional key to prevent duplicate entries
|
|
76
|
-
*
|
|
77
46
|
* # Responses
|
|
78
47
|
*
|
|
79
|
-
* - `
|
|
80
|
-
* - `
|
|
81
|
-
* - `404 Not Found` - Credit entitlement or customer not found
|
|
82
|
-
* - `409 Conflict` - Idempotency key already exists
|
|
48
|
+
* - `200 OK` - Returns the customer's balance
|
|
49
|
+
* - `404 Not Found` - Credit entitlement or customer balance not found
|
|
83
50
|
* - `500 Internal Server Error` - Database or server error
|
|
84
51
|
*/
|
|
85
|
-
|
|
86
|
-
const { credit_entitlement_id
|
|
87
|
-
return this._client.
|
|
52
|
+
retrieve(customerID, params, options) {
|
|
53
|
+
const { credit_entitlement_id } = params;
|
|
54
|
+
return this._client.get(path `/credit-entitlements/${credit_entitlement_id}/balances/${customerID}`, options);
|
|
88
55
|
}
|
|
89
56
|
/**
|
|
90
57
|
* Returns a paginated list of credit grants with optional filtering by status.
|
|
@@ -144,5 +111,38 @@ export class Balances extends APIResource {
|
|
|
144
111
|
const { credit_entitlement_id, ...query } = params;
|
|
145
112
|
return this._client.getAPIList(path `/credit-entitlements/${credit_entitlement_id}/balances/${customerID}/ledger`, (DefaultPageNumberPagination), { query, ...options });
|
|
146
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* For credit entries, a new grant is created. For debit entries, credits are
|
|
116
|
+
* deducted from existing grants using FIFO (oldest first).
|
|
117
|
+
*
|
|
118
|
+
* # Authentication
|
|
119
|
+
*
|
|
120
|
+
* Requires an API key with `Editor` role.
|
|
121
|
+
*
|
|
122
|
+
* # Path Parameters
|
|
123
|
+
*
|
|
124
|
+
* - `credit_entitlement_id` - The unique identifier of the credit entitlement
|
|
125
|
+
* - `customer_id` - The unique identifier of the customer
|
|
126
|
+
*
|
|
127
|
+
* # Request Body
|
|
128
|
+
*
|
|
129
|
+
* - `entry_type` - "credit" or "debit"
|
|
130
|
+
* - `amount` - Amount to credit or debit
|
|
131
|
+
* - `reason` - Optional human-readable reason
|
|
132
|
+
* - `expires_at` - Optional expiration for credited amount (only for credit type)
|
|
133
|
+
* - `idempotency_key` - Optional key to prevent duplicate entries
|
|
134
|
+
*
|
|
135
|
+
* # Responses
|
|
136
|
+
*
|
|
137
|
+
* - `201 Created` - Ledger entry created successfully
|
|
138
|
+
* - `400 Bad Request` - Invalid request (e.g., debit with insufficient balance)
|
|
139
|
+
* - `404 Not Found` - Credit entitlement or customer not found
|
|
140
|
+
* - `409 Conflict` - Idempotency key already exists
|
|
141
|
+
* - `500 Internal Server Error` - Database or server error
|
|
142
|
+
*/
|
|
143
|
+
createLedgerEntry(customerID, params, options) {
|
|
144
|
+
const { credit_entitlement_id, ...body } = params;
|
|
145
|
+
return this._client.post(path `/credit-entitlements/${credit_entitlement_id}/balances/${customerID}/ledger-entries`, { body, ...options });
|
|
146
|
+
}
|
|
147
147
|
}
|
|
148
148
|
//# sourceMappingURL=balances.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"balances.mjs","sourceRoot":"","sources":["../../src/resources/credit-entitlements/balances.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EACL,2BAA2B,GAG5B,kCAA8B;AAE/B,OAA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;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,UAAU,CACR,UAAkB,EAClB,MAA+B,EAC/B,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,wBAAwB,qBAAqB,aAAa,UAAU,SAAS,EACjF,CAAA,2BAA8C,CAAA,EAC9C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,iBAAiB,CACf,UAAkB,EAClB,MAAsC,EACtC,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAI,CAAA,wBAAwB,qBAAqB,aAAa,UAAU,iBAAiB,EACzF,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CACrB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -8,6 +8,35 @@ import { DefaultPageNumberPagination, type DefaultPageNumberPaginationParams, Pa
|
|
|
8
8
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
9
9
|
export declare class CreditEntitlements extends APIResource {
|
|
10
10
|
balances: BalancesAPI.Balances;
|
|
11
|
+
/**
|
|
12
|
+
* Returns a paginated list of credit entitlements, allowing filtering of deleted
|
|
13
|
+
* entitlements. By default, only non-deleted entitlements are returned.
|
|
14
|
+
*
|
|
15
|
+
* # Authentication
|
|
16
|
+
*
|
|
17
|
+
* Requires an API key with `Viewer` role or higher.
|
|
18
|
+
*
|
|
19
|
+
* # Query Parameters
|
|
20
|
+
*
|
|
21
|
+
* - `page_size` - Number of items per page (default: 10, max: 100)
|
|
22
|
+
* - `page_number` - Zero-based page number (default: 0)
|
|
23
|
+
* - `deleted` - Boolean flag to list deleted entitlements instead of active ones
|
|
24
|
+
* (default: false)
|
|
25
|
+
*
|
|
26
|
+
* # Responses
|
|
27
|
+
*
|
|
28
|
+
* - `200 OK` - Returns a list of credit entitlements wrapped in a response object
|
|
29
|
+
* - `422 Unprocessable Entity` - Invalid query parameters (e.g., page_size > 100)
|
|
30
|
+
* - `500 Internal Server Error` - Database or server error
|
|
31
|
+
*
|
|
32
|
+
* # Business Logic
|
|
33
|
+
*
|
|
34
|
+
* - Results are ordered by creation date in descending order (newest first)
|
|
35
|
+
* - Only entitlements belonging to the authenticated business are returned
|
|
36
|
+
* - The `deleted` parameter controls visibility of soft-deleted entitlements
|
|
37
|
+
* - Pagination uses offset-based pagination (offset = page_number \* page_size)
|
|
38
|
+
*/
|
|
39
|
+
list(query?: CreditEntitlementListParams | null | undefined, options?: RequestOptions): PagePromise<CreditEntitlementsDefaultPageNumberPagination, CreditEntitlement>;
|
|
11
40
|
/**
|
|
12
41
|
* Credit entitlements define reusable credit templates that can be attached to
|
|
13
42
|
* products. Each entitlement defines how credits behave in terms of expiration,
|
|
@@ -81,6 +110,7 @@ export declare class CreditEntitlements extends APIResource {
|
|
|
81
110
|
* endpoint with `deleted=true`
|
|
82
111
|
*/
|
|
83
112
|
retrieve(id: string, options?: RequestOptions): APIPromise<CreditEntitlement>;
|
|
113
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
84
114
|
/**
|
|
85
115
|
* Allows partial updates to a credit entitlement's configuration. Only the fields
|
|
86
116
|
* provided in the request body will be updated; all other fields remain unchanged.
|
|
@@ -140,36 +170,6 @@ export declare class CreditEntitlements extends APIResource {
|
|
|
140
170
|
* timeframe fields together, price required for overage
|
|
141
171
|
*/
|
|
142
172
|
update(id: string, body: CreditEntitlementUpdateParams, options?: RequestOptions): APIPromise<void>;
|
|
143
|
-
/**
|
|
144
|
-
* Returns a paginated list of credit entitlements, allowing filtering of deleted
|
|
145
|
-
* entitlements. By default, only non-deleted entitlements are returned.
|
|
146
|
-
*
|
|
147
|
-
* # Authentication
|
|
148
|
-
*
|
|
149
|
-
* Requires an API key with `Viewer` role or higher.
|
|
150
|
-
*
|
|
151
|
-
* # Query Parameters
|
|
152
|
-
*
|
|
153
|
-
* - `page_size` - Number of items per page (default: 10, max: 100)
|
|
154
|
-
* - `page_number` - Zero-based page number (default: 0)
|
|
155
|
-
* - `deleted` - Boolean flag to list deleted entitlements instead of active ones
|
|
156
|
-
* (default: false)
|
|
157
|
-
*
|
|
158
|
-
* # Responses
|
|
159
|
-
*
|
|
160
|
-
* - `200 OK` - Returns a list of credit entitlements wrapped in a response object
|
|
161
|
-
* - `422 Unprocessable Entity` - Invalid query parameters (e.g., page_size > 100)
|
|
162
|
-
* - `500 Internal Server Error` - Database or server error
|
|
163
|
-
*
|
|
164
|
-
* # Business Logic
|
|
165
|
-
*
|
|
166
|
-
* - Results are ordered by creation date in descending order (newest first)
|
|
167
|
-
* - Only entitlements belonging to the authenticated business are returned
|
|
168
|
-
* - The `deleted` parameter controls visibility of soft-deleted entitlements
|
|
169
|
-
* - Pagination uses offset-based pagination (offset = page_number \* page_size)
|
|
170
|
-
*/
|
|
171
|
-
list(query?: CreditEntitlementListParams | null | undefined, options?: RequestOptions): PagePromise<CreditEntitlementsDefaultPageNumberPagination, CreditEntitlement>;
|
|
172
|
-
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
173
173
|
/**
|
|
174
174
|
* Undeletes a soft-deleted credit entitlement by clearing `deleted_at`, making it
|
|
175
175
|
* available again through standard list and get endpoints.
|
|
@@ -253,6 +253,12 @@ export interface CreditEntitlement {
|
|
|
253
253
|
rollover_timeframe_count?: number | null;
|
|
254
254
|
rollover_timeframe_interval?: SubscriptionsAPI.TimeInterval | null;
|
|
255
255
|
}
|
|
256
|
+
export interface CreditEntitlementListParams extends DefaultPageNumberPaginationParams {
|
|
257
|
+
/**
|
|
258
|
+
* List deleted credit entitlements
|
|
259
|
+
*/
|
|
260
|
+
deleted?: boolean;
|
|
261
|
+
}
|
|
256
262
|
export interface CreditEntitlementCreateParams {
|
|
257
263
|
/**
|
|
258
264
|
* Name of the credit entitlement
|
|
@@ -374,14 +380,8 @@ export interface CreditEntitlementUpdateParams {
|
|
|
374
380
|
*/
|
|
375
381
|
unit?: string | null;
|
|
376
382
|
}
|
|
377
|
-
export interface CreditEntitlementListParams extends DefaultPageNumberPaginationParams {
|
|
378
|
-
/**
|
|
379
|
-
* List deleted credit entitlements
|
|
380
|
-
*/
|
|
381
|
-
deleted?: boolean;
|
|
382
|
-
}
|
|
383
383
|
export declare namespace CreditEntitlements {
|
|
384
|
-
export { type CbbOverageBehavior as CbbOverageBehavior, type CreditEntitlement as CreditEntitlement, type CreditEntitlementsDefaultPageNumberPagination as CreditEntitlementsDefaultPageNumberPagination, type
|
|
385
|
-
export { Balances as Balances, 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
|
|
384
|
+
export { type CbbOverageBehavior as CbbOverageBehavior, type CreditEntitlement as CreditEntitlement, type CreditEntitlementsDefaultPageNumberPagination as CreditEntitlementsDefaultPageNumberPagination, type CreditEntitlementListParams as CreditEntitlementListParams, type CreditEntitlementCreateParams as CreditEntitlementCreateParams, type CreditEntitlementUpdateParams as CreditEntitlementUpdateParams, };
|
|
385
|
+
export { Balances as Balances, 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, };
|
|
386
386
|
}
|
|
387
387
|
//# sourceMappingURL=credit-entitlements.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit-entitlements.d.mts","sourceRoot":"","sources":["../../src/resources/credit-entitlements/credit-entitlements.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,OAAO,oBAAgB;AACnC,OAAO,KAAK,gBAAgB,6BAAyB;AACrD,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,EAChC,uBAAuB,EACvB,yBAAyB,EACzB,qDAAqD,EACrD,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,QAAQ,EACR,8CAA8C,EAC9C,iBAAiB,EACjB,qBAAqB,EACrB,iDAAiD,EACjD,eAAe,EAChB,uBAAmB;AACpB,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EACL,2BAA2B,EAC3B,KAAK,iCAAiC,EACtC,WAAW,EACZ,kCAA8B;AAE/B,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,kBAAmB,SAAQ,WAAW;IACjD,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IAExE
|
|
1
|
+
{"version":3,"file":"credit-entitlements.d.mts","sourceRoot":"","sources":["../../src/resources/credit-entitlements/credit-entitlements.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,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K,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,iDAAiD,IAAI,iDAAiD,EAC3G,KAAK,qDAAqD,IAAI,qDAAqD,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"}
|
|
@@ -8,6 +8,35 @@ import { DefaultPageNumberPagination, type DefaultPageNumberPaginationParams, Pa
|
|
|
8
8
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
9
9
|
export declare class CreditEntitlements extends APIResource {
|
|
10
10
|
balances: BalancesAPI.Balances;
|
|
11
|
+
/**
|
|
12
|
+
* Returns a paginated list of credit entitlements, allowing filtering of deleted
|
|
13
|
+
* entitlements. By default, only non-deleted entitlements are returned.
|
|
14
|
+
*
|
|
15
|
+
* # Authentication
|
|
16
|
+
*
|
|
17
|
+
* Requires an API key with `Viewer` role or higher.
|
|
18
|
+
*
|
|
19
|
+
* # Query Parameters
|
|
20
|
+
*
|
|
21
|
+
* - `page_size` - Number of items per page (default: 10, max: 100)
|
|
22
|
+
* - `page_number` - Zero-based page number (default: 0)
|
|
23
|
+
* - `deleted` - Boolean flag to list deleted entitlements instead of active ones
|
|
24
|
+
* (default: false)
|
|
25
|
+
*
|
|
26
|
+
* # Responses
|
|
27
|
+
*
|
|
28
|
+
* - `200 OK` - Returns a list of credit entitlements wrapped in a response object
|
|
29
|
+
* - `422 Unprocessable Entity` - Invalid query parameters (e.g., page_size > 100)
|
|
30
|
+
* - `500 Internal Server Error` - Database or server error
|
|
31
|
+
*
|
|
32
|
+
* # Business Logic
|
|
33
|
+
*
|
|
34
|
+
* - Results are ordered by creation date in descending order (newest first)
|
|
35
|
+
* - Only entitlements belonging to the authenticated business are returned
|
|
36
|
+
* - The `deleted` parameter controls visibility of soft-deleted entitlements
|
|
37
|
+
* - Pagination uses offset-based pagination (offset = page_number \* page_size)
|
|
38
|
+
*/
|
|
39
|
+
list(query?: CreditEntitlementListParams | null | undefined, options?: RequestOptions): PagePromise<CreditEntitlementsDefaultPageNumberPagination, CreditEntitlement>;
|
|
11
40
|
/**
|
|
12
41
|
* Credit entitlements define reusable credit templates that can be attached to
|
|
13
42
|
* products. Each entitlement defines how credits behave in terms of expiration,
|
|
@@ -81,6 +110,7 @@ export declare class CreditEntitlements extends APIResource {
|
|
|
81
110
|
* endpoint with `deleted=true`
|
|
82
111
|
*/
|
|
83
112
|
retrieve(id: string, options?: RequestOptions): APIPromise<CreditEntitlement>;
|
|
113
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
84
114
|
/**
|
|
85
115
|
* Allows partial updates to a credit entitlement's configuration. Only the fields
|
|
86
116
|
* provided in the request body will be updated; all other fields remain unchanged.
|
|
@@ -140,36 +170,6 @@ export declare class CreditEntitlements extends APIResource {
|
|
|
140
170
|
* timeframe fields together, price required for overage
|
|
141
171
|
*/
|
|
142
172
|
update(id: string, body: CreditEntitlementUpdateParams, options?: RequestOptions): APIPromise<void>;
|
|
143
|
-
/**
|
|
144
|
-
* Returns a paginated list of credit entitlements, allowing filtering of deleted
|
|
145
|
-
* entitlements. By default, only non-deleted entitlements are returned.
|
|
146
|
-
*
|
|
147
|
-
* # Authentication
|
|
148
|
-
*
|
|
149
|
-
* Requires an API key with `Viewer` role or higher.
|
|
150
|
-
*
|
|
151
|
-
* # Query Parameters
|
|
152
|
-
*
|
|
153
|
-
* - `page_size` - Number of items per page (default: 10, max: 100)
|
|
154
|
-
* - `page_number` - Zero-based page number (default: 0)
|
|
155
|
-
* - `deleted` - Boolean flag to list deleted entitlements instead of active ones
|
|
156
|
-
* (default: false)
|
|
157
|
-
*
|
|
158
|
-
* # Responses
|
|
159
|
-
*
|
|
160
|
-
* - `200 OK` - Returns a list of credit entitlements wrapped in a response object
|
|
161
|
-
* - `422 Unprocessable Entity` - Invalid query parameters (e.g., page_size > 100)
|
|
162
|
-
* - `500 Internal Server Error` - Database or server error
|
|
163
|
-
*
|
|
164
|
-
* # Business Logic
|
|
165
|
-
*
|
|
166
|
-
* - Results are ordered by creation date in descending order (newest first)
|
|
167
|
-
* - Only entitlements belonging to the authenticated business are returned
|
|
168
|
-
* - The `deleted` parameter controls visibility of soft-deleted entitlements
|
|
169
|
-
* - Pagination uses offset-based pagination (offset = page_number \* page_size)
|
|
170
|
-
*/
|
|
171
|
-
list(query?: CreditEntitlementListParams | null | undefined, options?: RequestOptions): PagePromise<CreditEntitlementsDefaultPageNumberPagination, CreditEntitlement>;
|
|
172
|
-
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
173
173
|
/**
|
|
174
174
|
* Undeletes a soft-deleted credit entitlement by clearing `deleted_at`, making it
|
|
175
175
|
* available again through standard list and get endpoints.
|
|
@@ -253,6 +253,12 @@ export interface CreditEntitlement {
|
|
|
253
253
|
rollover_timeframe_count?: number | null;
|
|
254
254
|
rollover_timeframe_interval?: SubscriptionsAPI.TimeInterval | null;
|
|
255
255
|
}
|
|
256
|
+
export interface CreditEntitlementListParams extends DefaultPageNumberPaginationParams {
|
|
257
|
+
/**
|
|
258
|
+
* List deleted credit entitlements
|
|
259
|
+
*/
|
|
260
|
+
deleted?: boolean;
|
|
261
|
+
}
|
|
256
262
|
export interface CreditEntitlementCreateParams {
|
|
257
263
|
/**
|
|
258
264
|
* Name of the credit entitlement
|
|
@@ -374,14 +380,8 @@ export interface CreditEntitlementUpdateParams {
|
|
|
374
380
|
*/
|
|
375
381
|
unit?: string | null;
|
|
376
382
|
}
|
|
377
|
-
export interface CreditEntitlementListParams extends DefaultPageNumberPaginationParams {
|
|
378
|
-
/**
|
|
379
|
-
* List deleted credit entitlements
|
|
380
|
-
*/
|
|
381
|
-
deleted?: boolean;
|
|
382
|
-
}
|
|
383
383
|
export declare namespace CreditEntitlements {
|
|
384
|
-
export { type CbbOverageBehavior as CbbOverageBehavior, type CreditEntitlement as CreditEntitlement, type CreditEntitlementsDefaultPageNumberPagination as CreditEntitlementsDefaultPageNumberPagination, type
|
|
385
|
-
export { Balances as Balances, 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
|
|
384
|
+
export { type CbbOverageBehavior as CbbOverageBehavior, type CreditEntitlement as CreditEntitlement, type CreditEntitlementsDefaultPageNumberPagination as CreditEntitlementsDefaultPageNumberPagination, type CreditEntitlementListParams as CreditEntitlementListParams, type CreditEntitlementCreateParams as CreditEntitlementCreateParams, type CreditEntitlementUpdateParams as CreditEntitlementUpdateParams, };
|
|
385
|
+
export { Balances as Balances, 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, };
|
|
386
386
|
}
|
|
387
387
|
//# sourceMappingURL=credit-entitlements.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit-entitlements.d.ts","sourceRoot":"","sources":["../../src/resources/credit-entitlements/credit-entitlements.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,OAAO,mBAAgB;AACnC,OAAO,KAAK,gBAAgB,4BAAyB;AACrD,OAAO,KAAK,WAAW,sBAAmB;AAC1C,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,EAChC,uBAAuB,EACvB,yBAAyB,EACzB,qDAAqD,EACrD,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,QAAQ,EACR,8CAA8C,EAC9C,iBAAiB,EACjB,qBAAqB,EACrB,iDAAiD,EACjD,eAAe,EAChB,sBAAmB;AACpB,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EACL,2BAA2B,EAC3B,KAAK,iCAAiC,EACtC,WAAW,EACZ,iCAA8B;AAE/B,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,kBAAmB,SAAQ,WAAW;IACjD,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IAExE
|
|
1
|
+
{"version":3,"file":"credit-entitlements.d.ts","sourceRoot":"","sources":["../../src/resources/credit-entitlements/credit-entitlements.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,OAAO,mBAAgB;AACnC,OAAO,KAAK,gBAAgB,4BAAyB;AACrD,OAAO,KAAK,WAAW,sBAAmB;AAC1C,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,EAChC,uBAAuB,EACvB,yBAAyB,EACzB,qDAAqD,EACrD,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,QAAQ,EACR,8CAA8C,EAC9C,iBAAiB,EACjB,qBAAqB,EACrB,iDAAiD,EAC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