| 1 |
# -*- coding: utf-8 -*- |
| 2 |
# File generated from our OpenAPI spec |
| 3 |
from typing import Dict, List |
| 4 |
from typing_extensions import Literal, NotRequired, TypedDict |
| 5 |
|
| 6 |
|
| 7 |
class PaymentMethodUpdateParams(TypedDict): |
| 8 |
allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] |
| 9 |
""" |
| 10 |
This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. |
| 11 |
""" |
| 12 |
billing_details: NotRequired["PaymentMethodUpdateParamsBillingDetails"] |
| 13 |
""" |
| 14 |
Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. |
| 15 |
""" |
| 16 |
card: NotRequired["PaymentMethodUpdateParamsCard"] |
| 17 |
""" |
| 18 |
If this is a `card` PaymentMethod, this hash contains the user's card details. |
| 19 |
""" |
| 20 |
expand: NotRequired[List[str]] |
| 21 |
""" |
| 22 |
Specifies which fields in the response should be expanded. |
| 23 |
""" |
| 24 |
metadata: NotRequired["Literal['']|Dict[str, str]"] |
| 25 |
""" |
| 26 |
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. |
| 27 |
""" |
| 28 |
payto: NotRequired["PaymentMethodUpdateParamsPayto"] |
| 29 |
""" |
| 30 |
If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. |
| 31 |
""" |
| 32 |
us_bank_account: NotRequired["PaymentMethodUpdateParamsUsBankAccount"] |
| 33 |
""" |
| 34 |
If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. |
| 35 |
""" |
| 36 |
|
| 37 |
|
| 38 |
class PaymentMethodUpdateParamsBillingDetails(TypedDict): |
| 39 |
address: NotRequired[ |
| 40 |
"Literal['']|PaymentMethodUpdateParamsBillingDetailsAddress" |
| 41 |
] |
| 42 |
""" |
| 43 |
Billing address. |
| 44 |
""" |
| 45 |
email: NotRequired["Literal['']|str"] |
| 46 |
""" |
| 47 |
Email address. |
| 48 |
""" |
| 49 |
name: NotRequired["Literal['']|str"] |
| 50 |
""" |
| 51 |
Full name. |
| 52 |
""" |
| 53 |
phone: NotRequired["Literal['']|str"] |
| 54 |
""" |
| 55 |
Billing phone number (including extension). |
| 56 |
""" |
| 57 |
tax_id: NotRequired[str] |
| 58 |
""" |
| 59 |
Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. |
| 60 |
""" |
| 61 |
|
| 62 |
|
| 63 |
class PaymentMethodUpdateParamsBillingDetailsAddress(TypedDict): |
| 64 |
city: NotRequired[str] |
| 65 |
""" |
| 66 |
City, district, suburb, town, or village. |
| 67 |
""" |
| 68 |
country: NotRequired[str] |
| 69 |
""" |
| 70 |
Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). |
| 71 |
""" |
| 72 |
line1: NotRequired[str] |
| 73 |
""" |
| 74 |
Address line 1, such as the street, PO Box, or company name. |
| 75 |
""" |
| 76 |
line2: NotRequired[str] |
| 77 |
""" |
| 78 |
Address line 2, such as the apartment, suite, unit, or building. |
| 79 |
""" |
| 80 |
postal_code: NotRequired[str] |
| 81 |
""" |
| 82 |
ZIP or postal code. |
| 83 |
""" |
| 84 |
state: NotRequired[str] |
| 85 |
""" |
| 86 |
State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). |
| 87 |
""" |
| 88 |
|
| 89 |
|
| 90 |
class PaymentMethodUpdateParamsCard(TypedDict): |
| 91 |
exp_month: NotRequired[int] |
| 92 |
""" |
| 93 |
Two-digit number representing the card's expiration month. |
| 94 |
""" |
| 95 |
exp_year: NotRequired[int] |
| 96 |
""" |
| 97 |
Four-digit number representing the card's expiration year. |
| 98 |
""" |
| 99 |
networks: NotRequired["PaymentMethodUpdateParamsCardNetworks"] |
| 100 |
""" |
| 101 |
Contains information about card networks used to process the payment. |
| 102 |
""" |
| 103 |
|
| 104 |
|
| 105 |
class PaymentMethodUpdateParamsCardNetworks(TypedDict): |
| 106 |
preferred: NotRequired[ |
| 107 |
"Literal['']|Literal['cartes_bancaires', 'mastercard', 'visa']" |
| 108 |
] |
| 109 |
""" |
| 110 |
The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. |
| 111 |
""" |
| 112 |
|
| 113 |
|
| 114 |
class PaymentMethodUpdateParamsPayto(TypedDict): |
| 115 |
account_number: NotRequired[str] |
| 116 |
""" |
| 117 |
The account number for the bank account. |
| 118 |
""" |
| 119 |
bsb_number: NotRequired[str] |
| 120 |
""" |
| 121 |
Bank-State-Branch number of the bank account. |
| 122 |
""" |
| 123 |
pay_id: NotRequired[str] |
| 124 |
""" |
| 125 |
The PayID alias for the bank account. |
| 126 |
""" |
| 127 |
|
| 128 |
|
| 129 |
class PaymentMethodUpdateParamsUsBankAccount(TypedDict): |
| 130 |
account_holder_type: NotRequired[Literal["company", "individual"]] |
| 131 |
""" |
| 132 |
Bank account holder type. |
| 133 |
""" |
| 134 |
account_type: NotRequired[Literal["checking", "savings"]] |
| 135 |
""" |
| 136 |
Bank account type. |
| 137 |
""" |