Skip to content

Commit

Permalink
Merging from origin/master to sdk-release/next-major (#1280)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-stripe authored Mar 26, 2024
1 parent c0fe6ef commit 8a6bee9
Show file tree
Hide file tree
Showing 250 changed files with 25,658 additions and 8,226 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 8.8.0 - 2024-03-21
* [#1273](https://github.com/stripe/stripe-python/pull/1273) Update generated code
* Add support for new resources `ConfirmationToken` and `Forwarding.Request`
* Add support for `retrieve` method on resource `ConfirmationToken`
* Add support for `create`, `list`, and `retrieve` methods on resource `Request`
* Add support for `mobilepay_payments` on `Account.Capabilities`, `Account.CreateParamsCapabilities`, and `Account.UpdateParamsCapabilities`
* Add support for new values `forwarding_api_inactive`, `forwarding_api_invalid_parameter`, `forwarding_api_upstream_connection_error`, and `forwarding_api_upstream_connection_timeout` on enums `Invoice.LastFinalizationError.code`, `PaymentIntent.LastPaymentError.code`, `SetupAttempt.SetupError.code`, `SetupIntent.LastSetupError.code`, and `StripeError.code`
* Add support for `payment_reference` on `Charge.PaymentMethodDetails.UsBankAccount`
* Add support for `payout` on `Treasury.ReceivedDebit.LinkedFlows`
* Add support for `name` on `ConfigurationService.CreateParams`, `ConfigurationService.UpdateParams`, and `Configuration` for terminal
* Add support for `confirmation_token` on `PaymentIntentService.ConfirmParams`, `PaymentIntentService.CreateParams`, `SetupIntentService.ConfirmParams`, and `SetupIntentService.CreateParams`
* Add support for new value `mobilepay` on enums `Customer.ListPaymentMethodsParams.type`, `PaymentMethod.CreateParams.type`, and `PaymentMethod.ListParams.type`
* Add support for `mobilepay` on `Charge.PaymentMethodDetails`, `PaymentIntent.PaymentMethodOptions`, `PaymentIntentService.ConfirmParamsPaymentMethodData`, `PaymentIntentService.ConfirmParamsPaymentMethodOptions`, `PaymentIntentService.CreateParamsPaymentMethodData`, `PaymentIntentService.CreateParamsPaymentMethodOptions`, `PaymentIntentService.UpdateParamsPaymentMethodData`, `PaymentIntentService.UpdateParamsPaymentMethodOptions`, `PaymentMethod.CreateParams`, `PaymentMethod`, `SetupIntentService.ConfirmParamsPaymentMethodData`, `SetupIntentService.CreateParamsPaymentMethodData`, and `SetupIntentService.UpdateParamsPaymentMethodData`
* Add support for new value `mobilepay` on enums `PaymentIntentService.ConfirmParamsPaymentMethodData.type`, `PaymentIntentService.CreateParamsPaymentMethodData.type`, `PaymentIntentService.UpdateParamsPaymentMethodData.type`, `SetupIntentService.ConfirmParamsPaymentMethodData.type`, `SetupIntentService.CreateParamsPaymentMethodData.type`, and `SetupIntentService.UpdateParamsPaymentMethodData.type`
* Add support for new value `mobilepay` on enum `PaymentMethod.type`



## 8.7.0 - 2024-03-14
* [#1269](https://github.com/stripe/stripe-python/pull/1269) Update generated code
* Add support for `personalization_design` on parameter classes `CardService.CreateParams`, `CardService.ListParams`, `CardService.UpdateParams`, `stripe.issuing.Card.CreateParams`, `stripe.issuing.Card.ListParams`, and `stripe.issuing.Card.ModifyParams` and resource `stripe.issuing.Card`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v878
v896
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ We would love for you to try these and share feedback with us before these featu
To install a beta version use `pip install` with the exact version you'd like to use:
```
pip install stripe==v8.6.0b1
pip install --pre stripe
```
> **Note**
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.7.0
8.8.0
6 changes: 6 additions & 0 deletions stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ def __getattr__(name):
checkout as checkout,
climate as climate,
financial_connections as financial_connections,
forwarding as forwarding,
identity as identity,
issuing as issuing,
radar as radar,
Expand Down Expand Up @@ -281,6 +282,10 @@ def __getattr__(name):
from stripe._charge_service import ChargeService as ChargeService
from stripe._checkout_service import CheckoutService as CheckoutService
from stripe._climate_service import ClimateService as ClimateService
from stripe._confirmation_token import ConfirmationToken as ConfirmationToken
from stripe._confirmation_token_service import (
ConfirmationTokenService as ConfirmationTokenService,
)
from stripe._connect_collection_transfer import (
ConnectCollectionTransfer as ConnectCollectionTransfer,
)
Expand Down Expand Up @@ -354,6 +359,7 @@ def __getattr__(name):
from stripe._financial_connections_service import (
FinancialConnectionsService as FinancialConnectionsService,
)
from stripe._forwarding_service import ForwardingService as ForwardingService
from stripe._funding_instructions import (
FundingInstructions as FundingInstructions,
)
Expand Down
782 changes: 402 additions & 380 deletions stripe/_account.py

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions stripe/_account_capability_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@

class AccountCapabilityService(StripeService):
class ListParams(TypedDict):
expand: NotRequired["List[str]"]
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
"""

class RetrieveParams(TypedDict):
expand: NotRequired["List[str]"]
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
"""

class UpdateParams(TypedDict):
expand: NotRequired["List[str]"]
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
"""
requested: NotRequired["bool"]
requested: NotRequired[bool]
"""
To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays.
Expand Down
76 changes: 38 additions & 38 deletions stripe/_account_external_account_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

class AccountExternalAccountService(StripeService):
class CreateParams(TypedDict):
default_for_currency: NotRequired["bool"]
default_for_currency: NotRequired[bool]
"""
When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency.
"""
expand: NotRequired["List[str]"]
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
"""
Expand All @@ -29,18 +29,18 @@ class CreateParams(TypedDict):
"""
Please refer to full [documentation](https://stripe.com/docs/api) instead.
"""
metadata: NotRequired["Dict[str, str]"]
metadata: NotRequired[Dict[str, str]]
"""
Set of [key-value pairs](https://stripe.com/docs/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`.
"""

class CreateParamsBankAccount(TypedDict):
object: Literal["bank_account"]
account_holder_name: NotRequired["str"]
account_holder_name: NotRequired[str]
"""
The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object.
"""
account_holder_type: NotRequired["Literal['company', 'individual']"]
account_holder_type: NotRequired[Literal["company", "individual"]]
"""
The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
"""
Expand All @@ -52,72 +52,72 @@ class CreateParamsBankAccount(TypedDict):
"""
The country in which the bank account is located.
"""
currency: NotRequired["str"]
currency: NotRequired[str]
"""
The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts)
"""
routing_number: NotRequired["str"]
routing_number: NotRequired[str]
"""
The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required.
"""

class CreateParamsCard(TypedDict):
object: Literal["card"]
address_city: NotRequired["str"]
address_country: NotRequired["str"]
address_line1: NotRequired["str"]
address_line2: NotRequired["str"]
address_state: NotRequired["str"]
address_zip: NotRequired["str"]
currency: NotRequired["str"]
cvc: NotRequired["str"]
address_city: NotRequired[str]
address_country: NotRequired[str]
address_line1: NotRequired[str]
address_line2: NotRequired[str]
address_state: NotRequired[str]
address_zip: NotRequired[str]
currency: NotRequired[str]
cvc: NotRequired[str]
exp_month: int
exp_year: int
name: NotRequired["str"]
name: NotRequired[str]
number: str
metadata: NotRequired["Dict[str, str]"]
metadata: NotRequired[Dict[str, str]]
"""
Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
"""

class CreateParamsCardToken(TypedDict):
object: Literal["card"]
currency: NotRequired["str"]
currency: NotRequired[str]
token: str

class DeleteParams(TypedDict):
pass

class ListParams(TypedDict):
ending_before: NotRequired["str"]
ending_before: NotRequired[str]
"""
A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
"""
expand: NotRequired["List[str]"]
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
"""
limit: NotRequired["int"]
limit: NotRequired[int]
"""
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
"""
object: NotRequired["Literal['bank_account', 'card']"]
object: NotRequired[Literal["bank_account", "card"]]
"""
Filter external accounts according to a particular object type.
"""
starting_after: NotRequired["str"]
starting_after: NotRequired[str]
"""
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
"""

class RetrieveParams(TypedDict):
expand: NotRequired["List[str]"]
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
"""

class UpdateParams(TypedDict):
account_holder_name: NotRequired["str"]
account_holder_name: NotRequired[str]
"""
The name of the person or business that owns the bank account.
"""
Expand All @@ -128,36 +128,36 @@ class UpdateParams(TypedDict):
The type of entity that holds the account. This can be either `individual` or `company`.
"""
account_type: NotRequired[
"Literal['checking', 'futsu', 'savings', 'toza']"
Literal["checking", "futsu", "savings", "toza"]
]
"""
The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
"""
address_city: NotRequired["str"]
address_city: NotRequired[str]
"""
City/District/Suburb/Town/Village.
"""
address_country: NotRequired["str"]
address_country: NotRequired[str]
"""
Billing address country, if provided when creating card.
"""
address_line1: NotRequired["str"]
address_line1: NotRequired[str]
"""
Address line 1 (Street address/PO Box/Company name).
"""
address_line2: NotRequired["str"]
address_line2: NotRequired[str]
"""
Address line 2 (Apartment/Suite/Unit/Building).
"""
address_state: NotRequired["str"]
address_state: NotRequired[str]
"""
State/County/Province/Region.
"""
address_zip: NotRequired["str"]
address_zip: NotRequired[str]
"""
ZIP or postal code.
"""
default_for_currency: NotRequired["bool"]
default_for_currency: NotRequired[bool]
"""
When set to true, this becomes the default external account for its currency.
"""
Expand All @@ -167,23 +167,23 @@ class UpdateParams(TypedDict):
"""
Documents that may be submitted to satisfy various informational requests.
"""
exp_month: NotRequired["str"]
exp_month: NotRequired[str]
"""
Two digit number representing the card's expiration month.
"""
exp_year: NotRequired["str"]
exp_year: NotRequired[str]
"""
Four digit number representing the card's expiration year.
"""
expand: NotRequired["List[str]"]
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
"""
metadata: NotRequired["Literal['']|Dict[str, str]"]
"""
Set of [key-value pairs](https://stripe.com/docs/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`.
"""
name: NotRequired["str"]
name: NotRequired[str]
"""
Cardholder name.
"""
Expand All @@ -197,7 +197,7 @@ class UpdateParamsDocuments(TypedDict):
"""

class UpdateParamsDocumentsBankAccountOwnershipVerification(TypedDict):
files: NotRequired["List[str]"]
files: NotRequired[List[str]]
"""
One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
"""
Expand Down
10 changes: 5 additions & 5 deletions stripe/_account_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CreateParams(RequestOptions):
"""
The identifier of the account to create an account link for.
"""
collect: NotRequired["Literal['currently_due', 'eventually_due']"]
collect: NotRequired[Literal["currently_due", "eventually_due"]]
"""
The collect parameter is deprecated. Use `collection_options` instead.
"""
Expand All @@ -31,15 +31,15 @@ class CreateParams(RequestOptions):
"""
Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow.
"""
expand: NotRequired["List[str]"]
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
"""
refresh_url: NotRequired["str"]
refresh_url: NotRequired[str]
"""
The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.
"""
return_url: NotRequired["str"]
return_url: NotRequired[str]
"""
The URL that the user will be redirected to upon leaving or completing the linked flow.
"""
Expand All @@ -53,7 +53,7 @@ class CreateParamsCollectionOptions(TypedDict):
"""
Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`.
"""
future_requirements: NotRequired["Literal['include', 'omit']"]
future_requirements: NotRequired[Literal["include", "omit"]]
"""
Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`.
"""
Expand Down
10 changes: 5 additions & 5 deletions stripe/_account_link_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CreateParams(TypedDict):
"""
The identifier of the account to create an account link for.
"""
collect: NotRequired["Literal['currently_due', 'eventually_due']"]
collect: NotRequired[Literal["currently_due", "eventually_due"]]
"""
The collect parameter is deprecated. Use `collection_options` instead.
"""
Expand All @@ -23,15 +23,15 @@ class CreateParams(TypedDict):
"""
Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow.
"""
expand: NotRequired["List[str]"]
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
"""
refresh_url: NotRequired["str"]
refresh_url: NotRequired[str]
"""
The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.
"""
return_url: NotRequired["str"]
return_url: NotRequired[str]
"""
The URL that the user will be redirected to upon leaving or completing the linked flow.
"""
Expand All @@ -45,7 +45,7 @@ class CreateParamsCollectionOptions(TypedDict):
"""
Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`.
"""
future_requirements: NotRequired["Literal['include', 'omit']"]
future_requirements: NotRequired[Literal["include", "omit"]]
"""
Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`.
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/_account_login_link_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class AccountLoginLinkService(StripeService):
class CreateParams(TypedDict):
expand: NotRequired["List[str]"]
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
"""
Expand Down
Loading

0 comments on commit 8a6bee9

Please sign in to comment.