Skip to content

Commit

Permalink
Merge pull request #1648 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
API Updates for beta branch
  • Loading branch information
anniel-stripe authored Jan 5, 2023
2 parents 36a6ef3 + e54db13 commit b36aa63
Show file tree
Hide file tree
Showing 16 changed files with 221 additions and 66 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 11.6.0 - 2023-01-05
* [#1646](https://github.com/stripe/stripe-node/pull/1646) API Updates
* Add support for `card_issuing` on `Issuing.Cardholder.individual`

## 11.6.0-beta.1 - 2022-12-22
* [#1643](https://github.com/stripe/stripe-node/pull/1643) API Updates for beta branch
* Updated stable APIs to the latest version
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v216
v217
4 changes: 4 additions & 0 deletions lib/resources/Quotes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/resources/Quotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ module.exports = StripeResource.extend({
methodType: 'list',
}),

markStaleQuote: stripeMethod({
method: 'POST',
fullPath: '/v1/quotes/{quote}/mark_stale',
}),

pdf: stripeMethod({
host: 'files.stripe.com',
method: 'GET',
Expand Down
2 changes: 1 addition & 1 deletion test/resources/generated_examples_test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ describe('Checkout.Sessions', function() {
});
});

describe('CashBalances', function() {
describe('CashBalance', function() {
it('retrieveCashBalance method', async function() {
const cashBalance = await stripe.customers.retrieveCashBalance('cus_123');
expect(cashBalance).not.to.be.null;
Expand Down
28 changes: 28 additions & 0 deletions types/Issuing/Cardholders.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ declare module 'stripe' {
}

interface Individual {
card_issuing: Individual.CardIssuing | null;

/**
* The date of birth of this cardholder.
*/
Expand All @@ -114,6 +116,32 @@ declare module 'stripe' {
}

namespace Individual {
interface CardIssuing {
/**
* Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards).
*/
user_terms_acceptance: CardIssuing.UserTermsAcceptance | null;
}

namespace CardIssuing {
interface UserTermsAcceptance {
/**
* The Unix timestamp marking when the cardholder accepted the Authorized User Terms.
*/
date: number | null;

/**
* The IP address from which the cardholder accepted the Authorized User Terms.
*/
ip: string | null;

/**
* The user agent of the browser from which the cardholder accepted the Authorized User Terms.
*/
user_agent: string | null;
}
}

interface Dob {
/**
* The day of birth, between 1 and 31.
Expand Down
2 changes: 1 addition & 1 deletion types/PaymentMethods.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ declare module 'stripe' {
networks: Card.Networks | null;

/**
* Contains details on how this Card maybe be used for 3D Secure authentication.
* Contains details on how this Card may be used for 3D Secure authentication.
*/
three_d_secure_usage: Card.ThreeDSecureUsage | null;

Expand Down
2 changes: 1 addition & 1 deletion types/PlansResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ declare module 'stripe' {
tax_code?: string;

/**
* A label that represents units of this product in Stripe and on customers' receipts and invoices. When set, this will be included in associated invoice line item descriptions.
* A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
*/
unit_label?: string;
}
Expand Down
2 changes: 1 addition & 1 deletion types/PricesResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ declare module 'stripe' {
tax_code?: string;

/**
* A label that represents units of this product in Stripe and on customers' receipts and invoices. When set, this will be included in associated invoice line item descriptions.
* A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
*/
unit_label?: string;
}
Expand Down
2 changes: 1 addition & 1 deletion types/Products.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ declare module 'stripe' {
type: Product.Type;

/**
* A label that represents units of this product in Stripe and on customers' receipts and invoices. When set, this will be included in associated invoice line item descriptions.
* A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
*/
unit_label?: string | null;

Expand Down
4 changes: 2 additions & 2 deletions types/ProductsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ declare module 'stripe' {
type?: ProductCreateParams.Type;

/**
* A label that represents units of this product in Stripe and on customers' receipts and invoices. When set, this will be included in associated invoice line item descriptions.
* A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
*/
unit_label?: string;

Expand Down Expand Up @@ -377,7 +377,7 @@ declare module 'stripe' {
tax_code?: Stripe.Emptyable<string>;

/**
* A label that represents units of this product in Stripe and on customers' receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`.
* A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`.
*/
unit_label?: string;

Expand Down
4 changes: 2 additions & 2 deletions types/Quotes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ declare module 'stripe' {

interface SubscriptionData {
/**
* Describes what period to bill for upon accepting the quote.
* Describes the period to bill for upon accepting the quote.
*/
bill_on_acceptance?: SubscriptionData.BillOnAcceptance | null;

Expand Down Expand Up @@ -736,7 +736,7 @@ declare module 'stripe' {
applies_to: SubscriptionDataOverride.AppliesTo;

/**
* The start of the period to bill from when the Quote is accepted.
* Describes the period to bill for upon accepting the quote.
*/
bill_on_acceptance: SubscriptionDataOverride.BillOnAcceptance | null;

Expand Down
128 changes: 116 additions & 12 deletions types/QuotesResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ declare module 'stripe' {

interface SubscriptionData {
/**
* The start of the period to bill from when the Quote is accepted.
* Describes the period to bill for upon accepting the quote.
*/
bill_on_acceptance?: SubscriptionData.BillOnAcceptance;

Expand Down Expand Up @@ -1272,10 +1272,15 @@ declare module 'stripe' {
}

interface BillUntil {
/**
* Details of the duration over which to bill.
*/
duration?: BillUntil.Duration;

/**
* Details of a Quote line item from which to bill until.
*/
line_starts_at?: BillUntil.LineStartsAt;
line_ends_at?: BillUntil.LineEndsAt;

/**
* Details of a Unix timestamp to bill until.
Expand All @@ -1289,7 +1294,23 @@ declare module 'stripe' {
}

namespace BillUntil {
interface LineStartsAt {
interface Duration {
/**
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
*/
interval: Duration.Interval;

/**
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
*/
interval_count: number;
}

namespace Duration {
type Interval = 'day' | 'month' | 'week' | 'year';
}

interface LineEndsAt {
/**
* The ID of a quote line.
*/
Expand Down Expand Up @@ -1339,7 +1360,7 @@ declare module 'stripe' {
applies_to: SubscriptionDataOverride.AppliesTo;

/**
* The start of the period to bill from when the Quote is accepted.
* Describes the period to bill for upon accepting the quote.
*/
bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance;

Expand Down Expand Up @@ -1457,10 +1478,15 @@ declare module 'stripe' {
}

interface BillUntil {
/**
* Details of the duration over which to bill.
*/
duration?: BillUntil.Duration;

/**
* Details of a Quote line item from which to bill until.
*/
line_starts_at?: BillUntil.LineStartsAt;
line_ends_at?: BillUntil.LineEndsAt;

/**
* Details of a Unix timestamp to bill until.
Expand All @@ -1474,7 +1500,23 @@ declare module 'stripe' {
}

namespace BillUntil {
interface LineStartsAt {
interface Duration {
/**
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
*/
interval: Duration.Interval;

/**
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
*/
interval_count: number;
}

namespace Duration {
type Interval = 'day' | 'month' | 'week' | 'year';
}

interface LineEndsAt {
/**
* The ID of a quote line.
*/
Expand Down Expand Up @@ -2671,7 +2713,7 @@ declare module 'stripe' {

interface SubscriptionData {
/**
* The start of the period to bill from when the Quote is accepted.
* Describes the period to bill for upon accepting the quote.
*/
bill_on_acceptance?: SubscriptionData.BillOnAcceptance;

Expand Down Expand Up @@ -2783,10 +2825,15 @@ declare module 'stripe' {
}

interface BillUntil {
/**
* Details of the duration over which to bill.
*/
duration?: BillUntil.Duration;

/**
* Details of a Quote line item from which to bill until.
*/
line_starts_at?: BillUntil.LineStartsAt;
line_ends_at?: BillUntil.LineEndsAt;

/**
* Details of a Unix timestamp to bill until.
Expand All @@ -2800,7 +2847,23 @@ declare module 'stripe' {
}

namespace BillUntil {
interface LineStartsAt {
interface Duration {
/**
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
*/
interval: Duration.Interval;

/**
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
*/
interval_count: number;
}

namespace Duration {
type Interval = 'day' | 'month' | 'week' | 'year';
}

interface LineEndsAt {
/**
* The ID of a quote line.
*/
Expand Down Expand Up @@ -2850,7 +2913,7 @@ declare module 'stripe' {
applies_to: SubscriptionDataOverride.AppliesTo;

/**
* The start of the period to bill from when the Quote is accepted.
* Describes the period to bill for upon accepting the quote.
*/
bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance;

Expand Down Expand Up @@ -2968,10 +3031,15 @@ declare module 'stripe' {
}

interface BillUntil {
/**
* Details of the duration over which to bill.
*/
duration?: BillUntil.Duration;

/**
* Details of a Quote line item from which to bill until.
*/
line_starts_at?: BillUntil.LineStartsAt;
line_ends_at?: BillUntil.LineEndsAt;

/**
* Details of a Unix timestamp to bill until.
Expand All @@ -2985,7 +3053,23 @@ declare module 'stripe' {
}

namespace BillUntil {
interface LineStartsAt {
interface Duration {
/**
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
*/
interval: Duration.Interval;

/**
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
*/
interval_count: number;
}

namespace Duration {
type Interval = 'day' | 'month' | 'week' | 'year';
}

interface LineEndsAt {
/**
* The ID of a quote line.
*/
Expand Down Expand Up @@ -3130,6 +3214,13 @@ declare module 'stripe' {
expand?: Array<string>;
}

interface QuoteMarkStaleQuoteParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}

interface QuotePdfParams {
/**
* Specifies which fields in the response should be expanded.
Expand Down Expand Up @@ -3325,6 +3416,19 @@ declare module 'stripe' {
options?: RequestOptions
): ApiListPromise<Stripe.QuoteLine>;

/**
* Converts a draft or open quote to stale.
*/
markStaleQuote(
id: string,
params?: QuoteMarkStaleQuoteParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Quote>>;
markStaleQuote(
id: string,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Quote>>;

/**
* Download the PDF for a finalized quote
*/
Expand Down
Loading

0 comments on commit b36aa63

Please sign in to comment.