Skip to content

Commit

Permalink
Codegen for openapi v207
Browse files Browse the repository at this point in the history
  • Loading branch information
anniel-stripe committed Nov 10, 2022
1 parent 7d82524 commit 5917bc2
Show file tree
Hide file tree
Showing 11 changed files with 697 additions and 5 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v205
v207
4 changes: 2 additions & 2 deletions types/2022-08-01/Coupons.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ declare module 'stripe' {
amount_off: number;
}

type Duration = 'forever' | 'once' | 'repeating';
type Duration = 'forever' | 'once' | 'repeating' | 'variable';
}

/**
Expand Down Expand Up @@ -217,7 +217,7 @@ declare module 'stripe' {
amount_off: number;
}

type Duration = 'forever' | 'once' | 'repeating';
type Duration = 'forever' | 'once' | 'repeating' | 'variable';
}

interface CouponRetrieveParams {
Expand Down
38 changes: 38 additions & 0 deletions types/2022-08-01/InvoiceItems.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,25 @@ declare module 'stripe' {
* ID of an existing discount on the object (or one of its ancestors) to reuse.
*/
discount?: string;

/**
* Details to determine how long the discount should be applied for.
*/
discount_end?: Discount.DiscountEnd;
}

namespace Discount {
interface DiscountEnd {
/**
* A precise Unix timestamp for the discount to end. Must be in the future.
*/
timestamp?: number;

/**
* The type of calculation made to determine when the discount ends.
*/
type: 'timestamp';
}
}

