From db4bd1de23c155e42ed6a4b11807a120d0d6749d Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:18:04 -0800 Subject: [PATCH] Update generated code (#1241) * Update generated code for v832 * Update generated code for v833 * Update generated code for v834 * Update generated code for v835 * Update generated code for v835 * Update generated code for v836 * Update generated code for v837 * Update generated code for v838 * Update generated code for v839 * Update generated code for v840 * Update generated code for v840 * Update generated code for v840 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: pakrym-stripe <99349468+pakrym-stripe@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/_account.py | 3 + stripe/_account_service.py | 3 + stripe/_application_fee.py | 3 + stripe/_application_fee_service.py | 3 + stripe/_balance_transaction.py | 5 +- stripe/_balance_transaction_service.py | 3 + stripe/_charge.py | 3 + stripe/_charge_service.py | 3 + stripe/_customer.py | 3 + stripe/_customer_service.py | 3 + stripe/_event.py | 3 + stripe/_event_service.py | 3 + stripe/_file.py | 3 + stripe/_file_link.py | 3 + stripe/_file_link_service.py | 3 + stripe/_file_service.py | 3 + stripe/_invoice.py | 9 +- stripe/_invoice_item.py | 3 + stripe/_invoice_item_service.py | 3 + stripe/_invoice_line_item.py | 214 +++++++++++++++++- stripe/_invoice_line_item_service.py | 210 ++++++++++++++++- stripe/_invoice_service.py | 7 +- stripe/_invoice_upcoming_lines_service.py | 2 +- stripe/_payout.py | 3 + stripe/_payout_service.py | 3 + stripe/_refund_service.py | 3 + stripe/_review.py | 3 + stripe/_review_service.py | 3 + stripe/_subscription.py | 9 +- stripe/_subscription_item.py | 6 +- stripe/_subscription_item_service.py | 6 +- stripe/_subscription_service.py | 9 +- stripe/_tax_rate.py | 6 +- stripe/_tax_rate_service.py | 4 +- stripe/_transfer.py | 3 + stripe/_transfer_service.py | 3 + stripe/billing_portal/_configuration.py | 2 +- stripe/checkout/_session.py | 2 +- stripe/checkout/_session_service.py | 2 +- stripe/identity/_verification_report.py | 11 + .../identity/_verification_report_service.py | 7 + stripe/identity/_verification_session.py | 15 ++ .../identity/_verification_session_service.py | 11 + stripe/issuing/_dispute.py | 2 +- stripe/issuing/_dispute_service.py | 2 +- stripe/issuing/_token.py | 2 +- stripe/issuing/_token_service.py | 2 +- stripe/radar/_value_list.py | 3 + stripe/radar/_value_list_item.py | 3 + stripe/radar/_value_list_item_service.py | 3 + stripe/radar/_value_list_service.py | 3 + stripe/reporting/_report_run.py | 3 + stripe/reporting/_report_run_service.py | 3 + stripe/treasury/_financial_account.py | 3 + .../_financial_account_features_service.py | 202 ++++++++++++++++- stripe/treasury/_financial_account_service.py | 3 + stripe/treasury/_outbound_payment.py | 22 ++ stripe/treasury/_outbound_payment_service.py | 22 ++ stripe/treasury/_transaction.py | 3 + stripe/treasury/_transaction_entry.py | 3 + stripe/treasury/_transaction_entry_service.py | 3 + stripe/treasury/_transaction_service.py | 3 + 63 files changed, 862 insertions(+), 39 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 5433dd907..e3b365910 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v829 \ No newline at end of file +v840 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index 4795e9748..dd752a614 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -2983,6 +2983,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. diff --git a/stripe/_account_service.py b/stripe/_account_service.py index 492e334ce..79a36b2b3 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -1498,6 +1498,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. diff --git a/stripe/_application_fee.py b/stripe/_application_fee.py index 654b58c80..65edc18ca 100644 --- a/stripe/_application_fee.py +++ b/stripe/_application_fee.py @@ -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. diff --git a/stripe/_application_fee_service.py b/stripe/_application_fee_service.py index 7553c1f96..ec6097625 100644 --- a/stripe/_application_fee_service.py +++ b/stripe/_application_fee_service.py @@ -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. diff --git a/stripe/_balance_transaction.py b/stripe/_balance_transaction.py index cd2be2bef..2dcb2ef9b 100644 --- a/stripe/_balance_transaction.py +++ b/stripe/_balance_transaction.py @@ -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). diff --git a/stripe/_balance_transaction_service.py b/stripe/_balance_transaction_service.py index 3ee27421a..ad5eb2e90 100644 --- a/stripe/_balance_transaction_service.py +++ b/stripe/_balance_transaction_service.py @@ -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). diff --git a/stripe/_charge.py b/stripe/_charge.py index a8822ff21..ff4341274 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -1877,6 +1877,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. diff --git a/stripe/_charge_service.py b/stripe/_charge_service.py index 923b6cb1b..672df3981 100644 --- a/stripe/_charge_service.py +++ b/stripe/_charge_service.py @@ -203,6 +203,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. diff --git a/stripe/_customer.py b/stripe/_customer.py index 9155b77a5..09063ab7c 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -748,6 +748,9 @@ class ListCashBalanceTransactionsParams(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. diff --git a/stripe/_customer_service.py b/stripe/_customer_service.py index cc60fea72..20b93bc53 100644 --- a/stripe/_customer_service.py +++ b/stripe/_customer_service.py @@ -354,6 +354,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. diff --git a/stripe/_event.py b/stripe/_event.py index 1ac83497e..49fca07ec 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -66,6 +66,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. diff --git a/stripe/_event_service.py b/stripe/_event_service.py index e2e3a8438..694153301 100644 --- a/stripe/_event_service.py +++ b/stripe/_event_service.py @@ -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. diff --git a/stripe/_file.py b/stripe/_file.py index 37af1bbcd..f2309b4f3 100644 --- a/stripe/_file.py +++ b/stripe/_file.py @@ -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. diff --git a/stripe/_file_link.py b/stripe/_file_link.py index d4bb91f91..37f0f770e 100644 --- a/stripe/_file_link.py +++ b/stripe/_file_link.py @@ -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. diff --git a/stripe/_file_link_service.py b/stripe/_file_link_service.py index 3579ac429..a98bdbc08 100644 --- a/stripe/_file_link_service.py +++ b/stripe/_file_link_service.py @@ -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. diff --git a/stripe/_file_service.py b/stripe/_file_service.py index a5ab0060a..70a68b205 100644 --- a/stripe/_file_service.py +++ b/stripe/_file_service.py @@ -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. diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 883437dbc..1a4c51108 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -1071,7 +1071,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"] """ @@ -1580,6 +1580,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. @@ -2380,7 +2383,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`. + 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`. """ subscription_proration_date: NotRequired["int"] """ @@ -2922,7 +2925,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`. + 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`. """ subscription_proration_date: NotRequired["int"] """ diff --git a/stripe/_invoice_item.py b/stripe/_invoice_item.py index e5368dd08..1d3b0d10d 100644 --- a/stripe/_invoice_item.py +++ b/stripe/_invoice_item.py @@ -192,6 +192,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. diff --git a/stripe/_invoice_item_service.py b/stripe/_invoice_item_service.py index 6c3b4c86b..c097edb20 100644 --- a/stripe/_invoice_item_service.py +++ b/stripe/_invoice_item_service.py @@ -141,6 +141,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. diff --git a/stripe/_invoice_line_item.py b/stripe/_invoice_line_item.py index 44be8a05a..28d6ecdb1 100644 --- a/stripe/_invoice_line_item.py +++ b/stripe/_invoice_line_item.py @@ -1,9 +1,18 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._expandable_field import ExpandableField +from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, Dict, List, Optional -from typing_extensions import Literal, TYPE_CHECKING +from stripe._updateable_api_resource import UpdateableAPIResource +from stripe._util import sanitize_id +from typing import ClassVar, Dict, List, Optional, cast +from typing_extensions import ( + Literal, + NotRequired, + TypedDict, + Unpack, + TYPE_CHECKING, +) if TYPE_CHECKING: from stripe._discount import Discount @@ -15,7 +24,7 @@ from stripe._tax_rate import TaxRate -class InvoiceLineItem(StripeObject): +class InvoiceLineItem(UpdateableAPIResource["InvoiceLineItem"]): OBJECT_NAME: ClassVar[Literal["line_item"]] = "line_item" class DiscountAmount(StripeObject): @@ -95,6 +104,184 @@ class TaxAmount(StripeObject): The amount on which tax is calculated, in cents (or local equivalent). """ + class ModifyParams(RequestOptions): + amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + """ + description: NotRequired["str"] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ + discountable: NotRequired["bool"] + """ + Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + """ + discounts: NotRequired[ + "Literal['']|List[InvoiceLineItem.ModifyParamsDiscount]" + ] + """ + The coupons & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + """ + 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`. + """ + period: NotRequired["InvoiceLineItem.ModifyParamsPeriod"] + """ + The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + """ + price: NotRequired["str"] + """ + The ID of the price object. + """ + price_data: NotRequired["InvoiceLineItem.ModifyParamsPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Non-negative integer. The quantity of units for the line item. + """ + tax_amounts: NotRequired[ + "Literal['']|List[InvoiceLineItem.ModifyParamsTaxAmount]" + ] + """ + A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + """ + + class ModifyParamsDiscount(TypedDict): + coupon: NotRequired["str"] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired["str"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + + class ModifyParamsPeriod(TypedDict): + end: int + """ + The end of the period, which must be greater than or equal to the start. This value is inclusive. + """ + start: int + """ + The start of the period. This value is inclusive. + """ + + class ModifyParamsPriceData(TypedDict): + currency: str + """ + 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). + """ + product: NotRequired["str"] + """ + The ID of the product that this price will belong to. One of `product` or `product_data` is required. + """ + product_data: NotRequired[ + "InvoiceLineItem.ModifyParamsPriceDataProductData" + ] + """ + Data used to generate a new product object inline. One of `product` or `product_data` is required. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + class ModifyParamsPriceDataProductData(TypedDict): + description: NotRequired["str"] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + images: NotRequired["List[str]"] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + 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`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + tax_code: NotRequired["str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + + class ModifyParamsTaxAmount(TypedDict): + amount: int + """ + The amount, in cents (or local equivalent), of the tax. + """ + tax_rate_data: "InvoiceLineItem.ModifyParamsTaxAmountTaxRateData" + """ + Data to find or create a TaxRate object. + + Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. + """ + taxable_amount: int + """ + The amount on which tax is calculated, in cents (or local equivalent). + """ + + class ModifyParamsTaxAmountTaxRateData(TypedDict): + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + """ + display_name: str + """ + The display name of the tax rate, which will be shown to users. + """ + inclusive: bool + """ + This specifies if the tax rate is inclusive or exclusive. + """ + jurisdiction: NotRequired["str"] + """ + The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. + """ + percentage: float + """ + The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + """ + state: NotRequired["str"] + """ + [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + """ + tax_type: NotRequired[ + "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'pst', 'qst', 'rst', 'sales_tax', 'vat', 'service_tax']" + ] + """ + The high-level tax type, such as `vat` or `sales_tax`. + """ + amount: int """ The amount, in cents (or local equivalent). @@ -192,6 +379,27 @@ class TaxAmount(StripeObject): """ The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. """ + + @classmethod + def modify( + cls, id: str, **params: Unpack["InvoiceLineItem.ModifyParams"] + ) -> "InvoiceLineItem": + """ + Updates an invoice's line item. Some fields, such as tax_amounts, only live on the invoice line item, + so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice + item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. + Updating an invoice's line item is only possible before the invoice is finalized. + """ + url = "%s/%s" % (cls.class_url(), sanitize_id(id)) + return cast( + "InvoiceLineItem", + cls._static_request( + "post", + url, + params=params, + ), + ) + _inner_class_types = { "discount_amounts": DiscountAmount, "period": Period, diff --git a/stripe/_invoice_line_item_service.py b/stripe/_invoice_line_item_service.py index 37fca43f4..af42968d7 100644 --- a/stripe/_invoice_line_item_service.py +++ b/stripe/_invoice_line_item_service.py @@ -5,8 +5,8 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, cast -from typing_extensions import NotRequired, TypedDict +from typing import Dict, List, cast +from typing_extensions import Literal, NotRequired, TypedDict class InvoiceLineItemService(StripeService): @@ -28,6 +28,184 @@ class ListParams(TypedDict): 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 UpdateParams(TypedDict): + amount: NotRequired["int"] + """ + The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + """ + description: NotRequired["str"] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ + discountable: NotRequired["bool"] + """ + Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + """ + discounts: NotRequired[ + "Literal['']|List[InvoiceLineItemService.UpdateParamsDiscount]" + ] + """ + The coupons & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + """ + 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`. + """ + period: NotRequired["InvoiceLineItemService.UpdateParamsPeriod"] + """ + The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + """ + price: NotRequired["str"] + """ + The ID of the price object. + """ + price_data: NotRequired["InvoiceLineItemService.UpdateParamsPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired["int"] + """ + Non-negative integer. The quantity of units for the line item. + """ + tax_amounts: NotRequired[ + "Literal['']|List[InvoiceLineItemService.UpdateParamsTaxAmount]" + ] + """ + A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + """ + + class UpdateParamsDiscount(TypedDict): + coupon: NotRequired["str"] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired["str"] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + + class UpdateParamsPeriod(TypedDict): + end: int + """ + The end of the period, which must be greater than or equal to the start. This value is inclusive. + """ + start: int + """ + The start of the period. This value is inclusive. + """ + + class UpdateParamsPriceData(TypedDict): + currency: str + """ + 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). + """ + product: NotRequired["str"] + """ + The ID of the product that this price will belong to. One of `product` or `product_data` is required. + """ + product_data: NotRequired[ + "InvoiceLineItemService.UpdateParamsPriceDataProductData" + ] + """ + Data used to generate a new product object inline. One of `product` or `product_data` is required. + """ + tax_behavior: NotRequired[ + "Literal['exclusive', 'inclusive', 'unspecified']" + ] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired["int"] + """ + A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + """ + unit_amount_decimal: NotRequired["str"] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + class UpdateParamsPriceDataProductData(TypedDict): + description: NotRequired["str"] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + images: NotRequired["List[str]"] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + 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`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + tax_code: NotRequired["str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + + class UpdateParamsTaxAmount(TypedDict): + amount: int + """ + The amount, in cents (or local equivalent), of the tax. + """ + tax_rate_data: "InvoiceLineItemService.UpdateParamsTaxAmountTaxRateData" + """ + Data to find or create a TaxRate object. + + Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. + """ + taxable_amount: int + """ + The amount on which tax is calculated, in cents (or local equivalent). + """ + + class UpdateParamsTaxAmountTaxRateData(TypedDict): + country: NotRequired["str"] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + description: NotRequired["str"] + """ + An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + """ + display_name: str + """ + The display name of the tax rate, which will be shown to users. + """ + inclusive: bool + """ + This specifies if the tax rate is inclusive or exclusive. + """ + jurisdiction: NotRequired["str"] + """ + The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. + """ + percentage: float + """ + The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + """ + state: NotRequired["str"] + """ + [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + """ + tax_type: NotRequired[ + "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'pst', 'qst', 'rst', 'sales_tax', 'vat', 'service_tax']" + ] + """ + The high-level tax type, such as `vat` or `sales_tax`. + """ + def list( self, invoice: str, @@ -50,3 +228,31 @@ def list( options=options, ), ) + + def update( + self, + invoice: str, + line_item_id: str, + params: "InvoiceLineItemService.UpdateParams" = {}, + options: RequestOptions = {}, + ) -> InvoiceLineItem: + """ + Updates an invoice's line item. Some fields, such as tax_amounts, only live on the invoice line item, + so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice + item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. + Updating an invoice's line item is only possible before the invoice is finalized. + """ + return cast( + InvoiceLineItem, + self._request( + "post", + "/v1/invoices/{invoice}/lines/{line_item_id}".format( + invoice=sanitize_id(invoice), + line_item_id=sanitize_id(line_item_id), + ), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 74ca9dc3e..69cb98fa5 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -123,7 +123,7 @@ class CreateParams(TypedDict): "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["InvoiceService.CreateParamsRendering"] """ @@ -636,6 +636,9 @@ class ListParams(TypedDict): The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. """ created: NotRequired["InvoiceService.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. @@ -859,7 +862,7 @@ class UpcomingParams(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`. """ subscription_proration_date: NotRequired["int"] """ diff --git a/stripe/_invoice_upcoming_lines_service.py b/stripe/_invoice_upcoming_lines_service.py index 144a793e7..5ed8a439f 100644 --- a/stripe/_invoice_upcoming_lines_service.py +++ b/stripe/_invoice_upcoming_lines_service.py @@ -110,7 +110,7 @@ class ListParams(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`. """ subscription_proration_date: NotRequired["int"] """ diff --git a/stripe/_payout.py b/stripe/_payout.py index 5aa5ec72d..b20ecbc67 100644 --- a/stripe/_payout.py +++ b/stripe/_payout.py @@ -87,6 +87,9 @@ class CreateParams(RequestOptions): class ListParams(RequestOptions): arrival_date: NotRequired["Payout.ListParamsArrivalDate|int"] created: NotRequired["Payout.ListParamsCreated|int"] + """ + Only return payouts that were created during the given date interval. + """ destination: NotRequired["str"] """ The ID of an external account - only return payouts sent to this external account. diff --git a/stripe/_payout_service.py b/stripe/_payout_service.py index 6bd83db57..d3070c3b2 100644 --- a/stripe/_payout_service.py +++ b/stripe/_payout_service.py @@ -57,6 +57,9 @@ class CreateParams(TypedDict): class ListParams(TypedDict): arrival_date: NotRequired["PayoutService.ListParamsArrivalDate|int"] created: NotRequired["PayoutService.ListParamsCreated|int"] + """ + Only return payouts that were created during the given date interval. + """ destination: NotRequired["str"] """ The ID of an external account - only return payouts sent to this external account. diff --git a/stripe/_refund_service.py b/stripe/_refund_service.py index 3a4f80905..48c4f620a 100644 --- a/stripe/_refund_service.py +++ b/stripe/_refund_service.py @@ -73,6 +73,9 @@ class ListParams(TypedDict): Only return refunds for the charge specified by this charge ID. """ created: NotRequired["RefundService.ListParamsCreated|int"] + """ + Only return refunds 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. diff --git a/stripe/_review.py b/stripe/_review.py index 3a55c51a5..2bb7a4e78 100644 --- a/stripe/_review.py +++ b/stripe/_review.py @@ -78,6 +78,9 @@ class ApproveParams(RequestOptions): class ListParams(RequestOptions): created: NotRequired["Review.ListParamsCreated|int"] + """ + Only return reviews 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. diff --git a/stripe/_review_service.py b/stripe/_review_service.py index 7a3532a1c..cdd2b4f64 100644 --- a/stripe/_review_service.py +++ b/stripe/_review_service.py @@ -18,6 +18,9 @@ class ApproveParams(TypedDict): class ListParams(TypedDict): created: NotRequired["ReviewService.ListParamsCreated|int"] + """ + Only return reviews 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. diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 4ed86fa4f..8f103635e 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -586,7 +586,7 @@ class CreateParams(RequestOptions): "Literal['always_invoice', 'create_prorations', 'none']" ] """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. """ transfer_data: NotRequired["Subscription.CreateParamsTransferData"] """ @@ -1041,6 +1041,9 @@ class ListParams(RequestOptions): The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. """ created: NotRequired["Subscription.ListParamsCreated|int"] + """ + Only return subscriptions that were created during the given date interval. + """ current_period_end: NotRequired[ "Subscription.ListParamsCurrentPeriodEnd|int" ] @@ -1279,7 +1282,7 @@ class ModifyParams(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`. + 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"] """ @@ -1746,7 +1749,7 @@ class ResumeParams(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`. + 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"] """ diff --git a/stripe/_subscription_item.py b/stripe/_subscription_item.py index 2b2e64ce4..bc6821b3a 100644 --- a/stripe/_subscription_item.py +++ b/stripe/_subscription_item.py @@ -90,7 +90,7 @@ class CreateParams(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`. + 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"] """ @@ -180,7 +180,7 @@ class DeleteParams(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`. + 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"] """ @@ -274,7 +274,7 @@ class ModifyParams(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`. + 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"] """ diff --git a/stripe/_subscription_item_service.py b/stripe/_subscription_item_service.py index 1777057f5..499f83d41 100644 --- a/stripe/_subscription_item_service.py +++ b/stripe/_subscription_item_service.py @@ -72,7 +72,7 @@ class CreateParams(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"] """ @@ -144,7 +144,7 @@ class DeleteParams(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"] """ @@ -228,7 +228,7 @@ class UpdateParams(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"] """ diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index f9f849c72..7be42d79b 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -189,7 +189,7 @@ class CreateParams(TypedDict): "Literal['always_invoice', 'create_prorations', 'none']" ] """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. """ transfer_data: NotRequired[ "SubscriptionService.CreateParamsTransferData" @@ -654,6 +654,9 @@ class ListParams(TypedDict): The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. """ created: NotRequired["SubscriptionService.ListParamsCreated|int"] + """ + Only return subscriptions that were created during the given date interval. + """ current_period_end: NotRequired[ "SubscriptionService.ListParamsCurrentPeriodEnd|int" ] @@ -772,7 +775,7 @@ class ResumeParams(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"] """ @@ -938,7 +941,7 @@ class UpdateParams(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"] """ diff --git a/stripe/_tax_rate.py b/stripe/_tax_rate.py index 8bcebeeb8..0ece4d92a 100644 --- a/stripe/_tax_rate.py +++ b/stripe/_tax_rate.py @@ -65,7 +65,7 @@ class CreateParams(RequestOptions): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'pst', 'qst', 'rst', 'sales_tax', 'service_tax', 'vat']" + "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'pst', 'qst', 'rst', 'sales_tax', 'vat', 'service_tax']" ] """ The high-level tax type, such as `vat` or `sales_tax`. @@ -153,7 +153,7 @@ class ModifyParams(RequestOptions): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'pst', 'qst', 'rst', 'sales_tax', 'service_tax', 'vat']" + "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'pst', 'qst', 'rst', 'sales_tax', 'vat', 'service_tax']" ] """ The high-level tax type, such as `vat` or `sales_tax`. @@ -242,8 +242,8 @@ class RetrieveParams(RequestOptions): "qst", "rst", "sales_tax", - "service_tax", "vat", + "service_tax", ] ] """ diff --git a/stripe/_tax_rate_service.py b/stripe/_tax_rate_service.py index 4dc574dcc..4beab11a1 100644 --- a/stripe/_tax_rate_service.py +++ b/stripe/_tax_rate_service.py @@ -52,7 +52,7 @@ class CreateParams(TypedDict): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'pst', 'qst', 'rst', 'sales_tax', 'service_tax', 'vat']" + "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'pst', 'qst', 'rst', 'sales_tax', 'vat', 'service_tax']" ] """ The high-level tax type, such as `vat` or `sales_tax`. @@ -146,7 +146,7 @@ class UpdateParams(TypedDict): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'pst', 'qst', 'rst', 'sales_tax', 'service_tax', 'vat']" + "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'pst', 'qst', 'rst', 'sales_tax', 'vat', 'service_tax']" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/_transfer.py b/stripe/_transfer.py index f9d2b2b9d..c6763eef6 100644 --- a/stripe/_transfer.py +++ b/stripe/_transfer.py @@ -107,6 +107,9 @@ class CreateReversalParams(RequestOptions): class ListParams(RequestOptions): created: NotRequired["Transfer.ListParamsCreated|int"] + """ + Only return transfers that were created during the given date interval. + """ destination: NotRequired["str"] """ Only return transfers for the destination specified by this account ID. diff --git a/stripe/_transfer_service.py b/stripe/_transfer_service.py index 817ba1f25..581d2d78c 100644 --- a/stripe/_transfer_service.py +++ b/stripe/_transfer_service.py @@ -55,6 +55,9 @@ class CreateParams(TypedDict): class ListParams(TypedDict): created: NotRequired["TransferService.ListParamsCreated|int"] + """ + Only return transfers that were created during the given date interval. + """ destination: NotRequired["str"] """ Only return transfers for the destination specified by this account ID. diff --git a/stripe/billing_portal/_configuration.py b/stripe/billing_portal/_configuration.py index 29b445e75..7e9fb906c 100644 --- a/stripe/billing_portal/_configuration.py +++ b/stripe/billing_portal/_configuration.py @@ -149,7 +149,7 @@ class Product(StripeObject): "always_invoice", "create_prorations", "none" ] """ - Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation. """ _inner_class_types = {"products": Product} diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 93ca1d18c..6d99c10c5 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -3378,7 +3378,7 @@ class ListLineItemsParams(RequestOptions): class ListParams(RequestOptions): created: NotRequired["Session.ListParamsCreated|int"] """ - Only return the Checkout Sessions that were created during the given date interval. + Only return Checkout Sessions that were created during the given date interval. """ customer: NotRequired["str"] """ diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index 649f1f8d5..d14975cd0 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -1965,7 +1965,7 @@ class ExpireParams(TypedDict): class ListParams(TypedDict): created: NotRequired["SessionService.ListParamsCreated|int"] """ - Only return the Checkout Sessions that were created during the given date interval. + Only return Checkout Sessions that were created during the given date interval. """ customer: NotRequired["str"] """ diff --git a/stripe/identity/_verification_report.py b/stripe/identity/_verification_report.py index 6701de048..fbc13cd64 100644 --- a/stripe/identity/_verification_report.py +++ b/stripe/identity/_verification_report.py @@ -294,7 +294,14 @@ class Error(StripeObject): _inner_class_types = {"error": Error} class ListParams(RequestOptions): + client_reference_id: NotRequired["str"] + """ + A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + """ created: NotRequired["VerificationReport.ListParamsCreated|int"] + """ + Only return VerificationReports 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. @@ -344,6 +351,10 @@ class RetrieveParams(RequestOptions): Specifies which fields in the response should be expanded. """ + client_reference_id: Optional[str] + """ + A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + """ created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/stripe/identity/_verification_report_service.py b/stripe/identity/_verification_report_service.py index bdf1b0be5..281f9279a 100644 --- a/stripe/identity/_verification_report_service.py +++ b/stripe/identity/_verification_report_service.py @@ -11,7 +11,14 @@ class VerificationReportService(StripeService): class ListParams(TypedDict): + client_reference_id: NotRequired["str"] + """ + A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + """ created: NotRequired["VerificationReportService.ListParamsCreated|int"] + """ + Only return VerificationReports 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. diff --git a/stripe/identity/_verification_session.py b/stripe/identity/_verification_session.py index d668cefb1..7a1279af1 100644 --- a/stripe/identity/_verification_session.py +++ b/stripe/identity/_verification_session.py @@ -180,6 +180,10 @@ class CancelParams(RequestOptions): """ class CreateParams(RequestOptions): + client_reference_id: NotRequired["str"] + """ + A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + """ expand: NotRequired["List[str]"] """ Specifies which fields in the response should be expanded. @@ -230,7 +234,14 @@ class CreateParamsOptionsDocument(TypedDict): """ class ListParams(RequestOptions): + client_reference_id: NotRequired["str"] + """ + A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + """ created: NotRequired["VerificationSession.ListParamsCreated|int"] + """ + Only return VerificationSessions 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. @@ -330,6 +341,10 @@ class RetrieveParams(RequestOptions): Specifies which fields in the response should be expanded. """ + client_reference_id: Optional[str] + """ + A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + """ client_secret: Optional[str] """ The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don't store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. diff --git a/stripe/identity/_verification_session_service.py b/stripe/identity/_verification_session_service.py index 8fd15286f..08cf2148c 100644 --- a/stripe/identity/_verification_session_service.py +++ b/stripe/identity/_verification_session_service.py @@ -17,6 +17,10 @@ class CancelParams(TypedDict): """ class CreateParams(TypedDict): + client_reference_id: NotRequired["str"] + """ + A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + """ expand: NotRequired["List[str]"] """ Specifies which fields in the response should be expanded. @@ -67,9 +71,16 @@ class CreateParamsOptionsDocument(TypedDict): """ class ListParams(TypedDict): + client_reference_id: NotRequired["str"] + """ + A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + """ created: NotRequired[ "VerificationSessionService.ListParamsCreated|int" ] + """ + Only return VerificationSessions 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. diff --git a/stripe/issuing/_dispute.py b/stripe/issuing/_dispute.py index e51c3acf1..42ba8d0a7 100644 --- a/stripe/issuing/_dispute.py +++ b/stripe/issuing/_dispute.py @@ -501,7 +501,7 @@ class CreateParamsTreasury(TypedDict): class ListParams(RequestOptions): created: NotRequired["Dispute.ListParamsCreated|int"] """ - Select Issuing disputes that were created during the given date interval. + Only return Issuing disputes that were created during the given date interval. """ ending_before: NotRequired["str"] """ diff --git a/stripe/issuing/_dispute_service.py b/stripe/issuing/_dispute_service.py index 348e175a4..420dfee49 100644 --- a/stripe/issuing/_dispute_service.py +++ b/stripe/issuing/_dispute_service.py @@ -271,7 +271,7 @@ class CreateParamsTreasury(TypedDict): class ListParams(TypedDict): created: NotRequired["DisputeService.ListParamsCreated|int"] """ - Select Issuing disputes that were created during the given date interval. + Only return Issuing disputes that were created during the given date interval. """ ending_before: NotRequired["str"] """ diff --git a/stripe/issuing/_token.py b/stripe/issuing/_token.py index 5ec5c7c58..4f1ca698b 100644 --- a/stripe/issuing/_token.py +++ b/stripe/issuing/_token.py @@ -199,7 +199,7 @@ class ListParams(RequestOptions): """ created: NotRequired["Token.ListParamsCreated|int"] """ - Select Issuing tokens that were created during the given date interval. + Only return Issuing tokens that were created during the given date interval. """ ending_before: NotRequired["str"] """ diff --git a/stripe/issuing/_token_service.py b/stripe/issuing/_token_service.py index 457e6c98f..49db37535 100644 --- a/stripe/issuing/_token_service.py +++ b/stripe/issuing/_token_service.py @@ -17,7 +17,7 @@ class ListParams(TypedDict): """ created: NotRequired["TokenService.ListParamsCreated|int"] """ - Select Issuing tokens that were created during the given date interval. + Only return Issuing tokens that were created during the given date interval. """ ending_before: NotRequired["str"] """ diff --git a/stripe/radar/_value_list.py b/stripe/radar/_value_list.py index 50191d016..8d91ffae4 100644 --- a/stripe/radar/_value_list.py +++ b/stripe/radar/_value_list.py @@ -71,6 +71,9 @@ class ListParams(RequestOptions): A value contained within a value list - returns all value lists containing this value. """ created: NotRequired["ValueList.ListParamsCreated|int"] + """ + Only return value lists 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. diff --git a/stripe/radar/_value_list_item.py b/stripe/radar/_value_list_item.py index bcc0a9f15..8f9abd4e6 100644 --- a/stripe/radar/_value_list_item.py +++ b/stripe/radar/_value_list_item.py @@ -44,6 +44,9 @@ class DeleteParams(RequestOptions): class ListParams(RequestOptions): created: NotRequired["ValueListItem.ListParamsCreated|int"] + """ + Only return items 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. diff --git a/stripe/radar/_value_list_item_service.py b/stripe/radar/_value_list_item_service.py index 6ac1c7fee..ce97a4cd0 100644 --- a/stripe/radar/_value_list_item_service.py +++ b/stripe/radar/_value_list_item_service.py @@ -29,6 +29,9 @@ class DeleteParams(TypedDict): class ListParams(TypedDict): created: NotRequired["ValueListItemService.ListParamsCreated|int"] + """ + Only return items 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. diff --git a/stripe/radar/_value_list_service.py b/stripe/radar/_value_list_service.py index 196cf3d08..d1a5b49e4 100644 --- a/stripe/radar/_value_list_service.py +++ b/stripe/radar/_value_list_service.py @@ -47,6 +47,9 @@ class ListParams(TypedDict): A value contained within a value list - returns all value lists containing this value. """ created: NotRequired["ValueListService.ListParamsCreated|int"] + """ + Only return value lists 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. diff --git a/stripe/reporting/_report_run.py b/stripe/reporting/_report_run.py index 2dba14623..cd3fbee92 100644 --- a/stripe/reporting/_report_run.py +++ b/stripe/reporting/_report_run.py @@ -125,6 +125,9 @@ class CreateParamsParameters(TypedDict): class ListParams(RequestOptions): created: NotRequired["ReportRun.ListParamsCreated|int"] + """ + Only return Report Runs 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. diff --git a/stripe/reporting/_report_run_service.py b/stripe/reporting/_report_run_service.py index 24ef67365..34c1caaab 100644 --- a/stripe/reporting/_report_run_service.py +++ b/stripe/reporting/_report_run_service.py @@ -64,6 +64,9 @@ class CreateParamsParameters(TypedDict): class ListParams(TypedDict): created: NotRequired["ReportRunService.ListParamsCreated|int"] + """ + Only return Report Runs 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. diff --git a/stripe/treasury/_financial_account.py b/stripe/treasury/_financial_account.py index 98a44f87d..2adb74cc8 100644 --- a/stripe/treasury/_financial_account.py +++ b/stripe/treasury/_financial_account.py @@ -290,6 +290,9 @@ class CreateParamsPlatformRestrictions(TypedDict): class ListParams(RequestOptions): created: NotRequired["FinancialAccount.ListParamsCreated|int"] + """ + Only return FinancialAccounts that were created during the given date interval. + """ ending_before: NotRequired["str"] """ An object ID cursor for use in pagination. diff --git a/stripe/treasury/_financial_account_features_service.py b/stripe/treasury/_financial_account_features_service.py index 4e2a7370a..db45e91bc 100644 --- a/stripe/treasury/_financial_account_features_service.py +++ b/stripe/treasury/_financial_account_features_service.py @@ -163,10 +163,162 @@ class ListParams(TypedDict): Specifies which fields in the response should be expanded. """ - def create( + class RetrieveParams(TypedDict): + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + + class UpdateParams(TypedDict): + card_issuing: NotRequired[ + "FinancialAccountFeaturesService.UpdateParamsCardIssuing" + ] + """ + Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + """ + deposit_insurance: NotRequired[ + "FinancialAccountFeaturesService.UpdateParamsDepositInsurance" + ] + """ + Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + """ + expand: NotRequired["List[str]"] + """ + Specifies which fields in the response should be expanded. + """ + financial_addresses: NotRequired[ + "FinancialAccountFeaturesService.UpdateParamsFinancialAddresses" + ] + """ + Contains Features that add FinancialAddresses to the FinancialAccount. + """ + inbound_transfers: NotRequired[ + "FinancialAccountFeaturesService.UpdateParamsInboundTransfers" + ] + """ + Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + """ + intra_stripe_flows: NotRequired[ + "FinancialAccountFeaturesService.UpdateParamsIntraStripeFlows" + ] + """ + Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + """ + outbound_payments: NotRequired[ + "FinancialAccountFeaturesService.UpdateParamsOutboundPayments" + ] + """ + Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + """ + outbound_transfers: NotRequired[ + "FinancialAccountFeaturesService.UpdateParamsOutboundTransfers" + ] + """ + Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + """ + + class UpdateParamsCardIssuing(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + class UpdateParamsDepositInsurance(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + class UpdateParamsFinancialAddresses(TypedDict): + aba: NotRequired[ + "FinancialAccountFeaturesService.UpdateParamsFinancialAddressesAba" + ] + """ + Adds an ABA FinancialAddress to the FinancialAccount. + """ + + class UpdateParamsFinancialAddressesAba(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + class UpdateParamsInboundTransfers(TypedDict): + ach: NotRequired[ + "FinancialAccountFeaturesService.UpdateParamsInboundTransfersAch" + ] + """ + Enables ACH Debits via the InboundTransfers API. + """ + + class UpdateParamsInboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + class UpdateParamsIntraStripeFlows(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + class UpdateParamsOutboundPayments(TypedDict): + ach: NotRequired[ + "FinancialAccountFeaturesService.UpdateParamsOutboundPaymentsAch" + ] + """ + Enables ACH transfers via the OutboundPayments API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccountFeaturesService.UpdateParamsOutboundPaymentsUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundPayments API. + """ + + class UpdateParamsOutboundPaymentsAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + class UpdateParamsOutboundPaymentsUsDomesticWire(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + class UpdateParamsOutboundTransfers(TypedDict): + ach: NotRequired[ + "FinancialAccountFeaturesService.UpdateParamsOutboundTransfersAch" + ] + """ + Enables ACH transfers via the OutboundTransfers API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccountFeaturesService.UpdateParamsOutboundTransfersUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundTransfers API. + """ + + class UpdateParamsOutboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + class UpdateParamsOutboundTransfersUsDomesticWire(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + def update( self, financial_account: str, - params: "FinancialAccountFeaturesService.CreateParams" = {}, + params: "FinancialAccountFeaturesService.UpdateParams" = {}, options: RequestOptions = {}, ) -> FinancialAccountFeatures: """ @@ -186,6 +338,29 @@ def create( ), ) + def retrieve( + self, + financial_account: str, + params: "FinancialAccountFeaturesService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> FinancialAccountFeatures: + """ + Retrieves Features information associated with the FinancialAccount. + """ + return cast( + FinancialAccountFeatures, + self._request( + "get", + "/v1/treasury/financial_accounts/{financial_account}/features".format( + financial_account=sanitize_id(financial_account), + ), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + def list( self, financial_account: str, @@ -208,3 +383,26 @@ def list( options=options, ), ) + + def create( + self, + financial_account: str, + params: "FinancialAccountFeaturesService.CreateParams" = {}, + options: RequestOptions = {}, + ) -> FinancialAccountFeatures: + """ + Updates the Features associated with a FinancialAccount. + """ + return cast( + FinancialAccountFeatures, + self._request( + "post", + "/v1/treasury/financial_accounts/{financial_account}/features".format( + financial_account=sanitize_id(financial_account), + ), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/treasury/_financial_account_service.py b/stripe/treasury/_financial_account_service.py index ba6ec9604..70b71ad95 100644 --- a/stripe/treasury/_financial_account_service.py +++ b/stripe/treasury/_financial_account_service.py @@ -195,6 +195,9 @@ class CreateParamsPlatformRestrictions(TypedDict): class ListParams(TypedDict): created: NotRequired["FinancialAccountService.ListParamsCreated|int"] + """ + Only return FinancialAccounts that were created during the given date interval. + """ ending_before: NotRequired["str"] """ An object ID cursor for use in pagination. diff --git a/stripe/treasury/_outbound_payment.py b/stripe/treasury/_outbound_payment.py index 0b0d60145..08065951c 100644 --- a/stripe/treasury/_outbound_payment.py +++ b/stripe/treasury/_outbound_payment.py @@ -366,6 +366,10 @@ class FailParams(RequestOptions): """ class ListParams(RequestOptions): + created: NotRequired["OutboundPayment.ListParamsCreated|int"] + """ + Only return OutboundPayments that were created during the given date interval. + """ customer: NotRequired["str"] """ Only return OutboundPayments sent to this customer. @@ -397,6 +401,24 @@ class ListParams(RequestOptions): Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ + class PostParams(RequestOptions): expand: NotRequired["List[str]"] """ diff --git a/stripe/treasury/_outbound_payment_service.py b/stripe/treasury/_outbound_payment_service.py index eca51c4c6..11848568d 100644 --- a/stripe/treasury/_outbound_payment_service.py +++ b/stripe/treasury/_outbound_payment_service.py @@ -193,6 +193,10 @@ class CreateParamsEndUserDetails(TypedDict): """ class ListParams(TypedDict): + created: NotRequired["OutboundPaymentService.ListParamsCreated|int"] + """ + Only return OutboundPayments that were created during the given date interval. + """ customer: NotRequired["str"] """ Only return OutboundPayments sent to this customer. @@ -224,6 +228,24 @@ class ListParams(TypedDict): Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. """ + class ListParamsCreated(TypedDict): + gt: NotRequired["int"] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired["int"] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired["int"] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired["int"] + """ + Maximum value to filter by (inclusive) + """ + class RetrieveParams(TypedDict): expand: NotRequired["List[str]"] """ diff --git a/stripe/treasury/_transaction.py b/stripe/treasury/_transaction.py index f98ab5c36..078a4f728 100644 --- a/stripe/treasury/_transaction.py +++ b/stripe/treasury/_transaction.py @@ -116,6 +116,9 @@ class StatusTransitions(StripeObject): class ListParams(RequestOptions): created: NotRequired["Transaction.ListParamsCreated|int"] + """ + Only return Transactions 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. diff --git a/stripe/treasury/_transaction_entry.py b/stripe/treasury/_transaction_entry.py index 317a5318b..0ae9980b1 100644 --- a/stripe/treasury/_transaction_entry.py +++ b/stripe/treasury/_transaction_entry.py @@ -107,6 +107,9 @@ class FlowDetails(StripeObject): class ListParams(RequestOptions): created: NotRequired["TransactionEntry.ListParamsCreated|int"] + """ + Only return TransactionEntries that were created during the given date interval. + """ effective_at: NotRequired["TransactionEntry.ListParamsEffectiveAt|int"] ending_before: NotRequired["str"] """ diff --git a/stripe/treasury/_transaction_entry_service.py b/stripe/treasury/_transaction_entry_service.py index 2122e4fee..aeee3dfc0 100644 --- a/stripe/treasury/_transaction_entry_service.py +++ b/stripe/treasury/_transaction_entry_service.py @@ -12,6 +12,9 @@ class TransactionEntryService(StripeService): class ListParams(TypedDict): created: NotRequired["TransactionEntryService.ListParamsCreated|int"] + """ + Only return TransactionEntries that were created during the given date interval. + """ effective_at: NotRequired[ "TransactionEntryService.ListParamsEffectiveAt|int" ] diff --git a/stripe/treasury/_transaction_service.py b/stripe/treasury/_transaction_service.py index f51d713e6..1c43b9f84 100644 --- a/stripe/treasury/_transaction_service.py +++ b/stripe/treasury/_transaction_service.py @@ -12,6 +12,9 @@ class TransactionService(StripeService): class ListParams(TypedDict): created: NotRequired["TransactionService.ListParamsCreated|int"] + """ + Only return Transactions 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.