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

Merged
merged 31 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3fa4d3b
Update generated code for v1078
stripe-openapi[bot] Jun 13, 2024
672017b
Update generated code for v1079
stripe-openapi[bot] Jun 14, 2024
edc4654
Update generated code for v1080
stripe-openapi[bot] Jun 14, 2024
2d86d22
Update generated code for v1081
stripe-openapi[bot] Jun 14, 2024
4b1d783
Update generated code for v1082
stripe-openapi[bot] Jun 14, 2024
79a0a14
Update generated code for v1083
stripe-openapi[bot] Jun 15, 2024
0eb15d6
Update generated code (#1348)
stripe-openapi[bot] Jun 17, 2024
14d7dde
Bump version to 9.12.0
ramya-stripe Jun 17, 2024
9a3e69a
Merge upstream and update generated code for v1083
stripe-openapi[bot] Jun 17, 2024
52026c3
Update generated code for v1084
stripe-openapi[bot] Jun 18, 2024
aeee6d1
Update generated code for v1087
stripe-openapi[bot] Jun 18, 2024
1854563
Update generated code for v1088
stripe-openapi[bot] Jun 18, 2024
3db366c
Update generated code for v1091
stripe-openapi[bot] Jun 20, 2024
a247bfa
Update generated code for v1092
stripe-openapi[bot] Jun 21, 2024
83d538f
Update generated code for v1093
stripe-openapi[bot] Jun 21, 2024
e5cbd0a
Update generated code for v1094
stripe-openapi[bot] Jun 24, 2024
83020c0
Update generated code for v1095
stripe-openapi[bot] Jun 24, 2024
8b9fb4a
Update generated code for v1095
stripe-openapi[bot] Jun 24, 2024
60778a9
Update generated code (#1350)
stripe-openapi[bot] Jun 24, 2024
993551e
Bump version to 10.0.0
ramya-stripe Jun 24, 2024
e3e3ffe
Merge upstream and update generated code for v1095
stripe-openapi[bot] Jun 25, 2024
57d568c
Update generated code for v1096
stripe-openapi[bot] Jun 25, 2024
345499a
Update generated code for v1097
stripe-openapi[bot] Jun 25, 2024
02a9392
Update generated code for v1099
stripe-openapi[bot] Jun 25, 2024
7b08994
Update generated code for v1101
stripe-openapi[bot] Jun 26, 2024
bf12abe
Update generated code for v1102
stripe-openapi[bot] Jun 26, 2024
6f7a4a5
Update generated code for v1103
stripe-openapi[bot] Jun 27, 2024
018156a
Update generated code for v1104
stripe-openapi[bot] Jun 27, 2024
410ac74
Update generated code (#1353)
stripe-openapi[bot] Jun 27, 2024
26db537
Bump version to 10.1.0
ramya-stripe Jun 27, 2024
4dd3161
Merge upstream and update generated code for v1104
stripe-openapi[bot] Jun 27, 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
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
# Changelog

## 10.1.0 - 2024-06-27
* [#1353](https://github.com/stripe/stripe-python/pull/1353) Update generated code
* Add support for `email_type` on parameter classes `stripe.CreditNote.CreateParams`, `stripe.CreditNote.PreviewLinesParams`, and `stripe.CreditNote.PreviewParams`
* Add support for `filters` on parameter classes `stripe.Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections`, `stripe.Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections`, and `stripe.Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections` and resource classes `stripe.Invoice.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections`, `stripe.PaymentIntent.PaymentMethodOptions.UsBankAccount.FinancialConnections`, `stripe.SetupIntent.PaymentMethodOptions.UsBankAccount.FinancialConnections`, `stripe.Subscription.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections`, and `stripe.checkout.Session.PaymentMethodOptions.UsBankAccount.FinancialConnections`
* Add support for `account_subcategories` on parameter class `stripe.financial_connections.Session.CreateParamsFilters` and resource class `stripe.financial_connections.Session.Filters`
* Add support for `reboot_window` on parameter classes `stripe.terminal.Configuration.CreateParams` and `stripe.terminal.Configuration.ModifyParams` and resource `stripe.terminal.Configuration`
* Add support for `day` on enum `stripe.billing.Meter.ListEventSummariesParams.value_grouping_window`
* Add support for `multibanco` on enums `stripe.PaymentLink.payment_method_types`, `stripe.PaymentLink.CreateParams.payment_method_types`, and `stripe.PaymentLink.ModifyParams.payment_method_types`
* Add support for `twint` on enums `stripe.PaymentLink.payment_method_types`, `stripe.PaymentLink.CreateParams.payment_method_types`, and `stripe.PaymentLink.ModifyParams.payment_method_types`
* Add support for `zip` on enums `stripe.PaymentLink.payment_method_types`, `stripe.PaymentLink.CreateParams.payment_method_types`, and `stripe.PaymentLink.ModifyParams.payment_method_types`

## 10.0.0 - 2024-06-24
* [#1350](https://github.com/stripe/stripe-python/pull/1350) Update generated code

This release changes the pinned API version to 2024-06-20. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-06-20) and carefully review the API changes before upgrading.

### ⚠️ Breaking changes

* Remove the unused resource `PlatformTaxFee`
* Rename `volume_decimal` to `quantity_decimal` on parameter classes `stripe.issuing.Authorization.CaptureParamsPurchaseDetailsFuel`, `stripe.issuing.Transaction.CreateForceCaptureParamsPurchaseDetailsFuel`, and `stripe.issuing.Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFuel` and resource class `stripe.issuing.Transaction.PurchaseDetails.Fuel`

### Additions

* Add support for `fleet` on parameter classes `stripe.issuing.Authorization.CaptureParamsPurchaseDetails`, `stripe.issuing.Authorization.CreateParams`, `stripe.issuing.Transaction.CreateForceCaptureParamsPurchaseDetails`, and `stripe.issuing.Transaction.CreateUnlinkedRefundParamsPurchaseDetails`, resource `stripe.issuing.Authorization`, and resource class `stripe.issuing.Transaction.PurchaseDetails`
* Add support for new values `platform_disabled`, `paused.inactivity` and `other` on enums `Capability.Requirements.disabled_reason` and `Capability.FutureRequirements.disabled_reason`
* Add support for `industry_product_code` on parameter classes `stripe.issuing.Authorization.CaptureParamsPurchaseDetailsFuel`, `stripe.issuing.Transaction.CreateForceCaptureParamsPurchaseDetailsFuel`, and `stripe.issuing.Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFuel` and resource class `stripe.issuing.Transaction.PurchaseDetails.Fuel`
* Add support for `quantity_decimal` on parameter classes `stripe.issuing.Authorization.CaptureParamsPurchaseDetailsFuel`, `stripe.issuing.Transaction.CreateForceCaptureParamsPurchaseDetailsFuel`, and `stripe.issuing.Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFuel` and resource class `stripe.issuing.Transaction.PurchaseDetails.Fuel`
* Add support for `fuel` on parameter class `stripe.issuing.Authorization.CreateParams` and resource `stripe.issuing.Authorization`
* Add support for `_cls_finalize_amount` on resource `stripe.issuing.Authorization`
* Add support for `finalize_amount` on resource `stripe.issuing.Authorization`
* Change type of `disabled_reason` on `stripe.Capability.FutureRequirements` and `stripe.Capability.Requirements` from `str` to `Literal['other', 'paused.inactivity', 'pending.onboarding', 'pending.review', 'platform_disabled', 'platform_paused', 'rejected.inactivity', 'rejected.other', 'rejected.unsupported_business', 'requirements.fields_needed']`
* Add support for `ch_uid` on enums `stripe.checkout.Session.CustomerDetails.TaxId.type`, `stripe.Customer.CreateParamsTaxIdDatum.type`, `stripe.Customer.CreateTaxIdParams.type`, `stripe.Invoice.CustomerTaxId.type`, `stripe.Invoice.CreatePreviewParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type`, `stripe.tax.Calculation.CustomerDetails.TaxId.type`, `stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type`, `stripe.tax.Transaction.CustomerDetails.TaxId.type`, `stripe.TaxId.type`, and `stripe.TaxId.CreateParams.type`
* Add support for `card_canceled`, `card_expired`, `cardholder_blocked`, `insecure_authorization_method` and `pin_blocked` on enum `stripe.issuing.Authorization.RequestHistory.reason`
* Add support for `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `pound`, on enums `stripe.issuing.Authorization.CaptureParamsPurchaseDetailsFuel.unit`, `stripe.issuing.Transaction.CreateForceCaptureParamsPurchaseDetailsFuel.unit`, and `stripe.issuing.Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFuel.unit`
* Add support for `2024-06-20` on enum `stripe.WebhookEndpoint.CreateParams.api_version`

## 9.12.0 - 2024-06-17
* [#1348](https://github.com/stripe/stripe-python/pull/1348) Update generated code
* Add support for `tax_id_collection` on parameter class `stripe.PaymentLink.ModifyParams`
* Add support for `mobilepay` on enums `stripe.PaymentLink.payment_method_types`, `stripe.PaymentLink.CreateParams.payment_method_types`, and `stripe.PaymentLink.ModifyParams.payment_method_types`

## 9.12.0b1 - 2024-06-13
* [#1343](https://github.com/stripe/stripe-python/pull/1343) Update generated code for beta
* Add support for `de_stn` on enums `stripe.Order.TaxDetails.TaxId.type`, `stripe.Order.CreateParamsTaxDetailsTaxId.type`, `stripe.Order.ModifyParamsTaxDetailsTaxId.type`, and `stripe.QuotePreviewInvoice.CustomerTaxId.type`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1077
v1104
1 change: 0 additions & 1 deletion stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ def __getattr__(name):
from stripe._person import Person as Person
from stripe._plan import Plan as Plan
from stripe._plan_service import PlanService as PlanService
from stripe._platform_tax_fee import PlatformTaxFee as PlatformTaxFee
from stripe._price import Price as Price
from stripe._price_service import PriceService as PriceService
from stripe._product import Product as Product
Expand Down
2 changes: 1 addition & 1 deletion stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -3491,7 +3491,7 @@ class ModifyCapabilityParams(RequestOptions):
"""
To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays.
If a capability isn't permanent, you can remove it from the account by passing false. Most capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error.
If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error.
"""

class ModifyExternalAccountParams(RequestOptions):
Expand Down
2 changes: 1 addition & 1 deletion stripe/_account_capability_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class UpdateParams(TypedDict):
"""
To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays.
If a capability isn't permanent, you can remove it from the account by passing false. Most capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error.
If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error.
"""

def list(
Expand Down
2 changes: 1 addition & 1 deletion stripe/_api_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
class _ApiVersion:
CURRENT = "2024-04-10"
CURRENT = "2024-06-20"
PREVIEW = "2024-05-23.preview-v2"
2 changes: 0 additions & 2 deletions stripe/_balance_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
)
from stripe._dispute import Dispute as DisputeResource
from stripe._payout import Payout
from stripe._platform_tax_fee import PlatformTaxFee
from stripe._refund import Refund
from stripe._reserve_transaction import ReserveTransaction
from stripe._reversal import Reversal
Expand Down Expand Up @@ -193,7 +192,6 @@ class RetrieveParams(RequestOptions):
"IssuingDisputeResource",
"Transaction",
"Payout",
"PlatformTaxFee",
"Refund",
"ReserveTransaction",
"TaxDeductedAtSource",
Expand Down
38 changes: 30 additions & 8 deletions stripe/_capability.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,22 @@ class Error(StripeObject):
"""
Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.
"""
disabled_reason: Optional[str]
disabled_reason: Optional[
Literal[
"other",
"paused.inactivity",
"pending.onboarding",
"pending.review",
"platform_disabled",
"platform_paused",
"rejected.inactivity",
"rejected.other",
"rejected.unsupported_business",
"requirements.fields_needed",
]
]
"""
This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account.
This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account.
"""
errors: List[Error]
"""
Expand Down Expand Up @@ -294,13 +307,22 @@ class Error(StripeObject):
"""
Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled.
"""
disabled_reason: Optional[str]
disabled_reason: Optional[
Literal[
"other",
"paused.inactivity",
"pending.onboarding",
"pending.review",
"platform_disabled",
"platform_paused",
"rejected.inactivity",
"rejected.other",
"rejected.unsupported_business",
"requirements.fields_needed",
]
]
"""
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.
Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).
"""
errors: List[Error]
"""
Expand Down
12 changes: 12 additions & 0 deletions stripe/_credit_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ class CreateParams(RequestOptions):
"""
The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
"""
email_type: NotRequired[Literal["credit_note", "none"]]
"""
Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
"""
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
Expand Down Expand Up @@ -392,6 +396,10 @@ class PreviewLinesParams(RequestOptions):
"""
The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
"""
email_type: NotRequired[Literal["credit_note", "none"]]
"""
Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
"""
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.
Expand Down Expand Up @@ -539,6 +547,10 @@ class PreviewParams(RequestOptions):
"""
The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
"""
email_type: NotRequired[Literal["credit_note", "none"]]
"""
Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
"""
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
Expand Down
4 changes: 4 additions & 0 deletions stripe/_credit_note_preview_lines_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ class ListParams(TypedDict):
"""
The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
"""
email_type: NotRequired[Literal["credit_note", "none"]]
"""
Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
"""
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.
Expand Down
8 changes: 8 additions & 0 deletions stripe/_credit_note_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ class CreateParams(TypedDict):
"""
The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
"""
email_type: NotRequired[Literal["credit_note", "none"]]
"""
Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
"""
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
Expand Down Expand Up @@ -217,6 +221,10 @@ class PreviewParams(TypedDict):
"""
The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
"""
email_type: NotRequired[Literal["credit_note", "none"]]
"""
Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
"""
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
Expand Down
Loading
Loading