Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code for beta #1321

Merged
merged 14 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@
* Add support for `rechnung` on enums `stripe.ConfirmationToken.PaymentMethodPreview.type`, `stripe.ConfirmationToken.CreateParamsPaymentMethodData.type`, `stripe.Customer.ListPaymentMethodsParams.type`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData.type`, `stripe.PaymentIntent.CreateParamsPaymentMethodData.type`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData.type`, `stripe.PaymentMethod.type`, `stripe.PaymentMethod.CreateParams.type`, `stripe.PaymentMethod.ListParams.type`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData.type`, `stripe.SetupIntent.CreateParamsPaymentMethodData.type`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData.type`
* Change type of `transactions` on `stripe.gift_cards.Card` from `ListObject[Transaction]` to `Optional[ListObject[Transaction]]`

## 9.5.0 - 2024-05-02
* [#1317](https://github.com/stripe/stripe-python/pull/1317) Update generated code
* Add support for `paypal` on resource class `stripe.Dispute.PaymentMethodDetails`
* Add support for `payment_method_types` on parameter class `stripe.PaymentIntent.ConfirmParams`
* Add support for `ship_from_details` on parameter class `stripe.tax.Calculation.CreateParams` and resources `stripe.tax.Calculation` and `stripe.tax.Transaction`
* Add support for `bh`, `eg`, `ge`, `ke`, `kz`, `ng`, `om` on resource class `stripe.tax.Registration.CountryOptions` and parameter class `stripe.tax.Registration.CreateParamsCountryOptions`
* Add support for `paypal` on enum `stripe.Dispute.PaymentMethodDetails.type`
* Add support for `shipping_address_invalid` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code`
* Change type of `metadata` on `stripe.entitlements.Feature.ModifyParams` from `Dict[str, str]` to `Literal['']|Dict[str, str]`
* [#1319](https://github.com/stripe/stripe-python/pull/1319) Fix type change entries in Python Changelog

## 9.5.0b1 - 2024-04-25
* [#1308](https://github.com/stripe/stripe-python/pull/1308) Update generated code for beta
* Add support for `payment_method_settings` on parameter class `stripe.AccountSession.CreateParamsComponents`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1008
v1020
8 changes: 4 additions & 4 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -2374,13 +2374,13 @@ class CreateParamsIndividual(TypedDict):
"""
address_kana: NotRequired["Account.CreateParamsIndividualAddressKana"]
"""
The Kana variation of the the individual's primary address (Japan only).
The Kana variation of the individual's primary address (Japan only).
"""
address_kanji: NotRequired[
"Account.CreateParamsIndividualAddressKanji"
]
"""
The Kanji variation of the the individual's primary address (Japan only).
The Kanji variation of the individual's primary address (Japan only).
"""
dob: NotRequired["Literal['']|Account.CreateParamsIndividualDob"]
"""
Expand All @@ -2396,7 +2396,7 @@ class CreateParamsIndividual(TypedDict):
"""
first_name_kana: NotRequired[str]
"""
The Kana variation of the the individual's first name (Japan only).
The Kana variation of the individual's first name (Japan only).
"""
first_name_kanji: NotRequired[str]
"""
Expand Down Expand Up @@ -3931,7 +3931,7 @@ class RetrievePersonParams(RequestOptions):
"""
details_submitted: Optional[bool]
"""
Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true.
Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](https://stripe.com/connect/onboarding) to finish submitting account details.
"""
email: Optional[str]
"""
Expand Down
12 changes: 6 additions & 6 deletions stripe/_account_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,13 +1167,13 @@ class CreateParamsIndividual(TypedDict):
"AccountService.CreateParamsIndividualAddressKana"
]
"""
The Kana variation of the the individual's primary address (Japan only).
The Kana variation of the individual's primary address (Japan only).
"""
address_kanji: NotRequired[
"AccountService.CreateParamsIndividualAddressKanji"
]
"""
The Kanji variation of the the individual's primary address (Japan only).
The Kanji variation of the individual's primary address (Japan only).
"""
dob: NotRequired[
"Literal['']|AccountService.CreateParamsIndividualDob"
Expand All @@ -1191,7 +1191,7 @@ class CreateParamsIndividual(TypedDict):
"""
first_name_kana: NotRequired[str]
"""
The Kana variation of the the individual's first name (Japan only).
The Kana variation of the individual's first name (Japan only).
"""
first_name_kanji: NotRequired[str]
"""
Expand Down Expand Up @@ -2817,13 +2817,13 @@ class UpdateParamsIndividual(TypedDict):
"AccountService.UpdateParamsIndividualAddressKana"
]
"""
The Kana variation of the the individual's primary address (Japan only).
The Kana variation of the individual's primary address (Japan only).
"""
address_kanji: NotRequired[
"AccountService.UpdateParamsIndividualAddressKanji"
]
"""
The Kanji variation of the the individual's primary address (Japan only).
The Kanji variation of the individual's primary address (Japan only).
"""
dob: NotRequired[
"Literal['']|AccountService.UpdateParamsIndividualDob"
Expand All @@ -2841,7 +2841,7 @@ class UpdateParamsIndividual(TypedDict):
"""
first_name_kana: NotRequired[str]
"""
The Kana variation of the the individual's first name (Japan only).
The Kana variation of the individual's first name (Japan only).
"""
first_name_kanji: NotRequired[str]
"""
Expand Down
4 changes: 1 addition & 3 deletions stripe/_capability.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,11 @@ class Error(StripeObject):
"""
disabled_reason: Optional[str]
"""
If the capability is disabled, this string describes why. Can be `requirements.fields_needed`, `pending.onboarding`, `pending.review`, `rejected.fraud`, `rejected.other`, `platform_paused`, `action_required.requested_capabilities`, `rejected.inactivty`, or `rejected.unsupported_business`.
If the capability is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `requirements.fields_needed`, `pending.onboarding`, `pending.review`, `rejected.other`, `platform_paused`, `rejected.inactivty`, or `rejected.unsupported_business`.

`rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service, such as in [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses).

`rejected.inactivity` means that the capability has been paused for inactivity. This disabled reason currently only applies to the Issuing capability. See [Issuing: Managing Inactive Connects](https://support.stripe.com/questions/issuing-managing-inactive-connect-accounts) for more details.

If you believe that a rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.
"""
errors: List[Error]
"""
Expand Down
4 changes: 4 additions & 0 deletions stripe/_confirmation_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,10 @@ class Zip(StripeObject):
affirm: Optional[Affirm]
afterpay_clearpay: Optional[AfterpayClearpay]
alipay: Optional[Alipay]
allow_redisplay: Optional[Literal["always", "limited", "unspecified"]]
"""
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”.
"""
amazon_pay: Optional[AmazonPay]
au_becs_debit: Optional[AuBecsDebit]
bacs_debit: Optional[BacsDebit]
Expand Down
4 changes: 2 additions & 2 deletions stripe/_credit_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ def list_lines(
cls, credit_note: str, **params: Unpack["CreditNote.ListLinesParams"]
) -> ListObject["CreditNoteLineItem"]:
"""
When retrieving a credit note, you'll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
"""
return cast(
ListObject["CreditNoteLineItem"],
Expand All @@ -1155,7 +1155,7 @@ async def list_lines_async(
cls, credit_note: str, **params: Unpack["CreditNote.ListLinesParams"]
) -> ListObject["CreditNoteLineItem"]:
"""
When retrieving a credit note, you'll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
"""
return cast(
ListObject["CreditNoteLineItem"],
Expand Down
4 changes: 2 additions & 2 deletions stripe/_credit_note_line_item_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def list(
options: RequestOptions = {},
) -> ListObject[CreditNoteLineItem]:
"""
When retrieving a credit note, you'll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
"""
return cast(
ListObject[CreditNoteLineItem],
Expand All @@ -58,7 +58,7 @@ async def list_async(
options: RequestOptions = {},
) -> ListObject[CreditNoteLineItem]:
"""
When retrieving a credit note, you'll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
"""
return cast(
ListObject[CreditNoteLineItem],
Expand Down
2 changes: 2 additions & 0 deletions stripe/_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,14 @@ class RetrieveParams(RequestOptions):
"treasury.outbound_payment.failed",
"treasury.outbound_payment.posted",
"treasury.outbound_payment.returned",
"treasury.outbound_payment.tracking_details_updated",
"treasury.outbound_transfer.canceled",
"treasury.outbound_transfer.created",
"treasury.outbound_transfer.expected_arrival_date_updated",
"treasury.outbound_transfer.failed",
"treasury.outbound_transfer.posted",
"treasury.outbound_transfer.returned",
"treasury.outbound_transfer.tracking_details_updated",
"treasury.received_credit.created",
"treasury.received_credit.failed",
"treasury.received_credit.succeeded",
Expand Down
2 changes: 1 addition & 1 deletion stripe/_invoice_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class CreateParams(RequestOptions):
"""
subscription: NotRequired[str]
"""
The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
"""
tax_behavior: NotRequired[
Literal["exclusive", "inclusive", "unspecified"]
Expand Down
2 changes: 1 addition & 1 deletion stripe/_invoice_item_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class CreateParams(TypedDict):
"""
subscription: NotRequired[str]
"""
The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
"""
tax_behavior: NotRequired[
Literal["exclusive", "inclusive", "unspecified"]
Expand Down
4 changes: 4 additions & 0 deletions stripe/_payment_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -1959,6 +1959,10 @@ class RetrieveParams(RequestOptions):
affirm: Optional[Affirm]
afterpay_clearpay: Optional[AfterpayClearpay]
alipay: Optional[Alipay]
allow_redisplay: Optional[Literal["always", "limited", "unspecified"]]
"""
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”.
"""
amazon_pay: Optional[AmazonPay]
au_becs_debit: Optional[AuBecsDebit]
bacs_debit: Optional[BacsDebit]
Expand Down
6 changes: 3 additions & 3 deletions stripe/_quote.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ class CreateParams(RequestOptions):
"""
lines: NotRequired[List["Quote.CreateParamsLine"]]
"""
A list of lines on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
"""
metadata: NotRequired[Dict[str, str]]
"""
Expand Down Expand Up @@ -2473,7 +2473,7 @@ class ModifyParams(RequestOptions):
"""
lines: NotRequired[List["Quote.ModifyParamsLine"]]
"""
A list of lines on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
"""
metadata: NotRequired[Dict[str, str]]
"""
Expand Down Expand Up @@ -3843,7 +3843,7 @@ class RetrieveParams(RequestOptions):
"""
lines: Optional[List[str]]
"""
A list of lines on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
"""
livemode: bool
"""
Expand Down
4 changes: 2 additions & 2 deletions stripe/_quote_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class CreateParams(TypedDict):
"""
lines: NotRequired[List["QuoteService.CreateParamsLine"]]
"""
A list of lines on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
"""
metadata: NotRequired[Dict[str, str]]
"""
Expand Down Expand Up @@ -1597,7 +1597,7 @@ class UpdateParams(TypedDict):
"""
lines: NotRequired[List["QuoteService.UpdateParamsLine"]]
"""
A list of lines on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
"""
metadata: NotRequired[Dict[str, str]]
"""
Expand Down
6 changes: 3 additions & 3 deletions stripe/_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,13 @@ class CreateParamsAccountIndividual(TypedDict):
"Token.CreateParamsAccountIndividualAddressKana"
]
"""
The Kana variation of the the individual's primary address (Japan only).
The Kana variation of the individual's primary address (Japan only).
"""
address_kanji: NotRequired[
"Token.CreateParamsAccountIndividualAddressKanji"
]
"""
The Kanji variation of the the individual's primary address (Japan only).
The Kanji variation of the individual's primary address (Japan only).
"""
dob: NotRequired["Literal['']|Token.CreateParamsAccountIndividualDob"]
"""
Expand All @@ -337,7 +337,7 @@ class CreateParamsAccountIndividual(TypedDict):
"""
first_name_kana: NotRequired[str]
"""
The Kana variation of the the individual's first name (Japan only).
The Kana variation of the individual's first name (Japan only).
"""
first_name_kanji: NotRequired[str]
"""
Expand Down
6 changes: 3 additions & 3 deletions stripe/_token_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,13 @@ class CreateParamsAccountIndividual(TypedDict):
"TokenService.CreateParamsAccountIndividualAddressKana"
]
"""
The Kana variation of the the individual's primary address (Japan only).
The Kana variation of the individual's primary address (Japan only).
"""
address_kanji: NotRequired[
"TokenService.CreateParamsAccountIndividualAddressKanji"
]
"""
The Kanji variation of the the individual's primary address (Japan only).
The Kanji variation of the individual's primary address (Japan only).
"""
dob: NotRequired[
"Literal['']|TokenService.CreateParamsAccountIndividualDob"
Expand All @@ -308,7 +308,7 @@ class CreateParamsAccountIndividual(TypedDict):
"""
first_name_kana: NotRequired[str]
"""
The Kana variation of the the individual's first name (Japan only).
The Kana variation of the individual's first name (Japan only).
"""
first_name_kanji: NotRequired[str]
"""
Expand Down