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

Merged
merged 6 commits into from
Feb 22, 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
17 changes: 13 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 8.4.0 - 2024-02-22
* [#1241](https://github.com/stripe/stripe-python/pull/1241) Update generated code
- Add `InvoiceLineItem.modify` method.
* [#1244](https://github.com/stripe/stripe-python/pull/1244) Add TaxIds API
* Add support for `create`, `retrieve`, `delete`, and `list` methods on resource `TaxId`
* The `instance_url` function on resource `TaxId` now returns the top-level `/v1/tax_ids/{id}` path instead of the `/v1/customers/{customer}/tax_ids/{id}` path.
* [#1243](https://github.com/stripe/stripe-python/pull/1243) Remove http client base
* [#1242](https://github.com/stripe/stripe-python/pull/1242) Testing: unify http client mock

## 8.4.0b1 - 2024-02-16
* [#1235](https://github.com/stripe/stripe-python/pull/1235) Update generated code for beta
* Add support for `payto` and `twint` payment methods throughout the API
Expand All @@ -26,10 +35,10 @@

## 8.2.0 - 2024-02-08
* [#1225](https://github.com/stripe/stripe-python/pull/1225) Update generated code
* Add support for `invoices` on `Account.Settings`
* Add support for new value `velobank` on various enums `PaymentMethodDetails.P24.bank`
* Add support for `setup_future_usage` on `PaymentMethodOptions.Blik`
* Add support for `require_cvc_recollection` on `PaymentMethodOptions.Card`
* Add support for `invoices` on `Account.Settings`
* Add support for new value `velobank` on various enums `PaymentMethodDetails.P24.bank`
* Add support for `setup_future_usage` on `PaymentMethodOptions.Blik`
* Add support for `require_cvc_recollection` on `PaymentMethodOptions.Card`
* Add support for `account_tax_ids` on various `InvoiceSettings` request parameters
* [#1223](https://github.com/stripe/stripe-python/pull/1223) Move StripeClient usage collection onto StripeService
* [#1220](https://github.com/stripe/stripe-python/pull/1220) Measure StripeClient usage
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v831
v840
1 change: 1 addition & 0 deletions stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ def __getattr__(name):
TaxDeductedAtSource as TaxDeductedAtSource,
)
from stripe._tax_id import TaxId as TaxId
from stripe._tax_id_service import TaxIdService as TaxIdService
from stripe._tax_rate import TaxRate as TaxRate
from stripe._tax_rate_service import TaxRateService as TaxRateService
from stripe._tax_service import TaxService as TaxService
Expand Down
3 changes: 3 additions & 0 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -3109,6 +3109,9 @@ class ListExternalAccountsParams(RequestOptions):

class ListParams(RequestOptions):
created: NotRequired["Account.ListParamsCreated|int"]
"""
Only return connected accounts that were created during the given date interval.
"""
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
3 changes: 3 additions & 0 deletions stripe/_account_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1582,6 +1582,9 @@ class DeleteParams(TypedDict):

class ListParams(TypedDict):
created: NotRequired["AccountService.ListParamsCreated|int"]
"""
Only return connected accounts that were created during the given date interval.
"""
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
2 changes: 1 addition & 1 deletion stripe/_api_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# File generated from our OpenAPI spec
class _ApiVersion:
CURRENT = "2023-10-16"
PREVIEW = "2023-12-11.preview-v2"
PREVIEW = "2024-02-15.preview-v2"
3 changes: 3 additions & 0 deletions stripe/_application_fee.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ class ListParams(RequestOptions):
Only return application fees for the charge specified by this charge ID.
"""
created: NotRequired["ApplicationFee.ListParamsCreated|int"]
"""
Only return applications fees that were created during the given date interval.
"""
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
3 changes: 3 additions & 0 deletions stripe/_application_fee_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ class ListParams(TypedDict):
Only return application fees for the charge specified by this charge ID.
"""
created: NotRequired["ApplicationFeeService.ListParamsCreated|int"]
"""
Only return applications fees that were created during the given date interval.
"""
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
5 changes: 4 additions & 1 deletion stripe/_balance_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,14 @@ class FeeDetail(StripeObject):
"""
type: str
"""
Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`.
Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`.
"""

class ListParams(RequestOptions):
created: NotRequired["BalanceTransaction.ListParamsCreated|int"]
"""
Only return transactions that were created during the given date interval.
"""
currency: NotRequired["str"]
"""
Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
Expand Down
3 changes: 3 additions & 0 deletions stripe/_balance_transaction_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
class BalanceTransactionService(StripeService):
class ListParams(TypedDict):
created: NotRequired["BalanceTransactionService.ListParamsCreated|int"]
"""
Only return transactions that were created during the given date interval.
"""
currency: NotRequired["str"]
"""
Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
Expand Down
3 changes: 3 additions & 0 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -2625,6 +2625,9 @@ class CreateParamsTransferData(TypedDict):

class ListParams(RequestOptions):
created: NotRequired["Charge.ListParamsCreated|int"]
"""
Only return charges that were created during the given date interval.
"""
customer: NotRequired["str"]
"""
Only return charges for the customer specified by this customer ID.
Expand Down
3 changes: 3 additions & 0 deletions stripe/_charge_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,9 @@ class CreateParamsTransferData(TypedDict):

class ListParams(TypedDict):
created: NotRequired["ChargeService.ListParamsCreated|int"]
"""
Only return charges that were created during the given date interval.
"""
customer: NotRequired["str"]
"""
Only return charges for the customer specified by this customer ID.
Expand Down
3 changes: 3 additions & 0 deletions stripe/_customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,9 @@ class ListEntitlementsParams(RequestOptions):

class ListParams(RequestOptions):
created: NotRequired["Customer.ListParamsCreated|int"]
"""
Only return customers that were created during the given date interval.
"""
email: NotRequired["str"]
"""
A case-sensitive filter on the list based on the customer's `email` field. The value must be a string.
Expand Down
3 changes: 3 additions & 0 deletions stripe/_customer_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,9 @@ class DeleteParams(TypedDict):

class ListParams(TypedDict):
created: NotRequired["CustomerService.ListParamsCreated|int"]
"""
Only return customers that were created during the given date interval.
"""
email: NotRequired["str"]
"""
A case-sensitive filter on the list based on the customer's `email` field. The value must be a string.
Expand Down
3 changes: 3 additions & 0 deletions stripe/_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ class Request(StripeObject):

class ListParams(RequestOptions):
created: NotRequired["Event.ListParamsCreated|int"]
"""
Only return events that were created during the given date interval.
"""
delivery_success: NotRequired["bool"]
"""
Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned.
Expand Down
3 changes: 3 additions & 0 deletions stripe/_event_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
class EventService(StripeService):
class ListParams(TypedDict):
created: NotRequired["EventService.ListParamsCreated|int"]
"""
Only return events that were created during the given date interval.
"""
delivery_success: NotRequired["bool"]
"""
Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned.
Expand Down
3 changes: 3 additions & 0 deletions stripe/_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ class CreateParamsFileLinkData(TypedDict):

class ListParams(RequestOptions):
created: NotRequired["File.ListParamsCreated|int"]
"""
Only return files that were created during the given date interval.
"""
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
3 changes: 3 additions & 0 deletions stripe/_file_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ class CreateParams(RequestOptions):

class ListParams(RequestOptions):
created: NotRequired["FileLink.ListParamsCreated|int"]
"""
Only return links that were created during the given date interval.
"""
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
3 changes: 3 additions & 0 deletions stripe/_file_link_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class CreateParams(TypedDict):

class ListParams(TypedDict):
created: NotRequired["FileLinkService.ListParamsCreated|int"]
"""
Only return links that were created during the given date interval.
"""
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
3 changes: 3 additions & 0 deletions stripe/_file_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ class CreateParamsFileLinkData(TypedDict):

class ListParams(TypedDict):
created: NotRequired["FileService.ListParamsCreated|int"]
"""
Only return files that were created during the given date interval.
"""
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
17 changes: 10 additions & 7 deletions stripe/_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ class CreateParams(RequestOptions):
"Literal['exclude', 'include', 'include_and_require']"
]
"""
How to handle pending invoice items on invoice creation. One of `include` or `exclude`. `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to `exclude` if the parameter is omitted.
How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted.
"""
rendering: NotRequired["Invoice.CreateParamsRendering"]
"""
Expand Down Expand Up @@ -1821,7 +1821,7 @@ class CreatePreviewParams(RequestOptions):
"Literal['always_invoice', 'create_prorations', 'none']"
]
"""
Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead.
Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead.
"""
subscription_proration_date: NotRequired["int"]
"""
Expand Down Expand Up @@ -3430,7 +3430,7 @@ class CreatePreviewParamsSubscriptionDetails(TypedDict):
"Literal['always_invoice', 'create_prorations', 'none']"
]
"""
Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
"""
proration_date: NotRequired["int"]
"""
Expand Down Expand Up @@ -3776,6 +3776,9 @@ class ListParams(RequestOptions):
The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.
"""
created: NotRequired["Invoice.ListParamsCreated|int"]
"""
Only return invoices that were created during the given date interval.
"""
customer: NotRequired["str"]
"""
Only return invoices for the customer specified by this customer ID.
Expand Down Expand Up @@ -4682,7 +4685,7 @@ class UpcomingLinesParams(RequestOptions):
"Literal['always_invoice', 'create_prorations', 'none']"
]
"""
Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead.
Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead.
"""
subscription_proration_date: NotRequired["int"]
"""
Expand Down Expand Up @@ -6291,7 +6294,7 @@ class UpcomingLinesParamsSubscriptionDetails(TypedDict):
"Literal['always_invoice', 'create_prorations', 'none']"
]
"""
Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
"""
proration_date: NotRequired["int"]
"""
Expand Down Expand Up @@ -6719,7 +6722,7 @@ class UpcomingParams(RequestOptions):
"Literal['always_invoice', 'create_prorations', 'none']"
]
"""
Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead.
Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead.
"""
subscription_proration_date: NotRequired["int"]
"""
Expand Down Expand Up @@ -8290,7 +8293,7 @@ class UpcomingParamsSubscriptionDetails(TypedDict):
"Literal['always_invoice', 'create_prorations', 'none']"
]
"""
Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
"""
proration_date: NotRequired["int"]
"""
Expand Down
3 changes: 3 additions & 0 deletions stripe/_invoice_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ class DeleteParams(RequestOptions):

class ListParams(RequestOptions):
created: NotRequired["InvoiceItem.ListParamsCreated|int"]
"""
Only return invoice items that were created during the given date interval.
"""
customer: NotRequired["str"]
"""
The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned.
Expand Down
3 changes: 3 additions & 0 deletions stripe/_invoice_item_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ class DeleteParams(TypedDict):

class ListParams(TypedDict):
created: NotRequired["InvoiceItemService.ListParamsCreated|int"]
"""
Only return invoice items that were created during the given date interval.
"""
customer: NotRequired["str"]
"""
The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned.
Expand Down
Loading
Loading