diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 05aef7cb..4cce3762 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.55.0" + ".": "4.56.0" } diff --git a/.stats.yml b/.stats.yml index 8070692c..4de92a98 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 103 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-43a4d1d907fd25faa99fef58ba7afb3dd39fae36f955b29bfe27b4bfdaa0ee54.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-2824cb456b8e3a7ce1ea34aa37a2c8e63d5b70425a5863502ffe1e1b1ef7efaf.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 757cb530..f1af1922 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.56.0 (2025-02-11) + +Full Changelog: [v4.55.0...v4.56.0](https://github.com/orbcorp/orb-node/compare/v4.55.0...v4.56.0) + +### Features + +* **api:** api update ([#503](https://github.com/orbcorp/orb-node/issues/503)) ([adb02a1](https://github.com/orbcorp/orb-node/commit/adb02a1782cfd36dfbe3ea308df59a4ce3c93482)) + ## 4.55.0 (2025-02-07) Full Changelog: [v4.54.0...v4.55.0](https://github.com/orbcorp/orb-node/compare/v4.54.0...v4.55.0) diff --git a/package.json b/package.json index 02288de6..124032c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orb-billing", - "version": "4.55.0", + "version": "4.56.0", "description": "The official TypeScript library for the Orb API", "author": "Orb ", "types": "dist/index.d.ts", diff --git a/src/resources/customers/balance-transactions.ts b/src/resources/customers/balance-transactions.ts index 43cd5cb7..c01d87fd 100644 --- a/src/resources/customers/balance-transactions.ts +++ b/src/resources/customers/balance-transactions.ts @@ -89,7 +89,8 @@ export interface BalanceTransactionCreateResponse { | 'return_from_voiding' | 'credit_note_applied' | 'credit_note_voided' - | 'overpayment_refund'; + | 'overpayment_refund' + | 'external_payment'; /** * The value of the amount changed in the transaction. @@ -155,7 +156,8 @@ export interface BalanceTransactionListResponse { | 'return_from_voiding' | 'credit_note_applied' | 'credit_note_voided' - | 'overpayment_refund'; + | 'overpayment_refund' + | 'external_payment'; /** * The value of the amount changed in the transaction. diff --git a/src/resources/invoices.ts b/src/resources/invoices.ts index ee5a9d5d..08c914dc 100644 --- a/src/resources/invoices.ts +++ b/src/resources/invoices.ts @@ -524,7 +524,8 @@ export namespace Invoice { | 'return_from_voiding' | 'credit_note_applied' | 'credit_note_voided' - | 'overpayment_refund'; + | 'overpayment_refund' + | 'external_payment'; /** * The value of the amount changed in the transaction. @@ -1734,7 +1735,8 @@ export namespace InvoiceFetchUpcomingResponse { | 'return_from_voiding' | 'credit_note_applied' | 'credit_note_voided' - | 'overpayment_refund'; + | 'overpayment_refund' + | 'external_payment'; /** * The value of the amount changed in the transaction. diff --git a/src/resources/subscriptions.ts b/src/resources/subscriptions.ts index 6faba406..4650512c 100644 --- a/src/resources/subscriptions.ts +++ b/src/resources/subscriptions.ts @@ -8156,6 +8156,11 @@ export namespace SubscriptionCreateParams { } export interface AddPrice { + /** + * The definition of a new allocation price to create and add to the subscription. + */ + allocation_price?: AddPrice.AllocationPrice | null; + /** * @deprecated [DEPRECATED] Use add_adjustments instead. The subscription's * discounts for this price. @@ -8229,6 +8234,33 @@ export namespace SubscriptionCreateParams { } export namespace AddPrice { + /** + * The definition of a new allocation price to create and add to the subscription. + */ + export interface AllocationPrice { + /** + * An amount of the currency to allocate to the customer at the specified cadence. + */ + amount: string; + + /** + * The cadence at which to allocate the amount to the customer. + */ + cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom'; + + /** + * An ISO 4217 currency string or a custom pricing unit identifier in which to bill + * this price. + */ + currency: string; + + /** + * Whether the allocated amount should expire at the end of the cadence or roll + * over to the next period. + */ + expires_at_end_of_cadence: boolean; + } + export interface Discount { discount_type: 'percentage' | 'usage' | 'amount'; @@ -10721,6 +10753,11 @@ export namespace SubscriptionCreateParams { */ replaces_price_id: string; + /** + * The definition of a new allocation price to create and add to the subscription. + */ + allocation_price?: ReplacePrice.AllocationPrice | null; + /** * @deprecated [DEPRECATED] Use add_adjustments instead. The subscription's * discounts for the replacement price. @@ -10780,6 +10817,33 @@ export namespace SubscriptionCreateParams { } export namespace ReplacePrice { + /** + * The definition of a new allocation price to create and add to the subscription. + */ + export interface AllocationPrice { + /** + * An amount of the currency to allocate to the customer at the specified cadence. + */ + amount: string; + + /** + * The cadence at which to allocate the amount to the customer. + */ + cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom'; + + /** + * An ISO 4217 currency string or a custom pricing unit identifier in which to bill + * this price. + */ + currency: string; + + /** + * Whether the allocated amount should expire at the end of the cadence or roll + * over to the next period. + */ + expires_at_end_of_cadence: boolean; + } + export interface Discount { discount_type: 'percentage' | 'usage' | 'amount'; @@ -17127,6 +17191,11 @@ export namespace SubscriptionSchedulePlanChangeParams { } export interface AddPrice { + /** + * The definition of a new allocation price to create and add to the subscription. + */ + allocation_price?: AddPrice.AllocationPrice | null; + /** * @deprecated [DEPRECATED] Use add_adjustments instead. The subscription's * discounts for this price. @@ -17200,6 +17269,33 @@ export namespace SubscriptionSchedulePlanChangeParams { } export namespace AddPrice { + /** + * The definition of a new allocation price to create and add to the subscription. + */ + export interface AllocationPrice { + /** + * An amount of the currency to allocate to the customer at the specified cadence. + */ + amount: string; + + /** + * The cadence at which to allocate the amount to the customer. + */ + cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom'; + + /** + * An ISO 4217 currency string or a custom pricing unit identifier in which to bill + * this price. + */ + currency: string; + + /** + * Whether the allocated amount should expire at the end of the cadence or roll + * over to the next period. + */ + expires_at_end_of_cadence: boolean; + } + export interface Discount { discount_type: 'percentage' | 'usage' | 'amount'; @@ -19692,6 +19788,11 @@ export namespace SubscriptionSchedulePlanChangeParams { */ replaces_price_id: string; + /** + * The definition of a new allocation price to create and add to the subscription. + */ + allocation_price?: ReplacePrice.AllocationPrice | null; + /** * @deprecated [DEPRECATED] Use add_adjustments instead. The subscription's * discounts for the replacement price. @@ -19751,6 +19852,33 @@ export namespace SubscriptionSchedulePlanChangeParams { } export namespace ReplacePrice { + /** + * The definition of a new allocation price to create and add to the subscription. + */ + export interface AllocationPrice { + /** + * An amount of the currency to allocate to the customer at the specified cadence. + */ + amount: string; + + /** + * The cadence at which to allocate the amount to the customer. + */ + cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom'; + + /** + * An ISO 4217 currency string or a custom pricing unit identifier in which to bill + * this price. + */ + currency: string; + + /** + * Whether the allocated amount should expire at the end of the cadence or roll + * over to the next period. + */ + expires_at_end_of_cadence: boolean; + } + export interface Discount { discount_type: 'percentage' | 'usage' | 'amount'; diff --git a/src/version.ts b/src/version.ts index 70a133b5..03692402 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.55.0'; // x-release-please-version +export const VERSION = '4.56.0'; // x-release-please-version diff --git a/tests/api-resources/subscriptions.test.ts b/tests/api-resources/subscriptions.test.ts index f4074e87..984d0ebc 100644 --- a/tests/api-resources/subscriptions.test.ts +++ b/tests/api-resources/subscriptions.test.ts @@ -263,6 +263,12 @@ describe('resource subscriptions', () => { ], add_prices: [ { + allocation_price: { + amount: '10.00', + cadence: 'one_time', + currency: 'USD', + expires_at_end_of_cadence: true, + }, discounts: [ { discount_type: 'percentage', @@ -331,6 +337,12 @@ describe('resource subscriptions', () => { replace_prices: [ { replaces_price_id: 'replaces_price_id', + allocation_price: { + amount: '10.00', + cadence: 'one_time', + currency: 'USD', + expires_at_end_of_cadence: true, + }, discounts: [ { discount_type: 'percentage',