From 5be344d09ecd1886548d1089e1455ab102db2a51 Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Tue, 24 Mar 2020 15:12:14 -0700 Subject: [PATCH] Codegen for openapi cadc76e --- types/2020-03-02/Cards.d.ts | 2 +- types/2020-03-02/Charges.d.ts | 4 +-- types/2020-03-02/Issuing/Cardholders.d.ts | 4 +-- types/2020-03-02/Issuing/Cards.d.ts | 2 +- types/2020-03-02/Issuing/Disputes.d.ts | 16 ++++----- types/2020-03-02/PaymentMethods.d.ts | 2 +- types/2020-03-02/Subscriptions.d.ts | 42 +++++++++++++++++++++++ 7 files changed, 57 insertions(+), 15 deletions(-) diff --git a/types/2020-03-02/Cards.d.ts b/types/2020-03-02/Cards.d.ts index e865682cf9..ee5ddb4d18 100644 --- a/types/2020-03-02/Cards.d.ts +++ b/types/2020-03-02/Cards.d.ts @@ -114,7 +114,7 @@ declare module 'stripe' { exp_year: number; /** - * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number,for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. */ fingerprint?: string | null; diff --git a/types/2020-03-02/Charges.d.ts b/types/2020-03-02/Charges.d.ts index 42c21b8191..ff2b39c182 100644 --- a/types/2020-03-02/Charges.d.ts +++ b/types/2020-03-02/Charges.d.ts @@ -609,7 +609,7 @@ declare module 'stripe' { exp_year: number | null; /** - * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number,for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. */ fingerprint?: string | null; @@ -837,7 +837,7 @@ declare module 'stripe' { exp_year: number | null; /** - * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number,for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. */ fingerprint: string | null; diff --git a/types/2020-03-02/Issuing/Cardholders.d.ts b/types/2020-03-02/Issuing/Cardholders.d.ts index 3bbafe1bc4..e6311d6d64 100644 --- a/types/2020-03-02/Issuing/Cardholders.d.ts +++ b/types/2020-03-02/Issuing/Cardholders.d.ts @@ -1010,9 +1010,9 @@ declare module 'stripe' { address: Address; /** - * The cardholder's billing name. + * [DEPRECATED] The cardholder's billing name. */ - name: string | null; + name?: string | null; } interface Company { diff --git a/types/2020-03-02/Issuing/Cards.d.ts b/types/2020-03-02/Issuing/Cards.d.ts index 6a1fefd02c..3488c63ddd 100644 --- a/types/2020-03-02/Issuing/Cards.d.ts +++ b/types/2020-03-02/Issuing/Cards.d.ts @@ -3163,7 +3163,7 @@ declare module 'stripe' { name?: string; /** - * Only return cards whose full card number matches that of this card source ID. + * [DEPRECATED] Only return cards whose full card number matches that of this card source ID. */ source?: string; diff --git a/types/2020-03-02/Issuing/Disputes.d.ts b/types/2020-03-02/Issuing/Disputes.d.ts index e0f7aa6d87..82c4561947 100644 --- a/types/2020-03-02/Issuing/Disputes.d.ts +++ b/types/2020-03-02/Issuing/Disputes.d.ts @@ -18,24 +18,24 @@ declare module 'stripe' { /** * Disputed amount. Usually the amount of the `disputed_transaction`, but can differ (usually because of currency fluctuation or because only part of the order is disputed). */ - amount: number; + amount?: number; /** * Time at which the object was created. Measured in seconds since the Unix epoch. */ - created: number; + created?: number; /** * The currency the `disputed_transaction` was made in. */ - currency: string; + currency?: string; /** * The transaction being disputed. */ - disputed_transaction: string | Stripe.Issuing.Transaction; + disputed_transaction?: string | Stripe.Issuing.Transaction; - evidence: Dispute.Evidence; + evidence?: Dispute.Evidence; /** * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -45,17 +45,17 @@ declare module 'stripe' { /** * Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: Metadata; + metadata?: Metadata; /** * Reason for this dispute. One of `duplicate`, `product_not_received`, `fraudulent`, or `other`. */ - reason: string; + reason?: string; /** * Current status of dispute. One of `unsubmitted`, `under_review`, `won`, or `lost`. */ - status: Dispute.Status; + status?: Dispute.Status; } namespace Dispute { diff --git a/types/2020-03-02/PaymentMethods.d.ts b/types/2020-03-02/PaymentMethods.d.ts index 2fc8b96fb5..0eb6c5712c 100644 --- a/types/2020-03-02/PaymentMethods.d.ts +++ b/types/2020-03-02/PaymentMethods.d.ts @@ -126,7 +126,7 @@ declare module 'stripe' { exp_year: number; /** - * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. + * Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number,for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. */ fingerprint?: string | null; diff --git a/types/2020-03-02/Subscriptions.d.ts b/types/2020-03-02/Subscriptions.d.ts index 18e2c51b61..2b192e155f 100644 --- a/types/2020-03-02/Subscriptions.d.ts +++ b/types/2020-03-02/Subscriptions.d.ts @@ -124,6 +124,11 @@ declare module 'stripe' { */ next_pending_invoice_item_invoice: number | null; + /** + * If specified, payment collection for this subscription will be paused. + */ + pause_collection: Subscription.PauseCollection | null; + /** * Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ @@ -208,6 +213,22 @@ declare module 'stripe' { type CollectionMethod = 'charge_automatically' | 'send_invoice'; + interface PauseCollection { + /** + * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + */ + behavior: PauseCollection.Behavior; + + /** + * The time after which the subscription will resume collecting payments. + */ + resumes_at: number | null; + } + + namespace PauseCollection { + type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void'; + } + interface PendingInvoiceItemInterval { /** * Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. @@ -571,6 +592,11 @@ declare module 'stripe' { */ off_session?: boolean; + /** + * If specified, payment collection for this subscription will be paused. + */ + pause_collection?: SubscriptionUpdateParams.PauseCollection | null; + /** * Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. * @@ -693,6 +719,22 @@ declare module 'stripe' { } } + interface PauseCollection { + /** + * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + */ + behavior: PauseCollection.Behavior; + + /** + * The time after which the subscription will resume collecting payments. + */ + resumes_at?: number; + } + + namespace PauseCollection { + type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void'; + } + type PaymentBehavior = | 'allow_incomplete' | 'error_if_incomplete'