Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1e95a9c21695d1f28bf9bf64ed7c83a05749b1e8
e83a2c042b6fd289e2c574f1db817b0aa55d8b0d
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2396
v2413
6 changes: 6 additions & 0 deletions stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,10 @@ def add_beta_version(
from stripe._payment_method_service import (
PaymentMethodService as PaymentMethodService,
)
from stripe._payment_plan import PaymentPlan as PaymentPlan
from stripe._payment_plan_service import (
PaymentPlanService as PaymentPlanService,
)
from stripe._payment_record import PaymentRecord as PaymentRecord
from stripe._payment_record_service import (
PaymentRecordService as PaymentRecordService,
Expand Down Expand Up @@ -980,6 +984,8 @@ def add_beta_version(
False,
),
"PaymentMethodService": ("stripe._payment_method_service", False),
"PaymentPlan": ("stripe._payment_plan", False),
"PaymentPlanService": ("stripe._payment_plan_service", False),
"PaymentRecord": ("stripe._payment_record", False),
"PaymentRecordService": ("stripe._payment_record_service", False),
"Payout": ("stripe._payout", False),
Expand Down
288 changes: 205 additions & 83 deletions stripe/_account.py

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion stripe/_application_fee.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ class FundingSource(StripeObject):
"""
A list of refunds that have been applied to the fee.
"""
settlement_type: Optional[Literal["gross_settled", "net_settled"]]
settlement_type: Optional[
Union[Literal["gross_settled", "net_settled"], str]
]
"""
Type of settlement for the application fee. One of `net_settled` or `gross_settled`.
"""
Expand Down
105 changes: 54 additions & 51 deletions stripe/_balance_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,57 +159,60 @@ class FeeDetail(StripeObject):
"""
The transaction's net funds status in the Stripe balance, which are either `available` or `pending`.
"""
type: Literal[
"adjustment",
"advance",
"advance_funding",
"anticipation_repayment",
"application_fee",
"application_fee_refund",
"charge",
"climate_order_purchase",
"climate_order_refund",
"connect_collection_transfer",
"contribution",
"fee_credit_funding",
"inbound_transfer",
"inbound_transfer_reversal",
"issuing_authorization_hold",
"issuing_authorization_release",
"issuing_dispute",
"issuing_transaction",
"obligation_outbound",
"obligation_reversal_inbound",
"payment",
"payment_failure_refund",
"payment_network_reserve_hold",
"payment_network_reserve_release",
"payment_refund",
"payment_reversal",
"payment_unreconciled",
"payout",
"payout_cancel",
"payout_failure",
"payout_minimum_balance_hold",
"payout_minimum_balance_release",
"refund",
"refund_failure",
"reserve_hold",
"reserve_release",
"reserve_transaction",
"reserved_funds",
"stripe_balance_payment_debit",
"stripe_balance_payment_debit_reversal",
"stripe_fee",
"stripe_fx_fee",
"tax_fee",
"tax_fund",
"topup",
"topup_reversal",
"transfer",
"transfer_cancel",
"transfer_failure",
"transfer_refund",
type: Union[
Literal[
"adjustment",
"advance",
"advance_funding",
"anticipation_repayment",
"application_fee",
"application_fee_refund",
"charge",
"climate_order_purchase",
"climate_order_refund",
"connect_collection_transfer",
"contribution",
"fee_credit_funding",
"inbound_transfer",
"inbound_transfer_reversal",
"issuing_authorization_hold",
"issuing_authorization_release",
"issuing_dispute",
"issuing_transaction",
"obligation_outbound",
"obligation_reversal_inbound",
"payment",
"payment_failure_refund",
"payment_network_reserve_hold",
"payment_network_reserve_release",
"payment_refund",
"payment_reversal",
"payment_unreconciled",
"payout",
"payout_cancel",
"payout_failure",
"payout_minimum_balance_hold",
"payout_minimum_balance_release",
"refund",
"refund_failure",
"reserve_hold",
"reserve_release",
"reserve_transaction",
"reserved_funds",
"stripe_balance_payment_debit",
"stripe_balance_payment_debit_reversal",
"stripe_fee",
"stripe_fx_fee",
"tax_fee",
"tax_fund",
"topup",
"topup_reversal",
"transfer",
"transfer_cancel",
"transfer_failure",
"transfer_refund",
],
str,
]
"""
Transaction type: `tax_fund`, `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
Expand Down
4 changes: 3 additions & 1 deletion stripe/_bank_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ class Error(StripeObject):
"""
The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
"""
available_payout_methods: Optional[List[Literal["instant", "standard"]]]
available_payout_methods: Optional[
List[Union[Literal["instant", "standard"], str]]
]
"""
A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout.
"""
Expand Down
4 changes: 3 additions & 1 deletion stripe/_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ class Redaction(StripeObject):
"""
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”.
"""
available_payout_methods: Optional[List[Literal["instant", "standard"]]]
available_payout_methods: Optional[
List[Union[Literal["instant", "standard"], str]]
]
"""
A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout.
"""
Expand Down
4 changes: 2 additions & 2 deletions stripe/_cash_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from stripe._customer import Customer
from stripe._stripe_object import StripeObject, UntypedStripeObject
from stripe._util import sanitize_id
from typing import ClassVar, Optional
from typing import ClassVar, Optional, Union
from typing_extensions import Literal


Expand All @@ -15,7 +15,7 @@ class CashBalance(StripeObject):
OBJECT_NAME: ClassVar[Literal["cash_balance"]] = "cash_balance"

class Settings(StripeObject):
reconciliation_mode: Literal["automatic", "manual"]
reconciliation_mode: Union[Literal["automatic", "manual"], str]
"""
The configuration for how funds that land in the customer cash balance are reconciled.
"""
Expand Down
Loading
Loading