Skip to content

Commit 3b5ca7e

Browse files
Update generated code for v2240 and
1 parent 5f002ae commit 3b5ca7e

File tree

5 files changed

+57
-13
lines changed

5 files changed

+57
-13
lines changed

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
267ab2534bb4e9b0a4debdda54e93377b68ed092
1+
a527d1f955ea1eab1b7ccdb63001a69d1786fc37

src/resources/V2/Billing/LicenseFees.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@ export interface LicenseFee {
218218
*/
219219
display_name: string;
220220

221+
/**
222+
* The ID of the license fee's most recently created version.
223+
*/
224+
latest_version: string;
225+
221226
/**
222227
* A Licensed Item represents a billable item whose pricing is based on license fees. You can use license fees
223228
* to specify the pricing and create subscriptions to these items.
@@ -249,6 +254,17 @@ export interface LicenseFee {
249254
*/
250255
service_cycle: V2.Billing.LicenseFee.ServiceCycle;
251256

257+
/**
258+
* The interval for assessing service.
259+
*/
260+
service_interval: V2.Billing.LicenseFee.ServiceInterval;
261+
262+
/**
263+
* The length of the interval for assessing service. For example, set this to 3 and `service_interval` to `"month"` in
264+
* order to specify quarterly service.
265+
*/
266+
service_interval_count: number;
267+
252268
/**
253269
* The Stripe Tax tax behavior - whether the license fee is inclusive or exclusive of tax.
254270
*/
@@ -293,6 +309,8 @@ export namespace V2 {
293309
interval_count: number;
294310
}
295311

312+
export type ServiceInterval = 'day' | 'month' | 'week' | 'year';
313+
296314
export type TaxBehavior = 'exclusive' | 'inclusive';
297315

298316
export type TieringMode = 'graduated' | 'volume';

src/resources/V2/Billing/PricingPlans.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ export interface PricingPlan {
114114
*/
115115
display_name: string;
116116

117+
/**
118+
* The ID of the latest version of the PricingPlan.
119+
*/
120+
latest_version: string;
121+
117122
/**
118123
* The ID of the live version of the PricingPlan.
119124
*/

src/resources/V2/Billing/RateCards.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ export interface RateCard {
151151
*/
152152
display_name: string;
153153

154+
/**
155+
* The ID of this rate card's most recently created version.
156+
*/
157+
latest_version: string;
158+
154159
/**
155160
* The ID of the Rate Card Version that will be used by all subscriptions when no specific version is specified.
156161
*/
@@ -179,6 +184,20 @@ export interface RateCard {
179184
*/
180185
service_cycle: V2.Billing.RateCard.ServiceCycle;
181186

187+
/**
188+
* The interval for assessing service. For example, a monthly Rate Card with a rate of $1 for the first 10 "workloads"
189+
* and $2 thereafter means "$1 per workload up to 10 workloads during a month of service." This is similar to but
190+
* distinct from billing interval; the service interval deals with the rate at which the customer accumulates fees,
191+
* while the billing interval in Cadence deals with the rate the customer is billed.
192+
*/
193+
service_interval: V2.Billing.RateCard.ServiceInterval;
194+
195+
/**
196+
* The length of the interval for assessing service. For example, set this to 3 and `service_interval` to `"month"` in
197+
* order to specify quarterly service.
198+
*/
199+
service_interval_count: number;
200+
182201
/**
183202
* The Stripe Tax tax behavior - whether the rates are inclusive or exclusive of tax.
184203
*/
@@ -200,6 +219,8 @@ export namespace V2 {
200219
interval_count: number;
201220
}
202221

222+
export type ServiceInterval = 'day' | 'month' | 'week' | 'year';
223+
203224
export type TaxBehavior = 'exclusive' | 'inclusive';
204225

205226
export namespace ServiceCycle {

test/resources/generated_examples_test.spec.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4556,7 +4556,7 @@ describe('Generated tests', function() {
45564556
method: 'GET',
45574557
path: '/v2/billing/license_fees?lookup_keys[0]=lookup_keys',
45584558
response:
4559-
'{"data":[{"object":"v2.billing.license_fee","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","licensed_item":{"object":"v2.billing.licensed_item","created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","livemode":true},"live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive","tiers":[{}]}],"next_page_url":null,"previous_page_url":null}',
4559+
'{"data":[{"object":"v2.billing.license_fee","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","licensed_item":{"object":"v2.billing.licensed_item","created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","livemode":true},"live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive","tiers":[{}]}],"next_page_url":null,"previous_page_url":null}',
45604560
},
45614561
]);
45624562
const licenseFees = await stripe.v2.billing.licenseFees.list({
@@ -4571,7 +4571,7 @@ describe('Generated tests', function() {
45714571
method: 'POST',
45724572
path: '/v2/billing/license_fees',
45734573
response:
4574-
'{"object":"v2.billing.license_fee","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","licensed_item":{"object":"v2.billing.licensed_item","created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","livemode":true},"live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive","tiers":[{}]}',
4574+
'{"object":"v2.billing.license_fee","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","licensed_item":{"object":"v2.billing.licensed_item","created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","livemode":true},"live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive","tiers":[{}]}',
45754575
},
45764576
]);
45774577
const licenseFee = await stripe.v2.billing.licenseFees.create({
@@ -4591,7 +4591,7 @@ describe('Generated tests', function() {
45914591
method: 'GET',
45924592
path: '/v2/billing/license_fees/id_123',
45934593
response:
4594-
'{"object":"v2.billing.license_fee","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","licensed_item":{"object":"v2.billing.licensed_item","created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","livemode":true},"live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive","tiers":[{}]}',
4594+
'{"object":"v2.billing.license_fee","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","licensed_item":{"object":"v2.billing.licensed_item","created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","livemode":true},"live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive","tiers":[{}]}',
45954595
},
45964596
]);
45974597
const licenseFee = await stripe.v2.billing.licenseFees.retrieve('id_123');
@@ -4604,7 +4604,7 @@ describe('Generated tests', function() {
46044604
method: 'POST',
46054605
path: '/v2/billing/license_fees/id_123',
46064606
response:
4607-
'{"object":"v2.billing.license_fee","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","licensed_item":{"object":"v2.billing.licensed_item","created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","livemode":true},"live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive","tiers":[{}]}',
4607+
'{"object":"v2.billing.license_fee","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","licensed_item":{"object":"v2.billing.licensed_item","created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","livemode":true},"live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive","tiers":[{}]}',
46084608
},
46094609
]);
46104610
const licenseFee = await stripe.v2.billing.licenseFees.update('id_123');
@@ -4888,7 +4888,7 @@ describe('Generated tests', function() {
48884888
method: 'GET',
48894889
path: '/v2/billing/pricing_plans',
48904890
response:
4891-
'{"data":[{"object":"v2.billing.pricing_plan","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","livemode":true,"tax_behavior":"exclusive"}],"next_page_url":null,"previous_page_url":null}',
4891+
'{"data":[{"object":"v2.billing.pricing_plan","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","livemode":true,"tax_behavior":"exclusive"}],"next_page_url":null,"previous_page_url":null}',
48924892
},
48934893
]);
48944894
const pricingPlans = await stripe.v2.billing.pricingPlans.list();
@@ -4901,7 +4901,7 @@ describe('Generated tests', function() {
49014901
method: 'POST',
49024902
path: '/v2/billing/pricing_plans',
49034903
response:
4904-
'{"object":"v2.billing.pricing_plan","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","livemode":true,"tax_behavior":"exclusive"}',
4904+
'{"object":"v2.billing.pricing_plan","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","livemode":true,"tax_behavior":"exclusive"}',
49054905
},
49064906
]);
49074907
const pricingPlan = await stripe.v2.billing.pricingPlans.create({
@@ -4918,7 +4918,7 @@ describe('Generated tests', function() {
49184918
method: 'GET',
49194919
path: '/v2/billing/pricing_plans/id_123',
49204920
response:
4921-
'{"object":"v2.billing.pricing_plan","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","livemode":true,"tax_behavior":"exclusive"}',
4921+
'{"object":"v2.billing.pricing_plan","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","livemode":true,"tax_behavior":"exclusive"}',
49224922
},
49234923
]);
49244924
const pricingPlan = await stripe.v2.billing.pricingPlans.retrieve('id_123');
@@ -4931,7 +4931,7 @@ describe('Generated tests', function() {
49314931
method: 'POST',
49324932
path: '/v2/billing/pricing_plans/id_123',
49334933
response:
4934-
'{"object":"v2.billing.pricing_plan","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","livemode":true,"tax_behavior":"exclusive"}',
4934+
'{"object":"v2.billing.pricing_plan","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","livemode":true,"tax_behavior":"exclusive"}',
49354935
},
49364936
]);
49374937
const pricingPlan = await stripe.v2.billing.pricingPlans.update('id_123');
@@ -5169,7 +5169,7 @@ describe('Generated tests', function() {
51695169
method: 'GET',
51705170
path: '/v2/billing/rate_cards',
51715171
response:
5172-
'{"data":[{"object":"v2.billing.rate_card","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive"}],"next_page_url":null,"previous_page_url":null}',
5172+
'{"data":[{"object":"v2.billing.rate_card","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive"}],"next_page_url":null,"previous_page_url":null}',
51735173
},
51745174
]);
51755175
const rateCards = await stripe.v2.billing.rateCards.list();
@@ -5182,7 +5182,7 @@ describe('Generated tests', function() {
51825182
method: 'POST',
51835183
path: '/v2/billing/rate_cards',
51845184
response:
5185-
'{"object":"v2.billing.rate_card","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive"}',
5185+
'{"object":"v2.billing.rate_card","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive"}',
51865186
},
51875187
]);
51885188
const rateCard = await stripe.v2.billing.rateCards.create({
@@ -5201,7 +5201,7 @@ describe('Generated tests', function() {
52015201
method: 'GET',
52025202
path: '/v2/billing/rate_cards/id_123',
52035203
response:
5204-
'{"object":"v2.billing.rate_card","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive"}',
5204+
'{"object":"v2.billing.rate_card","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive"}',
52055205
},
52065206
]);
52075207
const rateCard = await stripe.v2.billing.rateCards.retrieve('id_123');
@@ -5214,7 +5214,7 @@ describe('Generated tests', function() {
52145214
method: 'POST',
52155215
path: '/v2/billing/rate_cards/id_123',
52165216
response:
5217-
'{"object":"v2.billing.rate_card","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive"}',
5217+
'{"object":"v2.billing.rate_card","active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","live_version":"live_version","livemode":true,"service_cycle":{"interval":"month","interval_count":797691627},"service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive"}',
52185218
},
52195219
]);
52205220
const rateCard = await stripe.v2.billing.rateCards.update('id_123');

0 commit comments

Comments
 (0)