diff --git a/lib/resources.js b/lib/resources.js index 5b311e9b39..619f9e3466 100644 --- a/lib/resources.js +++ b/lib/resources.js @@ -87,6 +87,7 @@ module.exports = { ScheduledQueryRuns: require('./resources/Sigma/ScheduledQueryRuns'), }), Terminal: resourceNamespace('terminal', { + Configurations: require('./resources/Terminal/Configurations'), ConnectionTokens: require('./resources/Terminal/ConnectionTokens'), Locations: require('./resources/Terminal/Locations'), Readers: require('./resources/Terminal/Readers'), diff --git a/lib/resources/Customers.js b/lib/resources/Customers.js index 660cfa78f9..b14ea81472 100644 --- a/lib/resources/Customers.js +++ b/lib/resources/Customers.js @@ -34,6 +34,11 @@ module.exports = StripeResource.extend({ path: '/{customer}', }), + createFundingInstructions: stripeMethod({ + method: 'POST', + path: '/{customer}/funding_instructions', + }), + deleteDiscount: stripeMethod({ method: 'DELETE', path: '/{customer}/discount', diff --git a/lib/resources/Terminal/Configurations.js b/lib/resources/Terminal/Configurations.js new file mode 100644 index 0000000000..4a7d069a8e --- /dev/null +++ b/lib/resources/Terminal/Configurations.js @@ -0,0 +1,36 @@ +// File generated from our OpenAPI spec + +'use strict'; + +const StripeResource = require('../../StripeResource'); +const stripeMethod = StripeResource.method; + +module.exports = StripeResource.extend({ + path: 'terminal/configurations', + + create: stripeMethod({ + method: 'POST', + path: '', + }), + + retrieve: stripeMethod({ + method: 'GET', + path: '/{configuration}', + }), + + update: stripeMethod({ + method: 'POST', + path: '/{configuration}', + }), + + list: stripeMethod({ + method: 'GET', + path: '', + methodType: 'list', + }), + + del: stripeMethod({ + method: 'DELETE', + path: '/{configuration}', + }), +}); diff --git a/test/resources/generated_examples_test.spec.js b/test/resources/generated_examples_test.spec.js index 03b6f2c694..477b62609f 100644 --- a/test/resources/generated_examples_test.spec.js +++ b/test/resources/generated_examples_test.spec.js @@ -47,6 +47,21 @@ describe('Customer', function() { ); expect(paymentMethods).not.to.be.null; }); + + it('createFundingInstructions method', async function() { + const fundingInstructions = await stripe.customers.createFundingInstructions( + 'cus_123', + { + bank_transfer: { + requested_address_types: ['zengin'], + type: 'jp_bank_transfer', + }, + currency: 'usd', + funding_type: 'bank_transfer', + } + ); + expect(fundingInstructions).not.to.be.null; + }); }); describe('BalanceTransaction', function() { @@ -2075,3 +2090,35 @@ describe('TestHelpers.TestClock', function() { expect(testClock).not.to.be.null; }); }); + +describe('Terminal.Configuration', function() { + it('list method', async function() { + const configurations = await stripe.terminal.configurations.list(); + expect(configurations).not.to.be.null; + }); + + it('retrieve method', async function() { + const configuration = await stripe.terminal.configurations.retrieve( + 'uc_123' + ); + expect(configuration).not.to.be.null; + }); + + it('create method', async function() { + const configuration = await stripe.terminal.configurations.create(); + expect(configuration).not.to.be.null; + }); + + it('update method', async function() { + const configuration = await stripe.terminal.configurations.update( + 'uc_123', + {tipping: {usd: {fixed_amounts: [10]}}} + ); + expect(configuration).not.to.be.null; + }); + + it('del method', async function() { + const deleted = await stripe.terminal.configurations.del('uc_123'); + expect(deleted).not.to.be.null; + }); +}); diff --git a/types/2020-08-27/Charges.d.ts b/types/2020-08-27/Charges.d.ts index ff0fdecb94..883e4af496 100644 --- a/types/2020-08-27/Charges.d.ts +++ b/types/2020-08-27/Charges.d.ts @@ -409,6 +409,8 @@ declare module 'stripe' { card_present?: PaymentMethodDetails.CardPresent; + customer_balance?: PaymentMethodDetails.CustomerBalance; + eps?: PaymentMethodDetails.Eps; fpx?: PaymentMethodDetails.Fpx; @@ -1007,7 +1009,7 @@ declare module 'stripe' { iin?: string | null; /** - * Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support] /docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support. + * Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). */ incremental_authorization_supported: boolean | null; @@ -1102,6 +1104,8 @@ declare module 'stripe' { } } + interface CustomerBalance {} + interface Eps { /** * The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. diff --git a/types/2020-08-27/Customers.d.ts b/types/2020-08-27/Customers.d.ts index be5ac7c071..48a0e3e539 100644 --- a/types/2020-08-27/Customers.d.ts +++ b/types/2020-08-27/Customers.d.ts @@ -277,6 +277,11 @@ declare module 'stripe' { */ balance?: number; + /** + * Balance information and default balance settings for this customer. + */ + cash_balance?: CustomerCreateParams.CashBalance; + coupon?: string; /** @@ -365,6 +370,34 @@ declare module 'stripe' { } namespace CustomerCreateParams { + interface CashBalance { + /** + * Settings controlling the behavior of the customer's cash balance, + * such as reconciliation of funds received. + */ + settings?: CashBalance.Settings; + } + + namespace CashBalance { + interface Settings { + /** + * Method for using the customer balance to pay outstanding + * `customer_balance` PaymentIntents. If set to `automatic`, all available + * funds will automatically be used to pay any outstanding PaymentIntent. + * If set to `manual`, only customer balance funds from bank transfers + * with a reference code matching + * `payment_intent.next_action.display_bank_transfer_intructions.reference_code` will + * automatically be used to pay the corresponding outstanding + * PaymentIntent. + */ + reconciliation_mode?: Settings.ReconciliationMode; + } + + namespace Settings { + type ReconciliationMode = 'automatic' | 'manual'; + } + } + interface InvoiceSettings { /** * Default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. @@ -508,6 +541,11 @@ declare module 'stripe' { */ balance?: number; + /** + * Balance information and default balance settings for this customer. + */ + cash_balance?: CustomerUpdateParams.CashBalance; + coupon?: string; /** @@ -598,6 +636,34 @@ declare module 'stripe' { } namespace CustomerUpdateParams { + interface CashBalance { + /** + * Settings controlling the behavior of the customer's cash balance, + * such as reconciliation of funds received. + */ + settings?: CashBalance.Settings; + } + + namespace CashBalance { + interface Settings { + /** + * Method for using the customer balance to pay outstanding + * `customer_balance` PaymentIntents. If set to `automatic`, all available + * funds will automatically be used to pay any outstanding PaymentIntent. + * If set to `manual`, only customer balance funds from bank transfers + * with a reference code matching + * `payment_intent.next_action.display_bank_transfer_intructions.reference_code` will + * automatically be used to pay the corresponding outstanding + * PaymentIntent. + */ + reconciliation_mode?: Settings.ReconciliationMode; + } + + namespace Settings { + type ReconciliationMode = 'automatic' | 'manual'; + } + } + interface InvoiceSettings { /** * Default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. @@ -683,6 +749,44 @@ declare module 'stripe' { interface CustomerDeleteParams {} + interface CustomerCreateFundingInstructionsParams { + /** + * Additional parameters for `bank_transfer` funding types + */ + bank_transfer: CustomerCreateFundingInstructionsParams.BankTransfer; + + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string; + + /** + * The `funding_type` to get the instructions for. + */ + funding_type: 'bank_transfer'; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + namespace CustomerCreateFundingInstructionsParams { + interface BankTransfer { + /** + * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `zengin`. + */ + requested_address_types?: Array<'zengin'>; + + /** + * The type of the `bank_transfer` + */ + type: 'jp_bank_transfer'; + } + } + interface CustomerDeleteDiscountParams {} interface CustomerListPaymentMethodsParams extends PaginationParams { @@ -708,6 +812,7 @@ declare module 'stripe' { | 'boleto' | 'card' | 'card_present' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' @@ -804,6 +909,17 @@ declare module 'stripe' { options?: RequestOptions ): Promise>; + /** + * Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time. + */ + createFundingInstructions( + id: string, + params: CustomerCreateFundingInstructionsParams, + options?: RequestOptions + ): Promise>; + /** * Removes the currently applied discount on a customer. */ diff --git a/types/2020-08-27/FundingInstructions.d.ts b/types/2020-08-27/FundingInstructions.d.ts new file mode 100644 index 0000000000..7c045d2b8b --- /dev/null +++ b/types/2020-08-27/FundingInstructions.d.ts @@ -0,0 +1,80 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + /** + * The FundingInstructions object. + */ + interface FundingInstructions { + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'funding_instructions'; + + bank_transfer: FundingInstructions.BankTransfer; + + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string; + + /** + * The `funding_type` of the returned instructions + */ + funding_type: 'bank_transfer'; + + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean; + } + + namespace FundingInstructions { + interface BankTransfer { + /** + * The country of the bank account to fund + */ + country: string; + + /** + * A list of financial addresses that can be used to fund a particular balance + */ + financial_addresses: Array; + + /** + * The bank_transfer type + */ + type: BankTransfer.Type; + } + + namespace BankTransfer { + interface FinancialAddress { + /** + * The payment networks supported by this FinancialAddress + */ + supported_networks?: Array; + + /** + * The type of financial address + */ + type: FinancialAddress.Type; + + /** + * Zengin Records contain Japan bank account details per the Zengin format. + */ + zengin?: FinancialAddress.Zengin; + } + + namespace FinancialAddress { + type SupportedNetwork = 'sepa' | 'zengin'; + + type Type = 'iban' | 'zengin'; + + interface Zengin {} + } + + type Type = 'eu_bank_transfer' | 'jp_bank_transfer'; + } + } + } +} diff --git a/types/2020-08-27/PaymentIntents.d.ts b/types/2020-08-27/PaymentIntents.d.ts index bc24e558a5..f703b52c48 100644 --- a/types/2020-08-27/PaymentIntents.d.ts +++ b/types/2020-08-27/PaymentIntents.d.ts @@ -26,6 +26,8 @@ declare module 'stripe' { */ amount_capturable: number; + amount_details?: PaymentIntent.AmountDetails; + /** * Amount that was collected by this PaymentIntent. */ @@ -214,6 +216,19 @@ declare module 'stripe' { } namespace PaymentIntent { + interface AmountDetails { + tip?: AmountDetails.Tip; + } + + namespace AmountDetails { + interface Tip { + /** + * Portion of the amount that corresponds to a tip. + */ + amount: number | null; + } + } + interface AutomaticPaymentMethods { /** * Automatically calculates compatible payment methods @@ -343,6 +358,8 @@ declare module 'stripe' { card_await_notification?: NextAction.CardAwaitNotification; + display_bank_transfer_instructions?: NextAction.DisplayBankTransferInstructions; + konbini_display_details?: NextAction.KonbiniDisplayDetails; oxxo_display_details?: NextAction.OxxoDisplayDetails; @@ -427,6 +444,62 @@ declare module 'stripe' { customer_approval_required: boolean | null; } + interface DisplayBankTransferInstructions { + /** + * The remaining amount that needs to be transferred to complete the payment. + */ + amount_remaining: number | null; + + /** + * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + */ + currency: string | null; + + /** + * A list of financial addresses that can be used to fund the customer balance + */ + financial_addresses?: Array< + DisplayBankTransferInstructions.FinancialAddress + >; + + /** + * A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. + */ + reference: string | null; + + /** + * Type of bank transfer + */ + type: 'jp_bank_transfer'; + } + + namespace DisplayBankTransferInstructions { + interface FinancialAddress { + /** + * The payment networks supported by this FinancialAddress + */ + supported_networks?: Array; + + /** + * The type of financial address + */ + type: FinancialAddress.Type; + + /** + * Zengin Records contain Japan bank account details per the Zengin format. + */ + zengin?: FinancialAddress.Zengin; + } + + namespace FinancialAddress { + type SupportedNetwork = 'sepa' | 'zengin'; + + type Type = 'iban' | 'zengin'; + + interface Zengin {} + } + } + interface KonbiniDisplayDetails { /** * The timestamp at which the pending Konbini payment expires. @@ -670,6 +743,8 @@ declare module 'stripe' { card_present?: PaymentMethodOptions.CardPresent; + customer_balance?: PaymentMethodOptions.CustomerBalance; + eps?: PaymentMethodOptions.Eps; fpx?: PaymentMethodOptions.Fpx; @@ -1034,11 +1109,61 @@ declare module 'stripe' { request_extended_authorization: boolean | null; /** - * Request ability to [increment](docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ request_incremental_authorization_support: boolean | null; } + interface CustomerBalance { + bank_transfer?: CustomerBalance.BankTransfer; + + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ + funding_type: 'bank_transfer' | null; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + */ + setup_future_usage?: 'none'; + } + + namespace CustomerBalance { + interface BankTransfer { + /** + * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `zengin`. + */ + requested_address_types?: Array<'zengin'>; + + /** + * The bank transfer type that this PaymentIntent is allowed to use for funding. Permitted values include: `us_bank_account`, `eu_bank_account`, `id_bank_account`, `gb_bank_account`, `jp_bank_account`, `mx_bank_account`, `eu_bank_transfer`, `gb_bank_transfer`, `id_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ + type: BankTransfer.Type | null; + } + + namespace BankTransfer { + type Type = + | 'eu_bank_account' + | 'eu_bank_transfer' + | 'gb_bank_account' + | 'gb_bank_transfer' + | 'id_bank_account' + | 'id_bank_transfer' + | 'jp_bank_account' + | 'jp_bank_transfer' + | 'mx_bank_account' + | 'mx_bank_transfer' + | 'us_bank_account' + | 'us_bank_transfer'; + } + } + interface Eps { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1626,6 +1751,11 @@ declare module 'stripe' { */ boleto?: PaymentMethodData.Boleto; + /** + * If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + */ + customer_balance?: PaymentMethodData.CustomerBalance; + /** * If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. */ @@ -1795,6 +1925,8 @@ declare module 'stripe' { tax_id: string; } + interface CustomerBalance {} + interface Eps { /** * The customer's bank. @@ -1996,6 +2128,7 @@ declare module 'stripe' { | 'bacs_debit' | 'bancontact' | 'boleto' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' @@ -2090,6 +2223,13 @@ declare module 'stripe' { */ card_present?: Stripe.Emptyable; + /** + * If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + */ + customer_balance?: Stripe.Emptyable< + PaymentMethodOptions.CustomerBalance + >; + /** * If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. */ @@ -2520,11 +2660,50 @@ declare module 'stripe' { request_extended_authorization?: boolean; /** - * Request ability to [increment](docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ request_incremental_authorization_support?: boolean; } + interface CustomerBalance { + /** + * Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + */ + bank_transfer?: CustomerBalance.BankTransfer; + + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ + funding_type?: 'bank_transfer'; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + */ + setup_future_usage?: 'none'; + } + + namespace CustomerBalance { + interface BankTransfer { + /** + * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `zengin`. + */ + requested_address_types?: Array<'zengin'>; + + /** + * The list of bank transfer types that this PaymentIntent is allowed to use for funding. Permitted values include: `us_bank_account`, `eu_bank_account`, `id_bank_account`, `gb_bank_account`, `jp_bank_account`, `mx_bank_account`, `eu_bank_transfer`, `gb_bank_transfer`, `id_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ + type: 'jp_bank_transfer'; + } + } + interface Eps { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3061,6 +3240,11 @@ declare module 'stripe' { */ boleto?: PaymentMethodData.Boleto; + /** + * If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + */ + customer_balance?: PaymentMethodData.CustomerBalance; + /** * If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. */ @@ -3230,6 +3414,8 @@ declare module 'stripe' { tax_id: string; } + interface CustomerBalance {} + interface Eps { /** * The customer's bank. @@ -3431,6 +3617,7 @@ declare module 'stripe' { | 'bacs_debit' | 'bancontact' | 'boleto' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' @@ -3525,6 +3712,13 @@ declare module 'stripe' { */ card_present?: Stripe.Emptyable; + /** + * If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + */ + customer_balance?: Stripe.Emptyable< + PaymentMethodOptions.CustomerBalance + >; + /** * If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. */ @@ -3955,11 +4149,50 @@ declare module 'stripe' { request_extended_authorization?: boolean; /** - * Request ability to [increment](docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ request_incremental_authorization_support?: boolean; } + interface CustomerBalance { + /** + * Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + */ + bank_transfer?: CustomerBalance.BankTransfer; + + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ + funding_type?: 'bank_transfer'; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + */ + setup_future_usage?: 'none'; + } + + namespace CustomerBalance { + interface BankTransfer { + /** + * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `zengin`. + */ + requested_address_types?: Array<'zengin'>; + + /** + * The list of bank transfer types that this PaymentIntent is allowed to use for funding. Permitted values include: `us_bank_account`, `eu_bank_account`, `id_bank_account`, `gb_bank_account`, `jp_bank_account`, `mx_bank_account`, `eu_bank_transfer`, `gb_bank_transfer`, `id_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ + type: 'jp_bank_transfer'; + } + } + interface Eps { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4633,6 +4866,11 @@ declare module 'stripe' { */ boleto?: PaymentMethodData.Boleto; + /** + * If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + */ + customer_balance?: PaymentMethodData.CustomerBalance; + /** * If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. */ @@ -4802,6 +5040,8 @@ declare module 'stripe' { tax_id: string; } + interface CustomerBalance {} + interface Eps { /** * The customer's bank. @@ -5003,6 +5243,7 @@ declare module 'stripe' { | 'bacs_debit' | 'bancontact' | 'boleto' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' @@ -5097,6 +5338,13 @@ declare module 'stripe' { */ card_present?: Stripe.Emptyable; + /** + * If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + */ + customer_balance?: Stripe.Emptyable< + PaymentMethodOptions.CustomerBalance + >; + /** * If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. */ @@ -5527,11 +5775,50 @@ declare module 'stripe' { request_extended_authorization?: boolean; /** - * Request ability to [increment](docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + * Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ request_incremental_authorization_support?: boolean; } + interface CustomerBalance { + /** + * Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + */ + bank_transfer?: CustomerBalance.BankTransfer; + + /** + * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + */ + funding_type?: 'bank_transfer'; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + */ + setup_future_usage?: 'none'; + } + + namespace CustomerBalance { + interface BankTransfer { + /** + * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `zengin`. + */ + requested_address_types?: Array<'zengin'>; + + /** + * The list of bank transfer types that this PaymentIntent is allowed to use for funding. Permitted values include: `us_bank_account`, `eu_bank_account`, `id_bank_account`, `gb_bank_account`, `jp_bank_account`, `mx_bank_account`, `eu_bank_transfer`, `gb_bank_transfer`, `id_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + */ + type: 'jp_bank_transfer'; + } + } + interface Eps { /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/types/2020-08-27/PaymentMethods.d.ts b/types/2020-08-27/PaymentMethods.d.ts index 7721aaf9d4..81d279ac6f 100644 --- a/types/2020-08-27/PaymentMethods.d.ts +++ b/types/2020-08-27/PaymentMethods.d.ts @@ -46,6 +46,8 @@ declare module 'stripe' { */ customer: string | Stripe.Customer | null; + customer_balance?: PaymentMethod.CustomerBalance; + eps?: PaymentMethod.Eps; fpx?: PaymentMethod.Fpx; @@ -389,6 +391,8 @@ declare module 'stripe' { interface CardPresent {} + interface CustomerBalance {} + interface Eps { /** * The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. @@ -647,6 +651,7 @@ declare module 'stripe' { | 'boleto' | 'card' | 'card_present' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' @@ -755,6 +760,11 @@ declare module 'stripe' { */ customer?: string; + /** + * If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + */ + customer_balance?: PaymentMethodCreateParams.CustomerBalance; + /** * If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. */ @@ -960,6 +970,8 @@ declare module 'stripe' { token: string; } + interface CustomerBalance {} + interface Eps { /** * The customer's bank. @@ -1162,6 +1174,7 @@ declare module 'stripe' { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' @@ -1351,6 +1364,7 @@ declare module 'stripe' { | 'boleto' | 'card' | 'card_present' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' diff --git a/types/2020-08-27/Terminal/Configurations.d.ts b/types/2020-08-27/Terminal/Configurations.d.ts new file mode 100644 index 0000000000..e68622a450 --- /dev/null +++ b/types/2020-08-27/Terminal/Configurations.d.ts @@ -0,0 +1,1075 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Terminal { + /** + * The Configuration object. + */ + interface Configuration { + /** + * Unique identifier for the object. + */ + id: string; + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'terminal.configuration'; + + bbpos_wisepos_e?: Configuration.BbposWiseposE; + + deleted?: void; + + /** + * Whether this Configuration is the default for your account + */ + is_account_default: boolean | null; + + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean; + + tipping?: Configuration.Tipping; + + verifone_p400?: Configuration.VerifoneP400; + } + + namespace Configuration { + interface BbposWiseposE { + /** + * A File ID representing an image you would like displayed on the reader. + */ + splashscreen?: string | Stripe.File; + } + + interface Tipping { + aud?: Tipping.Aud; + + cad?: Tipping.Cad; + + chf?: Tipping.Chf; + + dkk?: Tipping.Dkk; + + eur?: Tipping.Eur; + + gbp?: Tipping.Gbp; + + hkd?: Tipping.Hkd; + + myr?: Tipping.Myr; + + nok?: Tipping.Nok; + + nzd?: Tipping.Nzd; + + sek?: Tipping.Sek; + + sgd?: Tipping.Sgd; + + usd?: Tipping.Usd; + } + + namespace Tipping { + interface Aud { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts: Array | null; + + /** + * Percentages displayed when collecting a tip + */ + percentages: Array | null; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Cad { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts: Array | null; + + /** + * Percentages displayed when collecting a tip + */ + percentages: Array | null; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Chf { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts: Array | null; + + /** + * Percentages displayed when collecting a tip + */ + percentages: Array | null; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Dkk { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts: Array | null; + + /** + * Percentages displayed when collecting a tip + */ + percentages: Array | null; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Eur { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts: Array | null; + + /** + * Percentages displayed when collecting a tip + */ + percentages: Array | null; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Gbp { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts: Array | null; + + /** + * Percentages displayed when collecting a tip + */ + percentages: Array | null; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Hkd { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts: Array | null; + + /** + * Percentages displayed when collecting a tip + */ + percentages: Array | null; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Myr { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts: Array | null; + + /** + * Percentages displayed when collecting a tip + */ + percentages: Array | null; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Nok { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts: Array | null; + + /** + * Percentages displayed when collecting a tip + */ + percentages: Array | null; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Nzd { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts: Array | null; + + /** + * Percentages displayed when collecting a tip + */ + percentages: Array | null; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Sek { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts: Array | null; + + /** + * Percentages displayed when collecting a tip + */ + percentages: Array | null; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Sgd { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts: Array | null; + + /** + * Percentages displayed when collecting a tip + */ + percentages: Array | null; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Usd { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts: Array | null; + + /** + * Percentages displayed when collecting a tip + */ + percentages: Array | null; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + } + + interface VerifoneP400 { + /** + * A File ID representing an image you would like displayed on the reader. + */ + splashscreen?: string | Stripe.File; + } + } + + /** + * The DeletedConfiguration object. + */ + interface DeletedConfiguration { + /** + * Unique identifier for the object. + */ + id: string; + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'terminal.configuration'; + + /** + * Always true for a deleted object + */ + deleted: true; + } + + interface ConfigurationCreateParams { + /** + * An object containing device type specific settings for BBPOS WisePOS E readers + */ + bbpos_wisepos_e?: ConfigurationCreateParams.BbposWiseposE; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Tipping configurations for readers supporting on-reader tips + */ + tipping?: Stripe.Emptyable; + + /** + * An object containing device type specific settings for Verifone P400 readers + */ + verifone_p400?: ConfigurationCreateParams.VerifoneP400; + } + + namespace ConfigurationCreateParams { + interface BbposWiseposE { + /** + * A File ID representing an image you would like displayed on the reader. + */ + splashscreen?: Stripe.Emptyable; + } + + interface Tipping { + /** + * Tipping configuration for AUD + */ + aud?: Tipping.Aud; + + /** + * Tipping configuration for CAD + */ + cad?: Tipping.Cad; + + /** + * Tipping configuration for CHF + */ + chf?: Tipping.Chf; + + /** + * Tipping configuration for DKK + */ + dkk?: Tipping.Dkk; + + /** + * Tipping configuration for EUR + */ + eur?: Tipping.Eur; + + /** + * Tipping configuration for GBP + */ + gbp?: Tipping.Gbp; + + /** + * Tipping configuration for HKD + */ + hkd?: Tipping.Hkd; + + /** + * Tipping configuration for MYR + */ + myr?: Tipping.Myr; + + /** + * Tipping configuration for NOK + */ + nok?: Tipping.Nok; + + /** + * Tipping configuration for NZD + */ + nzd?: Tipping.Nzd; + + /** + * Tipping configuration for SEK + */ + sek?: Tipping.Sek; + + /** + * Tipping configuration for SGD + */ + sgd?: Tipping.Sgd; + + /** + * Tipping configuration for USD + */ + usd?: Tipping.Usd; + } + + namespace Tipping { + interface Aud { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Cad { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Chf { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Dkk { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Eur { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Gbp { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Hkd { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Myr { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Nok { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Nzd { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Sek { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Sgd { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Usd { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + } + + interface VerifoneP400 { + /** + * A File ID representing an image you would like displayed on the reader. + */ + splashscreen?: Stripe.Emptyable; + } + } + + interface ConfigurationRetrieveParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface ConfigurationUpdateParams { + /** + * An object containing device type specific settings for BBPOS WisePOS E readers + */ + bbpos_wisepos_e?: Stripe.Emptyable< + ConfigurationUpdateParams.BbposWiseposE + >; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Tipping configurations for readers supporting on-reader tips + */ + tipping?: Stripe.Emptyable; + + /** + * An object containing device type specific settings for Verifone P400 readers + */ + verifone_p400?: Stripe.Emptyable< + ConfigurationUpdateParams.VerifoneP400 + >; + } + + namespace ConfigurationUpdateParams { + interface BbposWiseposE { + /** + * A File ID representing an image you would like displayed on the reader. + */ + splashscreen?: Stripe.Emptyable; + } + + interface Tipping { + /** + * Tipping configuration for AUD + */ + aud?: Tipping.Aud; + + /** + * Tipping configuration for CAD + */ + cad?: Tipping.Cad; + + /** + * Tipping configuration for CHF + */ + chf?: Tipping.Chf; + + /** + * Tipping configuration for DKK + */ + dkk?: Tipping.Dkk; + + /** + * Tipping configuration for EUR + */ + eur?: Tipping.Eur; + + /** + * Tipping configuration for GBP + */ + gbp?: Tipping.Gbp; + + /** + * Tipping configuration for HKD + */ + hkd?: Tipping.Hkd; + + /** + * Tipping configuration for MYR + */ + myr?: Tipping.Myr; + + /** + * Tipping configuration for NOK + */ + nok?: Tipping.Nok; + + /** + * Tipping configuration for NZD + */ + nzd?: Tipping.Nzd; + + /** + * Tipping configuration for SEK + */ + sek?: Tipping.Sek; + + /** + * Tipping configuration for SGD + */ + sgd?: Tipping.Sgd; + + /** + * Tipping configuration for USD + */ + usd?: Tipping.Usd; + } + + namespace Tipping { + interface Aud { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Cad { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Chf { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Dkk { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Eur { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Gbp { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Hkd { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Myr { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Nok { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Nzd { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Sek { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Sgd { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + + interface Usd { + /** + * Fixed amounts displayed when collecting a tip + */ + fixed_amounts?: Array; + + /** + * Percentages displayed when collecting a tip + */ + percentages?: Array; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + */ + smart_tip_threshold?: number; + } + } + + interface VerifoneP400 { + /** + * A File ID representing an image you would like displayed on the reader. + */ + splashscreen?: Stripe.Emptyable; + } + } + + interface ConfigurationListParams extends PaginationParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * if present, only return the account default or non-default configurations. + */ + is_account_default?: boolean; + } + + interface ConfigurationDeleteParams {} + + class ConfigurationsResource { + /** + * Creates a new Configuration object. + */ + create( + params?: ConfigurationCreateParams, + options?: RequestOptions + ): Promise>; + create( + options?: RequestOptions + ): Promise>; + + /** + * Retrieves a Configuration object. + */ + retrieve( + id: string, + params?: ConfigurationRetrieveParams, + options?: RequestOptions + ): Promise< + Stripe.Response< + Stripe.Terminal.Configuration | Stripe.Terminal.DeletedConfiguration + > + >; + retrieve( + id: string, + options?: RequestOptions + ): Promise< + Stripe.Response< + Stripe.Terminal.Configuration | Stripe.Terminal.DeletedConfiguration + > + >; + + /** + * Updates a new Configuration object. + */ + update( + id: string, + params?: ConfigurationUpdateParams, + options?: RequestOptions + ): Promise>; + + /** + * Returns a list of Configuration objects. + */ + list( + params?: ConfigurationListParams, + options?: RequestOptions + ): ApiListPromise; + list( + options?: RequestOptions + ): ApiListPromise; + + /** + * Deletes a Configuration object. + */ + del( + id: string, + params?: ConfigurationDeleteParams, + options?: RequestOptions + ): Promise>; + del( + id: string, + options?: RequestOptions + ): Promise>; + } + } + } +} diff --git a/types/2020-08-27/Terminal/Locations.d.ts b/types/2020-08-27/Terminal/Locations.d.ts index e58062d21c..e3b3dcd5de 100644 --- a/types/2020-08-27/Terminal/Locations.d.ts +++ b/types/2020-08-27/Terminal/Locations.d.ts @@ -19,6 +19,11 @@ declare module 'stripe' { address: Stripe.Address; + /** + * The ID of a configuration that will be used to customize all readers in this location. + */ + configuration_overrides?: string; + deleted?: void; /** @@ -68,6 +73,11 @@ declare module 'stripe' { */ display_name: string; + /** + * The ID of a configuration that will be used to customize all readers in this location. + */ + configuration_overrides?: string; + /** * Specifies which fields in the response should be expanded. */ @@ -126,6 +136,11 @@ declare module 'stripe' { */ address?: LocationUpdateParams.Address; + /** + * The ID of a configuration that will be used to customize all readers in this location. + */ + configuration_overrides?: string; + /** * A name for the location. */ diff --git a/types/2020-08-27/index.d.ts b/types/2020-08-27/index.d.ts index 48e6266076..992c68ddbc 100644 --- a/types/2020-08-27/index.d.ts +++ b/types/2020-08-27/index.d.ts @@ -41,6 +41,7 @@ /// /// /// +/// /// /// /// @@ -94,6 +95,7 @@ /// /// /// +/// /// /// /// @@ -208,6 +210,7 @@ declare module 'stripe' { scheduledQueryRuns: Stripe.Sigma.ScheduledQueryRunsResource; }; terminal: { + configurations: Stripe.Terminal.ConfigurationsResource; connectionTokens: Stripe.Terminal.ConnectionTokensResource; locations: Stripe.Terminal.LocationsResource; readers: Stripe.Terminal.ReadersResource;