diff --git a/openapi/version.json b/openapi/version.json index ba96aaad0..ee831c6c5 100644 --- a/openapi/version.json +++ b/openapi/version.json @@ -1,3 +1,3 @@ { - "version": "v433" + "version": "v446" } \ No newline at end of file diff --git a/src/resources/generated/application_fee.rs b/src/resources/generated/application_fee.rs index e849dbe77..507ba112d 100644 --- a/src/resources/generated/application_fee.rs +++ b/src/resources/generated/application_fee.rs @@ -22,10 +22,10 @@ pub struct ApplicationFee { /// ID of the Stripe account this fee was taken from. pub account: Expandable, - /// Amount earned, in %s. + /// Amount earned, in cents (or local equivalent). pub amount: i64, - /// Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued). + /// Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued). pub amount_refunded: i64, /// ID of the Connect application that earned the fee. diff --git a/src/resources/generated/balance_transaction.rs b/src/resources/generated/balance_transaction.rs index 761718e97..fecd59264 100644 --- a/src/resources/generated/balance_transaction.rs +++ b/src/resources/generated/balance_transaction.rs @@ -19,7 +19,7 @@ pub struct BalanceTransaction { /// Unique identifier for the object. pub id: BalanceTransactionId, - /// Gross amount of the transaction, in %s. + /// Gross amount of the transaction, in cents (or local equivalent). pub amount: i64, /// The date the transaction's net funds will become available in the Stripe balance. @@ -49,13 +49,13 @@ pub struct BalanceTransaction { /// Then the BalanceTransaction's `amount` would be `1234`, `currency` would be `usd`, and `exchange_rate` would be `1.234`. pub exchange_rate: Option, - /// Fees (in %s) paid for this transaction. + /// Fees (in cents (or local equivalent)) paid for this transaction. pub fee: i64, - /// Detailed breakdown of fees (in %s) paid for this transaction. + /// Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. pub fee_details: Vec, - /// Net amount of the transaction, in %s. + /// Net amount of the transaction, in cents (or local equivalent). pub net: i64, /// [Learn more](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective. diff --git a/src/resources/generated/charge.rs b/src/resources/generated/charge.rs index 8e2739394..78818814f 100644 --- a/src/resources/generated/charge.rs +++ b/src/resources/generated/charge.rs @@ -33,10 +33,10 @@ pub struct Charge { /// The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). pub amount: i64, - /// Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made). + /// Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). pub amount_captured: i64, - /// Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued). + /// Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). pub amount_refunded: i64, /// ID of the Connect application that created the charge. diff --git a/src/resources/generated/checkout_session.rs b/src/resources/generated/checkout_session.rs index 8d2e3dfef..747957d9a 100644 --- a/src/resources/generated/checkout_session.rs +++ b/src/resources/generated/checkout_session.rs @@ -990,7 +990,7 @@ pub struct LineItemsTaxAmount { /// The possible values for this field may be extended as new tax rules are supported. pub taxability_reason: Option, - /// The amount on which tax is calculated, in %s. + /// The amount on which tax is calculated, in cents (or local equivalent). pub taxable_amount: Option, } @@ -1776,7 +1776,7 @@ pub struct CreateCheckoutSessionShippingOptions { pub struct CreateCheckoutSessionSubscriptionData { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. + /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. /// To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. /// For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). #[serde(skip_serializing_if = "Option::is_none")] @@ -1801,7 +1801,7 @@ pub struct CreateCheckoutSessionSubscriptionData { /// The subscription's description, meant to be displayable to the customer. /// Use this field to optionally store an explanation of the subscription - /// for rendering in Stripe hosted surfaces. + /// for rendering in the [customer portal](https://stripe.com/docs/customer-management). #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, @@ -2546,7 +2546,7 @@ pub struct CreateCheckoutSessionShippingOptionsShippingRateData { pub struct CreateCheckoutSessionSubscriptionDataTransferData { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. + /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. /// By default, the entire amount is transferred to the destination. #[serde(skip_serializing_if = "Option::is_none")] pub amount_percent: Option, diff --git a/src/resources/generated/connect_collection_transfer.rs b/src/resources/generated/connect_collection_transfer.rs index 5733a56fa..ab8344dac 100644 --- a/src/resources/generated/connect_collection_transfer.rs +++ b/src/resources/generated/connect_collection_transfer.rs @@ -14,7 +14,7 @@ pub struct ConnectCollectionTransfer { /// Unique identifier for the object. pub id: ConnectCollectionTransferId, - /// Amount transferred, in %s. + /// Amount transferred, in cents (or local equivalent). pub amount: i64, /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. diff --git a/src/resources/generated/coupon.rs b/src/resources/generated/coupon.rs index 43b97ff32..409f68c84 100644 --- a/src/resources/generated/coupon.rs +++ b/src/resources/generated/coupon.rs @@ -78,7 +78,7 @@ pub struct Coupon { /// Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. /// - /// For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead. + /// For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. #[serde(skip_serializing_if = "Option::is_none")] pub percent_off: Option, diff --git a/src/resources/generated/credit_note.rs b/src/resources/generated/credit_note.rs index f62c35fcd..05e780225 100644 --- a/src/resources/generated/credit_note.rs +++ b/src/resources/generated/credit_note.rs @@ -20,7 +20,7 @@ pub struct CreditNote { /// Unique identifier for the object. pub id: CreditNoteId, - /// The integer amount in %s representing the total amount of the credit note, including tax. + /// The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. pub amount: i64, /// This is the sum of all the shipping amounts. @@ -42,7 +42,7 @@ pub struct CreditNote { /// Customer balance transaction related to this credit note. pub customer_balance_transaction: Option>, - /// The integer amount in %s representing the total amount of discount that was credited. + /// The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. pub discount_amount: i64, /// The aggregate amounts calculated per discount for all line items. @@ -94,19 +94,19 @@ pub struct CreditNote { /// Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). pub status: CreditNoteStatus, - /// The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts. + /// The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. pub subtotal: i64, - /// The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts. + /// The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. pub subtotal_excluding_tax: Option, /// The aggregate amounts calculated per tax rate for all line items. pub tax_amounts: Vec, - /// The integer amount in %s representing the total amount of the credit note, including tax and all discount. + /// The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. pub total: i64, - /// The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts. + /// The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. pub total_excluding_tax: Option, /// Type of this credit note, one of `pre_payment` or `post_payment`. @@ -163,7 +163,7 @@ impl Object for CreditNote { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreditNoteTaxAmount { - /// The amount, in %s, of the tax. + /// The amount, in cents (or local equivalent), of the tax. pub amount: i64, /// Whether this tax amount is inclusive or exclusive. @@ -177,13 +177,13 @@ pub struct CreditNoteTaxAmount { /// The possible values for this field may be extended as new tax rules are supported. pub taxability_reason: Option, - /// The amount on which tax is calculated, in %s. + /// The amount on which tax is calculated, in cents (or local equivalent). pub taxable_amount: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DiscountsResourceDiscountAmount { - /// The amount, in %s, of the discount. + /// The amount, in cents (or local equivalent), of the discount. pub amount: i64, /// The discount that was applied to get this discount amount. diff --git a/src/resources/generated/credit_note_line_item.rs b/src/resources/generated/credit_note_line_item.rs index c9e80e85a..4461be9d3 100644 --- a/src/resources/generated/credit_note_line_item.rs +++ b/src/resources/generated/credit_note_line_item.rs @@ -16,16 +16,16 @@ pub struct CreditNoteLineItem { /// Unique identifier for the object. pub id: CreditNoteLineItemId, - /// The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. + /// The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. pub amount: i64, - /// The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts. + /// The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts. pub amount_excluding_tax: Option, /// Description of the item being credited. pub description: Option, - /// The integer amount in %s representing the discount being credited for this line item. + /// The integer amount in cents (or local equivalent) representing the discount being credited for this line item. pub discount_amount: i64, /// The amount of discount calculated per discount for this line item. @@ -59,7 +59,7 @@ pub struct CreditNoteLineItem { /// Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. pub unit_amount_decimal: Option, - /// The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts. + /// The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts. pub unit_amount_excluding_tax: Option, } @@ -75,7 +75,7 @@ impl Object for CreditNoteLineItem { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct CreditNoteTaxAmount { - /// The amount, in %s, of the tax. + /// The amount, in cents (or local equivalent), of the tax. pub amount: i64, /// Whether this tax amount is inclusive or exclusive. @@ -89,13 +89,13 @@ pub struct CreditNoteTaxAmount { /// The possible values for this field may be extended as new tax rules are supported. pub taxability_reason: Option, - /// The amount on which tax is calculated, in %s. + /// The amount on which tax is calculated, in cents (or local equivalent). pub taxable_amount: Option, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DiscountsResourceDiscountAmount { - /// The amount, in %s, of the discount. + /// The amount, in cents (or local equivalent), of the discount. pub amount: i64, /// The discount that was applied to get this discount amount. diff --git a/src/resources/generated/fee_refund.rs b/src/resources/generated/fee_refund.rs index 33162ac3f..e34feceb0 100644 --- a/src/resources/generated/fee_refund.rs +++ b/src/resources/generated/fee_refund.rs @@ -16,7 +16,7 @@ pub struct ApplicationFeeRefund { /// Unique identifier for the object. pub id: ApplicationFeeRefundId, - /// Amount, in %s. + /// Amount, in cents (or local equivalent). pub amount: i64, /// Balance transaction that describes the impact on your account balance. diff --git a/src/resources/generated/invoice.rs b/src/resources/generated/invoice.rs index 8ad805b8e..f359a1e8a 100644 --- a/src/resources/generated/invoice.rs +++ b/src/resources/generated/invoice.rs @@ -53,11 +53,11 @@ pub struct Invoice { #[serde(skip_serializing_if = "Option::is_none")] pub amount_due: Option, - /// The amount, in %s, that was paid. + /// The amount, in cents (or local equivalent), that was paid. #[serde(skip_serializing_if = "Option::is_none")] pub amount_paid: Option, - /// The difference between amount_due and amount_paid, in %s. + /// The difference between amount_due and amount_paid, in cents (or local equivalent). #[serde(skip_serializing_if = "Option::is_none")] pub amount_remaining: Option, @@ -69,7 +69,7 @@ pub struct Invoice { #[serde(skip_serializing_if = "Option::is_none")] pub application: Option>, - /// The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. + /// The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. #[serde(skip_serializing_if = "Option::is_none")] pub application_fee_amount: Option, @@ -398,6 +398,10 @@ pub struct Invoice { #[serde(skip_serializing_if = "Option::is_none")] pub subscription: Option>, + /// Details about the subscription that created this invoice. + #[serde(skip_serializing_if = "Option::is_none")] + pub subscription_details: Option, + /// Only set for upcoming invoices that preview prorations. /// /// The time used to calculate prorations. @@ -410,7 +414,7 @@ pub struct Invoice { #[serde(skip_serializing_if = "Option::is_none")] pub subtotal: Option, - /// The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. + /// The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. /// /// Item discounts are already incorporated. #[serde(skip_serializing_if = "Option::is_none")] @@ -437,7 +441,7 @@ pub struct Invoice { #[serde(skip_serializing_if = "Option::is_none")] pub total_discount_amounts: Option>, - /// The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax. + /// The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. #[serde(skip_serializing_if = "Option::is_none")] pub total_excluding_tax: Option, @@ -509,7 +513,7 @@ pub struct AutomaticTax { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DiscountsResourceDiscountAmount { - /// The amount, in %s, of the discount. + /// The amount, in cents (or local equivalent), of the discount. pub amount: i64, /// The discount that was applied to get this discount amount. @@ -527,7 +531,7 @@ pub struct InvoiceSettingCustomField { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxAmount { - /// The amount, in %s, of the tax. + /// The amount, in cents (or local equivalent), of the tax. pub amount: i64, /// Whether this tax amount is inclusive or exclusive. @@ -541,7 +545,7 @@ pub struct TaxAmount { /// The possible values for this field may be extended as new tax rules are supported. pub taxability_reason: Option, - /// The amount on which tax is calculated, in %s. + /// The amount on which tax is calculated, in cents (or local equivalent). pub taxable_amount: Option, } @@ -565,7 +569,7 @@ pub struct InvoiceItemThresholdReason { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct InvoiceTransferData { - /// The amount in %s that will be transferred to the destination account when the invoice is paid. + /// The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. /// /// By default, the entire amount is transferred to the destination. pub amount: Option, @@ -664,6 +668,15 @@ pub struct InvoicesStatusTransitions { pub voided_at: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct SubscriptionDetailsData { + /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will reflect the metadata of the subscription at the time of invoice creation. + /// + /// *Note: This attribute is populated only for invoices created on or after June 29, 2023.*. + #[serde(default)] + pub metadata: Metadata, +} + /// The parameters for `Invoice::create`. #[derive(Clone, Debug, Serialize, Default)] pub struct CreateInvoice<'a> { diff --git a/src/resources/generated/invoices_shipping_cost.rs b/src/resources/generated/invoices_shipping_cost.rs index 6877b6e66..c2ab9c430 100644 --- a/src/resources/generated/invoices_shipping_cost.rs +++ b/src/resources/generated/invoices_shipping_cost.rs @@ -41,7 +41,7 @@ pub struct LineItemsTaxAmount { /// The possible values for this field may be extended as new tax rules are supported. pub taxability_reason: Option, - /// The amount on which tax is calculated, in %s. + /// The amount on which tax is calculated, in cents (or local equivalent). pub taxable_amount: Option, } diff --git a/src/resources/generated/item.rs b/src/resources/generated/item.rs index d507fd3c5..5f012c684 100644 --- a/src/resources/generated/item.rs +++ b/src/resources/generated/item.rs @@ -86,7 +86,7 @@ pub struct LineItemsTaxAmount { /// The possible values for this field may be extended as new tax rules are supported. pub taxability_reason: Option, - /// The amount on which tax is calculated, in %s. + /// The amount on which tax is calculated, in cents (or local equivalent). pub taxable_amount: Option, } diff --git a/src/resources/generated/line_item.rs b/src/resources/generated/line_item.rs index 2441d67d5..3c54dab60 100644 --- a/src/resources/generated/line_item.rs +++ b/src/resources/generated/line_item.rs @@ -16,10 +16,10 @@ pub struct InvoiceLineItem { /// Unique identifier for the object. pub id: InvoiceLineItemId, - /// The amount, in %s. + /// The amount, in cents (or local equivalent). pub amount: i64, - /// The integer amount in %s representing the amount for this line item, excluding all tax and discounts. + /// The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. pub amount_excluding_tax: Option, /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. @@ -97,7 +97,7 @@ pub struct InvoiceLineItem { #[serde(rename = "type")] pub type_: InvoiceLineItemType, - /// The amount in %s representing the unit amount for this line item, excluding all tax and discounts. + /// The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. pub unit_amount_excluding_tax: Option, } @@ -113,7 +113,7 @@ impl Object for InvoiceLineItem { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct DiscountsResourceDiscountAmount { - /// The amount, in %s, of the discount. + /// The amount, in cents (or local equivalent), of the discount. pub amount: i64, /// The discount that was applied to get this discount amount. @@ -122,7 +122,7 @@ pub struct DiscountsResourceDiscountAmount { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct TaxAmount { - /// The amount, in %s, of the tax. + /// The amount, in cents (or local equivalent), of the tax. pub amount: i64, /// Whether this tax amount is inclusive or exclusive. @@ -136,7 +136,7 @@ pub struct TaxAmount { /// The possible values for this field may be extended as new tax rules are supported. pub taxability_reason: Option, - /// The amount on which tax is calculated, in %s. + /// The amount on which tax is calculated, in cents (or local equivalent). pub taxable_amount: Option, } diff --git a/src/resources/generated/payment_intent.rs b/src/resources/generated/payment_intent.rs index acda5a74d..f672906bf 100644 --- a/src/resources/generated/payment_intent.rs +++ b/src/resources/generated/payment_intent.rs @@ -949,6 +949,11 @@ pub struct PaymentIntentPaymentMethodOptionsUsBankAccount { #[serde(skip_serializing_if = "Option::is_none")] pub financial_connections: Option, + /// Preferred transaction settlement speed. + #[serde(skip_serializing_if = "Option::is_none")] + pub preferred_settlement_speed: + 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. @@ -3329,6 +3334,11 @@ pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccount { #[serde(skip_serializing_if = "Option::is_none")] pub networks: Option, + /// Preferred transaction settlement speed. + #[serde(skip_serializing_if = "Option::is_none")] + pub preferred_settlement_speed: + 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. @@ -4170,6 +4180,11 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccount { #[serde(skip_serializing_if = "Option::is_none")] pub networks: Option, + /// Preferred transaction settlement speed. + #[serde(skip_serializing_if = "Option::is_none")] + pub preferred_settlement_speed: + 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. @@ -7411,6 +7426,44 @@ impl std::default::Default } } +/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccount`'s `preferred_settlement_speed` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed { + Fastest, + Standard, +} + +impl CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed { + pub fn as_str(self) -> &'static str { + match self { + CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Fastest => "fastest", + CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Standard => "standard", + } + } +} + +impl AsRef for CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display + for CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed +{ + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default + for CreatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed +{ + fn default() -> Self { + Self::Fastest + } +} + /// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsUsBankAccount`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -8391,6 +8444,46 @@ impl std::default::Default for PaymentIntentPaymentMethodOptionsSepaDebitSetupFu } } +/// 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")] +pub enum PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed { + Fastest, + Standard, +} + +impl PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed { + pub fn as_str(self) -> &'static str { + match self { + PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Fastest => { + "fastest" + } + PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Standard => { + "standard" + } + } + } +} + +impl AsRef for PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display for PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default + for PaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed +{ + fn default() -> Self { + Self::Fastest + } +} + /// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsUsBankAccount`'s `setup_future_usage` field. #[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] #[serde(rename_all = "snake_case")] @@ -12572,6 +12665,44 @@ impl std::default::Default } } +/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccount`'s `preferred_settlement_speed` field. +#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed { + Fastest, + Standard, +} + +impl UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed { + pub fn as_str(self) -> &'static str { + match self { + UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Fastest => "fastest", + UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed::Standard => "standard", + } + } +} + +impl AsRef for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl std::fmt::Display + for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed +{ + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.as_str().fmt(f) + } +} +impl std::default::Default + for UpdatePaymentIntentPaymentMethodOptionsUsBankAccountPreferredSettlementSpeed +{ + fn default() -> Self { + Self::Fastest + } +} + /// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsUsBankAccount`'s `setup_future_usage` 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 2119b7014..754145cae 100644 --- a/src/resources/generated/payment_link.rs +++ b/src/resources/generated/payment_link.rs @@ -32,7 +32,7 @@ pub struct PaymentLink { /// The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. pub application_fee_amount: Option, - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. + /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. pub application_fee_percent: Option, pub automatic_tax: PaymentLinksResourceAutomaticTax, @@ -382,7 +382,7 @@ pub struct PaymentLinksResourceTaxIdCollection { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PaymentLinksResourceTransferData { - /// The amount in %s that will be transferred to the destination account. + /// The amount in cents (or local equivalent) that will be transferred to the destination account. /// /// By default, the entire amount is transferred to the destination. pub amount: Option, @@ -410,7 +410,7 @@ pub struct CreatePaymentLink<'a> { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. + /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. /// There must be at least 1 line item with a recurring price to use this field. #[serde(skip_serializing_if = "Option::is_none")] pub application_fee_percent: Option, diff --git a/src/resources/generated/payout.rs b/src/resources/generated/payout.rs index ce0596075..cfe9c41c8 100644 --- a/src/resources/generated/payout.rs +++ b/src/resources/generated/payout.rs @@ -17,7 +17,7 @@ pub struct Payout { /// Unique identifier for the object. pub id: PayoutId, - /// Amount (in %s) to be transferred to your bank account or debit card. + /// Amount (in cents (or local equivalent)) to be transferred to your bank account or debit card. pub amount: i64, /// Date the payout is expected to arrive in the bank. diff --git a/src/resources/generated/plan.rs b/src/resources/generated/plan.rs index 74065e1f9..ec51e0351 100644 --- a/src/resources/generated/plan.rs +++ b/src/resources/generated/plan.rs @@ -31,13 +31,13 @@ pub struct Plan { #[serde(skip_serializing_if = "Option::is_none")] pub aggregate_usage: Option, - /// The unit amount in %s to be charged, represented as a whole integer if possible. + /// The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. /// /// Only set if `billing_scheme=per_unit`. #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, - /// The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. + /// The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. /// /// Only set if `billing_scheme=per_unit`. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/src/resources/generated/price.rs b/src/resources/generated/price.rs index b1bab9ee5..8645612dd 100644 --- a/src/resources/generated/price.rs +++ b/src/resources/generated/price.rs @@ -119,13 +119,13 @@ pub struct Price { #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option, - /// The unit amount in %s to be charged, represented as a whole integer if possible. + /// The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. /// /// Only set if `billing_scheme=per_unit`. #[serde(skip_serializing_if = "Option::is_none")] pub unit_amount: Option, - /// The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. + /// The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. /// /// Only set if `billing_scheme=per_unit`. #[serde(skip_serializing_if = "Option::is_none")] @@ -187,12 +187,12 @@ pub struct CurrencyOption { #[serde(skip_serializing_if = "Option::is_none")] pub tiers: Option>, - /// The unit amount in %s to be charged, represented as a whole integer if possible. + /// The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. /// /// Only set if `billing_scheme=per_unit`. pub unit_amount: Option, - /// The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. + /// The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. /// /// Only set if `billing_scheme=per_unit`. pub unit_amount_decimal: Option, diff --git a/src/resources/generated/product.rs b/src/resources/generated/product.rs index 257a37168..dac375d4d 100644 --- a/src/resources/generated/product.rs +++ b/src/resources/generated/product.rs @@ -405,7 +405,7 @@ pub struct UpdateProduct<'a> { /// /// May only be set if `type=good`. #[serde(skip_serializing_if = "Option::is_none")] - pub caption: Option<&'a str>, + pub caption: Option, /// An array of Connect application names or identifiers that should not be able to order the SKUs for this product. /// @@ -421,7 +421,7 @@ pub struct UpdateProduct<'a> { /// /// Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option<&'a str>, + pub description: Option, /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] @@ -469,7 +469,7 @@ pub struct UpdateProduct<'a> { /// When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. /// May only be set if `type=service`. #[serde(skip_serializing_if = "Option::is_none")] - pub unit_label: Option<&'a str>, + pub unit_label: Option, /// A URL of a publicly-accessible webpage for this product. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/src/resources/generated/quote.rs b/src/resources/generated/quote.rs index 3f8a14dbc..071a6f02b 100644 --- a/src/resources/generated/quote.rs +++ b/src/resources/generated/quote.rs @@ -36,7 +36,7 @@ pub struct Quote { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. + /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. /// Only applicable if there are line items with recurring prices on the quote. pub application_fee_percent: Option, @@ -260,14 +260,14 @@ pub struct QuotesResourceSubscriptionDataSubscriptionData { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct QuotesResourceTransferData { - /// The amount in %s that will be transferred to the destination account when the invoice is paid. + /// The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. /// /// By default, the entire amount is transferred to the destination. pub amount: Option, /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. + /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. /// By default, the entire amount will be transferred to the destination. pub amount_percent: Option, diff --git a/src/resources/generated/quotes_resource_total_details.rs b/src/resources/generated/quotes_resource_total_details.rs index 87b015146..94bf3821b 100644 --- a/src/resources/generated/quotes_resource_total_details.rs +++ b/src/resources/generated/quotes_resource_total_details.rs @@ -51,7 +51,7 @@ pub struct LineItemsTaxAmount { /// The possible values for this field may be extended as new tax rules are supported. pub taxability_reason: Option, - /// The amount on which tax is calculated, in %s. + /// The amount on which tax is calculated, in cents (or local equivalent). pub taxable_amount: Option, } diff --git a/src/resources/generated/radar_value_list.rs b/src/resources/generated/radar_value_list.rs index d5e5eb761..e60182364 100644 --- a/src/resources/generated/radar_value_list.rs +++ b/src/resources/generated/radar_value_list.rs @@ -35,7 +35,7 @@ pub struct RadarValueList { /// The type of items in the value list. /// - /// One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. + /// One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. #[serde(skip_serializing_if = "Option::is_none")] pub item_type: Option, @@ -79,7 +79,9 @@ pub enum RadarValueListItemType { CustomerId, Email, IpAddress, + SepaDebitFingerprint, String, + UsBankAccountFingerprint, } impl RadarValueListItemType { @@ -92,7 +94,9 @@ impl RadarValueListItemType { RadarValueListItemType::CustomerId => "customer_id", RadarValueListItemType::Email => "email", RadarValueListItemType::IpAddress => "ip_address", + RadarValueListItemType::SepaDebitFingerprint => "sepa_debit_fingerprint", RadarValueListItemType::String => "string", + RadarValueListItemType::UsBankAccountFingerprint => "us_bank_account_fingerprint", } } } diff --git a/src/resources/generated/refund.rs b/src/resources/generated/refund.rs index 26c340d89..3d2a9ea7e 100644 --- a/src/resources/generated/refund.rs +++ b/src/resources/generated/refund.rs @@ -17,7 +17,7 @@ pub struct Refund { /// Unique identifier for the object. pub id: RefundId, - /// Amount, in %s. + /// Amount, in cents (or local equivalent). pub amount: i64, /// Balance transaction that describes the impact on your account balance. diff --git a/src/resources/generated/subscription.rs b/src/resources/generated/subscription.rs index b20926948..039f834a3 100644 --- a/src/resources/generated/subscription.rs +++ b/src/resources/generated/subscription.rs @@ -31,7 +31,7 @@ pub struct Subscription { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. + /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. pub application_fee_percent: Option, pub automatic_tax: SubscriptionAutomaticTax, @@ -424,7 +424,7 @@ pub struct CreateSubscription<'a> { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. + /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. /// The request must be made by a platform account on a connected account in order to set an application fee percentage. /// For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). #[serde(skip_serializing_if = "Option::is_none")] @@ -771,7 +771,7 @@ pub struct UpdateSubscription<'a> { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. + /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. /// The request must be made by a platform account on a connected account in order to set an application fee percentage. /// For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). #[serde(skip_serializing_if = "Option::is_none")] @@ -845,7 +845,7 @@ pub struct UpdateSubscription<'a> { /// If `default_payment_method` is also set, `default_payment_method` will take precedence. /// If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). #[serde(skip_serializing_if = "Option::is_none")] - pub default_source: Option<&'a str>, + pub default_source: Option, /// The tax rates that will apply to any subscription item that does not have `tax_rates` set. /// @@ -858,7 +858,7 @@ pub struct UpdateSubscription<'a> { /// /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option<&'a str>, + pub description: Option, /// Specifies which fields in the response should be expanded. #[serde(skip_serializing_if = "Expand::is_empty")] @@ -1107,7 +1107,7 @@ pub struct CreateSubscriptionPendingInvoiceItemInterval { pub struct CreateSubscriptionTransferData { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. + /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. /// By default, the entire amount is transferred to the destination. #[serde(skip_serializing_if = "Option::is_none")] pub amount_percent: Option, @@ -1253,7 +1253,7 @@ pub struct UpdateSubscriptionPendingInvoiceItemInterval { pub struct UpdateSubscriptionTransferData { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. + /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. /// By default, the entire amount is transferred to the destination. #[serde(skip_serializing_if = "Option::is_none")] pub amount_percent: Option, diff --git a/src/resources/generated/subscription_schedule.rs b/src/resources/generated/subscription_schedule.rs index e1cf19b53..17b05eb3d 100644 --- a/src/resources/generated/subscription_schedule.rs +++ b/src/resources/generated/subscription_schedule.rs @@ -151,7 +151,7 @@ pub struct SubscriptionSchedulePhaseConfiguration { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. + /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. pub application_fee_percent: Option, #[serde(skip_serializing_if = "Option::is_none")] @@ -291,7 +291,7 @@ pub struct SubscriptionScheduleConfigurationItem { pub struct SubscriptionScheduleDefaultSettings { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. + /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. pub application_fee_percent: Option, #[serde(skip_serializing_if = "Option::is_none")] @@ -547,7 +547,7 @@ pub struct CreateSubscriptionSchedulePhases { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. + /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. /// The request must be made by a platform account on a connected account in order to set an application fee percentage. /// For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). #[serde(skip_serializing_if = "Option::is_none")] @@ -666,7 +666,7 @@ pub struct CreateSubscriptionSchedulePhases { pub struct SubscriptionScheduleDefaultSettingsParams { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. + /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. /// The request must be made by a platform account on a connected account in order to set an application fee percentage. /// For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). #[serde(skip_serializing_if = "Option::is_none")] @@ -733,7 +733,7 @@ pub struct UpdateSubscriptionSchedulePhases { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. + /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. /// The request must be made by a platform account on a connected account in order to set an application fee percentage. /// For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). #[serde(skip_serializing_if = "Option::is_none")] @@ -931,7 +931,7 @@ pub struct CreateSubscriptionSchedulePhasesItems { pub struct CreateSubscriptionSchedulePhasesTransferData { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. + /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. /// By default, the entire amount is transferred to the destination. #[serde(skip_serializing_if = "Option::is_none")] pub amount_percent: Option, @@ -963,7 +963,7 @@ pub struct SubscriptionScheduleDefaultSettingsParamsAutomaticTax { pub struct SubscriptionScheduleDefaultSettingsParamsTransferData { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. + /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. /// By default, the entire amount is transferred to the destination. #[serde(skip_serializing_if = "Option::is_none")] pub amount_percent: Option, @@ -1035,7 +1035,7 @@ pub struct UpdateSubscriptionSchedulePhasesItems { pub struct UpdateSubscriptionSchedulePhasesTransferData { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. + /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. /// By default, the entire amount is transferred to the destination. #[serde(skip_serializing_if = "Option::is_none")] pub amount_percent: Option, diff --git a/src/resources/generated/subscription_transfer_data.rs b/src/resources/generated/subscription_transfer_data.rs index 376ad767a..15cc9ddfe 100644 --- a/src/resources/generated/subscription_transfer_data.rs +++ b/src/resources/generated/subscription_transfer_data.rs @@ -12,7 +12,7 @@ pub struct SubscriptionTransferData { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// - /// This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. + /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. /// By default, the entire amount is transferred to the destination. pub amount_percent: Option, diff --git a/src/resources/generated/transfer.rs b/src/resources/generated/transfer.rs index e57ac69ac..2bfad37c1 100644 --- a/src/resources/generated/transfer.rs +++ b/src/resources/generated/transfer.rs @@ -17,10 +17,10 @@ pub struct Transfer { /// Unique identifier for the object. pub id: TransferId, - /// Amount in %s to be transferred. + /// Amount in cents (or local equivalent) to be transferred. pub amount: i64, - /// Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). + /// Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). pub amount_reversed: i64, /// Balance transaction that describes the impact of this transfer on your account balance. diff --git a/src/resources/generated/transfer_reversal.rs b/src/resources/generated/transfer_reversal.rs index d9d4d8a21..09cc244d9 100644 --- a/src/resources/generated/transfer_reversal.rs +++ b/src/resources/generated/transfer_reversal.rs @@ -16,7 +16,7 @@ pub struct TransferReversal { /// Unique identifier for the object. pub id: TransferReversalId, - /// Amount, in %s. + /// Amount, in cents (or local equivalent). pub amount: i64, /// Balance transaction that describes the impact on your account balance. diff --git a/src/resources/generated/webhook_endpoint.rs b/src/resources/generated/webhook_endpoint.rs index 10bf90b40..868a5717c 100644 --- a/src/resources/generated/webhook_endpoint.rs +++ b/src/resources/generated/webhook_endpoint.rs @@ -141,7 +141,7 @@ pub struct CreateWebhookEndpoint<'a> { /// An optional description of what the webhook is used for. #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option<&'a str>, + pub description: Option, /// The list of events to enable for this endpoint. /// @@ -227,7 +227,7 @@ impl Paginable for ListWebhookEndpoints<'_> { pub struct UpdateWebhookEndpoint<'a> { /// An optional description of what the webhook is used for. #[serde(skip_serializing_if = "Option::is_none")] - pub description: Option<&'a str>, + pub description: Option, /// Disable the webhook endpoint if set to true. #[serde(skip_serializing_if = "Option::is_none")]