interface Period {
Expand Down Expand Up @@ -412,6 +431,25 @@ declare module 'stripe' {
* ID of an existing discount on the object (or one of its ancestors) to reuse.
*/
discount?: string;

/**
* Details to determine how long the discount should be applied for.
*/
discount_end?: Discount.DiscountEnd;
}

namespace Discount {
interface DiscountEnd {
/**
* A precise Unix timestamp for the discount to end. Must be in the future.
*/
timestamp?: number;

/**
* The type of calculation made to determine when the discount ends.
*/
type: 'timestamp';
}
}

interface Period {
Expand Down
152 changes: 152 additions & 0 deletions types/2022-08-01/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,25 @@ declare module 'stripe' {
* ID of an existing discount on the object (or one of its ancestors) to reuse.
*/
discount?: string;

/**
* Details to determine how long the discount should be applied for.
*/
discount_end?: Discount.DiscountEnd;
}

namespace Discount {
interface DiscountEnd {
/**
* A precise Unix timestamp for the discount to end. Must be in the future.
*/
timestamp?: number;

/**
* The type of calculation made to determine when the discount ends.
*/
type: 'timestamp';
}
}

interface FromInvoice {
Expand Down Expand Up @@ -1586,6 +1605,25 @@ declare module 'stripe' {
* ID of an existing discount on the object (or one of its ancestors) to reuse.
*/
discount?: string;

/**
* Details to determine how long the discount should be applied for.
*/
discount_end?: Discount.DiscountEnd;
}

namespace Discount {
interface DiscountEnd {
/**
* A precise Unix timestamp for the discount to end. Must be in the future.
*/
timestamp?: number;

/**
* The type of calculation made to determine when the discount ends.
*/
type: 'timestamp';
}
}

interface PaymentSettings {
Expand Down Expand Up @@ -2163,6 +2201,25 @@ declare module 'stripe' {
* ID of an existing discount on the object (or one of its ancestors) to reuse.
*/
discount?: string;

/**
* Details to determine how long the discount should be applied for.
*/
discount_end?: Discount.DiscountEnd;
}

namespace Discount {
interface DiscountEnd {
/**
* A precise Unix timestamp for the discount to end. Must be in the future.
*/
timestamp?: number;

/**
* The type of calculation made to determine when the discount ends.
*/
type: 'timestamp';
}
}

interface InvoiceItem {
Expand Down Expand Up @@ -2258,6 +2315,25 @@ declare module 'stripe' {
* ID of an existing discount on the object (or one of its ancestors) to reuse.
*/
discount?: string;

/**
* Details to determine how long the discount should be applied for.
*/
discount_end?: Discount.DiscountEnd;
}

namespace Discount {
interface DiscountEnd {
/**
* A precise Unix timestamp for the discount to end. Must be in the future.
*/
timestamp?: number;

/**
* The type of calculation made to determine when the discount ends.
*/
type: 'timestamp';
}
}

interface Period {
Expand Down Expand Up @@ -2385,6 +2461,25 @@ declare module 'stripe' {
* ID of an existing discount on the object (or one of its ancestors) to reuse.
*/
discount?: string;

/**
* Details to determine how long the discount should be applied for.
*/
discount_end?: Discount.DiscountEnd;
}

namespace Discount {
interface DiscountEnd {
/**
* A precise Unix timestamp for the discount to end. Must be in the future.
*/
timestamp?: number;

/**
* The type of calculation made to determine when the discount ends.
*/
type: 'timestamp';
}
}

interface PriceData {
Expand Down Expand Up @@ -2757,6 +2852,25 @@ declare module 'stripe' {
* ID of an existing discount on the object (or one of its ancestors) to reuse.
*/
discount?: string;

/**
* Details to determine how long the discount should be applied for.
*/
discount_end?: Discount.DiscountEnd;
}

namespace Discount {
interface DiscountEnd {
/**
* A precise Unix timestamp for the discount to end. Must be in the future.
*/
timestamp?: number;

/**
* The type of calculation made to determine when the discount ends.
*/
type: 'timestamp';
}
}

interface InvoiceItem {
Expand Down Expand Up @@ -2852,6 +2966,25 @@ declare module 'stripe' {
* ID of an existing discount on the object (or one of its ancestors) to reuse.
*/
discount?: string;

/**
* Details to determine how long the discount should be applied for.
*/
discount_end?: Discount.DiscountEnd;
}

namespace Discount {
interface DiscountEnd {
/**
* A precise Unix timestamp for the discount to end. Must be in the future.
*/
timestamp?: number;

/**
* The type of calculation made to determine when the discount ends.
*/
type: 'timestamp';
}
}

interface Period {
Expand Down Expand Up @@ -2979,6 +3112,25 @@ declare module 'stripe' {
* ID of an existing discount on the object (or one of its ancestors) to reuse.
*/
discount?: string;

/**
* Details to determine how long the discount should be applied for.
*/
discount_end?: Discount.DiscountEnd;
}

namespace Discount {
interface DiscountEnd {
/**
* A precise Unix timestamp for the discount to end. Must be in the future.
*/
timestamp?: number;

/**
* The type of calculation made to determine when the discount ends.
*/
type: 'timestamp';
}
}

interface PriceData {
Expand Down
25 changes: 25 additions & 0 deletions types/2022-08-01/Issuing/Authorizations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ declare module 'stripe' {
* State where the seller is located
*/
state: string | null;

/**
* URL provided by the merchant on a 3DS request
*/
url?: string | null;
}

interface NetworkData {
Expand Down Expand Up @@ -342,6 +347,11 @@ declare module 'stripe' {
* Whether the cardholder provided an expiry date and if it matched Stripe's record.
*/
expiry_check: VerificationData.ExpiryCheck;

/**
* 3D Secure details.
*/
three_d_secure?: VerificationData.ThreeDSecure | null;
}

namespace VerificationData {
Expand All @@ -352,6 +362,21 @@ declare module 'stripe' {
type CvcCheck = 'match' | 'mismatch' | 'not_provided';

type ExpiryCheck = 'match' | 'mismatch' | 'not_provided';

interface ThreeDSecure {
/**
* The outcome of the 3D Secure authentication request.
*/
result: ThreeDSecure.Result;
}

namespace ThreeDSecure {
type Result =
| 'attempt_acknowledged'
| 'authenticated'
| 'failed'
| 'required';
}
}
}

Expand Down
6 changes: 4 additions & 2 deletions types/2022-08-01/Issuing/Cardholders.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,8 @@ declare module 'stripe' {
metadata?: Stripe.MetadataParam;

/**
* The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.
* The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards.
* While phone number is optional if the cardholder will not be creating EU cards, note that this cardholder will not be eligible for 3DS without a phone number. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.
*/
phone_number?: string;

Expand Down Expand Up @@ -2237,7 +2238,8 @@ declare module 'stripe' {
metadata?: Stripe.MetadataParam;

/**
* The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details.
* The cardholder's phone number. This is required for all cardholders who will be creating EU cards.
* While phone number is optional if the cardholder will not be creating EU cards, note that this cardholder will not be eligible for 3DS without a phone number. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.
*/
phone_number?: string;

Expand Down
5 changes: 5 additions & 0 deletions types/2022-08-01/Issuing/Transactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ declare module 'stripe' {
* State where the seller is located
*/
state: string | null;

/**
* URL provided by the merchant on a 3DS request
*/
url?: string | null;
}

interface NetworkData {
Expand Down
Loading

0 comments on commit 5917bc2

Please sign in to comment.