Skip to content

Commit d870ffa

Browse files
Update generated code (#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 272799e commit d870ffa

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`.

types/InvoiceRenderingTemplates.d.ts

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+
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
// File generated from our OpenAPI spec
2+
3+
declare module 'stripe' {
4+
namespace Stripe {
5+
interface InvoiceRenderingTemplateRetrieveParams {
6+
/**
7+
* Specifies which fields in the response should be expanded.
8+
*/
9+
expand?: Array<string>;
10+
11+
version?: number;
12+
}
13+
14+
interface InvoiceRenderingTemplateListParams extends PaginationParams {
15+
/**
16+
* Specifies which fields in the response should be expanded.
17+
*/
18+
expand?: Array<string>;
19+
20+
status?: InvoiceRenderingTemplateListParams.Status;
21+
}
22+
23+
namespace InvoiceRenderingTemplateListParams {
24+
type Status = 'active' | 'archived';
25+
}
26+
27+
interface InvoiceRenderingTemplateArchiveParams {
28+
/**
29+
* Specifies which fields in the response should be expanded.
30+
*/
31+
expand?: Array<string>;
32+
}
33+
34+
interface InvoiceRenderingTemplateUnarchiveParams {
35+
/**
36+
* Specifies which fields in the response should be expanded.
37+
*/
38+
expand?: Array<string>;
39+
}
40+
41+
class InvoiceRenderingTemplatesResource {
42+
/**
43+
* Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions.
44+
*/
45+
retrieve(
46+
id: string,
47+
params?: InvoiceRenderingTemplateRetrieveParams,
48+
options?: RequestOptions
49+
): Promise<Stripe.Response<Stripe.InvoiceRenderingTemplate>>;
50+
retrieve(
51+
id: string,
52+
options?: RequestOptions
53+
): Promise<Stripe.Response<Stripe.InvoiceRenderingTemplate>>;
54+
55+
/**
56+
* List all templates, ordered by creation date, with the most recently created template appearing first.
57+
*/
58+
list(
59+
params?: InvoiceRenderingTemplateListParams,
60+
options?: RequestOptions
61+
): ApiListPromise<Stripe.InvoiceRenderingTemplate>;
62+
list(
63+
options?: RequestOptions
64+
): ApiListPromise<Stripe.InvoiceRenderingTemplate>;
65+
66+
/**
67+
* Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.
68+
*/
69+
archive(
70+
id: string,
71+
params?: InvoiceRenderingTemplateArchiveParams,
72+
options?: RequestOptions
73+
): Promise<Stripe.Response<Stripe.InvoiceRenderingTemplate>>;
74+
archive(
75+
id: string,
76+
options?: RequestOptions
77+
): Promise<Stripe.Response<Stripe.InvoiceRenderingTemplate>>;
78+
79+
/**
80+
* Unarchive an invoice rendering template so it can be used on new Stripe objects again.
81+
*/
82+
unarchive(
83+
id: string,
84+
params?: InvoiceRenderingTemplateUnarchiveParams,
85+
options?: RequestOptions
86+
): Promise<Stripe.Response<Stripe.InvoiceRenderingTemplate>>;
87+
unarchive(
88+
id: string,
89+
options?: RequestOptions
90+
): Promise<Stripe.Response<Stripe.InvoiceRenderingTemplate>>;
91+
}
92+
}
93+
}

types/Invoices.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,6 +1199,16 @@ declare module 'stripe' {
11991199
* Invoice pdf rendering options
12001200
*/
12011201
pdf: Rendering.Pdf | null;
1202+
1203+
/**
1204+
* ID of the rendering template that the invoice is formatted by.
1205+
*/
1206+
template: string | null;
1207+
1208+
/**
1209+
* Version of the rendering template that the invoice is using.
1210+
*/
1211+
template_version: number | null;
12021212
}
12031213

12041214
namespace Rendering {

types/InvoicesResource.d.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,16 @@ declare module 'stripe' {
539539
* Invoice pdf rendering options
540540
*/
541541
pdf?: Rendering.Pdf;
542+
543+
/**
544+
* ID of the invoice rendering template to use for this invoice.
545+
*/
546+
template?: string;
547+
548+
/**
549+
* The specific version of invoice rendering template to use for this invoice.
550+
*/
551+
template_version?: Stripe.Emptyable<number>;
542552
}
543553

544554
namespace Rendering {
@@ -1231,6 +1241,16 @@ declare module 'stripe' {
12311241
* Invoice pdf rendering options
12321242
*/
12331243
pdf?: Rendering.Pdf;
1244+
1245+
/**
1246+
* ID of the invoice rendering template to use for this invoice.
1247+
*/
1248+
template?: string;
1249+
1250+
/**
1251+
* The specific version of invoice rendering template to use for this invoice.
1252+
*/
1253+
template_version?: Stripe.Emptyable<number>;
12341254
}
12351255

12361256
namespace Rendering {

types/Issuing/Cards.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ declare module 'stripe' {
246246
| 'failure'
247247
| 'pending'
248248
| 'returned'
249-
| 'shipped';
249+
| 'shipped'
250+
| 'submitted';
250251

251252
type Type = 'bulk' | 'individual';
252253
}

types/PaymentLinks.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,12 @@ declare module 'stripe' {
933933
* Indicates whether tax ID collection is enabled for the session.
934934
*/
935935
enabled: boolean;
936+
937+
required: TaxIdCollection.Required;
938+
}
939+
940+
namespace TaxIdCollection {
941+
type Required = 'if_supported' | 'never';
936942
}
937943

938944
interface TransferData {

types/PaymentLinksResource.d.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,15 @@ declare module 'stripe' {
992992
* Enable tax ID collection during checkout. Defaults to `false`.
993993
*/
994994
enabled: boolean;
995+
996+
/**
997+
* Describes whether a tax ID is required during checkout. Defaults to `never`.
998+
*/
999+
required?: TaxIdCollection.Required;
1000+
}
1001+
1002+
namespace TaxIdCollection {
1003+
type Required = 'if_supported' | 'never';
9951004
}
9961005

9971006
interface TransferData {
@@ -1881,6 +1890,15 @@ declare module 'stripe' {
18811890
* Enable tax ID collection during checkout. Defaults to `false`.
18821891
*/
18831892
enabled: boolean;
1893+
1894+
/**
1895+
* Describes whether a tax ID is required during checkout. Defaults to `never`.
1896+
*/
1897+
required?: TaxIdCollection.Required;
1898+
}
1899+
1900+
namespace TaxIdCollection {
1901+
type Required = 'if_supported' | 'never';
18841902
}
18851903
}
18861904

types/QuotesResource.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ declare module 'stripe' {
3939
description?: Stripe.Emptyable<string>;
4040

4141
/**
42-
* The discounts applied to the quote. You can only set up to one discount.
42+
* The discounts applied to the quote.
4343
*/
4444
discounts?: Stripe.Emptyable<Array<QuoteCreateParams.Discount>>;
4545

@@ -378,7 +378,7 @@ declare module 'stripe' {
378378
description?: Stripe.Emptyable<string>;
379379

380380
/**
381-
* The discounts applied to the quote. You can only set up to one discount.
381+
* The discounts applied to the quote.
382382
*/
383383
discounts?: Stripe.Emptyable<Array<QuoteUpdateParams.Discount>>;
384384

0 commit comments

Comments
 (0)