Skip to content

Commit

Permalink
Update generated code (#1188)
Browse files Browse the repository at this point in the history
* Update generated code for v742

* Update generated code for v745

* Update generated code for v745

* Update generated code for v747

* Update generated code for v748

* Update generated code for v750

* Update generated code for v752

* Update generated code for v753

* Update generated code for v755

* Update generated code for v755

* Update generated code for v755

* Update generated code for v755

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: pakrym-stripe <[email protected]>
  • Loading branch information
stripe-openapi[bot] and pakrym-stripe authored Jan 12, 2024
1 parent 1447d3b commit c0bae76
Show file tree
Hide file tree
Showing 72 changed files with 13,279 additions and 13,093 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v742
v755
1 change: 1 addition & 0 deletions stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ def __getattr__(name):
from stripe._customer_cash_balance_transaction import (
CustomerCashBalanceTransaction as CustomerCashBalanceTransaction,
)
from stripe._customer_session import CustomerSession as CustomerSession
from stripe._discount import Discount as Discount
from stripe._dispute import Dispute as Dispute
from stripe._ephemeral_key import EphemeralKey as EphemeralKey
Expand Down
2,344 changes: 1,172 additions & 1,172 deletions stripe/_account.py

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,45 +145,34 @@ class CreateParamsComponents(TypedDict):
Configuration for the payouts embedded component.
"""

class CreateParamsComponentsPayouts(TypedDict):
class CreateParamsComponentsAccountOnboarding(TypedDict):
enabled: bool
"""
Whether the embedded component is enabled.
"""
features: NotRequired[
"AccountSession.CreateParamsComponentsPayoutsFeatures"
"AccountSession.CreateParamsComponentsAccountOnboardingFeatures"
]
"""
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsPayoutsFeatures(TypedDict):
edit_payout_schedule: NotRequired["bool"]
"""
Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
"""
instant_payouts: NotRequired["bool"]
"""
Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
"""
standard_payouts: NotRequired["bool"]
"""
Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
"""
class CreateParamsComponentsAccountOnboardingFeatures(TypedDict):
pass

class CreateParamsComponentsPayments(TypedDict):
class CreateParamsComponentsPaymentDetails(TypedDict):
enabled: bool
"""
Whether the embedded component is enabled.
"""
features: NotRequired[
"AccountSession.CreateParamsComponentsPaymentsFeatures"
"AccountSession.CreateParamsComponentsPaymentDetailsFeatures"
]
"""
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsPaymentsFeatures(TypedDict):
class CreateParamsComponentsPaymentDetailsFeatures(TypedDict):
capture_payments: NotRequired["bool"]
"""
Whether to allow capturing and cancelling payment intents. This is `true` by default.
Expand All @@ -197,19 +186,19 @@ class CreateParamsComponentsPaymentsFeatures(TypedDict):
Whether to allow sending refunds. This is `true` by default.
"""

class CreateParamsComponentsPaymentDetails(TypedDict):
class CreateParamsComponentsPayments(TypedDict):
enabled: bool
"""
Whether the embedded component is enabled.
"""
features: NotRequired[
"AccountSession.CreateParamsComponentsPaymentDetailsFeatures"
"AccountSession.CreateParamsComponentsPaymentsFeatures"
]
"""
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsPaymentDetailsFeatures(TypedDict):
class CreateParamsComponentsPaymentsFeatures(TypedDict):
capture_payments: NotRequired["bool"]
"""
Whether to allow capturing and cancelling payment intents. This is `true` by default.
Expand All @@ -223,20 +212,31 @@ class CreateParamsComponentsPaymentDetailsFeatures(TypedDict):
Whether to allow sending refunds. This is `true` by default.
"""

class CreateParamsComponentsAccountOnboarding(TypedDict):
class CreateParamsComponentsPayouts(TypedDict):
enabled: bool
"""
Whether the embedded component is enabled.
"""
features: NotRequired[
"AccountSession.CreateParamsComponentsAccountOnboardingFeatures"
"AccountSession.CreateParamsComponentsPayoutsFeatures"
]
"""
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsAccountOnboardingFeatures(TypedDict):
pass
class CreateParamsComponentsPayoutsFeatures(TypedDict):
edit_payout_schedule: NotRequired["bool"]
"""
Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
"""
instant_payouts: NotRequired["bool"]
"""
Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
"""
standard_payouts: NotRequired["bool"]
"""
Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
"""

account: str
"""
Expand Down
2 changes: 0 additions & 2 deletions stripe/_api_version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec


class _ApiVersion:
CURRENT = "2023-10-16"
62 changes: 31 additions & 31 deletions stripe/_application_fee.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@
class ApplicationFee(ListableAPIResource["ApplicationFee"]):
OBJECT_NAME: ClassVar[Literal["application_fee"]] = "application_fee"

class CreateRefundParams(RequestOptions):
amount: NotRequired["int"]
"""
A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee.
"""
expand: NotRequired["List[str]"]
"""
Specifies which fields in the response should be expanded.
"""
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 ListParams(RequestOptions):
charge: NotRequired["str"]
"""
Expand Down Expand Up @@ -69,27 +83,35 @@ class ListParamsCreated(TypedDict):
Maximum value to filter by (inclusive)
"""

class RefundParams(RequestOptions):
amount: NotRequired["int"]
class ListRefundsParams(RequestOptions):
ending_before: NotRequired["str"]
"""
A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee.
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]"]
"""
Specifies which fields in the response should be expanded.
"""
metadata: NotRequired["Dict[str, str]"]
limit: NotRequired["int"]
"""
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`.
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
"""
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(RequestOptions):
class ModifyRefundParams(RequestOptions):
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`.
"""

class CreateRefundParams(RequestOptions):
class RefundParams(RequestOptions):
amount: NotRequired["int"]
"""
A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee.
Expand All @@ -103,39 +125,17 @@ class CreateRefundParams(RequestOptions):
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 RetrieveRefundParams(RequestOptions):
class RetrieveParams(RequestOptions):
expand: NotRequired["List[str]"]
"""
Specifies which fields in the response should be expanded.
"""

class ModifyRefundParams(RequestOptions):
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`.
"""

class ListRefundsParams(RequestOptions):
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.
"""
class RetrieveRefundParams(RequestOptions):
expand: NotRequired["List[str]"]
"""
Specifies which fields in the response should be expanded.
"""
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.
"""
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.
"""

account: ExpandableField["Account"]
"""
Expand Down
12 changes: 6 additions & 6 deletions stripe/_balance_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class ListParams(RequestOptions):
"""
type: NotRequired["str"]
"""
Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `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`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
"""

class ListParamsCreated(TypedDict):
Expand Down Expand Up @@ -223,12 +223,8 @@ class RetrieveParams(RequestOptions):
"issuing_authorization_release",
"issuing_dispute",
"issuing_transaction",
"obligation_inbound",
"obligation_outbound",
"obligation_payout",
"obligation_payout_failure",
"obligation_reversal_inbound",
"obligation_reversal_outbound",
"payment",
"payment_failure_refund",
"payment_network_reserve_hold",
Expand All @@ -252,9 +248,13 @@ class RetrieveParams(RequestOptions):
"transfer_cancel",
"transfer_failure",
"transfer_refund",
"obligation_inbound",
"obligation_payout",
"obligation_payout_failure",
"obligation_reversal_outbound",
]
"""
Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. 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.
Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `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`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. 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.
"""

@classmethod
Expand Down
40 changes: 20 additions & 20 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1784,14 +1784,20 @@ class CreateParams(RequestOptions):
A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options).
"""

class CreateParamsTransferData(TypedDict):
class CreateParamsDestination(TypedDict):
account: str
"""
ID of an existing, connected Stripe account.
"""
amount: NotRequired["int"]
"""
The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount.
"""
destination: str

class CreateParamsRadarOptions(TypedDict):
session: NotRequired["str"]
"""
ID of an existing, connected Stripe account.
A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
"""

class CreateParamsShipping(TypedDict):
Expand Down Expand Up @@ -1842,21 +1848,15 @@ class CreateParamsShippingAddress(TypedDict):
State, county, province, or region.
"""

class CreateParamsRadarOptions(TypedDict):
session: NotRequired["str"]
class CreateParamsTransferData(TypedDict):
amount: NotRequired["int"]
"""
A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
"""

class CreateParamsDestination(TypedDict):
account: str
destination: str
"""
ID of an existing, connected Stripe account.
"""
amount: NotRequired["int"]
"""
The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount.
"""

class ListParams(RequestOptions):
created: NotRequired["Charge.ListParamsCreated|int"]
Expand Down Expand Up @@ -1941,6 +1941,12 @@ class ModifyParams(RequestOptions):
A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
"""

class ModifyParamsFraudDetails(TypedDict):
user_report: Union[Literal[""], Literal["fraudulent", "safe"]]
"""
Either `safe` or `fraudulent`.
"""

class ModifyParamsShipping(TypedDict):
address: "Charge.ModifyParamsShippingAddress"
"""
Expand Down Expand Up @@ -1989,12 +1995,6 @@ class ModifyParamsShippingAddress(TypedDict):
State, county, province, or region.
"""

class ModifyParamsFraudDetails(TypedDict):
user_report: Union[Literal[""], Literal["fraudulent", "safe"]]
"""
Either `safe` or `fraudulent`.
"""

class RetrieveParams(RequestOptions):
expand: NotRequired["List[str]"]
"""
Expand Down
Loading

0 comments on commit c0bae76

Please sign in to comment.