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 #1393

Merged
merged 4 commits into from
Sep 18, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1260
v1266
2 changes: 2 additions & 0 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down Expand Up @@ -895,6 +896,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down
2 changes: 2 additions & 0 deletions stripe/_bank_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down Expand Up @@ -249,6 +250,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down
2 changes: 2 additions & 0 deletions stripe/_capability.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down Expand Up @@ -282,6 +283,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down
18 changes: 18 additions & 0 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,23 @@ class Receipt(StripeObject):
_inner_class_types = {"receipt": Receipt}

class Klarna(StripeObject):
class PayerDetails(StripeObject):
class Address(StripeObject):
country: Optional[str]
"""
The payer address country
"""

address: Optional[Address]
"""
The payer's address
"""
_inner_class_types = {"address": Address}

payer_details: Optional[PayerDetails]
"""
The payer details for this transaction.
"""
payment_method_category: Optional[str]
"""
The Klarna payment method used for this transaction.
Expand All @@ -1296,6 +1313,7 @@ class Klarna(StripeObject):
Preferred language of the Klarna authorization page that the customer is redirected to.
Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH`
"""
_inner_class_types = {"payer_details": PayerDetails}

class Konbini(StripeObject):
class Store(StripeObject):
Expand Down
16 changes: 14 additions & 2 deletions stripe/_dispute.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ class EvidenceDetails(StripeObject):
"""

class PaymentMethodDetails(StripeObject):
class AmazonPay(StripeObject):
dispute_type: Optional[Literal["chargeback", "claim"]]
"""
The AmazonPay dispute type, chargeback or claim
"""

class Card(StripeObject):
brand: str
"""
Expand Down Expand Up @@ -195,14 +201,20 @@ class Paypal(StripeObject):
The reason for the dispute as defined by PayPal
"""

amazon_pay: Optional[AmazonPay]
card: Optional[Card]
klarna: Optional[Klarna]
paypal: Optional[Paypal]
type: Literal["card", "klarna", "paypal"]
type: Literal["amazon_pay", "card", "klarna", "paypal"]
"""
Payment method type.
"""
_inner_class_types = {"card": Card, "klarna": Klarna, "paypal": Paypal}
_inner_class_types = {
"amazon_pay": AmazonPay,
"card": Card,
"klarna": Klarna,
"paypal": Paypal,
}

class CloseParams(RequestOptions):
expand: NotRequired[List[str]]
Expand Down
5 changes: 5 additions & 0 deletions stripe/_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ class LastFinalizationError(StripeObject):
"terminal_location_country_unsupported",
"terminal_reader_busy",
"terminal_reader_hardware_fault",
"terminal_reader_invalid_location_for_activation",
"terminal_reader_invalid_location_for_payment",
"terminal_reader_offline",
"terminal_reader_timeout",
Expand Down Expand Up @@ -6164,6 +6165,10 @@ class VoidInvoiceParams(RequestOptions):
Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
"""
automatic_tax: AutomaticTax
automatically_finalizes_at: Optional[int]
"""
The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized.
"""
billing_reason: Optional[
Literal[
"automatic_pending_invoice_item_invoice",
Expand Down
5 changes: 5 additions & 0 deletions stripe/_invoice_rendering_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
class InvoiceRenderingTemplate(
ListableAPIResource["InvoiceRenderingTemplate"]
):
"""
Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates
can be created from within the Dashboard, and they can be used over the API when creating invoices.
"""

OBJECT_NAME: ClassVar[Literal["invoice_rendering_template"]] = (
"invoice_rendering_template"
)
Expand Down
1 change: 1 addition & 0 deletions stripe/_payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ class LastPaymentError(StripeObject):
"terminal_location_country_unsupported",
"terminal_reader_busy",
"terminal_reader_hardware_fault",
"terminal_reader_invalid_location_for_activation",
"terminal_reader_invalid_location_for_payment",
"terminal_reader_offline",
"terminal_reader_timeout",
Expand Down
2 changes: 2 additions & 0 deletions stripe/_person.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down Expand Up @@ -443,6 +444,7 @@ class Error(StripeObject):
"verification_missing_owners",
"verification_requires_additional_memorandum_of_associations",
"verification_requires_additional_proof_of_registration",
"verification_supportability",
]
"""
The code for the type of error.
Expand Down
1 change: 1 addition & 0 deletions stripe/_setup_attempt.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ class SetupError(StripeObject):
"terminal_location_country_unsupported",
"terminal_reader_busy",
"terminal_reader_hardware_fault",
"terminal_reader_invalid_location_for_activation",
"terminal_reader_invalid_location_for_payment",
"terminal_reader_offline",
"terminal_reader_timeout",
Expand Down
1 change: 1 addition & 0 deletions stripe/_setup_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ class LastSetupError(StripeObject):
"terminal_location_country_unsupported",
"terminal_reader_busy",
"terminal_reader_hardware_fault",
"terminal_reader_invalid_location_for_activation",
"terminal_reader_invalid_location_for_payment",
"terminal_reader_offline",
"terminal_reader_timeout",
Expand Down
51 changes: 51 additions & 0 deletions stripe/tax/_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,12 +582,34 @@ class LocalLeaseTax(StripeObject):
A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.
"""

class StateSalesTax(StripeObject):
class Election(StripeObject):
jurisdiction: Optional[str]
"""
A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.
"""
type: Literal[
"local_use_tax",
"simplified_sellers_use_tax",
"single_local_use_tax",
]
"""
The type of the election for the state sales tax registration.
"""

elections: Optional[List[Election]]
"""
Elections for the state sales tax registration.
"""
_inner_class_types = {"elections": Election}

local_amusement_tax: Optional[LocalAmusementTax]
local_lease_tax: Optional[LocalLeaseTax]
state: str
"""
Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
"""
state_sales_tax: Optional[StateSalesTax]
type: Literal[
"local_amusement_tax",
"local_lease_tax",
Expand All @@ -600,6 +622,7 @@ class LocalLeaseTax(StripeObject):
_inner_class_types = {
"local_amusement_tax": LocalAmusementTax,
"local_lease_tax": LocalLeaseTax,
"state_sales_tax": StateSalesTax,
}

class Vn(StripeObject):
Expand Down Expand Up @@ -1650,6 +1673,12 @@ class CreateParamsCountryOptionsUs(TypedDict):
"""
Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
"""
state_sales_tax: NotRequired[
"Registration.CreateParamsCountryOptionsUsStateSalesTax"
]
"""
Options for the state sales tax registration.
"""
type: Literal[
"local_amusement_tax",
"local_lease_tax",
Expand All @@ -1672,6 +1701,28 @@ class CreateParamsCountryOptionsUsLocalLeaseTax(TypedDict):
A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago).
"""

class CreateParamsCountryOptionsUsStateSalesTax(TypedDict):
elections: List[
"Registration.CreateParamsCountryOptionsUsStateSalesTaxElection"
]
"""
Elections for the state sales tax registration.
"""

class CreateParamsCountryOptionsUsStateSalesTaxElection(TypedDict):
jurisdiction: NotRequired[str]
"""
A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City).
"""
type: Literal[
"local_use_tax",
"simplified_sellers_use_tax",
"single_local_use_tax",
]
"""
The type of the election for the state sales tax registration.
"""

class CreateParamsCountryOptionsVn(TypedDict):
type: Literal["simplified"]
"""
Expand Down
28 changes: 28 additions & 0 deletions stripe/tax/_registration_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,12 @@ class CreateParamsCountryOptionsUs(TypedDict):
"""
Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
"""
state_sales_tax: NotRequired[
"RegistrationService.CreateParamsCountryOptionsUsStateSalesTax"
]
"""
Options for the state sales tax registration.
"""
type: Literal[
"local_amusement_tax",
"local_lease_tax",
Expand All @@ -956,6 +962,28 @@ class CreateParamsCountryOptionsUsLocalLeaseTax(TypedDict):
A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago).
"""

class CreateParamsCountryOptionsUsStateSalesTax(TypedDict):
elections: List[
"RegistrationService.CreateParamsCountryOptionsUsStateSalesTaxElection"
]
"""
Elections for the state sales tax registration.
"""

class CreateParamsCountryOptionsUsStateSalesTaxElection(TypedDict):
jurisdiction: NotRequired[str]
"""
A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City).
"""
type: Literal[
"local_use_tax",
"simplified_sellers_use_tax",
"single_local_use_tax",
]
"""
The type of the election for the state sales tax registration.
"""

class CreateParamsCountryOptionsVn(TypedDict):
type: Literal["simplified"]
"""
Expand Down
Loading