Skip to content

Commit a2b1e94

Browse files
feat(api): api update
1 parent e2c889d commit a2b1e94

7 files changed

Lines changed: 41 additions & 7 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-36e32afb76082ffbe12a71342ed5b855b9ae83d8c5bcd225fe23915c308b39e7.yml
3-
openapi_spec_hash: 035e0bb6141d78b4aed031303585940c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-0ab0946487d1ee971683d894554494d9940010403874c0be724ffc3a82d696db.yml
3+
openapi_spec_hash: 66b792328a4faee3c7659185accc3f0e
44
config_hash: e6db17547fe854b1c240407cf4c6dc9e

src/resources/shared.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2743,6 +2743,20 @@ export interface NewAllocationPrice {
27432743
* The filters that determine which items the allocation applies to.
27442744
*/
27452745
filters?: Array<NewAllocationPrice.Filter> | null;
2746+
2747+
/**
2748+
* The item ID that line items representing charges for this allocation will be
2749+
* associated with. If not provided, the default allocation item for the currency
2750+
* will be used (e.g. 'Included Allocation (USD)').
2751+
*/
2752+
item_id?: string | null;
2753+
2754+
/**
2755+
* The (per-unit) cost basis of each created block. If non-zero, a customer will be
2756+
* invoiced according to the quantity and per unit cost basis specified for the
2757+
* allocation each cadence.
2758+
*/
2759+
per_unit_cost_basis?: string;
27462760
}
27472761

27482762
export namespace NewAllocationPrice {

src/resources/subscriptions.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6739,9 +6739,8 @@ export interface SubscriptionPriceIntervalsParams {
67396739
allow_invoice_credit_or_void?: boolean | null;
67406740

67416741
/**
6742-
* If true, ending an in-arrears price interval mid-cycle will defer billing the
6743-
* final line itemuntil the next scheduled invoice. If false, it will be billed on
6744-
* its end date. If not provided, behaviorwill follow account default.
6742+
* If set, the default value to use for added/edited price intervals with an
6743+
* end_date set.
67456744
*/
67466745
can_defer_billing?: boolean | null;
67476746

@@ -6769,6 +6768,13 @@ export namespace SubscriptionPriceIntervalsParams {
67696768
*/
67706769
allocation_price?: Shared.NewAllocationPrice | null;
67716770

6771+
/**
6772+
* If true, an in-arrears price interval ending mid-cycle will defer billing the
6773+
* final line item until the next scheduled invoice. If false, it will be billed on
6774+
* its end date.
6775+
*/
6776+
can_defer_billing?: boolean | null;
6777+
67726778
/**
67736779
* A list of discounts to initialize on the price interval.
67746780
*/
@@ -7570,9 +7576,9 @@ export namespace SubscriptionPriceIntervalsParams {
75707576
billing_cycle_day?: number | null;
75717577

75727578
/**
7573-
* If true, ending an in-arrears price interval mid-cycle will defer billing the
7579+
* If true, an in-arrears price interval ending mid-cycle will defer billing the
75747580
* final line item until the next scheduled invoice. If false, it will be billed on
7575-
* its end date. If not provided, behavior will follow account default.
7581+
* its end date.
75767582
*/
75777583
can_defer_billing?: boolean | null;
75787584

tests/api-resources/beta/beta.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ describe('resource beta', () => {
4848
custom_expiration: { duration: 0, duration_unit: 'day' },
4949
expires_at_end_of_cadence: true,
5050
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
51+
item_id: 'item_id',
52+
per_unit_cost_basis: 'per_unit_cost_basis',
5153
},
5254
plan_phase_order: 0,
5355
price: {
@@ -108,6 +110,8 @@ describe('resource beta', () => {
108110
custom_expiration: { duration: 0, duration_unit: 'day' },
109111
expires_at_end_of_cadence: true,
110112
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
113+
item_id: 'item_id',
114+
per_unit_cost_basis: 'per_unit_cost_basis',
111115
},
112116
plan_phase_order: 0,
113117
price: {

tests/api-resources/beta/external-plan-id.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ describe('resource externalPlanId', () => {
4848
custom_expiration: { duration: 0, duration_unit: 'day' },
4949
expires_at_end_of_cadence: true,
5050
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
51+
item_id: 'item_id',
52+
per_unit_cost_basis: 'per_unit_cost_basis',
5153
},
5254
plan_phase_order: 0,
5355
price: {
@@ -108,6 +110,8 @@ describe('resource externalPlanId', () => {
108110
custom_expiration: { duration: 0, duration_unit: 'day' },
109111
expires_at_end_of_cadence: true,
110112
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
113+
item_id: 'item_id',
114+
per_unit_cost_basis: 'per_unit_cost_basis',
111115
},
112116
plan_phase_order: 0,
113117
price: {

tests/api-resources/plans/plans.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ describe('resource plans', () => {
3333
custom_expiration: { duration: 0, duration_unit: 'day' },
3434
expires_at_end_of_cadence: true,
3535
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
36+
item_id: 'item_id',
37+
per_unit_cost_basis: 'per_unit_cost_basis',
3638
},
3739
plan_phase_order: 0,
3840
price: {

tests/api-resources/subscriptions.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ describe('resource subscriptions', () => {
301301
custom_expiration: { duration: 0, duration_unit: 'day' },
302302
expires_at_end_of_cadence: true,
303303
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
304+
item_id: 'item_id',
305+
per_unit_cost_basis: 'per_unit_cost_basis',
304306
},
305307
discounts: [
306308
{
@@ -391,6 +393,8 @@ describe('resource subscriptions', () => {
391393
custom_expiration: { duration: 0, duration_unit: 'day' },
392394
expires_at_end_of_cadence: true,
393395
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
396+
item_id: 'item_id',
397+
per_unit_cost_basis: 'per_unit_cost_basis',
394398
},
395399
discounts: [
396400
{

0 commit comments

Comments
 (0)