dodopayments 2.31.2 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +7 -7
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/bin/migration-config.json +187 -0
- package/client.d.mts +9 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -6
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +1 -1
- package/pagination.d.mts +1 -0
- package/pagination.d.mts.map +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.mjs +1 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/addons.d.mts.map +1 -1
- package/resources/addons.d.ts.map +1 -1
- package/resources/addons.mjs.map +1 -1
- package/resources/balances.d.mts.map +1 -1
- package/resources/balances.d.ts.map +1 -1
- package/resources/balances.mjs.map +1 -1
- package/resources/brands.d.mts.map +1 -1
- package/resources/brands.d.ts.map +1 -1
- package/resources/brands.mjs.map +1 -1
- package/resources/checkout-sessions.d.mts +45 -0
- package/resources/checkout-sessions.d.mts.map +1 -1
- package/resources/checkout-sessions.d.ts +45 -0
- package/resources/checkout-sessions.d.ts.map +1 -1
- package/resources/checkout-sessions.mjs.map +1 -1
- package/resources/credit-entitlements/balances.d.mts.map +1 -1
- package/resources/credit-entitlements/balances.d.ts.map +1 -1
- package/resources/credit-entitlements/balances.mjs.map +1 -1
- package/resources/credit-entitlements/credit-entitlements.d.mts.map +1 -1
- package/resources/credit-entitlements/credit-entitlements.d.ts.map +1 -1
- package/resources/credit-entitlements/credit-entitlements.mjs.map +1 -1
- package/resources/credit-entitlements/index.d.mts.map +1 -1
- package/resources/credit-entitlements/index.d.ts.map +1 -1
- package/resources/credit-entitlements/index.mjs.map +1 -1
- package/resources/credit-entitlements.d.mts.map +1 -1
- package/resources/credit-entitlements.d.ts.map +1 -1
- package/resources/credit-entitlements.mjs.map +1 -1
- package/resources/customers/customer-portal.d.mts.map +1 -1
- package/resources/customers/customer-portal.d.ts.map +1 -1
- package/resources/customers/customer-portal.mjs.map +1 -1
- package/resources/customers/customers.d.mts.map +1 -1
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.mts.map +1 -1
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.mjs.map +1 -1
- package/resources/customers/wallets/index.d.mts.map +1 -1
- package/resources/customers/wallets/index.d.ts.map +1 -1
- package/resources/customers/wallets/index.mjs.map +1 -1
- package/resources/customers/wallets/ledger-entries.d.mts.map +1 -1
- package/resources/customers/wallets/ledger-entries.d.ts.map +1 -1
- package/resources/customers/wallets/ledger-entries.mjs.map +1 -1
- package/resources/customers/wallets/wallets.d.mts.map +1 -1
- package/resources/customers/wallets/wallets.d.ts.map +1 -1
- package/resources/customers/wallets/wallets.mjs.map +1 -1
- package/resources/customers/wallets.d.mts.map +1 -1
- package/resources/customers/wallets.d.ts.map +1 -1
- package/resources/customers/wallets.mjs.map +1 -1
- package/resources/customers.d.mts.map +1 -1
- package/resources/customers.d.ts.map +1 -1
- package/resources/customers.mjs.map +1 -1
- package/resources/discounts.d.mts +74 -1
- package/resources/discounts.d.mts.map +1 -1
- package/resources/discounts.d.ts +74 -1
- package/resources/discounts.d.ts.map +1 -1
- package/resources/discounts.mjs.map +1 -1
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts.map +1 -1
- package/resources/disputes.mjs.map +1 -1
- package/resources/entitlements/entitlements.d.mts +8 -3
- package/resources/entitlements/entitlements.d.mts.map +1 -1
- package/resources/entitlements/entitlements.d.ts +8 -3
- package/resources/entitlements/entitlements.d.ts.map +1 -1
- package/resources/entitlements/entitlements.js.map +1 -1
- package/resources/entitlements/entitlements.mjs.map +1 -1
- package/resources/entitlements/files.d.mts.map +1 -1
- package/resources/entitlements/files.d.ts.map +1 -1
- package/resources/entitlements/files.mjs.map +1 -1
- package/resources/entitlements/grants.d.mts.map +1 -1
- package/resources/entitlements/grants.d.ts.map +1 -1
- package/resources/entitlements/grants.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/entitlements/index.js.map +1 -1
- package/resources/entitlements/index.mjs.map +1 -1
- package/resources/entitlements.d.mts.map +1 -1
- package/resources/entitlements.d.ts.map +1 -1
- package/resources/entitlements.mjs.map +1 -1
- package/resources/index.d.mts +4 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invoices/index.d.mts.map +1 -1
- package/resources/invoices/index.d.ts.map +1 -1
- package/resources/invoices/index.mjs.map +1 -1
- package/resources/invoices/invoices.d.mts.map +1 -1
- package/resources/invoices/invoices.d.ts.map +1 -1
- package/resources/invoices/invoices.mjs.map +1 -1
- package/resources/invoices/payments.d.mts +1 -0
- package/resources/invoices/payments.d.mts.map +1 -1
- package/resources/invoices/payments.d.ts +1 -0
- package/resources/invoices/payments.d.ts.map +1 -1
- package/resources/invoices/payments.js +7 -0
- package/resources/invoices/payments.js.map +1 -1
- package/resources/invoices/payments.mjs +7 -0
- package/resources/invoices/payments.mjs.map +1 -1
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.mjs.map +1 -1
- package/resources/license-key-instances.d.mts.map +1 -1
- package/resources/license-key-instances.d.ts.map +1 -1
- package/resources/license-key-instances.mjs.map +1 -1
- package/resources/license-keys.d.mts.map +1 -1
- package/resources/license-keys.d.ts.map +1 -1
- package/resources/license-keys.mjs.map +1 -1
- package/resources/licenses.d.mts.map +1 -1
- package/resources/licenses.d.ts.map +1 -1
- package/resources/licenses.mjs.map +1 -1
- package/resources/meters.d.mts +24 -96
- package/resources/meters.d.mts.map +1 -1
- package/resources/meters.d.ts +24 -96
- package/resources/meters.d.ts.map +1 -1
- package/resources/meters.mjs.map +1 -1
- package/resources/misc.d.mts.map +1 -1
- package/resources/misc.d.ts.map +1 -1
- package/resources/misc.mjs.map +1 -1
- package/resources/payments.d.mts +8 -75
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +8 -75
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.mjs.map +1 -1
- package/resources/payouts/breakup/breakup.d.mts.map +1 -1
- package/resources/payouts/breakup/breakup.d.ts.map +1 -1
- package/resources/payouts/breakup/breakup.mjs.map +1 -1
- package/resources/payouts/breakup/details.d.mts.map +1 -1
- package/resources/payouts/breakup/details.d.ts.map +1 -1
- package/resources/payouts/breakup/details.mjs.map +1 -1
- package/resources/payouts/breakup/index.d.mts.map +1 -1
- package/resources/payouts/breakup/index.d.ts.map +1 -1
- package/resources/payouts/breakup/index.mjs.map +1 -1
- package/resources/payouts/breakup.d.mts.map +1 -1
- package/resources/payouts/breakup.d.ts.map +1 -1
- package/resources/payouts/breakup.mjs.map +1 -1
- package/resources/payouts/index.d.mts.map +1 -1
- package/resources/payouts/index.d.ts.map +1 -1
- package/resources/payouts/index.mjs.map +1 -1
- package/resources/payouts/payouts.d.mts.map +1 -1
- package/resources/payouts/payouts.d.ts.map +1 -1
- package/resources/payouts/payouts.mjs.map +1 -1
- package/resources/payouts.d.mts.map +1 -1
- package/resources/payouts.d.ts.map +1 -1
- package/resources/payouts.mjs.map +1 -1
- package/resources/product-collections/groups/groups.d.mts +88 -0
- package/resources/product-collections/groups/groups.d.mts.map +1 -0
- package/resources/product-collections/groups/groups.d.ts +88 -0
- package/resources/product-collections/groups/groups.d.ts.map +1 -0
- package/resources/product-collections/groups/groups.js +37 -0
- package/resources/product-collections/groups/groups.js.map +1 -0
- package/resources/product-collections/groups/groups.mjs +32 -0
- package/resources/product-collections/groups/groups.mjs.map +1 -0
- package/resources/product-collections/groups/index.d.mts +3 -0
- package/resources/product-collections/groups/index.d.mts.map +1 -0
- package/resources/product-collections/groups/index.d.ts +3 -0
- package/resources/product-collections/groups/index.d.ts.map +1 -0
- package/resources/product-collections/groups/index.js +9 -0
- package/resources/product-collections/groups/index.js.map +1 -0
- package/resources/product-collections/groups/index.mjs +4 -0
- package/resources/product-collections/groups/index.mjs.map +1 -0
- package/resources/product-collections/groups/items.d.mts +78 -0
- package/resources/product-collections/groups/items.d.mts.map +1 -0
- package/resources/product-collections/groups/items.d.ts +78 -0
- package/resources/product-collections/groups/items.d.ts.map +1 -0
- package/resources/product-collections/groups/items.js +30 -0
- package/resources/product-collections/groups/items.js.map +1 -0
- package/resources/product-collections/groups/items.mjs +26 -0
- package/resources/product-collections/groups/items.mjs.map +1 -0
- package/resources/product-collections/groups.d.mts +2 -0
- package/resources/product-collections/groups.d.mts.map +1 -0
- package/resources/product-collections/groups.d.ts +2 -0
- package/resources/product-collections/groups.d.ts.map +1 -0
- package/resources/product-collections/groups.js +6 -0
- package/resources/product-collections/groups.js.map +1 -0
- package/resources/product-collections/groups.mjs +3 -0
- package/resources/product-collections/groups.mjs.map +1 -0
- package/resources/product-collections/index.d.mts +3 -0
- package/resources/product-collections/index.d.mts.map +1 -0
- package/resources/product-collections/index.d.ts +3 -0
- package/resources/product-collections/index.d.ts.map +1 -0
- package/resources/product-collections/index.js +9 -0
- package/resources/product-collections/index.js.map +1 -0
- package/resources/product-collections/index.mjs +4 -0
- package/resources/product-collections/index.mjs.map +1 -0
- package/resources/product-collections/product-collections.d.mts +166 -0
- package/resources/product-collections/product-collections.d.mts.map +1 -0
- package/resources/product-collections/product-collections.d.ts +166 -0
- package/resources/product-collections/product-collections.d.ts.map +1 -0
- package/resources/product-collections/product-collections.js +49 -0
- package/resources/product-collections/product-collections.js.map +1 -0
- package/resources/product-collections/product-collections.mjs +44 -0
- package/resources/product-collections/product-collections.mjs.map +1 -0
- package/resources/product-collections.d.mts +2 -0
- package/resources/product-collections.d.mts.map +1 -0
- package/resources/product-collections.d.ts +2 -0
- package/resources/product-collections.d.ts.map +1 -0
- package/resources/product-collections.js +6 -0
- package/resources/product-collections.js.map +1 -0
- package/resources/product-collections.mjs +3 -0
- package/resources/product-collections.mjs.map +1 -0
- package/resources/products/images.d.mts.map +1 -1
- package/resources/products/images.d.ts.map +1 -1
- package/resources/products/images.mjs.map +1 -1
- package/resources/products/index.d.mts.map +1 -1
- package/resources/products/index.d.ts.map +1 -1
- package/resources/products/index.mjs.map +1 -1
- package/resources/products/products.d.mts.map +1 -1
- package/resources/products/products.d.ts.map +1 -1
- package/resources/products/products.mjs.map +1 -1
- package/resources/products/short-links.d.mts.map +1 -1
- package/resources/products/short-links.d.ts.map +1 -1
- package/resources/products/short-links.mjs.map +1 -1
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts.map +1 -1
- package/resources/products.mjs.map +1 -1
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.mjs.map +1 -1
- package/resources/subscriptions.d.mts +28 -78
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +28 -78
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +3 -2
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +3 -2
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/usage-events.d.mts.map +1 -1
- package/resources/usage-events.d.ts.map +1 -1
- package/resources/usage-events.mjs.map +1 -1
- package/resources/webhook-events.d.mts +1 -1
- package/resources/webhook-events.d.mts.map +1 -1
- package/resources/webhook-events.d.ts +1 -1
- package/resources/webhook-events.d.ts.map +1 -1
- package/resources/webhook-events.mjs.map +1 -1
- package/resources/webhooks/headers.d.mts.map +1 -1
- package/resources/webhooks/headers.d.ts.map +1 -1
- package/resources/webhooks/headers.mjs.map +1 -1
- package/resources/webhooks/index.d.mts.map +1 -1
- package/resources/webhooks/index.d.ts.map +1 -1
- package/resources/webhooks/index.mjs.map +1 -1
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +33 -0
- package/src/resources/checkout-sessions.ts +52 -0
- package/src/resources/discounts.ts +88 -0
- package/src/resources/entitlements/entitlements.ts +9 -2
- package/src/resources/entitlements/index.ts +1 -0
- package/src/resources/index.ts +15 -0
- package/src/resources/invoices/payments.ts +8 -0
- package/src/resources/meters.ts +28 -113
- package/src/resources/payments.ts +9 -88
- package/src/resources/product-collections/groups/groups.ts +156 -0
- package/src/resources/product-collections/groups/index.ts +19 -0
- package/src/resources/product-collections/groups/items.ts +135 -0
- package/src/resources/product-collections/groups.ts +3 -0
- package/src/resources/product-collections/index.ts +23 -0
- package/src/resources/product-collections/product-collections.ts +278 -0
- package/src/resources/product-collections.ts +3 -0
- package/src/resources/subscriptions.ts +35 -96
- package/src/resources/webhook-events.ts +1 -5
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/client.ts
CHANGED
|
@@ -68,6 +68,7 @@ import {
|
|
|
68
68
|
import {
|
|
69
69
|
Discount,
|
|
70
70
|
DiscountCreateParams,
|
|
71
|
+
DiscountDetail,
|
|
71
72
|
DiscountListParams,
|
|
72
73
|
DiscountType,
|
|
73
74
|
DiscountUpdateParams,
|
|
@@ -111,6 +112,7 @@ import {
|
|
|
111
112
|
import {
|
|
112
113
|
Conjunction,
|
|
113
114
|
FilterOperator,
|
|
115
|
+
FilterType,
|
|
114
116
|
Meter,
|
|
115
117
|
MeterAggregation,
|
|
116
118
|
MeterCreateParams,
|
|
@@ -221,6 +223,7 @@ import {
|
|
|
221
223
|
EntitlementUpdateParams,
|
|
222
224
|
Entitlements,
|
|
223
225
|
EntitlementsDefaultPageNumberPagination,
|
|
226
|
+
GitHubPermission,
|
|
224
227
|
IntegrationConfig,
|
|
225
228
|
IntegrationConfigResponse,
|
|
226
229
|
} from './resources/entitlements/entitlements';
|
|
@@ -231,6 +234,18 @@ import {
|
|
|
231
234
|
PayoutListResponsesDefaultPageNumberPagination,
|
|
232
235
|
Payouts,
|
|
233
236
|
} from './resources/payouts/payouts';
|
|
237
|
+
import {
|
|
238
|
+
ProductCollection,
|
|
239
|
+
ProductCollectionCreateParams,
|
|
240
|
+
ProductCollectionListParams,
|
|
241
|
+
ProductCollectionListResponse,
|
|
242
|
+
ProductCollectionListResponsesDefaultPageNumberPagination,
|
|
243
|
+
ProductCollectionUnarchiveResponse,
|
|
244
|
+
ProductCollectionUpdateImagesParams,
|
|
245
|
+
ProductCollectionUpdateImagesResponse,
|
|
246
|
+
ProductCollectionUpdateParams,
|
|
247
|
+
ProductCollections,
|
|
248
|
+
} from './resources/product-collections/product-collections';
|
|
234
249
|
import {
|
|
235
250
|
AddMeterToPrice,
|
|
236
251
|
AttachCreditEntitlement,
|
|
@@ -1096,6 +1111,7 @@ export class DodoPayments {
|
|
|
1096
1111
|
balances: API.Balances = new API.Balances(this);
|
|
1097
1112
|
creditEntitlements: API.CreditEntitlements = new API.CreditEntitlements(this);
|
|
1098
1113
|
entitlements: API.Entitlements = new API.Entitlements(this);
|
|
1114
|
+
productCollections: API.ProductCollections = new API.ProductCollections(this);
|
|
1099
1115
|
}
|
|
1100
1116
|
|
|
1101
1117
|
DodoPayments.CheckoutSessions = CheckoutSessions;
|
|
@@ -1121,6 +1137,7 @@ DodoPayments.Meters = Meters;
|
|
|
1121
1137
|
DodoPayments.Balances = Balances;
|
|
1122
1138
|
DodoPayments.CreditEntitlements = CreditEntitlements;
|
|
1123
1139
|
DodoPayments.Entitlements = Entitlements;
|
|
1140
|
+
DodoPayments.ProductCollections = ProductCollections;
|
|
1124
1141
|
|
|
1125
1142
|
export declare namespace DodoPayments {
|
|
1126
1143
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -1313,6 +1330,7 @@ export declare namespace DodoPayments {
|
|
|
1313
1330
|
export {
|
|
1314
1331
|
Discounts as Discounts,
|
|
1315
1332
|
type Discount as Discount,
|
|
1333
|
+
type DiscountDetail as DiscountDetail,
|
|
1316
1334
|
type DiscountType as DiscountType,
|
|
1317
1335
|
type DiscountsDefaultPageNumberPagination as DiscountsDefaultPageNumberPagination,
|
|
1318
1336
|
type DiscountCreateParams as DiscountCreateParams,
|
|
@@ -1410,6 +1428,7 @@ export declare namespace DodoPayments {
|
|
|
1410
1428
|
Meters as Meters,
|
|
1411
1429
|
type Conjunction as Conjunction,
|
|
1412
1430
|
type FilterOperator as FilterOperator,
|
|
1431
|
+
type FilterType as FilterType,
|
|
1413
1432
|
type Meter as Meter,
|
|
1414
1433
|
type MeterAggregation as MeterAggregation,
|
|
1415
1434
|
type MeterFilter as MeterFilter,
|
|
@@ -1439,6 +1458,7 @@ export declare namespace DodoPayments {
|
|
|
1439
1458
|
Entitlements as Entitlements,
|
|
1440
1459
|
type Entitlement as Entitlement,
|
|
1441
1460
|
type EntitlementIntegrationType as EntitlementIntegrationType,
|
|
1461
|
+
type GitHubPermission as GitHubPermission,
|
|
1442
1462
|
type IntegrationConfig as IntegrationConfig,
|
|
1443
1463
|
type IntegrationConfigResponse as IntegrationConfigResponse,
|
|
1444
1464
|
type EntitlementsDefaultPageNumberPagination as EntitlementsDefaultPageNumberPagination,
|
|
@@ -1446,4 +1466,17 @@ export declare namespace DodoPayments {
|
|
|
1446
1466
|
type EntitlementUpdateParams as EntitlementUpdateParams,
|
|
1447
1467
|
type EntitlementListParams as EntitlementListParams,
|
|
1448
1468
|
};
|
|
1469
|
+
|
|
1470
|
+
export {
|
|
1471
|
+
ProductCollections as ProductCollections,
|
|
1472
|
+
type ProductCollection as ProductCollection,
|
|
1473
|
+
type ProductCollectionListResponse as ProductCollectionListResponse,
|
|
1474
|
+
type ProductCollectionUnarchiveResponse as ProductCollectionUnarchiveResponse,
|
|
1475
|
+
type ProductCollectionUpdateImagesResponse as ProductCollectionUpdateImagesResponse,
|
|
1476
|
+
type ProductCollectionListResponsesDefaultPageNumberPagination as ProductCollectionListResponsesDefaultPageNumberPagination,
|
|
1477
|
+
type ProductCollectionCreateParams as ProductCollectionCreateParams,
|
|
1478
|
+
type ProductCollectionUpdateParams as ProductCollectionUpdateParams,
|
|
1479
|
+
type ProductCollectionListParams as ProductCollectionListParams,
|
|
1480
|
+
type ProductCollectionUpdateImagesParams as ProductCollectionUpdateImagesParams,
|
|
1481
|
+
};
|
|
1449
1482
|
}
|
|
@@ -93,6 +93,17 @@ export interface CheckoutSessionFlags {
|
|
|
93
93
|
*/
|
|
94
94
|
allow_currency_selection?: boolean;
|
|
95
95
|
|
|
96
|
+
/**
|
|
97
|
+
* If true, the customer can supply or edit the business name associated with the
|
|
98
|
+
* tax id during checkout. Works independently of `allow_customer_editing_tax_id` —
|
|
99
|
+
* either flag (or `allow_tax_id`) is sufficient to let the customer override the
|
|
100
|
+
* session's business name. Typically set together with
|
|
101
|
+
* `allow_customer_editing_tax_id`.
|
|
102
|
+
*
|
|
103
|
+
* Default is false
|
|
104
|
+
*/
|
|
105
|
+
allow_customer_editing_business_name?: boolean;
|
|
106
|
+
|
|
96
107
|
allow_customer_editing_city?: boolean;
|
|
97
108
|
|
|
98
109
|
allow_customer_editing_country?: boolean;
|
|
@@ -199,6 +210,13 @@ export interface CheckoutSessionRequest {
|
|
|
199
210
|
*/
|
|
200
211
|
customer?: PaymentsAPI.CustomerRequest | null;
|
|
201
212
|
|
|
213
|
+
/**
|
|
214
|
+
* Optional business / legal name associated with the tax id. When provided
|
|
215
|
+
* together with a valid tax id for a B2B purchase, this name is rendered on the
|
|
216
|
+
* invoice instead of the customer's personal name.
|
|
217
|
+
*/
|
|
218
|
+
customer_business_name?: string | null;
|
|
219
|
+
|
|
202
220
|
/**
|
|
203
221
|
* Customization for the checkout session page
|
|
204
222
|
*/
|
|
@@ -289,6 +307,26 @@ export interface CheckoutSessionResponse {
|
|
|
289
307
|
* Checkout url (None when payment_method_id is provided)
|
|
290
308
|
*/
|
|
291
309
|
checkout_url?: string | null;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Client secret used to load the Dodo Payments checkout SDK. Returned when
|
|
313
|
+
* `confirm: true` was passed and a PaymentIntent was created at session-creation
|
|
314
|
+
* time. `None` otherwise.
|
|
315
|
+
*/
|
|
316
|
+
client_secret?: string | null;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Underlying payment id when `confirm: true` was passed and a PaymentIntent was
|
|
320
|
+
* created at session-creation time. `None` otherwise.
|
|
321
|
+
*/
|
|
322
|
+
payment_id?: string | null;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Publishable key for the Dodo Payments checkout SDK. Returned when
|
|
326
|
+
* `confirm: true` was passed and a PaymentIntent was created at session-creation
|
|
327
|
+
* time. `None` otherwise.
|
|
328
|
+
*/
|
|
329
|
+
publishable_key?: string | null;
|
|
292
330
|
}
|
|
293
331
|
|
|
294
332
|
export interface CheckoutSessionStatus {
|
|
@@ -867,6 +905,13 @@ export interface CheckoutSessionCreateParams {
|
|
|
867
905
|
*/
|
|
868
906
|
customer?: PaymentsAPI.CustomerRequest | null;
|
|
869
907
|
|
|
908
|
+
/**
|
|
909
|
+
* Optional business / legal name associated with the tax id. When provided
|
|
910
|
+
* together with a valid tax id for a B2B purchase, this name is rendered on the
|
|
911
|
+
* invoice instead of the customer's personal name.
|
|
912
|
+
*/
|
|
913
|
+
customer_business_name?: string | null;
|
|
914
|
+
|
|
870
915
|
/**
|
|
871
916
|
* Customization for the checkout session page
|
|
872
917
|
*/
|
|
@@ -992,6 +1037,13 @@ export interface CheckoutSessionPreviewParams {
|
|
|
992
1037
|
*/
|
|
993
1038
|
customer?: PaymentsAPI.CustomerRequest | null;
|
|
994
1039
|
|
|
1040
|
+
/**
|
|
1041
|
+
* Optional business / legal name associated with the tax id. When provided
|
|
1042
|
+
* together with a valid tax id for a B2B purchase, this name is rendered on the
|
|
1043
|
+
* invoice instead of the customer's personal name.
|
|
1044
|
+
*/
|
|
1045
|
+
customer_business_name?: string | null;
|
|
1046
|
+
|
|
995
1047
|
/**
|
|
996
1048
|
* Customization for the checkout session page
|
|
997
1049
|
*/
|
|
@@ -145,6 +145,93 @@ export interface Discount {
|
|
|
145
145
|
usage_limit?: number | null;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Response struct for a discount with its position in a stack and optional
|
|
150
|
+
* cycle-tracking information (for subscriptions).
|
|
151
|
+
*/
|
|
152
|
+
export interface DiscountDetail {
|
|
153
|
+
/**
|
|
154
|
+
* The discount amount (basis points for percentage, USD cents for flat)
|
|
155
|
+
*/
|
|
156
|
+
amount: number;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The business this discount belongs to
|
|
160
|
+
*/
|
|
161
|
+
business_id: string;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* The discount code
|
|
165
|
+
*/
|
|
166
|
+
code: string;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Timestamp when the discount was created
|
|
170
|
+
*/
|
|
171
|
+
created_at: string;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The unique discount ID
|
|
175
|
+
*/
|
|
176
|
+
discount_id: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Additional metadata
|
|
180
|
+
*/
|
|
181
|
+
metadata: { [key: string]: string };
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Position of this discount in the stack (0-based)
|
|
185
|
+
*/
|
|
186
|
+
position: number;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Whether this discount should be preserved when a subscription changes plans
|
|
190
|
+
*/
|
|
191
|
+
preserve_on_plan_change: boolean;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* List of product IDs to which this discount is restricted
|
|
195
|
+
*/
|
|
196
|
+
restricted_to: Array<string>;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* How many times this discount has been used
|
|
200
|
+
*/
|
|
201
|
+
times_used: number;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* The type of discount
|
|
205
|
+
*/
|
|
206
|
+
type: DiscountType;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Remaining billing cycles for this discount on this subscription (None for
|
|
210
|
+
* one-time payments)
|
|
211
|
+
*/
|
|
212
|
+
cycles_remaining?: number | null;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Optional date/time after which discount is expired
|
|
216
|
+
*/
|
|
217
|
+
expires_at?: string | null;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Name for the Discount
|
|
221
|
+
*/
|
|
222
|
+
name?: string | null;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Number of subscription billing cycles this discount is valid for
|
|
226
|
+
*/
|
|
227
|
+
subscription_cycles?: number | null;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Usage limit for this discount, if any
|
|
231
|
+
*/
|
|
232
|
+
usage_limit?: number | null;
|
|
233
|
+
}
|
|
234
|
+
|
|
148
235
|
export type DiscountType = 'percentage';
|
|
149
236
|
|
|
150
237
|
export interface DiscountCreateParams {
|
|
@@ -287,6 +374,7 @@ export interface DiscountListParams extends DefaultPageNumberPaginationParams {
|
|
|
287
374
|
export declare namespace Discounts {
|
|
288
375
|
export {
|
|
289
376
|
type Discount as Discount,
|
|
377
|
+
type DiscountDetail as DiscountDetail,
|
|
290
378
|
type DiscountType as DiscountType,
|
|
291
379
|
type DiscountsDefaultPageNumberPagination as DiscountsDefaultPageNumberPagination,
|
|
292
380
|
type DiscountCreateParams as DiscountCreateParams,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as EntitlementsAPI from './entitlements';
|
|
4
5
|
import * as SubscriptionsAPI from '../subscriptions';
|
|
5
6
|
import * as FilesAPI from './files';
|
|
6
7
|
import { FileDeleteParams, FileUploadResponse, Files } from './files';
|
|
@@ -142,6 +143,11 @@ export type EntitlementIntegrationType =
|
|
|
142
143
|
| 'digital_files'
|
|
143
144
|
| 'license_key';
|
|
144
145
|
|
|
146
|
+
/**
|
|
147
|
+
* Repository permission to grant on a `github` entitlement.
|
|
148
|
+
*/
|
|
149
|
+
export type GitHubPermission = 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
|
|
150
|
+
|
|
145
151
|
/**
|
|
146
152
|
* Integration-specific configuration supplied when creating or updating an
|
|
147
153
|
* entitlement. The shape required matches the entitlement's `integration_type`.
|
|
@@ -161,7 +167,7 @@ export namespace IntegrationConfig {
|
|
|
161
167
|
/**
|
|
162
168
|
* Permission to grant on the repository.
|
|
163
169
|
*/
|
|
164
|
-
permission:
|
|
170
|
+
permission: EntitlementsAPI.GitHubPermission;
|
|
165
171
|
|
|
166
172
|
/**
|
|
167
173
|
* Repository or organisation slug to grant access to.
|
|
@@ -288,7 +294,7 @@ export namespace IntegrationConfigResponse {
|
|
|
288
294
|
/**
|
|
289
295
|
* Permission to grant on the repository.
|
|
290
296
|
*/
|
|
291
|
-
permission:
|
|
297
|
+
permission: EntitlementsAPI.GitHubPermission;
|
|
292
298
|
|
|
293
299
|
/**
|
|
294
300
|
* Repository or organisation slug to grant access to.
|
|
@@ -494,6 +500,7 @@ export declare namespace Entitlements {
|
|
|
494
500
|
export {
|
|
495
501
|
type Entitlement as Entitlement,
|
|
496
502
|
type EntitlementIntegrationType as EntitlementIntegrationType,
|
|
503
|
+
type GitHubPermission as GitHubPermission,
|
|
497
504
|
type IntegrationConfig as IntegrationConfig,
|
|
498
505
|
type IntegrationConfigResponse as IntegrationConfigResponse,
|
|
499
506
|
type EntitlementsDefaultPageNumberPagination as EntitlementsDefaultPageNumberPagination,
|
package/src/resources/index.ts
CHANGED
|
@@ -65,6 +65,7 @@ export {
|
|
|
65
65
|
export {
|
|
66
66
|
Discounts,
|
|
67
67
|
type Discount,
|
|
68
|
+
type DiscountDetail,
|
|
68
69
|
type DiscountType,
|
|
69
70
|
type DiscountCreateParams,
|
|
70
71
|
type DiscountUpdateParams,
|
|
@@ -85,6 +86,7 @@ export {
|
|
|
85
86
|
Entitlements,
|
|
86
87
|
type Entitlement,
|
|
87
88
|
type EntitlementIntegrationType,
|
|
89
|
+
type GitHubPermission,
|
|
88
90
|
type IntegrationConfig,
|
|
89
91
|
type IntegrationConfigResponse,
|
|
90
92
|
type EntitlementCreateParams,
|
|
@@ -121,6 +123,7 @@ export {
|
|
|
121
123
|
Meters,
|
|
122
124
|
type Conjunction,
|
|
123
125
|
type FilterOperator,
|
|
126
|
+
type FilterType,
|
|
124
127
|
type Meter,
|
|
125
128
|
type MeterAggregation,
|
|
126
129
|
type MeterFilter,
|
|
@@ -164,6 +167,18 @@ export {
|
|
|
164
167
|
type PayoutListParams,
|
|
165
168
|
type PayoutListResponsesDefaultPageNumberPagination,
|
|
166
169
|
} from './payouts/payouts';
|
|
170
|
+
export {
|
|
171
|
+
ProductCollections,
|
|
172
|
+
type ProductCollection,
|
|
173
|
+
type ProductCollectionListResponse,
|
|
174
|
+
type ProductCollectionUnarchiveResponse,
|
|
175
|
+
type ProductCollectionUpdateImagesResponse,
|
|
176
|
+
type ProductCollectionCreateParams,
|
|
177
|
+
type ProductCollectionUpdateParams,
|
|
178
|
+
type ProductCollectionListParams,
|
|
179
|
+
type ProductCollectionUpdateImagesParams,
|
|
180
|
+
type ProductCollectionListResponsesDefaultPageNumberPagination,
|
|
181
|
+
} from './product-collections/product-collections';
|
|
167
182
|
export {
|
|
168
183
|
Products,
|
|
169
184
|
type AddMeterToPrice,
|
|
@@ -15,6 +15,14 @@ export class Payments extends APIResource {
|
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
retrievePayout(payoutID: string, options?: RequestOptions): APIPromise<Response> {
|
|
19
|
+
return this._client.get(path`/invoices/payouts/${payoutID}`, {
|
|
20
|
+
...options,
|
|
21
|
+
headers: buildHeaders([{ Accept: 'application/pdf' }, options?.headers]),
|
|
22
|
+
__binaryResponse: true,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
18
26
|
retrieveRefund(refundID: string, options?: RequestOptions): APIPromise<Response> {
|
|
19
27
|
return this._client.get(path`/invoices/refunds/${refundID}`, {
|
|
20
28
|
...options,
|
package/src/resources/meters.ts
CHANGED
|
@@ -57,6 +57,32 @@ export type FilterOperator =
|
|
|
57
57
|
| 'contains'
|
|
58
58
|
| 'does_not_contain';
|
|
59
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Filter clauses — either a flat list of `MeterFilterCondition`s or a list of
|
|
62
|
+
* nested `MeterFilter`s. Up to 3 levels of nesting are accepted; the limit is
|
|
63
|
+
* enforced at runtime.
|
|
64
|
+
*/
|
|
65
|
+
export type FilterType = Array<FilterType.MeterFilterConditionList> | Array<MeterFilter>;
|
|
66
|
+
|
|
67
|
+
export namespace FilterType {
|
|
68
|
+
export interface MeterFilterConditionList {
|
|
69
|
+
/**
|
|
70
|
+
* Filter key to apply
|
|
71
|
+
*/
|
|
72
|
+
key: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Filter operator
|
|
76
|
+
*/
|
|
77
|
+
operator: MetersAPI.FilterOperator;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Filter value - can be string, number, or boolean
|
|
81
|
+
*/
|
|
82
|
+
value: string | number | boolean;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
60
86
|
export interface Meter {
|
|
61
87
|
id: string;
|
|
62
88
|
|
|
@@ -112,7 +138,7 @@ export interface MeterFilter {
|
|
|
112
138
|
* Filter clauses - can be direct conditions or nested filters (up to 3 levels
|
|
113
139
|
* deep)
|
|
114
140
|
*/
|
|
115
|
-
clauses:
|
|
141
|
+
clauses: FilterType;
|
|
116
142
|
|
|
117
143
|
/**
|
|
118
144
|
* Logical conjunction to apply between clauses (and/or)
|
|
@@ -120,118 +146,6 @@ export interface MeterFilter {
|
|
|
120
146
|
conjunction: Conjunction;
|
|
121
147
|
}
|
|
122
148
|
|
|
123
|
-
export namespace MeterFilter {
|
|
124
|
-
/**
|
|
125
|
-
* Filter condition with key, operator, and value
|
|
126
|
-
*/
|
|
127
|
-
export interface DirectFilterCondition {
|
|
128
|
-
/**
|
|
129
|
-
* Filter key to apply
|
|
130
|
-
*/
|
|
131
|
-
key: string;
|
|
132
|
-
|
|
133
|
-
operator: MetersAPI.FilterOperator;
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Filter value - can be string, number, or boolean
|
|
137
|
-
*/
|
|
138
|
-
value: string | number | boolean;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Level 1 nested filter - can contain Level 2 filters
|
|
143
|
-
*/
|
|
144
|
-
export interface NestedMeterFilter {
|
|
145
|
-
/**
|
|
146
|
-
* Level 1: Can be conditions or nested filters (2 more levels allowed)
|
|
147
|
-
*/
|
|
148
|
-
clauses: Array<NestedMeterFilter.Level1FilterCondition> | Array<NestedMeterFilter.Level1NestedFilter>;
|
|
149
|
-
|
|
150
|
-
conjunction: MetersAPI.Conjunction;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export namespace NestedMeterFilter {
|
|
154
|
-
/**
|
|
155
|
-
* Filter condition with key, operator, and value
|
|
156
|
-
*/
|
|
157
|
-
export interface Level1FilterCondition {
|
|
158
|
-
/**
|
|
159
|
-
* Filter key to apply
|
|
160
|
-
*/
|
|
161
|
-
key: string;
|
|
162
|
-
|
|
163
|
-
operator: MetersAPI.FilterOperator;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Filter value - can be string, number, or boolean
|
|
167
|
-
*/
|
|
168
|
-
value: string | number | boolean;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Level 2 nested filter
|
|
173
|
-
*/
|
|
174
|
-
export interface Level1NestedFilter {
|
|
175
|
-
/**
|
|
176
|
-
* Level 2: Can be conditions or nested filters (1 more level allowed)
|
|
177
|
-
*/
|
|
178
|
-
clauses: Array<Level1NestedFilter.Level2FilterCondition> | Array<Level1NestedFilter.Level2NestedFilter>;
|
|
179
|
-
|
|
180
|
-
conjunction: MetersAPI.Conjunction;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export namespace Level1NestedFilter {
|
|
184
|
-
/**
|
|
185
|
-
* Filter condition with key, operator, and value
|
|
186
|
-
*/
|
|
187
|
-
export interface Level2FilterCondition {
|
|
188
|
-
/**
|
|
189
|
-
* Filter key to apply
|
|
190
|
-
*/
|
|
191
|
-
key: string;
|
|
192
|
-
|
|
193
|
-
operator: MetersAPI.FilterOperator;
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Filter value - can be string, number, or boolean
|
|
197
|
-
*/
|
|
198
|
-
value: string | number | boolean;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Level 3 nested filter (final nesting level)
|
|
203
|
-
*/
|
|
204
|
-
export interface Level2NestedFilter {
|
|
205
|
-
/**
|
|
206
|
-
* Level 3: Filter conditions only (max depth reached)
|
|
207
|
-
*/
|
|
208
|
-
clauses: Array<Level2NestedFilter.Clause>;
|
|
209
|
-
|
|
210
|
-
conjunction: MetersAPI.Conjunction;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export namespace Level2NestedFilter {
|
|
214
|
-
/**
|
|
215
|
-
* Filter condition with key, operator, and value
|
|
216
|
-
*/
|
|
217
|
-
export interface Clause {
|
|
218
|
-
/**
|
|
219
|
-
* Filter key to apply
|
|
220
|
-
*/
|
|
221
|
-
key: string;
|
|
222
|
-
|
|
223
|
-
operator: MetersAPI.FilterOperator;
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Filter value - can be string, number, or boolean
|
|
227
|
-
*/
|
|
228
|
-
value: string | number | boolean;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
149
|
export interface MeterCreateParams {
|
|
236
150
|
/**
|
|
237
151
|
* Aggregation configuration for the meter
|
|
@@ -275,6 +189,7 @@ export declare namespace Meters {
|
|
|
275
189
|
export {
|
|
276
190
|
type Conjunction as Conjunction,
|
|
277
191
|
type FilterOperator as FilterOperator,
|
|
192
|
+
type FilterType as FilterType,
|
|
278
193
|
type Meter as Meter,
|
|
279
194
|
type MeterAggregation as MeterAggregation,
|
|
280
195
|
type MeterFilter as MeterFilter,
|
|
@@ -301,7 +301,7 @@ export interface Payment {
|
|
|
301
301
|
/**
|
|
302
302
|
* All stacked discounts applied, ordered by position
|
|
303
303
|
*/
|
|
304
|
-
discounts?: Array<
|
|
304
|
+
discounts?: Array<DiscountsAPI.DiscountDetail> | null;
|
|
305
305
|
|
|
306
306
|
/**
|
|
307
307
|
* An error code if the payment failed
|
|
@@ -378,93 +378,6 @@ export interface Payment {
|
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
export namespace Payment {
|
|
381
|
-
/**
|
|
382
|
-
* Response struct for a discount with its position in a stack and optional
|
|
383
|
-
* cycle-tracking information (for subscriptions).
|
|
384
|
-
*/
|
|
385
|
-
export interface Discount {
|
|
386
|
-
/**
|
|
387
|
-
* The discount amount (basis points for percentage, USD cents for flat)
|
|
388
|
-
*/
|
|
389
|
-
amount: number;
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* The business this discount belongs to
|
|
393
|
-
*/
|
|
394
|
-
business_id: string;
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* The discount code
|
|
398
|
-
*/
|
|
399
|
-
code: string;
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* Timestamp when the discount was created
|
|
403
|
-
*/
|
|
404
|
-
created_at: string;
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* The unique discount ID
|
|
408
|
-
*/
|
|
409
|
-
discount_id: string;
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* Additional metadata
|
|
413
|
-
*/
|
|
414
|
-
metadata: { [key: string]: string };
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* Position of this discount in the stack (0-based)
|
|
418
|
-
*/
|
|
419
|
-
position: number;
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Whether this discount should be preserved when a subscription changes plans
|
|
423
|
-
*/
|
|
424
|
-
preserve_on_plan_change: boolean;
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
* List of product IDs to which this discount is restricted
|
|
428
|
-
*/
|
|
429
|
-
restricted_to: Array<string>;
|
|
430
|
-
|
|
431
|
-
/**
|
|
432
|
-
* How many times this discount has been used
|
|
433
|
-
*/
|
|
434
|
-
times_used: number;
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* The type of discount
|
|
438
|
-
*/
|
|
439
|
-
type: DiscountsAPI.DiscountType;
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* Remaining billing cycles for this discount on this subscription (None for
|
|
443
|
-
* one-time payments)
|
|
444
|
-
*/
|
|
445
|
-
cycles_remaining?: number | null;
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
* Optional date/time after which discount is expired
|
|
449
|
-
*/
|
|
450
|
-
expires_at?: string | null;
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* Name for the Discount
|
|
454
|
-
*/
|
|
455
|
-
name?: string | null;
|
|
456
|
-
|
|
457
|
-
/**
|
|
458
|
-
* Number of subscription billing cycles this discount is valid for
|
|
459
|
-
*/
|
|
460
|
-
subscription_cycles?: number | null;
|
|
461
|
-
|
|
462
|
-
/**
|
|
463
|
-
* Usage limit for this discount, if any
|
|
464
|
-
*/
|
|
465
|
-
usage_limit?: number | null;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
381
|
export interface ProductCart {
|
|
469
382
|
product_id: string;
|
|
470
383
|
|
|
@@ -555,6 +468,7 @@ export type PaymentMethodTypes =
|
|
|
555
468
|
| 'sepa'
|
|
556
469
|
| 'sepa_bank_transfer'
|
|
557
470
|
| 'sofort'
|
|
471
|
+
| 'sunbit'
|
|
558
472
|
| 'swish'
|
|
559
473
|
| 'touch_n_go'
|
|
560
474
|
| 'trustly'
|
|
@@ -794,6 +708,13 @@ export interface PaymentCreateParams {
|
|
|
794
708
|
*/
|
|
795
709
|
billing_currency?: MiscAPI.Currency | null;
|
|
796
710
|
|
|
711
|
+
/**
|
|
712
|
+
* Optional business / legal name associated with the tax id. When provided
|
|
713
|
+
* together with a valid tax id for a B2B purchase, this name is rendered on the
|
|
714
|
+
* invoice instead of the customer's personal name.
|
|
715
|
+
*/
|
|
716
|
+
customer_business_name?: string | null;
|
|
717
|
+
|
|
797
718
|
/**
|
|
798
719
|
* @deprecated Use `discount_id` instead.
|
|
799
720
|
*/
|