From 29a457d280f25ebd7d95e80ad5a4af4172e05682 Mon Sep 17 00:00:00 2001 From: arlyon Date: Fri, 2 Feb 2024 00:22:17 +0000 Subject: [PATCH] feat: generate latest changes from OpenApi spec --- openapi/version.json | 2 +- src/resources/generated/account.rs | 116 ++++- src/resources/generated/charge.rs | 17 + src/resources/generated/checkout_session.rs | 32 +- src/resources/generated/payment_intent.rs | 203 ++++++++ src/resources/generated/payment_link.rs | 6 + src/resources/generated/payment_method.rs | 20 + src/resources/generated/refund.rs | 3 + src/resources/generated/setup_intent.rs | 18 + src/resources/generated/subscription.rs | 12 + .../generated/subscription_schedule.rs | 15 +- src/resources/generated/tax_calculation.rs | 12 +- .../generated/tax_calculation_line_item.rs | 8 +- src/resources/generated/tax_id.rs | 442 +++++++++++++++++- src/resources/generated/tax_rate.rs | 47 ++ src/resources/generated/tax_transaction.rs | 8 +- .../generated/tax_transaction_line_item.rs | 4 +- src/resources/generated/terminal_reader.rs | 4 +- 18 files changed, 940 insertions(+), 29 deletions(-) diff --git a/openapi/version.json b/openapi/version.json index 530456b41..65b13f277 100644 --- a/openapi/version.json +++ b/openapi/version.json @@ -1,3 +1,3 @@ { - "version": "v796" + "version": "v808" } \ No newline at end of file diff --git a/src/resources/generated/account.rs b/src/resources/generated/account.rs index a5da67231..9c4494703 100644 --- a/src/resources/generated/account.rs +++ b/src/resources/generated/account.rs @@ -10,7 +10,7 @@ use crate::params::{ Deleted, Expand, Expandable, List, Metadata, Object, Paginable, RangeQuery, Timestamp, }; use crate::resources::{ - Address, Currency, DelayDays, ExternalAccount, File, Person, PersonVerificationParams, + Address, Currency, DelayDays, ExternalAccount, File, Person, PersonVerificationParams, TaxId, VerificationDocumentParams, }; @@ -358,6 +358,10 @@ pub struct AccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub sofort_payments: Option, + /// The status of the Swish capability of the account, or whether the account can directly process Swish payments. + #[serde(skip_serializing_if = "Option::is_none")] + pub swish_payments: Option, + /// The status of the tax reporting 1099-K (US) capability of the account. #[serde(skip_serializing_if = "Option::is_none")] pub tax_reporting_us_1099_k: Option, @@ -509,6 +513,9 @@ pub struct AccountSettings { pub dashboard: DashboardSettings, + #[serde(skip_serializing_if = "Option::is_none")] + pub invoices: Option, + pub payments: PaymentsSettings, #[serde(skip_serializing_if = "Option::is_none")] @@ -614,6 +621,14 @@ pub struct DeclineChargeOn { pub cvc_failure: bool, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct AccountInvoicesSettings { + /// The list of default Account Tax IDs to automatically include on invoices. + /// + /// Account Tax IDs get added when an invoice is finalized. + pub default_account_tax_ids: Option>>, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentsSettings { /// The default text that appears on credit card statements when a charge is made. @@ -935,7 +950,8 @@ pub struct CreateAccount<'a> { /// /// You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation. /// By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. - /// To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts. + /// To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. + /// After you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub external_account: Option<&'a str>, @@ -1098,7 +1114,8 @@ pub struct UpdateAccount<'a> { /// /// You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation. /// By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. - /// To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts. + /// To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. + /// After you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts. #[serde(skip_serializing_if = "Option::is_none")] pub external_account: Option<&'a str>, @@ -1416,6 +1433,10 @@ pub struct CreateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub sofort_payments: Option, + /// The swish_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub swish_payments: Option, + /// The tax_reporting_us_1099_k capability. #[serde(skip_serializing_if = "Option::is_none")] pub tax_reporting_us_1099_k: Option, @@ -1569,6 +1590,10 @@ pub struct PersonParams { #[serde(skip_serializing_if = "Option::is_none")] pub registered_address: Option, + /// Describes the person’s relationship to the account. + #[serde(skip_serializing_if = "Option::is_none")] + pub relationship: Option, + /// The last four digits of the individual's Social Security Number (U.S. /// /// only). @@ -1706,6 +1731,10 @@ pub struct UpdateAccountCapabilities { #[serde(skip_serializing_if = "Option::is_none")] pub sofort_payments: Option, + /// The swish_payments capability. + #[serde(skip_serializing_if = "Option::is_none")] + pub swish_payments: Option, + /// The tax_reporting_us_1099_k capability. #[serde(skip_serializing_if = "Option::is_none")] pub tax_reporting_us_1099_k: Option, @@ -2177,6 +2206,16 @@ pub struct CreateAccountCapabilitiesSofortPayments { pub requested: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateAccountCapabilitiesSwishPayments { + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateAccountCapabilitiesTaxReportingUs1099K { /// Passing true requests the capability for the account, if it is not already requested. @@ -2363,6 +2402,31 @@ pub struct PersonParamsRegisteredAddress { pub state: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PersonParamsRelationship { + /// Whether the person is a director of the account's legal entity. + /// + /// Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + #[serde(skip_serializing_if = "Option::is_none")] + pub director: Option, + + /// Whether the person has significant responsibility to control, manage, or direct the organization. + #[serde(skip_serializing_if = "Option::is_none")] + pub executive: Option, + + /// Whether the person is an owner of the account’s legal entity. + #[serde(skip_serializing_if = "Option::is_none")] + pub owner: Option, + + /// The percent owned by the person of the account's legal entity. + #[serde(skip_serializing_if = "Option::is_none")] + pub percent_ownership: Option, + + /// The person's title (e.g., CEO, Support Engineer). + #[serde(skip_serializing_if = "Option::is_none")] + pub title: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesAcssDebitPayments { /// Passing true requests the capability for the account, if it is not already requested. @@ -2673,6 +2737,16 @@ pub struct UpdateAccountCapabilitiesSofortPayments { pub requested: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateAccountCapabilitiesSwishPayments { + /// Passing true requests the capability for the account, if it is not already requested. + /// + /// A requested capability may not immediately become active. + /// Any requirements to activate the capability are returned in the `requirements` arrays. + #[serde(skip_serializing_if = "Option::is_none")] + pub requested: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateAccountCapabilitiesTaxReportingUs1099K { /// Passing true requests the capability for the account, if it is not already requested. @@ -3833,6 +3907,42 @@ impl std::default::Default for AccountCapabilitiesSofortPayments { } } +/// An enum representing the possible values of an `AccountCapabilities`'s `swish_payments` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum AccountCapabilitiesSwishPayments { + Active, + Inactive, + Pending, +} + +impl AccountCapabilitiesSwishPayments { + pub fn as_str(self) -> &'static str { + match self { + AccountCapabilitiesSwishPayments::Active => "active", + AccountCapabilitiesSwishPayments::Inactive => "inactive", + AccountCapabilitiesSwishPayments::Pending => "pending", + } + } +} + +impl AsRef for AccountCapabilitiesSwishPayments { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for AccountCapabilitiesSwishPayments { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for AccountCapabilitiesSwishPayments { + fn default() -> Self { + Self::Active + } +} + /// An enum representing the possible values of an `AccountCapabilities`'s `treasury` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/charge.rs b/src/resources/generated/charge.rs index d98e5d525..a1bf1b6e5 100644 --- a/src/resources/generated/charge.rs +++ b/src/resources/generated/charge.rs @@ -466,6 +466,9 @@ pub struct PaymentMethodDetails { #[serde(skip_serializing_if = "Option::is_none")] pub stripe_account: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + /// The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. /// An additional hash is included on `payment_method_details` with a name matching this value. /// It contains information specific to the payment method. @@ -1441,6 +1444,20 @@ pub struct PaymentMethodDetailsSofort { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsStripeAccount {} +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodDetailsSwish { + /// Uniquely identifies the payer's Swish account. + /// + /// You can use this attribute to check whether two Swish transactions were paid for by the same payer. + pub fingerprint: Option, + + /// Payer bank reference number for the payment. + pub payment_reference: Option, + + /// The last four digits of the Swish account phone number. + pub verified_phone_last4: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodDetailsUsBankAccount { /// Account holder type: individual or company. diff --git a/src/resources/generated/checkout_session.rs b/src/resources/generated/checkout_session.rs index 6bdf65f8b..3ebec39ce 100644 --- a/src/resources/generated/checkout_session.rs +++ b/src/resources/generated/checkout_session.rs @@ -199,8 +199,7 @@ pub struct CheckoutSession { /// Describes the type of transaction being performed by Checkout in order to customize /// relevant text on the page, such as the submit button. /// - /// `submit_type` can only be specified on Checkout Sessions in `payment` mode, but not Checkout Sessions in `subscription` or `setup` mode. - /// Possible values are `auto`, `pay`, `book`, `donate`. + /// `submit_type` can only be specified on Checkout Sessions in `payment` mode. /// If blank or `auto`, `pay` is used. pub submit_type: Option, @@ -338,6 +337,9 @@ pub struct CheckoutSessionPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub sofort: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, } @@ -741,6 +743,14 @@ pub struct CheckoutSofortPaymentMethodOptions { pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CheckoutSwishPaymentMethodOptions { + /// The order reference that will be displayed to customers in the Swish application. + /// + /// Defaults to the `id` of the Payment Intent. + pub reference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CheckoutUsBankAccountPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] @@ -1348,8 +1358,7 @@ pub struct CreateCheckoutSession<'a> { /// Describes the type of transaction being performed by Checkout in order to customize /// relevant text on the page, such as the submit button. /// - /// `submit_type` can only be specified on Checkout Sessions in `payment` mode, but not Checkout Sessions in `subscription` or `setup` mode. - /// Possible values are `auto`, `pay`, `book`, `donate`. + /// `submit_type` can only be specified on Checkout Sessions in `payment` mode. /// If blank or `auto`, `pay` is used. #[serde(skip_serializing_if = "Option::is_none")] pub submit_type: Option, @@ -1873,6 +1882,10 @@ pub struct CreateCheckoutSessionPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub sofort: Option, + /// contains details about the Swish payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + /// contains details about the Us Bank Account payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, @@ -2649,6 +2662,15 @@ pub struct CreateCheckoutSessionPaymentMethodOptionsSofort { pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateCheckoutSessionPaymentMethodOptionsSwish { + /// The order reference that will be displayed to customers in the Swish application. + /// + /// Defaults to the `id` of the Payment Intent. + #[serde(skip_serializing_if = "Option::is_none")] + pub reference: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateCheckoutSessionPaymentMethodOptionsUsBankAccount { /// Additional fields for Financial Connections Session creation. @@ -6818,6 +6840,7 @@ pub enum CreateCheckoutSessionPaymentMethodTypes { RevolutPay, SepaDebit, Sofort, + Swish, UsBankAccount, WechatPay, Zip, @@ -6855,6 +6878,7 @@ impl CreateCheckoutSessionPaymentMethodTypes { CreateCheckoutSessionPaymentMethodTypes::RevolutPay => "revolut_pay", CreateCheckoutSessionPaymentMethodTypes::SepaDebit => "sepa_debit", CreateCheckoutSessionPaymentMethodTypes::Sofort => "sofort", + CreateCheckoutSessionPaymentMethodTypes::Swish => "swish", CreateCheckoutSessionPaymentMethodTypes::UsBankAccount => "us_bank_account", CreateCheckoutSessionPaymentMethodTypes::WechatPay => "wechat_pay", CreateCheckoutSessionPaymentMethodTypes::Zip => "zip", diff --git a/src/resources/generated/payment_intent.rs b/src/resources/generated/payment_intent.rs index f3df894d9..491d9071a 100644 --- a/src/resources/generated/payment_intent.rs +++ b/src/resources/generated/payment_intent.rs @@ -315,6 +315,10 @@ pub struct PaymentIntentNextAction { #[serde(skip_serializing_if = "Option::is_none")] pub redirect_to_url: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub swish_handle_redirect_or_display_qr_code: + Option, + /// Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. #[serde(rename = "type")] pub type_: String, @@ -668,6 +672,35 @@ pub struct PaymentIntentNextActionRedirectToUrl { pub url: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode { + /// The URL to the hosted Swish instructions page, which allows customers to view the QR code. + #[serde(skip_serializing_if = "Option::is_none")] + pub hosted_instructions_url: Option, + + /// The url for mobile redirect based auth. + #[serde(skip_serializing_if = "Option::is_none")] + pub mobile_auth_url: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + pub qr_code: Option, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentNextActionSwishQrCode { + /// The raw data string used to generate QR code, it should be used together with QR code library. + #[serde(skip_serializing_if = "Option::is_none")] + pub data: Option, + + /// The image_url_png string used to render QR code. + #[serde(skip_serializing_if = "Option::is_none")] + pub image_url_png: Option, + + /// The image_url_svg string used to render QR code. + #[serde(skip_serializing_if = "Option::is_none")] + pub image_url_svg: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentNextActionVerifyWithMicrodeposits { /// The timestamp when the microdeposits are expected to land. @@ -825,6 +858,9 @@ pub struct PaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub sofort: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, @@ -1003,6 +1039,21 @@ pub struct PaymentIntentPaymentMethodOptionsSepaDebit { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebit {} +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentIntentPaymentMethodOptionsSwish { + /// The order ID displayed in the Swish app after the payment is authorized. + #[serde(skip_serializing_if = "Option::is_none")] + pub reference: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentIntentPaymentMethodOptionsUsBankAccount { #[serde(skip_serializing_if = "Option::is_none")] @@ -2102,6 +2153,10 @@ pub struct CreatePaymentIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub sofort: Option, + /// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + /// The type of the PaymentMethod. /// /// An additional hash is included on the PaymentMethod with a name matching this value. @@ -2248,6 +2303,10 @@ pub struct CreatePaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub sofort: Option, + /// If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + /// If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, @@ -2447,6 +2506,10 @@ pub struct UpdatePaymentIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub sofort: Option, + /// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + /// The type of the PaymentMethod. /// /// An additional hash is included on the PaymentMethod with a name matching this value. @@ -2593,6 +2656,10 @@ pub struct UpdatePaymentIntentPaymentMethodOptions { #[serde(skip_serializing_if = "Option::is_none")] pub sofort: Option, + /// If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + /// If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. #[serde(skip_serializing_if = "Option::is_none")] pub us_bank_account: Option, @@ -2827,6 +2894,9 @@ pub struct CreatePaymentIntentPaymentMethodDataSofort { pub country: CreatePaymentIntentPaymentMethodDataSofortCountry, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodDataSwish {} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodDataUsBankAccount { /// Account holder type: individual or company. @@ -3450,6 +3520,21 @@ pub struct CreatePaymentIntentPaymentMethodOptionsSofort { pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentIntentPaymentMethodOptionsSwish { + /// The order ID displayed in the Swish app after the payment is authorized. + #[serde(skip_serializing_if = "Option::is_none")] + pub reference: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccount { /// Additional fields for Financial Connections Session creation. @@ -3714,6 +3799,9 @@ pub struct UpdatePaymentIntentPaymentMethodDataSofort { pub country: UpdatePaymentIntentPaymentMethodDataSofortCountry, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodDataSwish {} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodDataUsBankAccount { /// Account holder type: individual or company. @@ -4337,6 +4425,21 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsSofort { pub setup_future_usage: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdatePaymentIntentPaymentMethodOptionsSwish { + /// The order ID displayed in the Swish app after the payment is authorized. + #[serde(skip_serializing_if = "Option::is_none")] + pub reference: Option, + + /// Indicates that you intend to make future payments with this PaymentIntent's payment method. + /// + /// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + /// + /// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + #[serde(skip_serializing_if = "Option::is_none")] + pub setup_future_usage: Option, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccount { /// Additional fields for Financial Connections Session creation. @@ -5551,6 +5654,7 @@ pub enum CreatePaymentIntentPaymentMethodDataType { RevolutPay, SepaDebit, Sofort, + Swish, UsBankAccount, WechatPay, Zip, @@ -5587,6 +5691,7 @@ impl CreatePaymentIntentPaymentMethodDataType { CreatePaymentIntentPaymentMethodDataType::RevolutPay => "revolut_pay", CreatePaymentIntentPaymentMethodDataType::SepaDebit => "sepa_debit", CreatePaymentIntentPaymentMethodDataType::Sofort => "sofort", + CreatePaymentIntentPaymentMethodDataType::Swish => "swish", CreatePaymentIntentPaymentMethodDataType::UsBankAccount => "us_bank_account", CreatePaymentIntentPaymentMethodDataType::WechatPay => "wechat_pay", CreatePaymentIntentPaymentMethodDataType::Zip => "zip", @@ -8136,6 +8241,38 @@ impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsSofortSetu } } +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsSwish`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { + None, +} + +impl CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage::None => "none", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `permissions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -9464,6 +9601,38 @@ impl std::default::Default for PaymentIntentPaymentMethodOptionsSepaDebitSetupFu } } +/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsSwish`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum PaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { + None, +} + +impl PaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + PaymentIntentPaymentMethodOptionsSwishSetupFutureUsage::None => "none", + } + } +} + +impl AsRef for PaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for PaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsUsBankAccount`'s `preferred_settlement_speed` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -11452,6 +11621,7 @@ pub enum UpdatePaymentIntentPaymentMethodDataType { RevolutPay, SepaDebit, Sofort, + Swish, UsBankAccount, WechatPay, Zip, @@ -11488,6 +11658,7 @@ impl UpdatePaymentIntentPaymentMethodDataType { UpdatePaymentIntentPaymentMethodDataType::RevolutPay => "revolut_pay", UpdatePaymentIntentPaymentMethodDataType::SepaDebit => "sepa_debit", UpdatePaymentIntentPaymentMethodDataType::Sofort => "sofort", + UpdatePaymentIntentPaymentMethodDataType::Swish => "swish", UpdatePaymentIntentPaymentMethodDataType::UsBankAccount => "us_bank_account", UpdatePaymentIntentPaymentMethodDataType::WechatPay => "wechat_pay", UpdatePaymentIntentPaymentMethodDataType::Zip => "zip", @@ -14037,6 +14208,38 @@ impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsSofortSetu } } +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsSwish`'s `setup_future_usage` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { + None, +} + +impl UpdatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage::None => "none", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsSwishSetupFutureUsage { + fn default() -> Self { + Self::None + } +} + /// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections`'s `permissions` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/payment_link.rs b/src/resources/generated/payment_link.rs index 6cfa2e234..6cb088927 100644 --- a/src/resources/generated/payment_link.rs +++ b/src/resources/generated/payment_link.rs @@ -2163,6 +2163,7 @@ pub enum CreatePaymentLinkPaymentMethodTypes { Promptpay, SepaDebit, Sofort, + Swish, UsBankAccount, WechatPay, } @@ -2196,6 +2197,7 @@ impl CreatePaymentLinkPaymentMethodTypes { CreatePaymentLinkPaymentMethodTypes::Promptpay => "promptpay", CreatePaymentLinkPaymentMethodTypes::SepaDebit => "sepa_debit", CreatePaymentLinkPaymentMethodTypes::Sofort => "sofort", + CreatePaymentLinkPaymentMethodTypes::Swish => "swish", CreatePaymentLinkPaymentMethodTypes::UsBankAccount => "us_bank_account", CreatePaymentLinkPaymentMethodTypes::WechatPay => "wechat_pay", } @@ -3166,6 +3168,7 @@ pub enum PaymentLinkPaymentMethodTypes { Promptpay, SepaDebit, Sofort, + Swish, UsBankAccount, WechatPay, } @@ -3199,6 +3202,7 @@ impl PaymentLinkPaymentMethodTypes { PaymentLinkPaymentMethodTypes::Promptpay => "promptpay", PaymentLinkPaymentMethodTypes::SepaDebit => "sepa_debit", PaymentLinkPaymentMethodTypes::Sofort => "sofort", + PaymentLinkPaymentMethodTypes::Swish => "swish", PaymentLinkPaymentMethodTypes::UsBankAccount => "us_bank_account", PaymentLinkPaymentMethodTypes::WechatPay => "wechat_pay", } @@ -4513,6 +4517,7 @@ pub enum UpdatePaymentLinkPaymentMethodTypes { Promptpay, SepaDebit, Sofort, + Swish, UsBankAccount, WechatPay, } @@ -4546,6 +4551,7 @@ impl UpdatePaymentLinkPaymentMethodTypes { UpdatePaymentLinkPaymentMethodTypes::Promptpay => "promptpay", UpdatePaymentLinkPaymentMethodTypes::SepaDebit => "sepa_debit", UpdatePaymentLinkPaymentMethodTypes::Sofort => "sofort", + UpdatePaymentLinkPaymentMethodTypes::Swish => "swish", UpdatePaymentLinkPaymentMethodTypes::UsBankAccount => "us_bank_account", UpdatePaymentLinkPaymentMethodTypes::WechatPay => "wechat_pay", } diff --git a/src/resources/generated/payment_method.rs b/src/resources/generated/payment_method.rs index 34db22f67..aab8b50e6 100644 --- a/src/resources/generated/payment_method.rs +++ b/src/resources/generated/payment_method.rs @@ -136,6 +136,9 @@ pub struct PaymentMethod { #[serde(skip_serializing_if = "Option::is_none")] pub sofort: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + /// The type of the PaymentMethod. /// /// An additional hash is included on the PaymentMethod with a name matching this value. @@ -342,6 +345,8 @@ pub struct Networks { pub available: Vec, /// The preferred network for the card. + /// + /// Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. pub preferred: Option, } @@ -738,6 +743,9 @@ pub struct PaymentMethodSofort { pub country: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct PaymentMethodSwish {} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentMethodUsBankAccount { /// Account holder type: individual or company. @@ -974,6 +982,10 @@ pub struct CreatePaymentMethod<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub sofort: Option, + /// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + /// The type of the PaymentMethod. /// /// An additional hash is included on the PaymentMethod with a name matching this value. @@ -1034,6 +1046,7 @@ impl<'a> CreatePaymentMethod<'a> { revolut_pay: Default::default(), sepa_debit: Default::default(), sofort: Default::default(), + swish: Default::default(), type_: Default::default(), us_bank_account: Default::default(), wechat_pay: Default::default(), @@ -1296,6 +1309,9 @@ pub struct CreatePaymentMethodSofort { pub country: CreatePaymentMethodSofortCountry, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreatePaymentMethodSwish {} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreatePaymentMethodUsBankAccount { /// Account holder type: individual or company. @@ -2365,6 +2381,7 @@ pub enum PaymentMethodType { RevolutPay, SepaDebit, Sofort, + Swish, UsBankAccount, WechatPay, Zip, @@ -2404,6 +2421,7 @@ impl PaymentMethodType { PaymentMethodType::RevolutPay => "revolut_pay", PaymentMethodType::SepaDebit => "sepa_debit", PaymentMethodType::Sofort => "sofort", + PaymentMethodType::Swish => "swish", PaymentMethodType::UsBankAccount => "us_bank_account", PaymentMethodType::WechatPay => "wechat_pay", PaymentMethodType::Zip => "zip", @@ -2461,6 +2479,7 @@ pub enum PaymentMethodTypeFilter { RevolutPay, SepaDebit, Sofort, + Swish, UsBankAccount, WechatPay, Zip, @@ -2498,6 +2517,7 @@ impl PaymentMethodTypeFilter { PaymentMethodTypeFilter::RevolutPay => "revolut_pay", PaymentMethodTypeFilter::SepaDebit => "sepa_debit", PaymentMethodTypeFilter::Sofort => "sofort", + PaymentMethodTypeFilter::Swish => "swish", PaymentMethodTypeFilter::UsBankAccount => "us_bank_account", PaymentMethodTypeFilter::WechatPay => "wechat_pay", PaymentMethodTypeFilter::Zip => "zip", diff --git a/src/resources/generated/refund.rs b/src/resources/generated/refund.rs index 4cf17066d..eec7f5897 100644 --- a/src/resources/generated/refund.rs +++ b/src/resources/generated/refund.rs @@ -210,6 +210,9 @@ pub struct RefundDestinationDetails { #[serde(skip_serializing_if = "Option::is_none")] pub sofort: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub th_bank_transfer: Option, diff --git a/src/resources/generated/setup_intent.rs b/src/resources/generated/setup_intent.rs index a16f8f224..5c6903052 100644 --- a/src/resources/generated/setup_intent.rs +++ b/src/resources/generated/setup_intent.rs @@ -837,6 +837,10 @@ pub struct CreateSetupIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub sofort: Option, + /// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + /// The type of the PaymentMethod. /// /// An additional hash is included on the PaymentMethod with a name matching this value. @@ -1035,6 +1039,10 @@ pub struct UpdateSetupIntentPaymentMethodData { #[serde(skip_serializing_if = "Option::is_none")] pub sofort: Option, + /// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + #[serde(skip_serializing_if = "Option::is_none")] + pub swish: Option, + /// The type of the PaymentMethod. /// /// An additional hash is included on the PaymentMethod with a name matching this value. @@ -1273,6 +1281,9 @@ pub struct CreateSetupIntentPaymentMethodDataSofort { pub country: CreateSetupIntentPaymentMethodDataSofortCountry, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateSetupIntentPaymentMethodDataSwish {} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSetupIntentPaymentMethodDataUsBankAccount { /// Account holder type: individual or company. @@ -1572,6 +1583,9 @@ pub struct UpdateSetupIntentPaymentMethodDataSofort { pub country: UpdateSetupIntentPaymentMethodDataSofortCountry, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UpdateSetupIntentPaymentMethodDataSwish {} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSetupIntentPaymentMethodDataUsBankAccount { /// Account holder type: individual or company. @@ -2747,6 +2761,7 @@ pub enum CreateSetupIntentPaymentMethodDataType { RevolutPay, SepaDebit, Sofort, + Swish, UsBankAccount, WechatPay, Zip, @@ -2783,6 +2798,7 @@ impl CreateSetupIntentPaymentMethodDataType { CreateSetupIntentPaymentMethodDataType::RevolutPay => "revolut_pay", CreateSetupIntentPaymentMethodDataType::SepaDebit => "sepa_debit", CreateSetupIntentPaymentMethodDataType::Sofort => "sofort", + CreateSetupIntentPaymentMethodDataType::Swish => "swish", CreateSetupIntentPaymentMethodDataType::UsBankAccount => "us_bank_account", CreateSetupIntentPaymentMethodDataType::WechatPay => "wechat_pay", CreateSetupIntentPaymentMethodDataType::Zip => "zip", @@ -4679,6 +4695,7 @@ pub enum UpdateSetupIntentPaymentMethodDataType { RevolutPay, SepaDebit, Sofort, + Swish, UsBankAccount, WechatPay, Zip, @@ -4715,6 +4732,7 @@ impl UpdateSetupIntentPaymentMethodDataType { UpdateSetupIntentPaymentMethodDataType::RevolutPay => "revolut_pay", UpdateSetupIntentPaymentMethodDataType::SepaDebit => "sepa_debit", UpdateSetupIntentPaymentMethodDataType::Sofort => "sofort", + UpdateSetupIntentPaymentMethodDataType::Swish => "swish", UpdateSetupIntentPaymentMethodDataType::UsBankAccount => "us_bank_account", UpdateSetupIntentPaymentMethodDataType::WechatPay => "wechat_pay", UpdateSetupIntentPaymentMethodDataType::Zip => "zip", diff --git a/src/resources/generated/subscription.rs b/src/resources/generated/subscription.rs index 45670e784..5f52e4d1f 100644 --- a/src/resources/generated/subscription.rs +++ b/src/resources/generated/subscription.rs @@ -1115,6 +1115,12 @@ pub struct CreateSubscriptionBillingCycleAnchorConfig { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreateSubscriptionInvoiceSettings { + /// The account tax IDs associated with the subscription. + /// + /// Will be set on invoices generated by the subscription. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_tax_ids: Option>, + /// The connected account that issues the invoice. /// /// The invoice is presented with the branding and support information of the specified account. @@ -1249,6 +1255,12 @@ pub struct UpdateSubscriptionCancellationDetails { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UpdateSubscriptionInvoiceSettings { + /// The account tax IDs associated with the subscription. + /// + /// Will be set on invoices generated by the subscription. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_tax_ids: Option>, + /// The connected account that issues the invoice. /// /// The invoice is presented with the branding and support information of the specified account. diff --git a/src/resources/generated/subscription_schedule.rs b/src/resources/generated/subscription_schedule.rs index 3fdb800f6..b363e16b1 100644 --- a/src/resources/generated/subscription_schedule.rs +++ b/src/resources/generated/subscription_schedule.rs @@ -10,7 +10,8 @@ use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable, Range use crate::resources::{ Account, Application, CollectionMethod, ConnectAccountReference, Coupon, Currency, Customer, PaymentMethod, Plan, Price, Scheduled, Subscription, SubscriptionBillingThresholds, - SubscriptionItemBillingThresholds, SubscriptionTransferData, TaxRate, TestHelpersTestClock, + SubscriptionItemBillingThresholds, SubscriptionTransferData, TaxId, TaxRate, + TestHelpersTestClock, }; /// The resource representing a Stripe "SubscriptionSchedule". @@ -234,6 +235,12 @@ pub struct SubscriptionSchedulePhaseConfiguration { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceSettingSubscriptionSchedulePhaseSetting { + /// The account tax IDs associated with this phase of the subscription schedule. + /// + /// Will be set on invoices generated by this phase of the subscription schedule. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_tax_ids: Option>>, + /// Number of days within which a customer must pay invoices generated by this subscription schedule. /// /// This value will be `null` for subscription schedules where `billing=charge_automatically`. @@ -1007,6 +1014,12 @@ pub struct SubscriptionScheduleDefaultSettingsParamsTransferData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionScheduleInvoiceSettings { + /// The account tax IDs associated with this phase of the subscription schedule. + /// + /// Will be set on invoices generated by this phase of the subscription schedule. + #[serde(skip_serializing_if = "Option::is_none")] + pub account_tax_ids: Option>, + /// Number of days within which a customer must pay invoices generated by this subscription schedule. /// /// This value will be `null` for subscription schedules where `billing=charge_automatically`. diff --git a/src/resources/generated/tax_calculation.rs b/src/resources/generated/tax_calculation.rs index 9223d376e..019df6654 100644 --- a/src/resources/generated/tax_calculation.rs +++ b/src/resources/generated/tax_calculation.rs @@ -66,7 +66,7 @@ impl Object for TaxCalculation { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceTaxBreakdown { - /// The amount of tax, in integer cents. + /// The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount: i64, /// Specifies whether the tax amount is included in the line item amount. @@ -79,19 +79,19 @@ pub struct TaxProductResourceTaxBreakdown { /// We might extend the possible values for this field to support new tax rules. pub taxability_reason: TaxProductResourceTaxBreakdownTaxabilityReason, - /// The amount on which tax is calculated, in integer cents. + /// The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub taxable_amount: i64, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceTaxCalculationShippingCost { - /// The shipping amount in integer cents. + /// The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). /// /// If `tax_behavior=inclusive`, then this amount includes taxes. /// Otherwise, taxes were calculated on top of this amount. pub amount: i64, - /// The amount of tax calculated for shipping, in integer cents. + /// The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount_tax: i64, /// The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). @@ -113,7 +113,7 @@ pub struct TaxProductResourceTaxCalculationShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceLineItemTaxBreakdown { - /// The amount of tax, in integer cents. + /// The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount: i64, pub jurisdiction: TaxProductResourceJurisdiction, @@ -131,7 +131,7 @@ pub struct TaxProductResourceLineItemTaxBreakdown { /// The possible values for this field may be extended as new tax rules are supported. pub taxability_reason: TaxProductResourceLineItemTaxBreakdownTaxabilityReason, - /// The amount on which tax is calculated, in integer cents. + /// The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub taxable_amount: i64, } diff --git a/src/resources/generated/tax_calculation_line_item.rs b/src/resources/generated/tax_calculation_line_item.rs index f8135e39d..2ced34f23 100644 --- a/src/resources/generated/tax_calculation_line_item.rs +++ b/src/resources/generated/tax_calculation_line_item.rs @@ -13,13 +13,13 @@ pub struct TaxCalculationLineItem { /// Unique identifier for the object. pub id: TaxCalculationLineItemId, - /// The line item amount in integer cents. + /// The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). /// /// If `tax_behavior=inclusive`, then this amount includes taxes. /// Otherwise, taxes were calculated on top of this amount. pub amount: i64, - /// The amount of tax calculated for this line item, in integer cents. + /// The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount_tax: i64, /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -60,7 +60,7 @@ impl Object for TaxCalculationLineItem { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceLineItemTaxBreakdown { - /// The amount of tax, in integer cents. + /// The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount: i64, pub jurisdiction: TaxProductResourceJurisdiction, @@ -78,7 +78,7 @@ pub struct TaxProductResourceLineItemTaxBreakdown { /// The possible values for this field may be extended as new tax rules are supported. pub taxability_reason: TaxProductResourceLineItemTaxBreakdownTaxabilityReason, - /// The amount on which tax is calculated, in integer cents. + /// The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub taxable_amount: i64, } diff --git a/src/resources/generated/tax_id.rs b/src/resources/generated/tax_id.rs index 69b45dfa4..74979cdcc 100644 --- a/src/resources/generated/tax_id.rs +++ b/src/resources/generated/tax_id.rs @@ -4,9 +4,10 @@ use serde::{Deserialize, Serialize}; +use crate::client::{Client, Response}; use crate::ids::TaxIdId; -use crate::params::{Expandable, Object, Timestamp}; -use crate::resources::Customer; +use crate::params::{Deleted, Expand, Expandable, List, Object, Paginable, Timestamp}; +use crate::resources::{Account, Application, Customer}; /// The resource representing a Stripe "tax_id". /// @@ -38,6 +39,10 @@ pub struct TaxId { #[serde(skip_serializing_if = "Option::is_none")] pub livemode: Option, + /// The account or customer the tax ID belongs to. + #[serde(skip_serializing_if = "Option::is_none")] + pub owner: Option, + /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. /// /// Note that some legacy tax IDs have type `unknown`. @@ -54,6 +59,28 @@ pub struct TaxId { pub verification: Option, } +impl TaxId { + /// Returns a list of tax IDs. + pub fn list(client: &Client, params: &ListTaxIds<'_>) -> Response> { + client.get_query("/tax_ids", ¶ms) + } + + /// Creates a new account or customer `tax_id` object. + pub fn create(client: &Client, params: CreateTaxId<'_>) -> Response { + client.post_form("/tax_ids", ¶ms) + } + + /// Retrieves an account or customer `tax_id` object. + pub fn retrieve(client: &Client, id: &TaxIdId, expand: &[&str]) -> Response { + client.get_query(&format!("/tax_ids/{}", id), &Expand { expand }) + } + + /// Deletes an existing account or customer `tax_id` object. + pub fn delete(client: &Client, id: &TaxIdId) -> Response> { + client.delete(&format!("/tax_ids/{}", id)) + } +} + impl Object for TaxId { type Id = TaxIdId; fn id(&self) -> Self::Id { @@ -64,6 +91,25 @@ impl Object for TaxId { } } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct TaxIDsOwner { + /// The account being referenced when `type` is `account`. + #[serde(skip_serializing_if = "Option::is_none")] + pub account: Option>, + + /// The Connect Application being referenced when `type` is `application`. + #[serde(skip_serializing_if = "Option::is_none")] + pub application: Option>, + + /// The customer being referenced when `type` is `customer`. + #[serde(skip_serializing_if = "Option::is_none")] + pub customer: Option>, + + /// Type of owner referenced. + #[serde(rename = "type")] + pub type_: TaxIDsOwnerType, +} + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxIdVerification { /// Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. @@ -76,6 +122,236 @@ pub struct TaxIdVerification { pub verified_name: Option, } +/// The parameters for `TaxId::create`. +#[derive(Clone, Debug, Serialize)] +pub struct CreateTaxId<'a> { + /// Specifies which fields in the response should be expanded. + #[serde(skip_serializing_if = "Expand::is_empty")] + pub expand: &'a [&'a str], + + /// The account or customer the tax ID belongs to. + /// + /// Defaults to `owner[type]=self`. + #[serde(skip_serializing_if = "Option::is_none")] + pub owner: Option, + + /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. + #[serde(rename = "type")] + pub type_: TaxIdTypeFilter, + + /// Value of the tax ID. + pub value: &'a str, +} + +impl<'a> CreateTaxId<'a> { + pub fn new(type_: TaxIdTypeFilter, value: &'a str) -> Self { + CreateTaxId { expand: Default::default(), owner: Default::default(), type_, value } + } +} + +/// The parameters for `TaxId::list`. +#[derive(Clone, Debug, Serialize, Default)] +pub struct ListTaxIds<'a> { + /// 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. + #[serde(skip_serializing_if = "Option::is_none")] + pub ending_before: Option, + + /// Specifies which fields in the response should be expanded. + #[serde(skip_serializing_if = "Expand::is_empty")] + pub expand: &'a [&'a str], + + /// A limit on the number of objects to be returned. + /// + /// Limit can range between 1 and 100, and the default is 10. + #[serde(skip_serializing_if = "Option::is_none")] + pub limit: Option, + + /// The account or customer the tax ID belongs to. + /// + /// Defaults to `owner[type]=self`. + #[serde(skip_serializing_if = "Option::is_none")] + pub owner: Option, + + /// 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. + #[serde(skip_serializing_if = "Option::is_none")] + pub starting_after: Option, +} + +impl<'a> ListTaxIds<'a> { + pub fn new() -> Self { + ListTaxIds { + ending_before: Default::default(), + expand: Default::default(), + limit: Default::default(), + owner: Default::default(), + starting_after: Default::default(), + } + } +} +impl Paginable for ListTaxIds<'_> { + type O = TaxId; + fn set_last(&mut self, item: Self::O) { + self.starting_after = Some(item.id()); + } +} +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct CreateTaxIdOwner { + /// Account the tax ID belongs to. + /// + /// Required when `type=account`. + #[serde(skip_serializing_if = "Option::is_none")] + pub account: Option, + + /// Customer the tax ID belongs to. + /// + /// Required when `type=customer`. + #[serde(skip_serializing_if = "Option::is_none")] + pub customer: Option, + + /// Type of owner referenced. + #[serde(rename = "type")] + pub type_: CreateTaxIdOwnerType, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ListTaxIdsOwner { + /// Account the tax ID belongs to. + /// + /// Required when `type=account`. + #[serde(skip_serializing_if = "Option::is_none")] + pub account: Option, + + /// Customer the tax ID belongs to. + /// + /// Required when `type=customer`. + #[serde(skip_serializing_if = "Option::is_none")] + pub customer: Option, + + /// Type of owner referenced. + #[serde(rename = "type")] + pub type_: ListTaxIdsOwnerType, +} + +/// An enum representing the possible values of an `CreateTaxIdOwner`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreateTaxIdOwnerType { + Account, + Application, + Customer, + Self_, +} + +impl CreateTaxIdOwnerType { + pub fn as_str(self) -> &'static str { + match self { + CreateTaxIdOwnerType::Account => "account", + CreateTaxIdOwnerType::Application => "application", + CreateTaxIdOwnerType::Customer => "customer", + CreateTaxIdOwnerType::Self_ => "self", + } + } +} + +impl AsRef for CreateTaxIdOwnerType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for CreateTaxIdOwnerType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for CreateTaxIdOwnerType { + fn default() -> Self { + Self::Account + } +} + +/// An enum representing the possible values of an `ListTaxIdsOwner`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum ListTaxIdsOwnerType { + Account, + Application, + Customer, + Self_, +} + +impl ListTaxIdsOwnerType { + pub fn as_str(self) -> &'static str { + match self { + ListTaxIdsOwnerType::Account => "account", + ListTaxIdsOwnerType::Application => "application", + ListTaxIdsOwnerType::Customer => "customer", + ListTaxIdsOwnerType::Self_ => "self", + } + } +} + +impl AsRef for ListTaxIdsOwnerType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for ListTaxIdsOwnerType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for ListTaxIdsOwnerType { + fn default() -> Self { + Self::Account + } +} + +/// An enum representing the possible values of an `TaxIDsOwner`'s `type` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum TaxIDsOwnerType { + Account, + Application, + Customer, + Self_, +} + +impl TaxIDsOwnerType { + pub fn as_str(self) -> &'static str { + match self { + TaxIDsOwnerType::Account => "account", + TaxIDsOwnerType::Application => "application", + TaxIDsOwnerType::Customer => "customer", + TaxIDsOwnerType::Self_ => "self", + } + } +} + +impl AsRef for TaxIDsOwnerType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for TaxIDsOwnerType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for TaxIDsOwnerType { + fn default() -> Self { + Self::Account + } +} + /// An enum representing the possible values of an `TaxId`'s `type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -240,6 +516,168 @@ impl std::default::Default for TaxIdType { } } +/// An enum representing the possible values of an `CreateTaxId`'s `type_` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum TaxIdTypeFilter { + AdNrt, + AeTrn, + ArCuit, + AuAbn, + AuArn, + BgUic, + BoTin, + BrCnpj, + BrCpf, + CaBn, + CaGstHst, + CaPstBc, + CaPstMb, + CaPstSk, + CaQst, + ChVat, + ClTin, + CnTin, + CoNit, + CrTin, + DoRcn, + EcRuc, + EgTin, + EsCif, + EuOssVat, + EuVat, + GbVat, + GeVat, + HkBr, + HuTin, + IdNpwp, + IlVat, + InGst, + IsVat, + JpCn, + JpRn, + JpTrn, + KePin, + KrBrn, + LiUid, + MxRfc, + MyFrp, + MyItn, + MySst, + NoVat, + NzGst, + PeRuc, + PhTin, + RoTin, + RsPib, + RuInn, + RuKpp, + SaVat, + SgGst, + SgUen, + SiTin, + SvNit, + ThVat, + TrTin, + TwVat, + UaVat, + UsEin, + UyRuc, + VeRif, + VnTin, + ZaVat, +} + +impl TaxIdTypeFilter { + pub fn as_str(self) -> &'static str { + match self { + TaxIdTypeFilter::AdNrt => "ad_nrt", + TaxIdTypeFilter::AeTrn => "ae_trn", + TaxIdTypeFilter::ArCuit => "ar_cuit", + TaxIdTypeFilter::AuAbn => "au_abn", + TaxIdTypeFilter::AuArn => "au_arn", + TaxIdTypeFilter::BgUic => "bg_uic", + TaxIdTypeFilter::BoTin => "bo_tin", + TaxIdTypeFilter::BrCnpj => "br_cnpj", + TaxIdTypeFilter::BrCpf => "br_cpf", + TaxIdTypeFilter::CaBn => "ca_bn", + TaxIdTypeFilter::CaGstHst => "ca_gst_hst", + TaxIdTypeFilter::CaPstBc => "ca_pst_bc", + TaxIdTypeFilter::CaPstMb => "ca_pst_mb", + TaxIdTypeFilter::CaPstSk => "ca_pst_sk", + TaxIdTypeFilter::CaQst => "ca_qst", + TaxIdTypeFilter::ChVat => "ch_vat", + TaxIdTypeFilter::ClTin => "cl_tin", + TaxIdTypeFilter::CnTin => "cn_tin", + TaxIdTypeFilter::CoNit => "co_nit", + TaxIdTypeFilter::CrTin => "cr_tin", + TaxIdTypeFilter::DoRcn => "do_rcn", + TaxIdTypeFilter::EcRuc => "ec_ruc", + TaxIdTypeFilter::EgTin => "eg_tin", + TaxIdTypeFilter::EsCif => "es_cif", + TaxIdTypeFilter::EuOssVat => "eu_oss_vat", + TaxIdTypeFilter::EuVat => "eu_vat", + TaxIdTypeFilter::GbVat => "gb_vat", + TaxIdTypeFilter::GeVat => "ge_vat", + TaxIdTypeFilter::HkBr => "hk_br", + TaxIdTypeFilter::HuTin => "hu_tin", + TaxIdTypeFilter::IdNpwp => "id_npwp", + TaxIdTypeFilter::IlVat => "il_vat", + TaxIdTypeFilter::InGst => "in_gst", + TaxIdTypeFilter::IsVat => "is_vat", + TaxIdTypeFilter::JpCn => "jp_cn", + TaxIdTypeFilter::JpRn => "jp_rn", + TaxIdTypeFilter::JpTrn => "jp_trn", + TaxIdTypeFilter::KePin => "ke_pin", + TaxIdTypeFilter::KrBrn => "kr_brn", + TaxIdTypeFilter::LiUid => "li_uid", + TaxIdTypeFilter::MxRfc => "mx_rfc", + TaxIdTypeFilter::MyFrp => "my_frp", + TaxIdTypeFilter::MyItn => "my_itn", + TaxIdTypeFilter::MySst => "my_sst", + TaxIdTypeFilter::NoVat => "no_vat", + TaxIdTypeFilter::NzGst => "nz_gst", + TaxIdTypeFilter::PeRuc => "pe_ruc", + TaxIdTypeFilter::PhTin => "ph_tin", + TaxIdTypeFilter::RoTin => "ro_tin", + TaxIdTypeFilter::RsPib => "rs_pib", + TaxIdTypeFilter::RuInn => "ru_inn", + TaxIdTypeFilter::RuKpp => "ru_kpp", + TaxIdTypeFilter::SaVat => "sa_vat", + TaxIdTypeFilter::SgGst => "sg_gst", + TaxIdTypeFilter::SgUen => "sg_uen", + TaxIdTypeFilter::SiTin => "si_tin", + TaxIdTypeFilter::SvNit => "sv_nit", + TaxIdTypeFilter::ThVat => "th_vat", + TaxIdTypeFilter::TrTin => "tr_tin", + TaxIdTypeFilter::TwVat => "tw_vat", + TaxIdTypeFilter::UaVat => "ua_vat", + TaxIdTypeFilter::UsEin => "us_ein", + TaxIdTypeFilter::UyRuc => "uy_ruc", + TaxIdTypeFilter::VeRif => "ve_rif", + TaxIdTypeFilter::VnTin => "vn_tin", + TaxIdTypeFilter::ZaVat => "za_vat", + } + } +} + +impl AsRef for TaxIdTypeFilter { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for TaxIdTypeFilter { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for TaxIdTypeFilter { + fn default() -> Self { + Self::AdNrt + } +} + /// An enum representing the possible values of an `TaxIdVerification`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/tax_rate.rs b/src/resources/generated/tax_rate.rs index 046e4308f..9000974df 100644 --- a/src/resources/generated/tax_rate.rs +++ b/src/resources/generated/tax_rate.rs @@ -51,6 +51,11 @@ pub struct TaxRate { /// It also appears on your customer’s invoice. pub jurisdiction: Option, + /// The level of the jurisdiction that imposes this tax rate. + /// + /// Will be `null` for manually defined tax rates. + pub jurisdiction_level: Option, + /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. pub livemode: bool, @@ -311,6 +316,48 @@ impl<'a> UpdateTaxRate<'a> { } } +/// An enum representing the possible values of an `TaxRate`'s `jurisdiction_level` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum TaxRateJurisdictionLevel { + City, + Country, + County, + District, + Multiple, + State, +} + +impl TaxRateJurisdictionLevel { + pub fn as_str(self) -> &'static str { + match self { + TaxRateJurisdictionLevel::City => "city", + TaxRateJurisdictionLevel::Country => "country", + TaxRateJurisdictionLevel::County => "county", + TaxRateJurisdictionLevel::District => "district", + TaxRateJurisdictionLevel::Multiple => "multiple", + TaxRateJurisdictionLevel::State => "state", + } + } +} + +impl AsRef for TaxRateJurisdictionLevel { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for TaxRateJurisdictionLevel { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default for TaxRateJurisdictionLevel { + fn default() -> Self { + Self::City + } +} + /// An enum representing the possible values of an `TaxRate`'s `tax_type` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] diff --git a/src/resources/generated/tax_transaction.rs b/src/resources/generated/tax_transaction.rs index efb1eaf74..1b963a46c 100644 --- a/src/resources/generated/tax_transaction.rs +++ b/src/resources/generated/tax_transaction.rs @@ -78,13 +78,13 @@ pub struct TaxProductResourceTaxTransactionResourceReversal { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceTaxTransactionShippingCost { - /// The shipping amount in integer cents. + /// The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). /// /// If `tax_behavior=inclusive`, then this amount includes taxes. /// Otherwise, taxes were calculated on top of this amount. pub amount: i64, - /// The amount of tax calculated for shipping, in integer cents. + /// The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount_tax: i64, /// The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). @@ -109,7 +109,7 @@ pub struct TaxProductResourceTaxTransactionShippingCost { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxProductResourceLineItemTaxBreakdown { - /// The amount of tax, in integer cents. + /// The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount: i64, pub jurisdiction: TaxProductResourceJurisdiction, @@ -127,7 +127,7 @@ pub struct TaxProductResourceLineItemTaxBreakdown { /// The possible values for this field may be extended as new tax rules are supported. pub taxability_reason: TaxProductResourceLineItemTaxBreakdownTaxabilityReason, - /// The amount on which tax is calculated, in integer cents. + /// The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub taxable_amount: i64, } diff --git a/src/resources/generated/tax_transaction_line_item.rs b/src/resources/generated/tax_transaction_line_item.rs index 6a42c15ff..8707265c5 100644 --- a/src/resources/generated/tax_transaction_line_item.rs +++ b/src/resources/generated/tax_transaction_line_item.rs @@ -12,13 +12,13 @@ pub struct TaxTransactionLineItem { /// Unique identifier for the object. pub id: TaxTransactionLineItemId, - /// The line item amount in integer cents. + /// The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). /// /// If `tax_behavior=inclusive`, then this amount includes taxes. /// Otherwise, taxes were calculated on top of this amount. pub amount: i64, - /// The amount of tax calculated for this line item, in integer cents. + /// The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). pub amount_tax: i64, /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. diff --git a/src/resources/generated/terminal_reader.rs b/src/resources/generated/terminal_reader.rs index 4d5e625a0..c3454ca8c 100644 --- a/src/resources/generated/terminal_reader.rs +++ b/src/resources/generated/terminal_reader.rs @@ -61,7 +61,7 @@ pub struct TerminalReader { /// The networking status of the reader. #[serde(skip_serializing_if = "Option::is_none")] - pub status: Option, + pub status: Option, } impl TerminalReader { @@ -548,7 +548,7 @@ impl std::default::Default for TerminalReaderReaderResourceSetReaderDisplayActio } } -/// An enum representing the possible values of an `ListTerminalReaders`'s `status` field. +/// An enum representing the possible values of an `TerminalReader`'s `status` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] pub enum TerminalReaderStatus {