Skip to content

Commit

Permalink
Merge pull request #908 from stripe/remi/codegen-1158945
Browse files Browse the repository at this point in the history
Multiple API changes
  • Loading branch information
remi-stripe authored Jun 3, 2020
2 parents aa27788 + 798a084 commit 455e8cf
Show file tree
Hide file tree
Showing 8 changed files with 171 additions and 9 deletions.
9 changes: 9 additions & 0 deletions types/2020-03-02/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,8 @@ declare module 'stripe' {
payments: Settings.Payments;

payouts?: Settings.Payouts;

sepa_debit_payments?: Settings.SepaDebitPayments;
}

namespace Settings {
Expand Down Expand Up @@ -632,6 +634,13 @@ declare module 'stripe' {
weekly_anchor?: string;
}
}

interface SepaDebitPayments {
/**
* SEPA creditor identifier that identifies the company making the payment.
*/
creditor_id?: string;
}
}

interface TosAcceptance {
Expand Down
41 changes: 36 additions & 5 deletions types/2020-03-02/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,21 +198,34 @@ declare module 'stripe' {

type Locale =
| 'auto'
| 'bg'
| 'cs'
| 'da'
| 'de'
| 'el'
| 'en'
| 'es'
| 'et'
| 'fi'
| 'fr'
| 'hu'
| 'it'
| 'ja'
| 'lt'
| 'lv'
| 'ms'
| 'mt'
| 'nb'
| 'nl'
| 'pl'
| 'pt'
| 'pt-BR'
| 'ro'
| 'ru'
| 'sk'
| 'sl'
| 'sv'
| 'tr'
| 'zh';

type Mode = 'payment' | 'setup' | 'subscription';
Expand Down Expand Up @@ -500,7 +513,14 @@ declare module 'stripe' {
cancel_url: string;

/**
* A list of the types of payment methods (e.g., card) this Checkout session can accept.
* A list of the types of payment methods (e.g., `card`) this Checkout session can accept.
*
* Read more about the supported payment methods and their requirements in our [payment
* method details guide](https://stripe.com/docs/payments/checkout/payment-methods).
*
* If multiple payment methods are passed, Checkout will dynamically reorder them to
* prioritize the most relevant payment methods based on the customer's location and
* other characteristics.
*/
payment_method_types: Array<SessionCreateParams.PaymentMethodType>;

Expand Down Expand Up @@ -552,9 +572,7 @@ declare module 'stripe' {

/**
* A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [prices](https://stripe.com/docs/api/prices).
*
* If not using recurring prices, this parameter is for one-time payments or
* adding invoice line items to a subscription (used in conjunction with `subscription_data.items`).
* One-time prices in `subscription` mode will be on the initial invoice only.
*
* There is a maximum of 100 line items, however it is recommended to
* consolidate line items if there are more than a few dozen.
Expand Down Expand Up @@ -680,7 +698,7 @@ declare module 'stripe' {
recurring?: PriceData.Recurring;

/**
* A positive integer in %s (or 0 for a free price) representing how much to charge.
* A positive integer in %s representing how much to charge.
*/
unit_amount?: number;

Expand Down Expand Up @@ -733,21 +751,34 @@ declare module 'stripe' {

type Locale =
| 'auto'
| 'bg'
| 'cs'
| 'da'
| 'de'
| 'el'
| 'en'
| 'es'
| 'et'
| 'fi'
| 'fr'
| 'hu'
| 'it'
| 'ja'
| 'lt'
| 'lv'
| 'ms'
| 'mt'
| 'nb'
| 'nl'
| 'pl'
| 'pt'
| 'pt-BR'
| 'ro'
| 'ru'
| 'sk'
| 'sl'
| 'sv'
| 'tr'
| 'zh';

type Mode = 'payment' | 'setup' | 'subscription';
Expand Down
2 changes: 1 addition & 1 deletion types/2020-03-02/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ declare module 'stripe' {
/**
* The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.
*/
transfer_data?: Invoice.TransferData | null;
transfer_data: Invoice.TransferData | null;

/**
* Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
Expand Down
61 changes: 61 additions & 0 deletions types/2020-03-02/PaymentIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,23 @@ declare module 'stripe' {
}

interface PaymentMethodOptions {
bancontact?: PaymentMethodOptions.Bancontact;

card?: PaymentMethodOptions.Card;
}

namespace PaymentMethodOptions {
interface Bancontact {
/**
* Preferred language of the Bancontact authorization page that the customer is redirected to.
*/
preferred_language: Bancontact.PreferredLanguage;
}

namespace Bancontact {
type PreferredLanguage = 'de' | 'en' | 'fr' | 'nl';
}

interface Card {
/**
* Installment details for this payment (Mexico only).
Expand Down Expand Up @@ -692,13 +705,29 @@ declare module 'stripe' {
type OffSession = 'one_off' | 'recurring';

interface PaymentMethodOptions {
/**
* If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
*/
bancontact?: PaymentMethodOptions.Bancontact | null;

/**
* Configuration for any card payments attempted on this PaymentIntent.
*/
card?: PaymentMethodOptions.Card | null;
}

namespace PaymentMethodOptions {
interface Bancontact {
/**
* Preferred language of the Bancontact authorization page that the customer is redirected to.
*/
preferred_language?: Bancontact.PreferredLanguage;
}

namespace Bancontact {
type PreferredLanguage = 'de' | 'en' | 'fr' | 'nl';
}

interface Card {
/**
* Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
Expand Down Expand Up @@ -936,13 +965,29 @@ declare module 'stripe' {

namespace PaymentIntentUpdateParams {
interface PaymentMethodOptions {
/**
* If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
*/
bancontact?: PaymentMethodOptions.Bancontact | null;

/**
* Configuration for any card payments attempted on this PaymentIntent.
*/
card?: PaymentMethodOptions.Card | null;
}

namespace PaymentMethodOptions {
interface Bancontact {
/**
* Preferred language of the Bancontact authorization page that the customer is redirected to.
*/
preferred_language?: Bancontact.PreferredLanguage;
}

namespace Bancontact {
type PreferredLanguage = 'de' | 'en' | 'fr' | 'nl';
}

interface Card {
/**
* Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
Expand Down Expand Up @@ -1296,13 +1341,29 @@ declare module 'stripe' {
type OffSession = 'one_off' | 'recurring';

interface PaymentMethodOptions {
/**
* If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
*/
bancontact?: PaymentMethodOptions.Bancontact | null;

/**
* Configuration for any card payments attempted on this PaymentIntent.
*/
card?: PaymentMethodOptions.Card | null;
}

namespace PaymentMethodOptions {
interface Bancontact {
/**
* Preferred language of the Bancontact authorization page that the customer is redirected to.
*/
preferred_language?: Bancontact.PreferredLanguage;
}

namespace Bancontact {
type PreferredLanguage = 'de' | 'en' | 'fr' | 'nl';
}

interface Card {
/**
* Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
Expand Down
Loading

0 comments on commit 455e8cf

Please sign in to comment.