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

Merged
merged 21 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
bb96ee9
Update generated code for v742
stripe-openapi[bot] Jan 4, 2024
99be702
Update generated code for v743
stripe-openapi[bot] Jan 5, 2024
53a37e8
Update generated code for v745
stripe-openapi[bot] Jan 5, 2024
615e723
Update generated code for v745
stripe-openapi[bot] Jan 5, 2024
1447d3b
Add more request settings flow tests (#1190)
anniel-stripe Jan 5, 2024
f58ae3c
Merge upstream and update generated code for v746
stripe-openapi[bot] Jan 6, 2024
1dc7123
Update generated code for v747
stripe-openapi[bot] Jan 8, 2024
2bc8751
Update generated code for v748
stripe-openapi[bot] Jan 8, 2024
b1fe802
Update generated code for v749
stripe-openapi[bot] Jan 8, 2024
0bfdc1f
Update generated code for v750
stripe-openapi[bot] Jan 9, 2024
e9e3905
Update generated code for v751
stripe-openapi[bot] Jan 9, 2024
7ed1423
Update generated code for v752
stripe-openapi[bot] Jan 10, 2024
6020f93
Update generated code for v753
stripe-openapi[bot] Jan 10, 2024
9b5f56e
Update generated code for v755
stripe-openapi[bot] Jan 11, 2024
c6ed2f7
Update generated code for v755
stripe-openapi[bot] Jan 11, 2024
0b20374
Update generated code for v755
stripe-openapi[bot] Jan 11, 2024
8ab1fea
Update generated code for v755
stripe-openapi[bot] Jan 12, 2024
c0bae76
Update generated code (#1188)
stripe-openapi[bot] Jan 12, 2024
ae9948a
Bump version to 7.12.0
pakrym-stripe Jan 12, 2024
1606f9d
Merge upstream and update generated code for v756
stripe-openapi[bot] Jan 12, 2024
cbc675a
Merge branch 'beta' into latest-codegen-beta
pakrym-stripe Jan 12, 2024
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
20 changes: 14 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
# Changelog

## 7.12.0 - 2024-01-12
* [#1188](https://github.com/stripe/stripe-python/pull/1188) Update generated code
* Add support for new resource `CustomerSession`
* Add support for `create` method on resource `CustomerSession`
* Remove support for values `obligation_inbound`, `obligation_payout_failure`, `obligation_payout`, and `obligation_reversal_outbound` from enum `BalanceTransaction.type`
* Add support for new values `eps` and `p24` on enums `Invoice.payment_settings.payment_method_types[]`, `InvoiceCreateParams.payment_settings.payment_method_types[]`, `InvoiceUpdateParams.payment_settings.payment_method_types[]`, `Subscription.payment_settings.payment_method_types[]`, `SubscriptionCreateParams.payment_settings.payment_method_types[]`, and `SubscriptionUpdateParams.payment_settings.payment_method_types[]`
* Remove support for value `obligation` from enum `Reporting.ReportRunCreateParams.parameters.reporting_category`
* Add support for `billing_cycle_anchor_config` on `SubscriptionCreateParams` and `Subscription`

## 7.12.0b1 - 2024-01-04
* [#1187](https://github.com/stripe/stripe-python/pull/1187) Update generated code for beta
* Updated stable APIs to the latest version


## 7.11.0 - 2024-01-04
* [#1186](https://github.com/stripe/stripe-python/pull/1186) Update generated code
* Add support for `retrieve` on resource `tax.Registration`
* Change type from `Optional[PaymentDetails]` to `PaymentDetails` of `payment_details` on field `AccountSession.Components`
* Change type from `Optional[Payments]` to `Payments` of `payments` on field `AccountSession.Components`
* Change type from `Optional[Payouts]` to `Payouts` of `payouts` on field `AccountSession.Components`
* Change type from `Optional[Features]` to `Features` of `features` on fields `AccountSession.Components.PaymentDetails`, `AccountSession.Components.Payments`, and `AccountSession.Components.Payouts`
* Add support for `retrieve` on resource `tax.Registration`
* Change type from `Optional[PaymentDetails]` to `PaymentDetails` of `payment_details` on field `AccountSession.Components`
* Change type from `Optional[Payments]` to `Payments` of `payments` on field `AccountSession.Components`
* Change type from `Optional[Payouts]` to `Payouts` of `payouts` on field `AccountSession.Components`
* Change type from `Optional[Features]` to `Features` of `features` on fields `AccountSession.Components.PaymentDetails`, `AccountSession.Components.Payments`, and `AccountSession.Components.Payouts`
* Change type from `Optional[InvoiceSettings]` to `InvoiceSettings` of `invoice_settings` on field `SubscriptionSchedule.DefaultSettings`

## 7.11.0b1 - 2023-12-22
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v742
v756
2,360 changes: 1,180 additions & 1,180 deletions stripe/_account.py

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,45 +161,49 @@ 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"]
class CreateParamsComponentsAccountOnboardingFeatures(TypedDict):
pass

class CreateParamsComponentsCapitalFinancingPromotion(TypedDict):
enabled: bool
"""
Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
Whether the embedded component is enabled.
"""
standard_payouts: NotRequired["bool"]
features: NotRequired[
"AccountSession.CreateParamsComponentsCapitalFinancingPromotionFeatures"
]
"""
Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsPayments(TypedDict):
class CreateParamsComponentsCapitalFinancingPromotionFeatures(TypedDict):
pass

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 @@ -213,19 +217,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 @@ -239,35 +243,31 @@ class CreateParamsComponentsPaymentDetailsFeatures(TypedDict):
Whether to allow sending refunds. This is `true` by default.
"""

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

class CreateParamsComponentsCapitalFinancingPromotionFeatures(TypedDict):
pass

class CreateParamsComponentsAccountOnboarding(TypedDict):
enabled: bool
class CreateParamsComponentsPayoutsFeatures(TypedDict):
edit_payout_schedule: NotRequired["bool"]
"""
Whether the embedded component is enabled.
Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
"""
features: NotRequired[
"AccountSession.CreateParamsComponentsAccountOnboardingFeatures"
]
instant_payouts: NotRequired["bool"]
"""
The list of features enabled in the embedded component.
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

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,7 +1,5 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec


class _ApiVersion:
CURRENT = "2023-10-16"
PREVIEW = "2023-12-11.preview-v2"
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
Loading