Skip to content

Commit 4dfbdd4

Browse files
Update generated code (stripe#2171)
* Update generated code for v1249 * Update generated code for v1250 * Update generated code for v1252 * Update generated code for v1255 * Update generated code for v1257 * Update generated code for v1259 * Update generated code for v1260 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: helenye-stripe <[email protected]>
1 parent a54fb5e commit 4dfbdd4

21 files changed

+277
-9
lines changed

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1246
1+
v1260

src/resources.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export {ExchangeRates} from './resources/ExchangeRates.js';
8888
export {FileLinks} from './resources/FileLinks.js';
8989
export {Files} from './resources/Files.js';
9090
export {InvoiceItems} from './resources/InvoiceItems.js';
91+
export {InvoiceRenderingTemplates} from './resources/InvoiceRenderingTemplates.js';
9192
export {Invoices} from './resources/Invoices.js';
9293
export {Mandates} from './resources/Mandates.js';
9394
export {OAuth} from './resources/OAuth.js';
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// File generated from our OpenAPI spec
2+
3+
import {StripeResource} from '../StripeResource.js';
4+
const stripeMethod = StripeResource.method;
5+
export const InvoiceRenderingTemplates = StripeResource.extend({
6+
retrieve: stripeMethod({
7+
method: 'GET',
8+
fullPath: '/v1/invoice_rendering_templates/{template}',
9+
}),
10+
list: stripeMethod({
11+
method: 'GET',
12+
fullPath: '/v1/invoice_rendering_templates',
13+
methodType: 'list',
14+
}),
15+
archive: stripeMethod({
16+
method: 'POST',
17+
fullPath: '/v1/invoice_rendering_templates/{template}/archive',
18+
}),
19+
unarchive: stripeMethod({
20+
method: 'POST',
21+
fullPath: '/v1/invoice_rendering_templates/{template}/unarchive',
22+
}),
23+
});

test/resources/generated_examples_test.spec.js

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

types/Checkout/Sessions.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,6 +2026,15 @@ declare module 'stripe' {
20262026
* Indicates whether tax ID collection is enabled for the session
20272027
*/
20282028
enabled: boolean;
2029+
2030+
/**
2031+
* Indicates whether a tax ID is required on the payment page
2032+
*/
2033+
required: TaxIdCollection.Required;
2034+
}
2035+
2036+
namespace TaxIdCollection {
2037+
type Required = 'if_supported' | 'never';
20292038
}
20302039

20312040
interface TotalDetails {

types/Checkout/SessionsResource.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2478,6 +2478,15 @@ declare module 'stripe' {
24782478
* Enable tax ID collection during checkout. Defaults to `false`.
24792479
*/
24802480
enabled: boolean;
2481+
2482+
/**
2483+
* Describes whether a tax ID is required during checkout. Defaults to `never`.
2484+
*/
2485+
required?: TaxIdCollection.Required;
2486+
}
2487+
2488+
namespace TaxIdCollection {
2489+
type Required = 'if_supported' | 'never';
24812490
}
24822491

24832492
type UiMode = 'embedded' | 'hosted';

types/Customers.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ declare module 'stripe' {
197197
* How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
198198
*/
199199
amount_tax_display: string | null;
200+
201+
/**
202+
* ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice.
203+
*/
204+
template: string | null;
200205
}
201206
}
202207

types/CustomersResource.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ declare module 'stripe' {
171171
amount_tax_display?: Stripe.Emptyable<
172172
RenderingOptions.AmountTaxDisplay
173173
>;
174+
175+
/**
176+
* ID of the invoice rendering template to use for future invoices.
177+
*/
178+
template?: string;
174179
}
175180

176181
namespace RenderingOptions {
@@ -477,6 +482,11 @@ declare module 'stripe' {
477482
amount_tax_display?: Stripe.Emptyable<
478483
RenderingOptions.AmountTaxDisplay
479484
>;
485+
486+
/**
487+
* ID of the invoice rendering template to use for future invoices.
488+
*/
489+
template?: string;
480490
}
481491

482492
namespace RenderingOptions {

types/InvoiceLineItems.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ declare module 'stripe' {
113113
/**
114114
* The amount of tax calculated per tax rate for this line item
115115
*/
116-
tax_amounts?: Array<InvoiceLineItem.TaxAmount>;
116+
tax_amounts: Array<InvoiceLineItem.TaxAmount>;
117117

118118
/**
119119
* The tax rates which apply to the line item.
120120
*/
121-
tax_rates?: Array<Stripe.TaxRate>;
121+
tax_rates: Array<Stripe.TaxRate>;
122122

123123
/**
124124
* A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// File generated from our OpenAPI spec
2+
3+
declare module 'stripe' {
4+
namespace Stripe {
5+
/**
6+
* The InvoiceRenderingTemplate object.
7+
*/
8+
interface InvoiceRenderingTemplate {
9+
/**
10+
* Unique identifier for the object.
11+
*/
12+
id: string;
13+
14+
/**
15+
* String representing the object's type. Objects of the same type share the same value.
16+
*/
17+
object: 'invoice_rendering_template';
18+
19+
/**
20+
* Time at which the object was created. Measured in seconds since the Unix epoch.
21+
*/
22+
created: number;
23+
24+
/**
25+
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
26+
*/
27+
livemode: boolean;
28+
29+
/**
30+
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
31+
*/
32+
metadata: Stripe.Metadata | null;
33+
34+
/**
35+
* A brief description of the template, hidden from customers
36+
*/
37+
nickname: string | null;
38+
39+
/**
40+
* The status of the template, one of `active` or `archived`.
41+
*/
42+
status: InvoiceRenderingTemplate.Status;
43+
44+
/**
45+
* Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering
46+
*/
47+
version: number;
48+
}
49+
50+
namespace InvoiceRenderingTemplate {
51+
type Status = 'active' | 'archived';
52+
}
53+
}
54+
}

0 commit comments

Comments
 (0)