From e80622b20ff8db634e9fa660f77e382bf9b6da0e Mon Sep 17 00:00:00 2001 From: Luis Alberto Santos Date: Sun, 25 Aug 2024 11:59:21 +0200 Subject: [PATCH] feat: added `serialize_extra` and `deserialize_extra` feature flags --- async-stripe-types/Cargo.toml | 4 +- async-stripe-webhook/Cargo.toml | 2 + generated/async-stripe-billing/Cargo.toml | 2 + .../src/billing_meter/requests.rs | 15 ++ .../src/billing_meter/types.rs | 1 + .../src/billing_meter_event/requests.rs | 2 + .../src/billing_meter_event/types.rs | 1 + .../requests.rs | 3 + .../billing_meter_event_adjustment/types.rs | 3 +- .../billing_meter_event_summary/requests.rs | 2 + .../src/billing_meter_event_summary/types.rs | 1 + .../billing_portal_configuration/requests.rs | 27 ++ .../src/billing_portal_configuration/types.rs | 1 + .../src/billing_portal_session/requests.rs | 13 + .../src/billing_portal_session/types.rs | 1 + .../src/credit_note/requests.rs | 19 ++ .../src/credit_note_line_item/requests.rs | 2 + .../src/invoice/requests.rs | 178 ++++++++++++++ .../src/invoice_item/requests.rs | 13 + .../src/invoice_line_item/requests.rs | 10 + .../async-stripe-billing/src/plan/requests.rs | 14 ++ .../src/quote/requests.rs | 39 +++ .../src/subscription/requests.rs | 71 ++++++ .../src/subscription_item/requests.rs | 18 ++ .../src/subscription_schedule/requests.rs | 50 ++++ .../src/tax_id/requests.rs | 16 ++ .../src/test_helpers_test_clock/requests.rs | 9 + .../src/usage_record/requests.rs | 3 + .../src/usage_record/types.rs | 1 + .../src/usage_record_summary/requests.rs | 2 + generated/async-stripe-checkout/Cargo.toml | 2 + .../src/checkout_session/requests.rs | 98 ++++++++ .../src/checkout_session/types.rs | 1 + generated/async-stripe-connect/Cargo.toml | 2 + .../src/account/requests.rs | 67 +++++ .../src/account_link/requests.rs | 3 + .../src/account_link/types.rs | 1 + .../src/account_session/requests.rs | 10 + .../src/account_session/types.rs | 1 + .../src/application_fee/requests.rs | 4 + .../src/application_fee_refund/requests.rs | 8 + .../src/apps_secret/requests.rs | 12 + .../src/apps_secret/types.rs | 1 + .../src/capability/requests.rs | 6 + .../src/country_spec/requests.rs | 4 + .../src/country_spec/types.rs | 1 + .../src/external_account/requests.rs | 11 + .../src/login_link/requests.rs | 2 + .../src/login_link/types.rs | 1 + .../src/person/requests.rs | 23 ++ .../src/topup/requests.rs | 10 + .../src/transfer/requests.rs | 8 + .../src/transfer_reversal/requests.rs | 8 + generated/async-stripe-core/Cargo.toml | 2 + .../async-stripe-core/src/balance/requests.rs | 2 + .../async-stripe-core/src/balance/types.rs | 1 + .../src/balance_transaction/requests.rs | 4 + .../src/cash_balance/requests.rs | 5 + .../async-stripe-core/src/charge/requests.rs | 19 ++ .../src/customer/requests.rs | 38 +++ .../customer_balance_transaction/requests.rs | 8 + .../requests.rs | 4 + .../src/customer_session/requests.rs | 5 + .../src/customer_session/types.rs | 1 + .../async-stripe-core/src/dispute/requests.rs | 9 + .../async-stripe-core/src/event/requests.rs | 4 + .../async-stripe-core/src/file/requests.rs | 4 + .../src/file_link/requests.rs | 9 + .../async-stripe-core/src/mandate/requests.rs | 2 + .../src/payment_intent/requests.rs | 230 ++++++++++++++++++ .../src/payment_source/requests.rs | 6 + .../async-stripe-core/src/payout/requests.rs | 12 + .../async-stripe-core/src/refund/requests.rs | 12 + .../src/setup_attempt/requests.rs | 2 + .../src/setup_intent/requests.rs | 107 ++++++++ .../async-stripe-core/src/token/requests.rs | 33 +++ .../async-stripe-core/src/token/types.rs | 3 +- generated/async-stripe-fraud/Cargo.toml | 2 + .../src/deleted_radar_value_list.rs | 1 + .../src/deleted_radar_value_list_item.rs | 1 + .../src/radar_early_fraud_warning/requests.rs | 4 + .../src/radar_early_fraud_warning/types.rs | 1 + .../src/radar_value_list/requests.rs | 9 + .../src/radar_value_list/types.rs | 1 + .../src/radar_value_list_item/requests.rs | 7 + .../src/radar_value_list_item/types.rs | 1 + .../async-stripe-fraud/src/review/requests.rs | 6 + generated/async-stripe-issuing/Cargo.toml | 2 + .../src/issuing_authorization/requests.rs | 32 +++ .../src/issuing_card/requests.rs | 24 ++ .../src/issuing_cardholder/requests.rs | 21 ++ .../src/issuing_dispute/requests.rs | 24 ++ .../requests.rs | 18 ++ .../src/issuing_physical_bundle/requests.rs | 4 + .../src/issuing_token/requests.rs | 6 + .../src/issuing_transaction/requests.rs | 22 ++ generated/async-stripe-misc/Cargo.toml | 2 + .../src/apple_pay_domain/requests.rs | 7 + .../src/apple_pay_domain/types.rs | 1 + .../src/climate_order/requests.rs | 11 + .../src/climate_order/types.rs | 1 + .../src/climate_product/requests.rs | 4 + .../src/climate_product/types.rs | 1 + .../src/climate_supplier/requests.rs | 4 + .../src/climate_supplier/types.rs | 1 + .../src/deleted_apple_pay_domain.rs | 1 + .../src/deleted_webhook_endpoint.rs | 1 + .../requests.rs | 4 + .../entitlements_active_entitlement/types.rs | 1 + ...entitlements_active_entitlement_summary.rs | 1 + .../src/entitlements_feature/requests.rs | 8 + .../src/ephemeral_key/requests.rs | 4 + .../src/ephemeral_key/types.rs | 1 + .../src/exchange_rate/requests.rs | 4 + .../src/exchange_rate/types.rs | 1 + .../financial_connections_account/requests.rs | 15 ++ .../financial_connections_account/types.rs | 1 + .../financial_connections_account_owner.rs | 1 + ...financial_connections_account_ownership.rs | 1 + .../financial_connections_session/requests.rs | 6 + .../financial_connections_session/types.rs | 1 + .../requests.rs | 5 + .../types.rs | 1 + .../src/forwarding_request/requests.rs | 9 + .../src/forwarding_request/types.rs | 1 + .../identity_verification_report/requests.rs | 4 + .../src/identity_verification_report/types.rs | 3 +- .../identity_verification_session/requests.rs | 17 ++ .../identity_verification_session/types.rs | 3 +- .../src/reporting_report_run/requests.rs | 7 + .../src/reporting_report_run/types.rs | 1 + .../src/reporting_report_type/requests.rs | 4 + .../src/reporting_report_type/types.rs | 1 + .../src/scheduled_query_run/requests.rs | 4 + .../src/scheduled_query_run/types.rs | 1 + .../src/tax_calculation/requests.rs | 11 + .../src/tax_calculation/types.rs | 1 + .../src/tax_calculation_line_item.rs | 1 + .../src/tax_registration/requests.rs | 91 +++++++ .../src/tax_registration/types.rs | 1 + .../src/tax_settings/requests.rs | 7 + .../src/tax_settings/types.rs | 1 + .../src/tax_transaction/requests.rs | 10 + .../src/tax_transaction/types.rs | 3 +- .../src/tax_transaction_line_item.rs | 3 +- .../src/webhook_endpoint/requests.rs | 9 + .../src/webhook_endpoint/types.rs | 1 + generated/async-stripe-payment/Cargo.toml | 2 + .../src/bank_account/requests.rs | 13 + .../async-stripe-payment/src/card/requests.rs | 11 + .../src/confirmation_token/requests.rs | 23 ++ .../src/confirmation_token/types.rs | 1 + .../src/payment_link/requests.rs | 64 +++++ .../src/payment_method/requests.rs | 35 +++ .../payment_method_configuration/requests.rs | 164 +++++++++++++ .../src/payment_method_configuration/types.rs | 1 + .../src/payment_method_domain/requests.rs | 10 + .../src/payment_method_domain/types.rs | 1 + .../src/source/requests.rs | 28 +++ .../src/source_mandate_notification.rs | 3 +- generated/async-stripe-product/Cargo.toml | 2 + .../src/coupon/requests.rs | 11 + .../src/deleted_product_feature.rs | 1 + .../src/price/requests.rs | 23 ++ .../src/product/requests.rs | 19 ++ .../src/product_feature/requests.rs | 7 + .../src/product_feature/types.rs | 1 + .../src/promotion_code/requests.rs | 11 + .../src/shipping_rate/requests.rs | 15 ++ .../src/tax_code/requests.rs | 4 + .../src/tax_rate/requests.rs | 8 + generated/async-stripe-shared/Cargo.toml | 2 + generated/async-stripe-shared/src/account.rs | 3 +- .../async-stripe-shared/src/application.rs | 1 + .../src/application_fee.rs | 1 + .../src/application_fee_refund.rs | 1 + .../src/balance_transaction.rs | 3 +- .../async-stripe-shared/src/bank_account.rs | 1 + .../async-stripe-shared/src/capability.rs | 1 + generated/async-stripe-shared/src/card.rs | 1 + .../async-stripe-shared/src/cash_balance.rs | 1 + generated/async-stripe-shared/src/charge.rs | 1 + .../src/checkout_session_item.rs | 1 + .../src/connect_collection_transfer.rs | 1 + generated/async-stripe-shared/src/coupon.rs | 1 + .../async-stripe-shared/src/credit_note.rs | 3 +- .../src/credit_note_line_item.rs | 3 +- generated/async-stripe-shared/src/customer.rs | 1 + .../src/customer_balance_transaction.rs | 3 +- .../src/customer_cash_balance_transaction.rs | 3 +- .../src/deleted_account.rs | 1 + .../src/deleted_bank_account.rs | 1 + .../async-stripe-shared/src/deleted_card.rs | 1 + .../async-stripe-shared/src/deleted_coupon.rs | 1 + .../src/deleted_customer.rs | 1 + .../src/deleted_discount.rs | 1 + .../src/deleted_invoice.rs | 1 + .../src/deleted_invoiceitem.rs | 1 + .../async-stripe-shared/src/deleted_person.rs | 1 + .../async-stripe-shared/src/deleted_plan.rs | 1 + .../src/deleted_product.rs | 1 + .../src/deleted_subscription_item.rs | 1 + .../async-stripe-shared/src/deleted_tax_id.rs | 1 + .../src/deleted_test_helpers_test_clock.rs | 1 + generated/async-stripe-shared/src/discount.rs | 1 + generated/async-stripe-shared/src/dispute.rs | 1 + .../src/entitlements_feature.rs | 1 + generated/async-stripe-shared/src/event.rs | 3 +- generated/async-stripe-shared/src/file.rs | 3 +- .../async-stripe-shared/src/file_link.rs | 1 + .../src/funding_instructions.rs | 1 + generated/async-stripe-shared/src/invoice.rs | 1 + .../async-stripe-shared/src/invoice_item.rs | 1 + .../src/invoice_line_item.rs | 3 +- .../src/issuing_authorization.rs | 1 + .../async-stripe-shared/src/issuing_card.rs | 3 +- .../src/issuing_cardholder.rs | 3 +- .../src/issuing_dispute.rs | 1 + .../src/issuing_personalization_design.rs | 1 + .../src/issuing_physical_bundle.rs | 3 +- .../async-stripe-shared/src/issuing_token.rs | 1 + .../src/issuing_transaction.rs | 3 +- generated/async-stripe-shared/src/mandate.rs | 3 +- .../async-stripe-shared/src/payment_intent.rs | 1 + .../async-stripe-shared/src/payment_link.rs | 1 + .../async-stripe-shared/src/payment_method.rs | 3 +- generated/async-stripe-shared/src/payout.rs | 3 +- generated/async-stripe-shared/src/person.rs | 1 + generated/async-stripe-shared/src/plan.rs | 1 + .../src/platform_tax_fee.rs | 3 +- generated/async-stripe-shared/src/price.rs | 3 +- generated/async-stripe-shared/src/product.rs | 3 +- .../async-stripe-shared/src/promotion_code.rs | 1 + generated/async-stripe-shared/src/quote.rs | 1 + generated/async-stripe-shared/src/refund.rs | 1 + .../src/reserve_transaction.rs | 1 + generated/async-stripe-shared/src/review.rs | 1 + .../async-stripe-shared/src/setup_attempt.rs | 1 + .../async-stripe-shared/src/setup_intent.rs | 1 + .../async-stripe-shared/src/shipping_rate.rs | 3 +- generated/async-stripe-shared/src/source.rs | 3 +- .../src/source_transaction.rs | 3 +- .../async-stripe-shared/src/subscription.rs | 1 + .../src/subscription_item.rs | 1 + .../src/subscription_schedule.rs | 1 + generated/async-stripe-shared/src/tax_code.rs | 1 + .../src/tax_deducted_at_source.rs | 1 + generated/async-stripe-shared/src/tax_id.rs | 3 +- generated/async-stripe-shared/src/tax_rate.rs | 1 + .../src/test_helpers_test_clock.rs | 1 + generated/async-stripe-shared/src/topup.rs | 1 + generated/async-stripe-shared/src/transfer.rs | 1 + .../src/transfer_reversal.rs | 1 + .../src/usage_record_summary.rs | 1 + generated/async-stripe-terminal/Cargo.toml | 2 + .../src/deleted_terminal_configuration.rs | 1 + .../src/deleted_terminal_location.rs | 1 + .../src/deleted_terminal_reader.rs | 1 + .../src/terminal_configuration/requests.rs | 16 ++ .../src/terminal_configuration/types.rs | 1 + .../src/terminal_connection_token/requests.rs | 2 + .../src/terminal_connection_token/types.rs | 1 + .../src/terminal_location/requests.rs | 11 + .../src/terminal_location/types.rs | 1 + .../src/terminal_reader/requests.rs | 29 +++ .../src/terminal_reader/types.rs | 1 + generated/async-stripe-treasury/Cargo.toml | 2 + .../src/treasury_credit_reversal/requests.rs | 6 + .../src/treasury_credit_reversal/types.rs | 1 + .../src/treasury_debit_reversal/requests.rs | 6 + .../src/treasury_debit_reversal/types.rs | 1 + .../treasury_financial_account/requests.rs | 55 +++++ .../src/treasury_financial_account/types.rs | 1 + .../treasury_financial_account_features.rs | 1 + .../src/treasury_inbound_transfer/requests.rs | 15 ++ .../src/treasury_inbound_transfer/types.rs | 1 + .../src/treasury_outbound_payment/requests.rs | 22 ++ .../src/treasury_outbound_payment/types.rs | 1 + .../treasury_outbound_transfer/requests.rs | 17 ++ .../src/treasury_outbound_transfer/types.rs | 1 + .../src/treasury_received_credit/requests.rs | 9 + .../src/treasury_received_credit/types.rs | 1 + .../src/treasury_received_debit/requests.rs | 8 + .../src/treasury_received_debit/types.rs | 1 + .../src/treasury_transaction/requests.rs | 5 + .../src/treasury_transaction/types.rs | 1 + .../treasury_transaction_entry/requests.rs | 4 + .../src/treasury_transaction_entry/types.rs | 3 +- openapi/src/templates/cargo_toml.rs | 4 + openapi/src/templates/utils.rs | 84 ++++--- 290 files changed, 2628 insertions(+), 75 deletions(-) diff --git a/async-stripe-types/Cargo.toml b/async-stripe-types/Cargo.toml index 49d74bd58..8648dc162 100644 --- a/async-stripe-types/Cargo.toml +++ b/async-stripe-types/Cargo.toml @@ -23,8 +23,10 @@ serde_json = { workspace = true, optional = true } [features] serialize = [] +serialize_extra = ["serialize"] deserialize = ["dep:serde_json"] +deserialize_extra = ["deserialize"] [dev-dependencies] serde_qs.workspace = true -serde_json.workspace = true \ No newline at end of file +serde_json.workspace = true diff --git a/async-stripe-webhook/Cargo.toml b/async-stripe-webhook/Cargo.toml index 44d1a0848..776142eef 100644 --- a/async-stripe-webhook/Cargo.toml +++ b/async-stripe-webhook/Cargo.toml @@ -40,7 +40,9 @@ serde_json.workspace = true [features] serialize = ["async-stripe-types/serialize", "async-stripe-shared/serialize"] +serialize_extra = ["async-stripe-types/serialize_extra", "async-stripe-shared/serialize_extra"] deserialize = ["async-stripe-types/deserialize", "async-stripe-shared/deserialize", "dep:serde_json"] +deserialize_extra = ["async-stripe-types/deserialize_extra", "async-stripe-shared/deserialize_extra", "dep:serde_json"] full = [ "async-stripe-billing", diff --git a/generated/async-stripe-billing/Cargo.toml b/generated/async-stripe-billing/Cargo.toml index 2594523d5..b40f77335 100644 --- a/generated/async-stripe-billing/Cargo.toml +++ b/generated/async-stripe-billing/Cargo.toml @@ -28,7 +28,9 @@ async-stripe-shared = {path = "../../generated/async-stripe-shared"} [features] serialize = ["async-stripe-types/serialize","async-stripe-shared/serialize"] +serialize_extra = ["async-stripe-types/serialize_extra","async-stripe-shared/serialize_extra"] deserialize = ["async-stripe-types/deserialize","async-stripe-shared/deserialize", "dep:serde_json"] +deserialize_extra = ["async-stripe-types/deserialize_extra","async-stripe-shared/deserialize_extra", "dep:serde_json"] billing_meter = [] billing_meter_event = [] billing_meter_event_adjustment = [] diff --git a/generated/async-stripe-billing/src/billing_meter/requests.rs b/generated/async-stripe-billing/src/billing_meter/requests.rs index 0f7854571..4d522a000 100644 --- a/generated/async-stripe-billing/src/billing_meter/requests.rs +++ b/generated/async-stripe-billing/src/billing_meter/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListBillingMeterBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -22,6 +23,7 @@ impl<'a> ListBillingMeterBuilder<'a> { } /// Retrieve a list of billing meters. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListBillingMeter<'a> { inner: ListBillingMeterBuilder<'a>, } @@ -98,6 +100,7 @@ impl StripeRequest for ListBillingMeter<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveBillingMeterBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -109,6 +112,7 @@ impl<'a> RetrieveBillingMeterBuilder<'a> { } /// Retrieves a billing meter given an ID #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveBillingMeter<'a> { inner: RetrieveBillingMeterBuilder<'a>, id: &'a stripe_billing::BillingMeterId, @@ -151,6 +155,7 @@ impl StripeRequest for RetrieveBillingMeter<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateBillingMeterBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] customer_mapping: Option>, @@ -183,6 +188,7 @@ impl<'a> CreateBillingMeterBuilder<'a> { } /// Fields that specify how to map a meter event to a customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingMeterCustomerMapping<'a> { /// The key in the usage event payload to use for mapping the event to a customer. pub event_payload_key: &'a str, @@ -250,6 +256,7 @@ impl<'de> serde::Deserialize<'de> for CreateBillingMeterCustomerMappingType { } /// The default settings to aggregate a meter's events with. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingMeterDefaultAggregation { /// Specifies how events are aggregated. /// Allowed values are `count` to count the number of events and `sum` to sum each event's value. @@ -321,6 +328,7 @@ impl<'de> serde::Deserialize<'de> for CreateBillingMeterDefaultAggregationFormul } /// Fields that specify how to calculate a meter event's value. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingMeterValueSettings<'a> { /// The key in the usage event payload to use as the value for this meter. /// For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used". @@ -333,6 +341,7 @@ impl<'a> CreateBillingMeterValueSettings<'a> { } /// Creates a billing meter #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingMeter<'a> { inner: CreateBillingMeterBuilder<'a>, } @@ -400,6 +409,7 @@ impl StripeRequest for CreateBillingMeter<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateBillingMeterBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] display_name: Option<&'a str>, @@ -413,6 +423,7 @@ impl<'a> UpdateBillingMeterBuilder<'a> { } /// Updates a billing meter #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateBillingMeter<'a> { inner: UpdateBillingMeterBuilder<'a>, id: &'a stripe_billing::BillingMeterId, @@ -460,6 +471,7 @@ impl StripeRequest for UpdateBillingMeter<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct DeactivateBillingMeterBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -471,6 +483,7 @@ impl<'a> DeactivateBillingMeterBuilder<'a> { } /// Deactivates a billing meter #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeactivateBillingMeter<'a> { inner: DeactivateBillingMeterBuilder<'a>, id: &'a stripe_billing::BillingMeterId, @@ -514,6 +527,7 @@ impl StripeRequest for DeactivateBillingMeter<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ReactivateBillingMeterBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -525,6 +539,7 @@ impl<'a> ReactivateBillingMeterBuilder<'a> { } /// Reactivates a billing meter #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ReactivateBillingMeter<'a> { inner: ReactivateBillingMeterBuilder<'a>, id: &'a stripe_billing::BillingMeterId, diff --git a/generated/async-stripe-billing/src/billing_meter/types.rs b/generated/async-stripe-billing/src/billing_meter/types.rs index f927a774d..5b42b5571 100644 --- a/generated/async-stripe-billing/src/billing_meter/types.rs +++ b/generated/async-stripe-billing/src/billing_meter/types.rs @@ -2,6 +2,7 @@ /// For example, you might create a billing meter to track the number of API calls made by a particular user. /// You can then attach the billing meter to a price and attach the price to a subscription to charge the user for the number of API calls they make. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct BillingMeter { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-billing/src/billing_meter_event/requests.rs b/generated/async-stripe-billing/src/billing_meter_event/requests.rs index 3ce643c80..aeb47bc74 100644 --- a/generated/async-stripe-billing/src/billing_meter_event/requests.rs +++ b/generated/async-stripe-billing/src/billing_meter_event/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateBillingMeterEventBuilder<'a> { event_name: &'a str, #[serde(skip_serializing_if = "Option::is_none")] @@ -20,6 +21,7 @@ impl<'a> CreateBillingMeterEventBuilder<'a> { } /// Creates a billing meter event #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingMeterEvent<'a> { inner: CreateBillingMeterEventBuilder<'a>, } diff --git a/generated/async-stripe-billing/src/billing_meter_event/types.rs b/generated/async-stripe-billing/src/billing_meter_event/types.rs index 437ed90f9..729416d6f 100644 --- a/generated/async-stripe-billing/src/billing_meter_event/types.rs +++ b/generated/async-stripe-billing/src/billing_meter_event/types.rs @@ -2,6 +2,7 @@ /// Meter events are used to bill a customer based on their usage. /// Meter events are associated with billing meters, which define the shape of the event's payload and how those events are aggregated for billing. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct BillingMeterEvent { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-billing/src/billing_meter_event_adjustment/requests.rs b/generated/async-stripe-billing/src/billing_meter_event_adjustment/requests.rs index 2cff511b5..378d3f3b9 100644 --- a/generated/async-stripe-billing/src/billing_meter_event_adjustment/requests.rs +++ b/generated/async-stripe-billing/src/billing_meter_event_adjustment/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateBillingMeterEventAdjustmentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] cancel: Option>, @@ -19,6 +20,7 @@ impl<'a> CreateBillingMeterEventAdjustmentBuilder<'a> { } /// Specifies which event to cancel. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingMeterEventAdjustmentCancel<'a> { /// Unique identifier for the event. /// You can only cancel events within 24 hours of Stripe receiving them. @@ -37,6 +39,7 @@ impl<'a> Default for CreateBillingMeterEventAdjustmentCancel<'a> { } /// Creates a billing meter event adjustment #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingMeterEventAdjustment<'a> { inner: CreateBillingMeterEventAdjustmentBuilder<'a>, } diff --git a/generated/async-stripe-billing/src/billing_meter_event_adjustment/types.rs b/generated/async-stripe-billing/src/billing_meter_event_adjustment/types.rs index 46a255e88..2c1eb5fb8 100644 --- a/generated/async-stripe-billing/src/billing_meter_event_adjustment/types.rs +++ b/generated/async-stripe-billing/src/billing_meter_event_adjustment/types.rs @@ -1,6 +1,7 @@ /// A billing meter event adjustment is a resource that allows you to cancel a meter event. /// For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct BillingMeterEventAdjustment { /// Specifies which event to cancel. @@ -13,7 +14,7 @@ pub struct BillingMeterEventAdjustment { pub status: BillingMeterEventAdjustmentStatus, /// Specifies whether to cancel a single event or a range of events for a time period. /// Time period cancellation is not supported yet. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: stripe_billing::BillingMeterEventAdjustmentType, } #[doc(hidden)] diff --git a/generated/async-stripe-billing/src/billing_meter_event_summary/requests.rs b/generated/async-stripe-billing/src/billing_meter_event_summary/requests.rs index 02f5aa113..c424771f5 100644 --- a/generated/async-stripe-billing/src/billing_meter_event_summary/requests.rs +++ b/generated/async-stripe-billing/src/billing_meter_event_summary/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListIdBillingMeterEventSummaryBuilder<'a> { customer: &'a str, end_time: stripe_types::Timestamp, @@ -94,6 +95,7 @@ impl<'de> serde::Deserialize<'de> for ListIdBillingMeterEventSummaryValueGroupin } /// Retrieve a list of billing meter event summaries. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListIdBillingMeterEventSummary<'a> { inner: ListIdBillingMeterEventSummaryBuilder<'a>, id: &'a stripe_billing::BillingMeterId, diff --git a/generated/async-stripe-billing/src/billing_meter_event_summary/types.rs b/generated/async-stripe-billing/src/billing_meter_event_summary/types.rs index 0fcb865c9..c5814e14b 100644 --- a/generated/async-stripe-billing/src/billing_meter_event_summary/types.rs +++ b/generated/async-stripe-billing/src/billing_meter_event_summary/types.rs @@ -2,6 +2,7 @@ /// It indicates how much. /// usage was accrued by a customer for that period. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct BillingMeterEventSummary { /// Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). diff --git a/generated/async-stripe-billing/src/billing_portal_configuration/requests.rs b/generated/async-stripe-billing/src/billing_portal_configuration/requests.rs index b84a94698..b3b3faf09 100644 --- a/generated/async-stripe-billing/src/billing_portal_configuration/requests.rs +++ b/generated/async-stripe-billing/src/billing_portal_configuration/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListBillingPortalConfigurationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -31,6 +32,7 @@ impl<'a> ListBillingPortalConfigurationBuilder<'a> { } /// Returns a list of configurations that describe the functionality of the customer portal. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListBillingPortalConfiguration<'a> { inner: ListBillingPortalConfigurationBuilder<'a>, } @@ -114,6 +116,7 @@ impl StripeRequest for ListBillingPortalConfiguration<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveBillingPortalConfigurationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -125,6 +128,7 @@ impl<'a> RetrieveBillingPortalConfigurationBuilder<'a> { } /// Retrieves a configuration that describes the functionality of the customer portal. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveBillingPortalConfiguration<'a> { inner: RetrieveBillingPortalConfigurationBuilder<'a>, configuration: &'a stripe_billing::BillingPortalConfigurationId, @@ -171,6 +175,7 @@ impl StripeRequest for RetrieveBillingPortalConfiguration<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateBillingPortalConfigurationBuilder<'a> { business_profile: CreateBillingPortalConfigurationBusinessProfile<'a>, #[serde(skip_serializing_if = "Option::is_none")] @@ -200,6 +205,7 @@ impl<'a> CreateBillingPortalConfigurationBuilder<'a> { } /// The business information shown to customers in the portal. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalConfigurationBusinessProfile<'a> { /// The messaging shown to customers in the portal. #[serde(skip_serializing_if = "Option::is_none")] @@ -223,6 +229,7 @@ impl<'a> Default for CreateBillingPortalConfigurationBusinessProfile<'a> { } /// Information about the features available in the portal. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalConfigurationFeatures<'a> { /// Information about updating the customer details in the portal. #[serde(skip_serializing_if = "Option::is_none")] @@ -258,6 +265,7 @@ impl<'a> Default for CreateBillingPortalConfigurationFeatures<'a> { } /// Information about updating the customer details in the portal. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalConfigurationFeaturesCustomerUpdate<'a> { /// The types of customer updates that are supported. When empty, customers are not updateable. #[serde(skip_serializing_if = "Option::is_none")] @@ -341,6 +349,7 @@ impl<'de> serde::Deserialize<'de> } /// Information about showing the billing history in the portal. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalConfigurationFeaturesInvoiceHistory { /// Whether the feature is enabled. pub enabled: bool, @@ -352,6 +361,7 @@ impl CreateBillingPortalConfigurationFeaturesInvoiceHistory { } /// Information about updating payment methods in the portal. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalConfigurationFeaturesPaymentMethodUpdate { /// Whether the feature is enabled. pub enabled: bool, @@ -363,6 +373,7 @@ impl CreateBillingPortalConfigurationFeaturesPaymentMethodUpdate { } /// Information about canceling subscriptions in the portal. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalConfigurationFeaturesSubscriptionCancel<'a> { /// Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer. #[serde(skip_serializing_if = "Option::is_none")] @@ -387,6 +398,7 @@ impl<'a> CreateBillingPortalConfigurationFeaturesSubscriptionCancel<'a> { } /// Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalConfigurationFeaturesSubscriptionCancelCancellationReason<'a> { /// Whether the feature is enabled. pub enabled: bool, @@ -615,6 +627,7 @@ impl<'de> serde::Deserialize<'de> } /// Information about updating subscriptions in the portal. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalConfigurationFeaturesSubscriptionUpdate<'a> { /// The types of subscription updates that are supported. When empty, subscriptions are not updateable. pub default_allowed_updates: @@ -776,6 +789,7 @@ impl<'de> serde::Deserialize<'de> /// The hosted login page for this configuration. /// Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalConfigurationLoginPage { /// Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. pub enabled: bool, @@ -787,6 +801,7 @@ impl CreateBillingPortalConfigurationLoginPage { } /// Creates a configuration that describes the functionality and behavior of a PortalSession #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalConfiguration<'a> { inner: CreateBillingPortalConfigurationBuilder<'a>, } @@ -850,6 +865,7 @@ impl StripeRequest for CreateBillingPortalConfiguration<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateBillingPortalConfigurationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -881,6 +897,7 @@ impl<'a> UpdateBillingPortalConfigurationBuilder<'a> { } /// The business information shown to customers in the portal. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateBillingPortalConfigurationBusinessProfile<'a> { /// The messaging shown to customers in the portal. #[serde(skip_serializing_if = "Option::is_none")] @@ -904,6 +921,7 @@ impl<'a> Default for UpdateBillingPortalConfigurationBusinessProfile<'a> { } /// Information about the features available in the portal. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateBillingPortalConfigurationFeatures<'a> { /// Information about updating the customer details in the portal. #[serde(skip_serializing_if = "Option::is_none")] @@ -939,6 +957,7 @@ impl<'a> Default for UpdateBillingPortalConfigurationFeatures<'a> { } /// Information about updating the customer details in the portal. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateBillingPortalConfigurationFeaturesCustomerUpdate<'a> { /// The types of customer updates that are supported. When empty, customers are not updateable. #[serde(skip_serializing_if = "Option::is_none")] @@ -1028,6 +1047,7 @@ impl<'de> serde::Deserialize<'de> } /// Information about showing the billing history in the portal. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateBillingPortalConfigurationFeaturesInvoiceHistory { /// Whether the feature is enabled. pub enabled: bool, @@ -1039,6 +1059,7 @@ impl UpdateBillingPortalConfigurationFeaturesInvoiceHistory { } /// Information about updating payment methods in the portal. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateBillingPortalConfigurationFeaturesPaymentMethodUpdate { /// Whether the feature is enabled. pub enabled: bool, @@ -1050,6 +1071,7 @@ impl UpdateBillingPortalConfigurationFeaturesPaymentMethodUpdate { } /// Information about canceling subscriptions in the portal. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateBillingPortalConfigurationFeaturesSubscriptionCancel<'a> { /// Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer. #[serde(skip_serializing_if = "Option::is_none")] @@ -1080,6 +1102,7 @@ impl<'a> Default for UpdateBillingPortalConfigurationFeaturesSubscriptionCancel< } /// Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateBillingPortalConfigurationFeaturesSubscriptionCancelCancellationReason<'a> { /// Whether the feature is enabled. pub enabled: bool, @@ -1307,6 +1330,7 @@ impl<'de> serde::Deserialize<'de> } /// Information about updating subscriptions in the portal. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateBillingPortalConfigurationFeaturesSubscriptionUpdate<'a> { /// The types of subscription updates that are supported. When empty, subscriptions are not updateable. #[serde(skip_serializing_if = "Option::is_none")] @@ -1478,6 +1502,7 @@ impl<'de> serde::Deserialize<'de> /// The hosted login page for this configuration. /// Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateBillingPortalConfigurationLoginPage { /// Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. /// @@ -1491,6 +1516,7 @@ impl UpdateBillingPortalConfigurationLoginPage { } /// Updates a configuration that describes the functionality of the customer portal. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateBillingPortalConfiguration<'a> { inner: UpdateBillingPortalConfigurationBuilder<'a>, configuration: &'a stripe_billing::BillingPortalConfigurationId, @@ -1576,6 +1602,7 @@ impl StripeRequest for UpdateBillingPortalConfiguration<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SubscriptionUpdateProductParam<'a> { /// The list of price IDs for the product that a subscription can be updated to. pub prices: &'a [&'a str], diff --git a/generated/async-stripe-billing/src/billing_portal_configuration/types.rs b/generated/async-stripe-billing/src/billing_portal_configuration/types.rs index 97f8a398a..9282fa47a 100644 --- a/generated/async-stripe-billing/src/billing_portal_configuration/types.rs +++ b/generated/async-stripe-billing/src/billing_portal_configuration/types.rs @@ -1,5 +1,6 @@ /// A portal configuration describes the functionality and behavior of a portal session. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct BillingPortalConfiguration { /// Whether the configuration is active and can be used to create portal sessions. diff --git a/generated/async-stripe-billing/src/billing_portal_session/requests.rs b/generated/async-stripe-billing/src/billing_portal_session/requests.rs index 6559a53ac..864bdf250 100644 --- a/generated/async-stripe-billing/src/billing_portal_session/requests.rs +++ b/generated/async-stripe-billing/src/billing_portal_session/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateBillingPortalSessionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] configuration: Option<&'a str>, @@ -34,6 +35,7 @@ impl<'a> CreateBillingPortalSessionBuilder<'a> { /// Information about a specific flow for the customer to go through. /// See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalSessionFlowData<'a> { /// Behavior after the flow is completed. #[serde(skip_serializing_if = "Option::is_none")] @@ -65,6 +67,7 @@ impl<'a> CreateBillingPortalSessionFlowData<'a> { } /// Behavior after the flow is completed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalSessionFlowDataAfterCompletion<'a> { /// Configuration when `after_completion.type=hosted_confirmation`. #[serde(skip_serializing_if = "Option::is_none")] @@ -84,6 +87,7 @@ impl<'a> CreateBillingPortalSessionFlowDataAfterCompletion<'a> { } /// Configuration when `after_completion.type=hosted_confirmation`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalSessionFlowDataAfterCompletionHostedConfirmation<'a> { /// A custom message to display to the customer after the flow is completed. #[serde(skip_serializing_if = "Option::is_none")] @@ -101,6 +105,7 @@ impl<'a> Default for CreateBillingPortalSessionFlowDataAfterCompletionHostedConf } /// Configuration when `after_completion.type=redirect`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalSessionFlowDataAfterCompletionRedirect<'a> { /// The URL the customer will be redirected to after the flow is completed. pub return_url: &'a str, @@ -173,6 +178,7 @@ impl<'de> serde::Deserialize<'de> for CreateBillingPortalSessionFlowDataAfterCom } /// Configuration when `flow_data.type=subscription_cancel`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalSessionFlowDataSubscriptionCancel<'a> { /// Specify a retention strategy to be used in the cancellation flow. #[serde(skip_serializing_if = "Option::is_none")] @@ -187,6 +193,7 @@ impl<'a> CreateBillingPortalSessionFlowDataSubscriptionCancel<'a> { } /// Specify a retention strategy to be used in the cancellation flow. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalSessionFlowDataSubscriptionCancelRetention<'a> { /// Configuration when `retention.type=coupon_offer`. pub coupon_offer: CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOffer<'a>, @@ -204,6 +211,7 @@ impl<'a> CreateBillingPortalSessionFlowDataSubscriptionCancelRetention<'a> { } /// Configuration when `retention.type=coupon_offer`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOffer<'a> { /// The ID of the coupon to be offered. pub coupon: &'a str, @@ -268,6 +276,7 @@ impl<'de> serde::Deserialize<'de> } /// Configuration when `flow_data.type=subscription_update`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdate<'a> { /// The ID of the subscription to be updated. pub subscription: &'a str, @@ -279,6 +288,7 @@ impl<'a> CreateBillingPortalSessionFlowDataSubscriptionUpdate<'a> { } /// Configuration when `flow_data.type=subscription_update_confirm`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirm<'a> { /// The coupon or promotion code to apply to this subscription update. /// Currently, only up to one may be specified. @@ -302,6 +312,7 @@ impl<'a> CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirm<'a> { /// The coupon or promotion code to apply to this subscription update. /// Currently, only up to one may be specified. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirmDiscounts<'a> { /// The ID of the coupon to apply to this subscription update. #[serde(skip_serializing_if = "Option::is_none")] @@ -323,6 +334,7 @@ impl<'a> Default for CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirm /// The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. /// Currently, only up to one may be specified and subscriptions with multiple items are not updatable. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalSessionFlowDataSubscriptionUpdateConfirmItems<'a> { /// The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. pub id: &'a str, @@ -403,6 +415,7 @@ impl<'de> serde::Deserialize<'de> for CreateBillingPortalSessionFlowDataType { } /// Creates a session of the customer portal. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateBillingPortalSession<'a> { inner: CreateBillingPortalSessionBuilder<'a>, } diff --git a/generated/async-stripe-billing/src/billing_portal_session/types.rs b/generated/async-stripe-billing/src/billing_portal_session/types.rs index c247e8a18..8af73d5aa 100644 --- a/generated/async-stripe-billing/src/billing_portal_session/types.rs +++ b/generated/async-stripe-billing/src/billing_portal_session/types.rs @@ -13,6 +13,7 @@ /// /// Learn more in the [integration guide](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal). #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct BillingPortalSession { /// The configuration used by this session, describing the features available. diff --git a/generated/async-stripe-billing/src/credit_note/requests.rs b/generated/async-stripe-billing/src/credit_note/requests.rs index 7fd629b88..2b757a28c 100644 --- a/generated/async-stripe-billing/src/credit_note/requests.rs +++ b/generated/async-stripe-billing/src/credit_note/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListCreditNoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -34,6 +35,7 @@ impl<'a> ListCreditNoteBuilder<'a> { } /// Returns a list of credit notes. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListCreditNote<'a> { inner: ListCreditNoteBuilder<'a>, } @@ -120,6 +122,7 @@ impl StripeRequest for ListCreditNote<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveCreditNoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -131,6 +134,7 @@ impl<'a> RetrieveCreditNoteBuilder<'a> { } /// Retrieves the credit note object with the given identifier. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveCreditNote<'a> { inner: RetrieveCreditNoteBuilder<'a>, id: &'a stripe_shared::CreditNoteId, @@ -173,6 +177,7 @@ impl StripeRequest for RetrieveCreditNote<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct PreviewCreditNoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -221,6 +226,7 @@ impl<'a> PreviewCreditNoteBuilder<'a> { } /// Line items that make up the credit note. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PreviewCreditNoteLines<'a> { /// The line item amount to credit. Only valid when `type` is `invoice_line_item`. #[serde(skip_serializing_if = "Option::is_none")] @@ -326,6 +332,7 @@ impl<'de> serde::Deserialize<'de> for PreviewCreditNoteLinesType { } /// Get a preview of a credit note without creating it. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PreviewCreditNote<'a> { inner: PreviewCreditNoteBuilder<'a>, } @@ -427,6 +434,7 @@ impl StripeRequest for PreviewCreditNote<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct PreviewLinesCreditNoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -484,6 +492,7 @@ impl<'a> PreviewLinesCreditNoteBuilder<'a> { } /// Line items that make up the credit note. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PreviewLinesCreditNoteLines<'a> { /// The line item amount to credit. Only valid when `type` is `invoice_line_item`. #[serde(skip_serializing_if = "Option::is_none")] @@ -591,6 +600,7 @@ impl<'de> serde::Deserialize<'de> for PreviewLinesCreditNoteLinesType { /// When retrieving a credit note preview, you’ll get a **lines** property containing the first handful of those items. /// This URL you can retrieve the full (paginated) list of line items. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PreviewLinesCreditNote<'a> { inner: PreviewLinesCreditNoteBuilder<'a>, } @@ -719,6 +729,7 @@ impl StripeRequest for PreviewLinesCreditNote<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateCreditNoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -767,6 +778,7 @@ impl<'a> CreateCreditNoteBuilder<'a> { } /// Line items that make up the credit note. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCreditNoteLines<'a> { /// The line item amount to credit. Only valid when `type` is `invoice_line_item`. #[serde(skip_serializing_if = "Option::is_none")] @@ -889,6 +901,7 @@ impl<'de> serde::Deserialize<'de> for CreateCreditNoteLinesType { /// Each credit note will increment the invoice’s `pre_payment_credit_notes_amount`. /// or `post_payment_credit_notes_amount` depending on its `status` at the time of credit note creation. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCreditNote<'a> { inner: CreateCreditNoteBuilder<'a>, } @@ -990,6 +1003,7 @@ impl StripeRequest for CreateCreditNote<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateCreditNoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -1005,6 +1019,7 @@ impl<'a> UpdateCreditNoteBuilder<'a> { } /// Updates an existing credit note. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCreditNote<'a> { inner: UpdateCreditNoteBuilder<'a>, id: &'a stripe_shared::CreditNoteId, @@ -1060,6 +1075,7 @@ impl StripeRequest for UpdateCreditNote<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct VoidCreditNoteCreditNoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -1072,6 +1088,7 @@ impl<'a> VoidCreditNoteCreditNoteBuilder<'a> { /// Marks a credit note as void. /// Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct VoidCreditNoteCreditNote<'a> { inner: VoidCreditNoteCreditNoteBuilder<'a>, id: &'a stripe_shared::CreditNoteId, @@ -1116,6 +1133,7 @@ impl StripeRequest for VoidCreditNoteCreditNote<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct TaxAmountWithTaxRateParam<'a> { /// The amount, in cents (or local equivalent), of the tax. pub amount: i64, @@ -1131,6 +1149,7 @@ impl<'a> TaxAmountWithTaxRateParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreditNoteShippingCost<'a> { /// The ID of the shipping rate to use for this order. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-billing/src/credit_note_line_item/requests.rs b/generated/async-stripe-billing/src/credit_note_line_item/requests.rs index 9d4701264..285b8b158 100644 --- a/generated/async-stripe-billing/src/credit_note_line_item/requests.rs +++ b/generated/async-stripe-billing/src/credit_note_line_item/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListCreditNoteCreditNoteLineItemBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -21,6 +22,7 @@ impl<'a> ListCreditNoteCreditNoteLineItemBuilder<'a> { /// When retrieving a credit note, you’ll get a **lines** property containing the the first handful of those items. /// There is also a URL where you can retrieve the full (paginated) list of line items. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListCreditNoteCreditNoteLineItem<'a> { inner: ListCreditNoteCreditNoteLineItemBuilder<'a>, credit_note: &'a stripe_shared::CreditNoteId, diff --git a/generated/async-stripe-billing/src/invoice/requests.rs b/generated/async-stripe-billing/src/invoice/requests.rs index e1706ad56..2e5147c81 100644 --- a/generated/async-stripe-billing/src/invoice/requests.rs +++ b/generated/async-stripe-billing/src/invoice/requests.rs @@ -6,6 +6,7 @@ use stripe_client_core::{ /// This cannot be undone. /// Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteInvoice<'a> { invoice: &'a stripe_shared::InvoiceId, } @@ -42,6 +43,7 @@ impl StripeRequest for DeleteInvoice<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListInvoiceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] collection_method: Option, @@ -83,6 +85,7 @@ impl<'a> ListInvoiceBuilder<'a> { /// You can list all invoices, or list the invoices for a specific customer. /// The invoices are returned sorted by creation date, with the most recently created invoices appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListInvoice<'a> { inner: ListInvoiceBuilder<'a>, } @@ -187,6 +190,7 @@ impl StripeRequest for ListInvoice<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveInvoiceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -198,6 +202,7 @@ impl<'a> RetrieveInvoiceBuilder<'a> { } /// Retrieves the invoice with the given ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveInvoice<'a> { inner: RetrieveInvoiceBuilder<'a>, invoice: &'a stripe_shared::InvoiceId, @@ -240,6 +245,7 @@ impl StripeRequest for RetrieveInvoice<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct SearchInvoiceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -261,6 +267,7 @@ impl<'a> SearchInvoiceBuilder<'a> { /// Occasionally, propagation of new or updated data can be up. /// to an hour behind during outages. Search functionality is not available to merchants in India. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SearchInvoice<'a> { inner: SearchInvoiceBuilder<'a>, } @@ -320,6 +327,7 @@ impl StripeRequest for SearchInvoice<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpcomingInvoiceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] automatic_tax: Option>, @@ -408,6 +416,7 @@ impl<'a> UpcomingInvoiceBuilder<'a> { } /// Settings for automatic tax lookup for this invoice preview. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceAutomaticTax<'a> { /// Whether Stripe automatically computes tax on this invoice. /// Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. @@ -427,6 +436,7 @@ impl<'a> UpcomingInvoiceAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -499,6 +509,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingInvoiceAutomaticTaxLiabilityType { /// Details about the customer you want to invoice or overrides for an existing customer. /// If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceCustomerDetails<'a> { /// The customer's address. #[serde(skip_serializing_if = "Option::is_none")] @@ -587,6 +598,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingInvoiceCustomerDetailsTaxExempt { } /// The customer's tax IDs. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceCustomerDetailsTaxIds<'a> { /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `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`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `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")] @@ -866,6 +878,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingInvoiceCustomerDetailsTaxIdsType { } /// List of invoice items to add or update in the upcoming invoice preview. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceInvoiceItems<'a> { /// The integer amount in cents (or local equivalent) of previewed invoice item. #[serde(skip_serializing_if = "Option::is_none")] @@ -962,6 +975,7 @@ impl<'a> Default for UpcomingInvoiceInvoiceItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceInvoiceItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -1116,6 +1130,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingInvoiceInvoiceItemsTaxBehavior { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1187,6 +1202,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingInvoiceIssuerType { /// The schedule creation or modification params to apply as a preview. /// Cannot be used with `subscription` or `subscription_` prefixed fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceScheduleDetails<'a> { /// Behavior of the subscription schedule and underlying subscription when it ends. /// Possible values are `release` or `cancel` with the default being `release`. @@ -1276,6 +1292,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingInvoiceScheduleDetailsEndBehavior /// Each phase can be customized to have different durations, plans, and coupons. /// If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceScheduleDetailsPhases<'a> { /// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. /// You may pass up to 20 items. @@ -1408,6 +1425,7 @@ impl<'a> UpcomingInvoiceScheduleDetailsPhases<'a> { /// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. /// You may pass up to 20 items. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceScheduleDetailsPhasesAddInvoiceItems<'a> { /// The coupons to redeem into discounts for the item. #[serde(skip_serializing_if = "Option::is_none")] @@ -1437,6 +1455,7 @@ impl<'a> Default for UpcomingInvoiceScheduleDetailsPhasesAddInvoiceItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceScheduleDetailsPhasesAddInvoiceItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -1527,6 +1546,7 @@ impl<'de> serde::Deserialize<'de> } /// Automatic tax settings for this phase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceScheduleDetailsPhasesAutomaticTax<'a> { /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -1545,6 +1565,7 @@ impl<'a> UpcomingInvoiceScheduleDetailsPhasesAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceScheduleDetailsPhasesAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1681,6 +1702,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingInvoiceScheduleDetailsPhasesBillin /// The date at which this phase of the subscription schedule ends. /// If set, `iterations` must not be set. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpcomingInvoiceScheduleDetailsPhasesEndDate { Timestamp(stripe_types::Timestamp), @@ -1688,6 +1710,7 @@ pub enum UpcomingInvoiceScheduleDetailsPhasesEndDate { } /// All invoices will be billed using the specified settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceScheduleDetailsPhasesInvoiceSettings<'a> { /// 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. @@ -1715,6 +1738,7 @@ impl<'a> Default for UpcomingInvoiceScheduleDetailsPhasesInvoiceSettings<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceScheduleDetailsPhasesInvoiceSettingsIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1790,6 +1814,7 @@ impl<'de> serde::Deserialize<'de> } /// List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceScheduleDetailsPhasesItems<'a> { /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// When updating, pass an empty string to remove previously-defined thresholds. @@ -1844,6 +1869,7 @@ impl<'a> Default for UpcomingInvoiceScheduleDetailsPhasesItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceScheduleDetailsPhasesItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -1884,6 +1910,7 @@ impl<'a> UpcomingInvoiceScheduleDetailsPhasesItemsPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceScheduleDetailsPhasesItemsPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: UpcomingInvoiceScheduleDetailsPhasesItemsPriceDataRecurringInterval, @@ -2095,6 +2122,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingInvoiceScheduleDetailsPhasesProrat /// The date at which this phase of the subscription schedule starts or `now`. /// Must be set on the first phase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpcomingInvoiceScheduleDetailsPhasesStartDate { Timestamp(stripe_types::Timestamp), @@ -2103,6 +2131,7 @@ pub enum UpcomingInvoiceScheduleDetailsPhasesStartDate { /// Sets the phase to trialing from the start date to this date. /// Must be before the phase end date, can not be combined with `trial`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpcomingInvoiceScheduleDetailsPhasesTrialEnd { Timestamp(stripe_types::Timestamp), @@ -2175,6 +2204,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingInvoiceScheduleDetailsProrationBeh /// This field has been deprecated and will be removed in a future API version. /// Use `subscription_details.billing_cycle_anchor` instead. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpcomingInvoiceSubscriptionBillingCycleAnchor { Now, @@ -2184,6 +2214,7 @@ pub enum UpcomingInvoiceSubscriptionBillingCycleAnchor { /// The subscription creation or modification params to apply as a preview. /// Cannot be used with `schedule` or `schedule_details` fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceSubscriptionDetails<'a> { /// For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). /// This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. @@ -2255,6 +2286,7 @@ impl<'a> Default for UpcomingInvoiceSubscriptionDetails<'a> { /// This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. /// For existing subscriptions, the value can only be set to `now` or `unchanged`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpcomingInvoiceSubscriptionDetailsBillingCycleAnchor { Now, @@ -2263,6 +2295,7 @@ pub enum UpcomingInvoiceSubscriptionDetailsBillingCycleAnchor { } /// A list of up to 20 subscription items, each with an attached price. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceSubscriptionDetailsItems<'a> { /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// When updating, pass an empty string to remove previously-defined thresholds. @@ -2330,6 +2363,7 @@ impl<'a> Default for UpcomingInvoiceSubscriptionDetailsItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceSubscriptionDetailsItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -2370,6 +2404,7 @@ impl<'a> UpcomingInvoiceSubscriptionDetailsItemsPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceSubscriptionDetailsItemsPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: UpcomingInvoiceSubscriptionDetailsItemsPriceDataRecurringInterval, @@ -2630,6 +2665,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingInvoiceSubscriptionDetailsResumeAt /// If provided, the invoice returned will preview updating or creating a subscription with that trial end. /// If set, one of `subscription_details.items` or `subscription` is required. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpcomingInvoiceSubscriptionDetailsTrialEnd { Now, @@ -2639,6 +2675,7 @@ pub enum UpcomingInvoiceSubscriptionDetailsTrialEnd { /// This field has been deprecated and will be removed in a future API version. /// Use `subscription_details.items` instead. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceSubscriptionItems<'a> { /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// When updating, pass an empty string to remove previously-defined thresholds. @@ -2706,6 +2743,7 @@ impl<'a> Default for UpcomingInvoiceSubscriptionItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceSubscriptionItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -2746,6 +2784,7 @@ impl<'a> UpcomingInvoiceSubscriptionItemsPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoiceSubscriptionItemsPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: UpcomingInvoiceSubscriptionItemsPriceDataRecurringInterval, @@ -3012,6 +3051,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingInvoiceSubscriptionResumeAt { /// This field has been deprecated and will be removed in a future API version. /// Use `subscription_details.trial_end` instead. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpcomingInvoiceSubscriptionTrialEnd { Now, @@ -3029,6 +3069,7 @@ pub enum UpcomingInvoiceSubscriptionTrialEnd { /// To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the `subscription_details.proration_date` parameter when doing the actual subscription update. /// The recommended way to get only the prorations being previewed is to consider only proration line items where `period[start]` is equal to the `subscription_details.proration_date` value passed in the request. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingInvoice<'a> { inner: UpcomingInvoiceBuilder<'a>, } @@ -3288,6 +3329,7 @@ impl StripeRequest for UpcomingInvoice<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpcomingLinesInvoiceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] automatic_tax: Option>, @@ -3385,6 +3427,7 @@ impl<'a> UpcomingLinesInvoiceBuilder<'a> { } /// Settings for automatic tax lookup for this invoice preview. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceAutomaticTax<'a> { /// Whether Stripe automatically computes tax on this invoice. /// Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. @@ -3404,6 +3447,7 @@ impl<'a> UpcomingLinesInvoiceAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -3478,6 +3522,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingLinesInvoiceAutomaticTaxLiabilityT /// Details about the customer you want to invoice or overrides for an existing customer. /// If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceCustomerDetails<'a> { /// The customer's address. #[serde(skip_serializing_if = "Option::is_none")] @@ -3568,6 +3613,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingLinesInvoiceCustomerDetailsTaxExem } /// The customer's tax IDs. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceCustomerDetailsTaxIds<'a> { /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `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`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `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")] @@ -3847,6 +3893,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingLinesInvoiceCustomerDetailsTaxIdsT } /// List of invoice items to add or update in the upcoming invoice preview. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceInvoiceItems<'a> { /// The integer amount in cents (or local equivalent) of previewed invoice item. #[serde(skip_serializing_if = "Option::is_none")] @@ -3943,6 +3990,7 @@ impl<'a> Default for UpcomingLinesInvoiceInvoiceItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceInvoiceItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -4099,6 +4147,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingLinesInvoiceInvoiceItemsTaxBehavio /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -4171,6 +4220,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingLinesInvoiceIssuerType { /// The schedule creation or modification params to apply as a preview. /// Cannot be used with `subscription` or `subscription_` prefixed fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceScheduleDetails<'a> { /// Behavior of the subscription schedule and underlying subscription when it ends. /// Possible values are `release` or `cancel` with the default being `release`. @@ -4262,6 +4312,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingLinesInvoiceScheduleDetailsEndBeha /// Each phase can be customized to have different durations, plans, and coupons. /// If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceScheduleDetailsPhases<'a> { /// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. /// You may pass up to 20 items. @@ -4395,6 +4446,7 @@ impl<'a> UpcomingLinesInvoiceScheduleDetailsPhases<'a> { /// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. /// You may pass up to 20 items. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceScheduleDetailsPhasesAddInvoiceItems<'a> { /// The coupons to redeem into discounts for the item. #[serde(skip_serializing_if = "Option::is_none")] @@ -4424,6 +4476,7 @@ impl<'a> Default for UpcomingLinesInvoiceScheduleDetailsPhasesAddInvoiceItems<'a } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceScheduleDetailsPhasesAddInvoiceItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -4522,6 +4575,7 @@ impl<'de> serde::Deserialize<'de> } /// Automatic tax settings for this phase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceScheduleDetailsPhasesAutomaticTax<'a> { /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -4540,6 +4594,7 @@ impl<'a> UpcomingLinesInvoiceScheduleDetailsPhasesAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceScheduleDetailsPhasesAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -4672,6 +4727,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingLinesInvoiceScheduleDetailsPhasesB /// The date at which this phase of the subscription schedule ends. /// If set, `iterations` must not be set. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpcomingLinesInvoiceScheduleDetailsPhasesEndDate { Timestamp(stripe_types::Timestamp), @@ -4679,6 +4735,7 @@ pub enum UpcomingLinesInvoiceScheduleDetailsPhasesEndDate { } /// All invoices will be billed using the specified settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceScheduleDetailsPhasesInvoiceSettings<'a> { /// 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. @@ -4706,6 +4763,7 @@ impl<'a> Default for UpcomingLinesInvoiceScheduleDetailsPhasesInvoiceSettings<'a /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceScheduleDetailsPhasesInvoiceSettingsIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -4777,6 +4835,7 @@ impl<'de> serde::Deserialize<'de> } /// List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceScheduleDetailsPhasesItems<'a> { /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// When updating, pass an empty string to remove previously-defined thresholds. @@ -4831,6 +4890,7 @@ impl<'a> Default for UpcomingLinesInvoiceScheduleDetailsPhasesItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceScheduleDetailsPhasesItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -4871,6 +4931,7 @@ impl<'a> UpcomingLinesInvoiceScheduleDetailsPhasesItemsPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceScheduleDetailsPhasesItemsPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: UpcomingLinesInvoiceScheduleDetailsPhasesItemsPriceDataRecurringInterval, @@ -5082,6 +5143,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingLinesInvoiceScheduleDetailsPhasesP /// The date at which this phase of the subscription schedule starts or `now`. /// Must be set on the first phase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpcomingLinesInvoiceScheduleDetailsPhasesStartDate { Timestamp(stripe_types::Timestamp), @@ -5090,6 +5152,7 @@ pub enum UpcomingLinesInvoiceScheduleDetailsPhasesStartDate { /// Sets the phase to trialing from the start date to this date. /// Must be before the phase end date, can not be combined with `trial`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpcomingLinesInvoiceScheduleDetailsPhasesTrialEnd { Timestamp(stripe_types::Timestamp), @@ -5162,6 +5225,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingLinesInvoiceScheduleDetailsProrati /// This field has been deprecated and will be removed in a future API version. /// Use `subscription_details.billing_cycle_anchor` instead. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpcomingLinesInvoiceSubscriptionBillingCycleAnchor { Now, @@ -5171,6 +5235,7 @@ pub enum UpcomingLinesInvoiceSubscriptionBillingCycleAnchor { /// The subscription creation or modification params to apply as a preview. /// Cannot be used with `schedule` or `schedule_details` fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceSubscriptionDetails<'a> { /// For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). /// This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. @@ -5242,6 +5307,7 @@ impl<'a> Default for UpcomingLinesInvoiceSubscriptionDetails<'a> { /// This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. /// For existing subscriptions, the value can only be set to `now` or `unchanged`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpcomingLinesInvoiceSubscriptionDetailsBillingCycleAnchor { Now, @@ -5250,6 +5316,7 @@ pub enum UpcomingLinesInvoiceSubscriptionDetailsBillingCycleAnchor { } /// A list of up to 20 subscription items, each with an attached price. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceSubscriptionDetailsItems<'a> { /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// When updating, pass an empty string to remove previously-defined thresholds. @@ -5317,6 +5384,7 @@ impl<'a> Default for UpcomingLinesInvoiceSubscriptionDetailsItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceSubscriptionDetailsItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -5357,6 +5425,7 @@ impl<'a> UpcomingLinesInvoiceSubscriptionDetailsItemsPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceSubscriptionDetailsItemsPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: UpcomingLinesInvoiceSubscriptionDetailsItemsPriceDataRecurringInterval, @@ -5617,6 +5686,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingLinesInvoiceSubscriptionDetailsRes /// If provided, the invoice returned will preview updating or creating a subscription with that trial end. /// If set, one of `subscription_details.items` or `subscription` is required. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpcomingLinesInvoiceSubscriptionDetailsTrialEnd { Now, @@ -5626,6 +5696,7 @@ pub enum UpcomingLinesInvoiceSubscriptionDetailsTrialEnd { /// This field has been deprecated and will be removed in a future API version. /// Use `subscription_details.items` instead. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceSubscriptionItems<'a> { /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// When updating, pass an empty string to remove previously-defined thresholds. @@ -5693,6 +5764,7 @@ impl<'a> Default for UpcomingLinesInvoiceSubscriptionItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceSubscriptionItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -5733,6 +5805,7 @@ impl<'a> UpcomingLinesInvoiceSubscriptionItemsPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoiceSubscriptionItemsPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: UpcomingLinesInvoiceSubscriptionItemsPriceDataRecurringInterval, @@ -6001,6 +6074,7 @@ impl<'de> serde::Deserialize<'de> for UpcomingLinesInvoiceSubscriptionResumeAt { /// This field has been deprecated and will be removed in a future API version. /// Use `subscription_details.trial_end` instead. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpcomingLinesInvoiceSubscriptionTrialEnd { Now, @@ -6009,6 +6083,7 @@ pub enum UpcomingLinesInvoiceSubscriptionTrialEnd { /// When retrieving an upcoming invoice, you’ll get a **lines** property containing the total count of line items and the first handful of those items. /// There is also a URL where you can retrieve the full (paginated) list of line items. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpcomingLinesInvoice<'a> { inner: UpcomingLinesInvoiceBuilder<'a>, } @@ -6297,6 +6372,7 @@ impl StripeRequest for UpcomingLinesInvoice<'_> { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateInvoiceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] account_tax_ids: Option<&'a [&'a str]>, @@ -6400,6 +6476,7 @@ impl<'a> CreateInvoiceBuilder<'a> { } /// Settings for automatic tax lookup for this invoice. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceAutomaticTax<'a> { /// Whether Stripe automatically computes tax on this invoice. /// Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. @@ -6419,6 +6496,7 @@ impl<'a> CreateInvoiceAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -6492,6 +6570,7 @@ impl<'de> serde::Deserialize<'de> for CreateInvoiceAutomaticTaxLiabilityType { /// The new invoice will be created in `status=draft`. /// See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceFromInvoice<'a> { /// The relation between the new invoice and the original invoice. /// Currently, only 'revision' is permitted. @@ -6561,6 +6640,7 @@ impl<'de> serde::Deserialize<'de> for CreateInvoiceFromInvoiceAction { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -6631,6 +6711,7 @@ impl<'de> serde::Deserialize<'de> for CreateInvoiceIssuerType { } /// Configuration settings for the PaymentIntent that is generated when the invoice is finalized. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoicePaymentSettings<'a> { /// ID of the mandate to be used for this invoice. /// It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. @@ -6657,6 +6738,7 @@ impl<'a> Default for CreateInvoicePaymentSettings<'a> { } /// Payment-method-specific configuration to provide to the invoice’s PaymentIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoicePaymentSettingsPaymentMethodOptions<'a> { /// If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] @@ -6702,6 +6784,7 @@ impl<'a> Default for CreateInvoicePaymentSettingsPaymentMethodOptions<'a> { } /// If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebit { /// Additional fields for Mandate creation #[serde(skip_serializing_if = "Option::is_none")] @@ -6724,6 +6807,7 @@ impl Default for CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebit { } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions { /// Transaction type of the mandate. #[serde(skip_serializing_if = "Option::is_none")] @@ -6874,6 +6958,7 @@ impl<'de> serde::Deserialize<'de> } /// If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsBancontact { /// Preferred language of the Bancontact authorization page that the customer is redirected to. #[serde(skip_serializing_if = "Option::is_none")] @@ -6962,6 +7047,7 @@ impl<'de> serde::Deserialize<'de> } /// If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCard { /// Installment configuration for payments attempted on this invoice (Mexico Only). /// @@ -6989,6 +7075,7 @@ impl Default for CreateInvoicePaymentSettingsPaymentMethodOptionsCard { /// /// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallments { /// Setting to true enables installments for this invoice. /// Setting to false will prevent any selected plan from applying to a payment. @@ -7010,6 +7097,7 @@ impl Default for CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallment } /// The selected installment plan to use for this invoice. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlan { /// For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. pub count: u64, @@ -7211,6 +7299,7 @@ impl<'de> serde::Deserialize<'de> } /// If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccount<'a> { /// Additional fields for Financial Connections Session creation #[serde(skip_serializing_if = "Option::is_none")] @@ -7234,6 +7323,7 @@ impl<'a> Default for CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccou } /// Additional fields for Financial Connections Session creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections<'a> { /// The list of permissions to request. /// If this parameter is passed, the `payment_method` permission must be included. @@ -7661,6 +7751,7 @@ impl<'de> serde::Deserialize<'de> for CreateInvoicePendingInvoiceItemsBehavior { } /// The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceRendering { /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// One of `exclude_tax` or `include_inclusive_tax`. @@ -7743,6 +7834,7 @@ impl<'de> serde::Deserialize<'de> for CreateInvoiceRenderingAmountTaxDisplay { } /// Invoice pdf rendering options #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceRenderingPdf { /// Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. /// If set to `auto`, invoice PDF page size defaults to `a4` for customers with @@ -7823,6 +7915,7 @@ impl<'de> serde::Deserialize<'de> for CreateInvoiceRenderingPdfPageSize { } /// Settings for the cost of shipping for this invoice. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceShippingCost<'a> { /// The ID of the shipping rate to use for this order. #[serde(skip_serializing_if = "Option::is_none")] @@ -7843,6 +7936,7 @@ impl<'a> Default for CreateInvoiceShippingCost<'a> { } /// Parameters to create a new ad-hoc shipping rate for this order. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceShippingCostShippingRateData<'a> { /// The estimated range for how long shipping will take, meant to be displayable to the customer. /// This will appear on CheckoutSessions. @@ -7889,6 +7983,7 @@ impl<'a> CreateInvoiceShippingCostShippingRateData<'a> { /// The estimated range for how long shipping will take, meant to be displayable to the customer. /// This will appear on CheckoutSessions. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimate { /// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. #[serde(skip_serializing_if = "Option::is_none")] @@ -7909,6 +8004,7 @@ impl Default for CreateInvoiceShippingCostShippingRateDataDeliveryEstimate { } /// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximum { /// A unit of time. pub unit: CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit, @@ -7990,6 +8086,7 @@ impl<'de> serde::Deserialize<'de> } /// The lower bound of the estimated range. If empty, represents no lower bound. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimum { /// A unit of time. pub unit: CreateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit, @@ -8071,6 +8168,7 @@ impl<'de> serde::Deserialize<'de> } /// Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceShippingCostShippingRateDataFixedAmount<'a> { /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -8095,6 +8193,7 @@ impl<'a> CreateInvoiceShippingCostShippingRateDataFixedAmount<'a> { /// Shipping rates defined in each available currency option. /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceShippingCostShippingRateDataFixedAmountCurrencyOptions { /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -8296,6 +8395,7 @@ impl<'de> serde::Deserialize<'de> for CreateInvoiceShippingCostShippingRateDataT } /// If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceTransferData<'a> { /// The amount that will be transferred automatically when the invoice is paid. /// If no amount is set, the full amount is transferred. @@ -8312,6 +8412,7 @@ impl<'a> CreateInvoiceTransferData<'a> { /// This endpoint creates a draft invoice for a given customer. /// The invoice remains a draft until you [finalize](https://stripe.com/docs/api#finalize_invoice) the invoice, which allows you to [pay](https://stripe.com/docs/api#pay_invoice) or [send](https://stripe.com/docs/api#send_invoice) the invoice to your customers. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoice<'a> { inner: CreateInvoiceBuilder<'a>, } @@ -8552,6 +8653,7 @@ impl StripeRequest for CreateInvoice<'_> { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateInvoiceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] account_tax_ids: Option<&'a [&'a str]>, @@ -8640,6 +8742,7 @@ impl<'a> UpdateInvoiceBuilder<'a> { } /// Settings for automatic tax lookup for this invoice. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceAutomaticTax<'a> { /// Whether Stripe automatically computes tax on this invoice. /// Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. @@ -8659,6 +8762,7 @@ impl<'a> UpdateInvoiceAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -8731,6 +8835,7 @@ impl<'de> serde::Deserialize<'de> for UpdateInvoiceAutomaticTaxLiabilityType { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -8801,6 +8906,7 @@ impl<'de> serde::Deserialize<'de> for UpdateInvoiceIssuerType { } /// Configuration settings for the PaymentIntent that is generated when the invoice is finalized. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoicePaymentSettings<'a> { /// ID of the mandate to be used for this invoice. /// It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. @@ -8827,6 +8933,7 @@ impl<'a> Default for UpdateInvoicePaymentSettings<'a> { } /// Payment-method-specific configuration to provide to the invoice’s PaymentIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoicePaymentSettingsPaymentMethodOptions<'a> { /// If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] @@ -8872,6 +8979,7 @@ impl<'a> Default for UpdateInvoicePaymentSettingsPaymentMethodOptions<'a> { } /// If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoicePaymentSettingsPaymentMethodOptionsAcssDebit { /// Additional fields for Mandate creation #[serde(skip_serializing_if = "Option::is_none")] @@ -8894,6 +9002,7 @@ impl Default for UpdateInvoicePaymentSettingsPaymentMethodOptionsAcssDebit { } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoicePaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions { /// Transaction type of the mandate. #[serde(skip_serializing_if = "Option::is_none")] @@ -9044,6 +9153,7 @@ impl<'de> serde::Deserialize<'de> } /// If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoicePaymentSettingsPaymentMethodOptionsBancontact { /// Preferred language of the Bancontact authorization page that the customer is redirected to. #[serde(skip_serializing_if = "Option::is_none")] @@ -9132,6 +9242,7 @@ impl<'de> serde::Deserialize<'de> } /// If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoicePaymentSettingsPaymentMethodOptionsCard { /// Installment configuration for payments attempted on this invoice (Mexico Only). /// @@ -9159,6 +9270,7 @@ impl Default for UpdateInvoicePaymentSettingsPaymentMethodOptionsCard { /// /// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoicePaymentSettingsPaymentMethodOptionsCardInstallments { /// Setting to true enables installments for this invoice. /// Setting to false will prevent any selected plan from applying to a payment. @@ -9180,6 +9292,7 @@ impl Default for UpdateInvoicePaymentSettingsPaymentMethodOptionsCardInstallment } /// The selected installment plan to use for this invoice. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlan { /// For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. pub count: u64, @@ -9381,6 +9494,7 @@ impl<'de> serde::Deserialize<'de> } /// If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccount<'a> { /// Additional fields for Financial Connections Session creation #[serde(skip_serializing_if = "Option::is_none")] @@ -9404,6 +9518,7 @@ impl<'a> Default for UpdateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccou } /// Additional fields for Financial Connections Session creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoicePaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections<'a> { /// The list of permissions to request. /// If this parameter is passed, the `payment_method` permission must be included. @@ -9774,6 +9889,7 @@ impl<'de> serde::Deserialize<'de> for UpdateInvoicePaymentSettingsPaymentMethodT } /// The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceRendering { /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// One of `exclude_tax` or `include_inclusive_tax`. @@ -9856,6 +9972,7 @@ impl<'de> serde::Deserialize<'de> for UpdateInvoiceRenderingAmountTaxDisplay { } /// Invoice pdf rendering options #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceRenderingPdf { /// Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. /// If set to `auto`, invoice PDF page size defaults to `a4` for customers with @@ -9936,6 +10053,7 @@ impl<'de> serde::Deserialize<'de> for UpdateInvoiceRenderingPdfPageSize { } /// Settings for the cost of shipping for this invoice. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceShippingCost<'a> { /// The ID of the shipping rate to use for this order. #[serde(skip_serializing_if = "Option::is_none")] @@ -9956,6 +10074,7 @@ impl<'a> Default for UpdateInvoiceShippingCost<'a> { } /// Parameters to create a new ad-hoc shipping rate for this order. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceShippingCostShippingRateData<'a> { /// The estimated range for how long shipping will take, meant to be displayable to the customer. /// This will appear on CheckoutSessions. @@ -10002,6 +10121,7 @@ impl<'a> UpdateInvoiceShippingCostShippingRateData<'a> { /// The estimated range for how long shipping will take, meant to be displayable to the customer. /// This will appear on CheckoutSessions. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceShippingCostShippingRateDataDeliveryEstimate { /// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. #[serde(skip_serializing_if = "Option::is_none")] @@ -10022,6 +10142,7 @@ impl Default for UpdateInvoiceShippingCostShippingRateDataDeliveryEstimate { } /// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximum { /// A unit of time. pub unit: UpdateInvoiceShippingCostShippingRateDataDeliveryEstimateMaximumUnit, @@ -10103,6 +10224,7 @@ impl<'de> serde::Deserialize<'de> } /// The lower bound of the estimated range. If empty, represents no lower bound. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimum { /// A unit of time. pub unit: UpdateInvoiceShippingCostShippingRateDataDeliveryEstimateMinimumUnit, @@ -10184,6 +10306,7 @@ impl<'de> serde::Deserialize<'de> } /// Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceShippingCostShippingRateDataFixedAmount<'a> { /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -10208,6 +10331,7 @@ impl<'a> UpdateInvoiceShippingCostShippingRateDataFixedAmount<'a> { /// Shipping rates defined in each available currency option. /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceShippingCostShippingRateDataFixedAmountCurrencyOptions { /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -10410,6 +10534,7 @@ impl<'de> serde::Deserialize<'de> for UpdateInvoiceShippingCostShippingRateDataT /// If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. /// This will be unset if you POST an empty value. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceTransferData<'a> { /// The amount that will be transferred automatically when the invoice is paid. /// If no amount is set, the full amount is transferred. @@ -10431,6 +10556,7 @@ impl<'a> UpdateInvoiceTransferData<'a> { /// sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass. /// `auto_advance=false`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoice<'a> { inner: UpdateInvoiceBuilder<'a>, invoice: &'a stripe_shared::InvoiceId, @@ -10637,6 +10763,7 @@ impl StripeRequest for UpdateInvoice<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct FinalizeInvoiceInvoiceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] auto_advance: Option, @@ -10651,6 +10778,7 @@ impl<'a> FinalizeInvoiceInvoiceBuilder<'a> { /// Stripe automatically finalizes drafts before sending and attempting payment on invoices. /// However, if you’d like to finalize a draft invoice manually, you can do so using this method. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct FinalizeInvoiceInvoice<'a> { inner: FinalizeInvoiceInvoiceBuilder<'a>, invoice: &'a stripe_shared::InvoiceId, @@ -10700,6 +10828,7 @@ impl StripeRequest for FinalizeInvoiceInvoice<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct MarkUncollectibleInvoiceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -10711,6 +10840,7 @@ impl<'a> MarkUncollectibleInvoiceBuilder<'a> { } /// Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct MarkUncollectibleInvoice<'a> { inner: MarkUncollectibleInvoiceBuilder<'a>, invoice: &'a stripe_shared::InvoiceId, @@ -10754,6 +10884,7 @@ impl StripeRequest for MarkUncollectibleInvoice<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct PayInvoiceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -10786,6 +10917,7 @@ impl<'a> PayInvoiceBuilder<'a> { /// Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). /// However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PayInvoice<'a> { inner: PayInvoiceBuilder<'a>, invoice: &'a stripe_shared::InvoiceId, @@ -10871,6 +11003,7 @@ impl StripeRequest for PayInvoice<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct SendInvoiceInvoiceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -10886,6 +11019,7 @@ impl<'a> SendInvoiceInvoiceBuilder<'a> { /// /// Requests made in test-mode result in no emails being sent, despite sending an `invoice.sent` event. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SendInvoiceInvoice<'a> { inner: SendInvoiceInvoiceBuilder<'a>, invoice: &'a stripe_shared::InvoiceId, @@ -10929,6 +11063,7 @@ impl StripeRequest for SendInvoiceInvoice<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct VoidInvoiceInvoiceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -10946,6 +11081,7 @@ impl<'a> VoidInvoiceInvoiceBuilder<'a> { /// You might need to [issue another invoice](https://stripe.com/docs/api#create_invoice) or [credit note](https://stripe.com/docs/api#create_credit_note) instead. /// Stripe recommends that you consult with your legal counsel for advice specific to your business. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct VoidInvoiceInvoice<'a> { inner: VoidInvoiceInvoiceBuilder<'a>, invoice: &'a stripe_shared::InvoiceId, @@ -10989,6 +11125,7 @@ impl StripeRequest for VoidInvoiceInvoice<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreatePreviewInvoiceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] automatic_tax: Option>, @@ -11041,6 +11178,7 @@ impl<'a> CreatePreviewInvoiceBuilder<'a> { } /// Settings for automatic tax lookup for this invoice preview. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceAutomaticTax<'a> { /// Whether Stripe automatically computes tax on this invoice. /// Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. @@ -11060,6 +11198,7 @@ impl<'a> CreatePreviewInvoiceAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -11134,6 +11273,7 @@ impl<'de> serde::Deserialize<'de> for CreatePreviewInvoiceAutomaticTaxLiabilityT /// Details about the customer you want to invoice or overrides for an existing customer. /// If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceCustomerDetails<'a> { /// The customer's address. #[serde(skip_serializing_if = "Option::is_none")] @@ -11224,6 +11364,7 @@ impl<'de> serde::Deserialize<'de> for CreatePreviewInvoiceCustomerDetailsTaxExem } /// The customer's tax IDs. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceCustomerDetailsTaxIds<'a> { /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `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`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `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")] @@ -11503,6 +11644,7 @@ impl<'de> serde::Deserialize<'de> for CreatePreviewInvoiceCustomerDetailsTaxIdsT } /// List of invoice items to add or update in the upcoming invoice preview. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceInvoiceItems<'a> { /// The integer amount in cents (or local equivalent) of previewed invoice item. #[serde(skip_serializing_if = "Option::is_none")] @@ -11599,6 +11741,7 @@ impl<'a> Default for CreatePreviewInvoiceInvoiceItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceInvoiceItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -11755,6 +11898,7 @@ impl<'de> serde::Deserialize<'de> for CreatePreviewInvoiceInvoiceItemsTaxBehavio /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -11827,6 +11971,7 @@ impl<'de> serde::Deserialize<'de> for CreatePreviewInvoiceIssuerType { /// The schedule creation or modification params to apply as a preview. /// Cannot be used with `subscription` or `subscription_` prefixed fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceScheduleDetails<'a> { /// Behavior of the subscription schedule and underlying subscription when it ends. /// Possible values are `release` or `cancel` with the default being `release`. @@ -11918,6 +12063,7 @@ impl<'de> serde::Deserialize<'de> for CreatePreviewInvoiceScheduleDetailsEndBeha /// Each phase can be customized to have different durations, plans, and coupons. /// If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceScheduleDetailsPhases<'a> { /// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. /// You may pass up to 20 items. @@ -12051,6 +12197,7 @@ impl<'a> CreatePreviewInvoiceScheduleDetailsPhases<'a> { /// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. /// You may pass up to 20 items. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceScheduleDetailsPhasesAddInvoiceItems<'a> { /// The coupons to redeem into discounts for the item. #[serde(skip_serializing_if = "Option::is_none")] @@ -12080,6 +12227,7 @@ impl<'a> Default for CreatePreviewInvoiceScheduleDetailsPhasesAddInvoiceItems<'a } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceScheduleDetailsPhasesAddInvoiceItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -12178,6 +12326,7 @@ impl<'de> serde::Deserialize<'de> } /// Automatic tax settings for this phase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceScheduleDetailsPhasesAutomaticTax<'a> { /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -12196,6 +12345,7 @@ impl<'a> CreatePreviewInvoiceScheduleDetailsPhasesAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceScheduleDetailsPhasesAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -12328,6 +12478,7 @@ impl<'de> serde::Deserialize<'de> for CreatePreviewInvoiceScheduleDetailsPhasesB /// The date at which this phase of the subscription schedule ends. /// If set, `iterations` must not be set. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreatePreviewInvoiceScheduleDetailsPhasesEndDate { Timestamp(stripe_types::Timestamp), @@ -12335,6 +12486,7 @@ pub enum CreatePreviewInvoiceScheduleDetailsPhasesEndDate { } /// All invoices will be billed using the specified settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceScheduleDetailsPhasesInvoiceSettings<'a> { /// 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. @@ -12362,6 +12514,7 @@ impl<'a> Default for CreatePreviewInvoiceScheduleDetailsPhasesInvoiceSettings<'a /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceScheduleDetailsPhasesInvoiceSettingsIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -12433,6 +12586,7 @@ impl<'de> serde::Deserialize<'de> } /// List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceScheduleDetailsPhasesItems<'a> { /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// When updating, pass an empty string to remove previously-defined thresholds. @@ -12487,6 +12641,7 @@ impl<'a> Default for CreatePreviewInvoiceScheduleDetailsPhasesItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceScheduleDetailsPhasesItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -12527,6 +12682,7 @@ impl<'a> CreatePreviewInvoiceScheduleDetailsPhasesItemsPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceScheduleDetailsPhasesItemsPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: CreatePreviewInvoiceScheduleDetailsPhasesItemsPriceDataRecurringInterval, @@ -12738,6 +12894,7 @@ impl<'de> serde::Deserialize<'de> for CreatePreviewInvoiceScheduleDetailsPhasesP /// The date at which this phase of the subscription schedule starts or `now`. /// Must be set on the first phase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreatePreviewInvoiceScheduleDetailsPhasesStartDate { Timestamp(stripe_types::Timestamp), @@ -12746,6 +12903,7 @@ pub enum CreatePreviewInvoiceScheduleDetailsPhasesStartDate { /// Sets the phase to trialing from the start date to this date. /// Must be before the phase end date, can not be combined with `trial`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreatePreviewInvoiceScheduleDetailsPhasesTrialEnd { Timestamp(stripe_types::Timestamp), @@ -12815,6 +12973,7 @@ impl<'de> serde::Deserialize<'de> for CreatePreviewInvoiceScheduleDetailsProrati /// The subscription creation or modification params to apply as a preview. /// Cannot be used with `schedule` or `schedule_details` fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceSubscriptionDetails<'a> { /// For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). /// This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. @@ -12886,6 +13045,7 @@ impl<'a> Default for CreatePreviewInvoiceSubscriptionDetails<'a> { /// This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. /// For existing subscriptions, the value can only be set to `now` or `unchanged`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreatePreviewInvoiceSubscriptionDetailsBillingCycleAnchor { Now, @@ -12894,6 +13054,7 @@ pub enum CreatePreviewInvoiceSubscriptionDetailsBillingCycleAnchor { } /// A list of up to 20 subscription items, each with an attached price. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceSubscriptionDetailsItems<'a> { /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// When updating, pass an empty string to remove previously-defined thresholds. @@ -12961,6 +13122,7 @@ impl<'a> Default for CreatePreviewInvoiceSubscriptionDetailsItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceSubscriptionDetailsItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -13001,6 +13163,7 @@ impl<'a> CreatePreviewInvoiceSubscriptionDetailsItemsPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoiceSubscriptionDetailsItemsPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: CreatePreviewInvoiceSubscriptionDetailsItemsPriceDataRecurringInterval, @@ -13261,6 +13424,7 @@ impl<'de> serde::Deserialize<'de> for CreatePreviewInvoiceSubscriptionDetailsRes /// If provided, the invoice returned will preview updating or creating a subscription with that trial end. /// If set, one of `subscription_details.items` or `subscription` is required. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreatePreviewInvoiceSubscriptionDetailsTrialEnd { Now, @@ -13278,6 +13442,7 @@ pub enum CreatePreviewInvoiceSubscriptionDetailsTrialEnd { /// To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the `subscription_details.proration_date` parameter when doing the actual subscription update. /// The recommended way to get only the prorations being previewed is to consider only proration line items where `period[start]` is equal to the `subscription_details.proration_date` value passed in the request. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePreviewInvoice<'a> { inner: CreatePreviewInvoiceBuilder<'a>, } @@ -13416,6 +13581,7 @@ impl StripeRequest for CreatePreviewInvoice<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct OptionalFieldsAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -13447,6 +13613,7 @@ impl<'a> Default for OptionalFieldsAddress<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct TaxParam<'a> { /// A recent IP address of the customer used for tax reporting and tax location inference. /// Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. @@ -13465,6 +13632,7 @@ impl<'a> Default for TaxParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DiscountsDataParam<'a> { /// ID of the coupon to create a new discount for. #[serde(skip_serializing_if = "Option::is_none")] @@ -13487,6 +13655,7 @@ impl<'a> Default for DiscountsDataParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct Period { /// The end of the period, which must be greater than or equal to the start. This value is inclusive. pub end: stripe_types::Timestamp, @@ -13499,6 +13668,7 @@ impl Period { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BillingThresholdsParam { /// Monetary threshold that triggers the subscription to advance to a new billing period #[serde(skip_serializing_if = "Option::is_none")] @@ -13519,6 +13689,7 @@ impl Default for BillingThresholdsParam { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ItemBillingThresholdsParam { /// Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)). pub usage_gte: i64, @@ -13529,6 +13700,7 @@ impl ItemBillingThresholdsParam { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct TransferDataSpecs<'a> { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. @@ -13544,6 +13716,7 @@ impl<'a> TransferDataSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CustomFieldParams<'a> { /// The name of the custom field. This may be up to 40 characters. pub name: &'a str, @@ -13556,6 +13729,7 @@ impl<'a> CustomFieldParams<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct EuBankTransferParam<'a> { /// The desired country code of the bank account information. /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. @@ -13567,6 +13741,7 @@ impl<'a> EuBankTransferParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CustomerShipping<'a> { /// Customer shipping address. pub address: OptionalFieldsAddress<'a>, @@ -13582,6 +13757,7 @@ impl<'a> CustomerShipping<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BankTransferParam<'a> { /// Configuration for eu_bank_transfer funding type. #[serde(skip_serializing_if = "Option::is_none")] @@ -13603,6 +13779,7 @@ impl<'a> Default for BankTransferParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RecipientShippingWithOptionalFieldsAddress<'a> { /// Shipping address pub address: OptionalFieldsAddress<'a>, @@ -13618,6 +13795,7 @@ impl<'a> RecipientShippingWithOptionalFieldsAddress<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct InvoicePaymentMethodOptionsParam<'a> { /// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-billing/src/invoice_item/requests.rs b/generated/async-stripe-billing/src/invoice_item/requests.rs index c8a5b7e8c..378919c5d 100644 --- a/generated/async-stripe-billing/src/invoice_item/requests.rs +++ b/generated/async-stripe-billing/src/invoice_item/requests.rs @@ -5,6 +5,7 @@ use stripe_client_core::{ /// Deletes an invoice item, removing it from an invoice. /// Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteInvoiceItem<'a> { invoiceitem: &'a stripe_shared::InvoiceItemId, } @@ -41,6 +42,7 @@ impl StripeRequest for DeleteInvoiceItem<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListInvoiceItemBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -76,6 +78,7 @@ impl<'a> ListInvoiceItemBuilder<'a> { /// Returns a list of your invoice items. /// Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListInvoiceItem<'a> { inner: ListInvoiceItemBuilder<'a>, } @@ -172,6 +175,7 @@ impl StripeRequest for ListInvoiceItem<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveInvoiceItemBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -183,6 +187,7 @@ impl<'a> RetrieveInvoiceItemBuilder<'a> { } /// Retrieves the invoice item with the given ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveInvoiceItem<'a> { inner: RetrieveInvoiceItemBuilder<'a>, invoiceitem: &'a stripe_shared::InvoiceItemId, @@ -226,6 +231,7 @@ impl StripeRequest for RetrieveInvoiceItem<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateInvoiceItemBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -292,6 +298,7 @@ impl<'a> CreateInvoiceItemBuilder<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceItemPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -443,6 +450,7 @@ impl<'de> serde::Deserialize<'de> for CreateInvoiceItemTaxBehavior { /// Creates an item to be added to a draft invoice (up to 250 items per invoice). /// If no invoice is specified, the item will be on the next invoice created for the customer specified. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateInvoiceItem<'a> { inner: CreateInvoiceItemBuilder<'a>, } @@ -591,6 +599,7 @@ impl StripeRequest for CreateInvoiceItem<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateInvoiceItemBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -646,6 +655,7 @@ impl<'a> UpdateInvoiceItemBuilder<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceItemPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -797,6 +807,7 @@ impl<'de> serde::Deserialize<'de> for UpdateInvoiceItemTaxBehavior { /// Updates the amount or description of an invoice item on an upcoming invoice. /// Updating an invoice item is only possible before the invoice it’s attached to is closed. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceItem<'a> { inner: UpdateInvoiceItemBuilder<'a>, invoiceitem: &'a stripe_shared::InvoiceItemId, @@ -931,6 +942,7 @@ impl StripeRequest for UpdateInvoiceItem<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DiscountsDataParam<'a> { /// ID of the coupon to create a new discount for. #[serde(skip_serializing_if = "Option::is_none")] @@ -953,6 +965,7 @@ impl<'a> Default for DiscountsDataParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct Period { /// The end of the period, which must be greater than or equal to the start. This value is inclusive. pub end: stripe_types::Timestamp, diff --git a/generated/async-stripe-billing/src/invoice_line_item/requests.rs b/generated/async-stripe-billing/src/invoice_line_item/requests.rs index 1a58a32a9..63334e0e9 100644 --- a/generated/async-stripe-billing/src/invoice_line_item/requests.rs +++ b/generated/async-stripe-billing/src/invoice_line_item/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListInvoiceInvoiceLineItemBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -21,6 +22,7 @@ impl<'a> ListInvoiceInvoiceLineItemBuilder<'a> { /// When retrieving an invoice, you’ll get a **lines** property containing the total count of line items and the first handful of those items. /// There is also a URL where you can retrieve the full (paginated) list of line items. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListInvoiceInvoiceLineItem<'a> { inner: ListInvoiceInvoiceLineItemBuilder<'a>, invoice: &'a stripe_shared::InvoiceId, @@ -95,6 +97,7 @@ impl StripeRequest for ListInvoiceInvoiceLineItem<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateInvoiceLineItemBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -143,6 +146,7 @@ impl<'a> UpdateInvoiceLineItemBuilder<'a> { /// Item discounts are applied before invoice discounts. /// Pass an empty string to remove previously-defined discounts. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceLineItemDiscounts<'a> { /// ID of the coupon to create a new discount for. #[serde(skip_serializing_if = "Option::is_none")] @@ -169,6 +173,7 @@ impl<'a> Default for UpdateInvoiceLineItemDiscounts<'a> { /// If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. /// See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceLineItemPeriod { /// The end of the period, which must be greater than or equal to the start. This value is inclusive. pub end: stripe_types::Timestamp, @@ -182,6 +187,7 @@ impl UpdateInvoiceLineItemPeriod { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceLineItemPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -222,6 +228,7 @@ impl<'a> UpdateInvoiceLineItemPriceData<'a> { } /// Data used to generate a new product object inline. One of `product` or `product_data` is required. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceLineItemPriceDataProductData<'a> { /// The product's description, meant to be displayable to the customer. /// Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. @@ -314,6 +321,7 @@ impl<'de> serde::Deserialize<'de> for UpdateInvoiceLineItemPriceDataTaxBehavior /// You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). /// Pass an empty string to remove previously defined tax amounts. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceLineItemTaxAmounts<'a> { /// The amount, in cents (or local equivalent), of the tax. pub amount: i64, @@ -341,6 +349,7 @@ impl<'a> UpdateInvoiceLineItemTaxAmounts<'a> { /// If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. /// TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceLineItemTaxAmountsTaxRateData<'a> { /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). #[serde(skip_serializing_if = "Option::is_none")] @@ -480,6 +489,7 @@ impl<'de> serde::Deserialize<'de> for UpdateInvoiceLineItemTaxAmountsTaxRateData /// item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. /// Updating an invoice’s line item is only possible before the invoice is finalized. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateInvoiceLineItem<'a> { inner: UpdateInvoiceLineItemBuilder<'a>, invoice: &'a stripe_shared::InvoiceId, diff --git a/generated/async-stripe-billing/src/plan/requests.rs b/generated/async-stripe-billing/src/plan/requests.rs index b84bcb3f3..9e50b4ae5 100644 --- a/generated/async-stripe-billing/src/plan/requests.rs +++ b/generated/async-stripe-billing/src/plan/requests.rs @@ -4,6 +4,7 @@ use stripe_client_core::{ /// Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeletePlan<'a> { plan: &'a stripe_shared::PlanId, } @@ -40,6 +41,7 @@ impl StripeRequest for DeletePlan<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListPlanBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -71,6 +73,7 @@ impl<'a> ListPlanBuilder<'a> { } /// Returns a list of your plans. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListPlan<'a> { inner: ListPlanBuilder<'a>, } @@ -158,6 +161,7 @@ impl StripeRequest for ListPlan<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrievePlanBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -169,6 +173,7 @@ impl<'a> RetrievePlanBuilder<'a> { } /// Retrieves the plan with the given ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrievePlan<'a> { inner: RetrievePlanBuilder<'a>, plan: &'a stripe_shared::PlanId, @@ -211,6 +216,7 @@ impl StripeRequest for RetrievePlan<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreatePlanBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -275,12 +281,14 @@ impl<'a> CreatePlanBuilder<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreatePlanProduct<'a> { InlineProductParams(CreatePlanInlineProductParams<'a>), Id(&'a str), } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePlanInlineProductParams<'a> { /// Whether the product is currently available for purchase. Defaults to `true`. #[serde(skip_serializing_if = "Option::is_none")] @@ -331,6 +339,7 @@ impl<'a> CreatePlanInlineProductParams<'a> { /// This parameter requires `billing_scheme` to be set to `tiered`. /// See also the documentation for `billing_scheme`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePlanTiers<'a> { /// The flat billing amount for an entire tier, regardless of the number of units in the tier. #[serde(skip_serializing_if = "Option::is_none")] @@ -366,6 +375,7 @@ impl<'a> CreatePlanTiers<'a> { /// The lower bound of a tier is the upper bound of the previous tier adding one. /// Use `inf` to define a fallback tier. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreatePlanTiersUpTo { Inf, @@ -374,6 +384,7 @@ pub enum CreatePlanTiersUpTo { /// Apply a transformation to the reported usage or set quantity before computing the billed price. /// Cannot be combined with `tiers`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePlanTransformUsage { /// Divide usage by this number. pub divide_by: i64, @@ -444,6 +455,7 @@ impl<'de> serde::Deserialize<'de> for CreatePlanTransformUsageRound { /// You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). /// It replaces the Plans API and is backwards compatible to simplify your migration. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePlan<'a> { inner: CreatePlanBuilder<'a>, } @@ -585,6 +597,7 @@ impl StripeRequest for CreatePlan<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdatePlanBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -615,6 +628,7 @@ impl<'a> UpdatePlanBuilder<'a> { /// Any parameters not provided are left unchanged. /// By design, you cannot change a plan’s ID, amount, currency, or billing cycle. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePlan<'a> { inner: UpdatePlanBuilder<'a>, plan: &'a stripe_shared::PlanId, diff --git a/generated/async-stripe-billing/src/quote/requests.rs b/generated/async-stripe-billing/src/quote/requests.rs index 57fb04e54..f54beb9fe 100644 --- a/generated/async-stripe-billing/src/quote/requests.rs +++ b/generated/async-stripe-billing/src/quote/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListQuoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] customer: Option<&'a str>, @@ -34,6 +35,7 @@ impl<'a> ListQuoteBuilder<'a> { } /// Returns a list of your quotes. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListQuote<'a> { inner: ListQuoteBuilder<'a>, } @@ -121,6 +123,7 @@ impl StripeRequest for ListQuote<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveQuoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -132,6 +135,7 @@ impl<'a> RetrieveQuoteBuilder<'a> { } /// Retrieves the quote with the given ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveQuote<'a> { inner: RetrieveQuoteBuilder<'a>, quote: &'a stripe_shared::QuoteId, @@ -174,6 +178,7 @@ impl StripeRequest for RetrieveQuote<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListComputedUpfrontLineItemsQuoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -192,6 +197,7 @@ impl<'a> ListComputedUpfrontLineItemsQuoteBuilder<'a> { /// When retrieving a quote, there is an includable **computed.upfront.line_items** property containing the first handful of those items. /// There is also a URL where you can retrieve the full (paginated) list of upfront line items. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListComputedUpfrontLineItemsQuote<'a> { inner: ListComputedUpfrontLineItemsQuoteBuilder<'a>, quote: &'a stripe_shared::QuoteId, @@ -270,6 +276,7 @@ impl StripeRequest for ListComputedUpfrontLineItemsQuote<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListLineItemsQuoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -288,6 +295,7 @@ impl<'a> ListLineItemsQuoteBuilder<'a> { /// When retrieving a quote, there is an includable **line_items** property containing the first handful of those items. /// There is also a URL where you can retrieve the full (paginated) list of line items. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListLineItemsQuote<'a> { inner: ListLineItemsQuoteBuilder<'a>, quote: &'a stripe_shared::QuoteId, @@ -363,6 +371,7 @@ impl StripeRequest for ListLineItemsQuote<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateQuoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] application_fee_amount: Option, @@ -433,6 +442,7 @@ impl<'a> CreateQuoteBuilder<'a> { } /// Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateQuoteAutomaticTax<'a> { /// Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. pub enabled: bool, @@ -451,6 +461,7 @@ impl<'a> CreateQuoteAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateQuoteAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -524,6 +535,7 @@ impl<'de> serde::Deserialize<'de> for CreateQuoteAutomaticTaxLiabilityType { /// The new quote will be created in `status=draft`. /// When using this parameter, you cannot specify any other parameters except for `expires_at`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateQuoteFromQuote<'a> { /// Whether this quote is a revision of the previous quote. #[serde(skip_serializing_if = "Option::is_none")] @@ -538,6 +550,7 @@ impl<'a> CreateQuoteFromQuote<'a> { } /// All invoices will be billed using the specified settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateQuoteInvoiceSettings<'a> { /// Number of days within which a customer must pay the invoice generated by this quote. /// This value will be `null` for quotes where `collection_method=charge_automatically`. @@ -561,6 +574,7 @@ impl<'a> Default for CreateQuoteInvoiceSettings<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateQuoteInvoiceSettingsIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -633,6 +647,7 @@ impl<'de> serde::Deserialize<'de> for CreateQuoteInvoiceSettingsIssuerType { /// A list of line items the customer is being quoted for. /// Each line item includes information about the product, the quantity, and the resulting cost. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateQuoteLineItems<'a> { /// The discounts applied to this line item. #[serde(skip_serializing_if = "Option::is_none")] @@ -665,6 +680,7 @@ impl<'a> Default for CreateQuoteLineItems<'a> { /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. /// One of `price` or `price_data` is required. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateQuoteLineItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -702,6 +718,7 @@ impl<'a> CreateQuoteLineItemsPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateQuoteLineItemsPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: CreateQuoteLineItemsPriceDataRecurringInterval, @@ -846,6 +863,7 @@ impl<'de> serde::Deserialize<'de> for CreateQuoteLineItemsPriceDataTaxBehavior { /// There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. /// A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateQuoteSubscriptionData<'a> { /// 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 surfaces and certain local payment methods UIs. @@ -883,6 +901,7 @@ impl<'a> Default for CreateQuoteSubscriptionData<'a> { /// The special value `current_period_end` can be provided to update a subscription at the end of its current period. /// The `effective_date` is ignored if it is in the past when the quote is accepted. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreateQuoteSubscriptionDataEffectiveDate { CurrentPeriodEnd, @@ -891,6 +910,7 @@ pub enum CreateQuoteSubscriptionDataEffectiveDate { /// A quote models prices and services for a customer. /// Default options for `header`, `description`, `footer`, and `expires_at` can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateQuote<'a> { inner: CreateQuoteBuilder<'a>, } @@ -1055,6 +1075,7 @@ impl StripeRequest for CreateQuote<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateQuoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] application_fee_amount: Option, @@ -1119,6 +1140,7 @@ impl<'a> UpdateQuoteBuilder<'a> { } /// Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateQuoteAutomaticTax<'a> { /// Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. pub enabled: bool, @@ -1137,6 +1159,7 @@ impl<'a> UpdateQuoteAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateQuoteAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1208,6 +1231,7 @@ impl<'de> serde::Deserialize<'de> for UpdateQuoteAutomaticTaxLiabilityType { } /// All invoices will be billed using the specified settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateQuoteInvoiceSettings<'a> { /// Number of days within which a customer must pay the invoice generated by this quote. /// This value will be `null` for quotes where `collection_method=charge_automatically`. @@ -1231,6 +1255,7 @@ impl<'a> Default for UpdateQuoteInvoiceSettings<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateQuoteInvoiceSettingsIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1303,6 +1328,7 @@ impl<'de> serde::Deserialize<'de> for UpdateQuoteInvoiceSettingsIssuerType { /// A list of line items the customer is being quoted for. /// Each line item includes information about the product, the quantity, and the resulting cost. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateQuoteLineItems<'a> { /// The discounts applied to this line item. #[serde(skip_serializing_if = "Option::is_none")] @@ -1345,6 +1371,7 @@ impl<'a> Default for UpdateQuoteLineItems<'a> { /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. /// One of `price` or `price_data` is required. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateQuoteLineItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -1382,6 +1409,7 @@ impl<'a> UpdateQuoteLineItemsPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateQuoteLineItemsPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: UpdateQuoteLineItemsPriceDataRecurringInterval, @@ -1526,6 +1554,7 @@ impl<'de> serde::Deserialize<'de> for UpdateQuoteLineItemsPriceDataTaxBehavior { /// There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. /// A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateQuoteSubscriptionData<'a> { /// 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 surfaces and certain local payment methods UIs. @@ -1563,6 +1592,7 @@ impl<'a> Default for UpdateQuoteSubscriptionData<'a> { /// The special value `current_period_end` can be provided to update a subscription at the end of its current period. /// The `effective_date` is ignored if it is in the past when the quote is accepted. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpdateQuoteSubscriptionDataEffectiveDate { CurrentPeriodEnd, @@ -1570,6 +1600,7 @@ pub enum UpdateQuoteSubscriptionDataEffectiveDate { } /// A quote models prices and services for a customer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateQuote<'a> { inner: UpdateQuoteBuilder<'a>, quote: &'a stripe_shared::QuoteId, @@ -1715,6 +1746,7 @@ impl StripeRequest for UpdateQuote<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct AcceptQuoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -1726,6 +1758,7 @@ impl<'a> AcceptQuoteBuilder<'a> { } /// Accepts the specified quote. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct AcceptQuote<'a> { inner: AcceptQuoteBuilder<'a>, quote: &'a stripe_shared::QuoteId, @@ -1768,6 +1801,7 @@ impl StripeRequest for AcceptQuote<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CancelQuoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -1779,6 +1813,7 @@ impl<'a> CancelQuoteBuilder<'a> { } /// Cancels the quote. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CancelQuote<'a> { inner: CancelQuoteBuilder<'a>, quote: &'a stripe_shared::QuoteId, @@ -1821,6 +1856,7 @@ impl StripeRequest for CancelQuote<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct FinalizeQuoteQuoteBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -1834,6 +1870,7 @@ impl<'a> FinalizeQuoteQuoteBuilder<'a> { } /// Finalizes the quote. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct FinalizeQuoteQuote<'a> { inner: FinalizeQuoteQuoteBuilder<'a>, quote: &'a stripe_shared::QuoteId, @@ -1884,6 +1921,7 @@ impl StripeRequest for FinalizeQuoteQuote<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DiscountsDataParam<'a> { /// ID of the coupon to create a new discount for. #[serde(skip_serializing_if = "Option::is_none")] @@ -1906,6 +1944,7 @@ impl<'a> Default for DiscountsDataParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct TransferDataSpecs<'a> { /// The amount that will be transferred automatically when the invoice is paid. /// If no amount is set, the full amount is transferred. diff --git a/generated/async-stripe-billing/src/subscription/requests.rs b/generated/async-stripe-billing/src/subscription/requests.rs index 62cc293a8..fdbd206df 100644 --- a/generated/async-stripe-billing/src/subscription/requests.rs +++ b/generated/async-stripe-billing/src/subscription/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CancelSubscriptionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] cancellation_details: Option>, @@ -20,6 +21,7 @@ impl<'a> CancelSubscriptionBuilder<'a> { } /// Details about why this subscription was cancelled #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CancelSubscriptionCancellationDetails<'a> { /// Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. #[serde(skip_serializing_if = "Option::is_none")] @@ -126,6 +128,7 @@ impl<'de> serde::Deserialize<'de> for CancelSubscriptionCancellationDetailsFeedb /// However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. /// Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CancelSubscription<'a> { inner: CancelSubscriptionBuilder<'a>, subscription_exposed_id: &'a stripe_shared::SubscriptionId, @@ -191,6 +194,7 @@ impl StripeRequest for CancelSubscription<'_> { } /// Removes the currently applied discount on a subscription. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteDiscountSubscription<'a> { subscription_exposed_id: &'a stripe_shared::SubscriptionId, } @@ -230,6 +234,7 @@ impl StripeRequest for DeleteDiscountSubscription<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListSubscriptionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] automatic_tax: Option, @@ -282,6 +287,7 @@ impl<'a> ListSubscriptionBuilder<'a> { } /// Filter subscriptions by their automatic tax settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListSubscriptionAutomaticTax { /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -377,6 +383,7 @@ impl<'de> serde::Deserialize<'de> for ListSubscriptionStatus { /// By default, returns a list of subscriptions that have not been canceled. /// In order to list canceled subscriptions, specify `status=canceled`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListSubscription<'a> { inner: ListSubscriptionBuilder<'a>, } @@ -508,6 +515,7 @@ impl StripeRequest for ListSubscription<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveSubscriptionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -519,6 +527,7 @@ impl<'a> RetrieveSubscriptionBuilder<'a> { } /// Retrieves the subscription with the given ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveSubscription<'a> { inner: RetrieveSubscriptionBuilder<'a>, subscription_exposed_id: &'a stripe_shared::SubscriptionId, @@ -562,6 +571,7 @@ impl StripeRequest for RetrieveSubscription<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct SearchSubscriptionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -583,6 +593,7 @@ impl<'a> SearchSubscriptionBuilder<'a> { /// Occasionally, propagation of new or updated data can be up. /// to an hour behind during outages. Search functionality is not available to merchants in India. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SearchSubscription<'a> { inner: SearchSubscriptionBuilder<'a>, } @@ -643,6 +654,7 @@ impl StripeRequest for SearchSubscription<'_> { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateSubscriptionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] add_invoice_items: Option<&'a [CreateSubscriptionAddInvoiceItems<'a>]>, @@ -758,6 +770,7 @@ impl<'a> CreateSubscriptionBuilder<'a> { /// A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. /// You may pass up to 20 items. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionAddInvoiceItems<'a> { /// The coupons to redeem into discounts for the item. #[serde(skip_serializing_if = "Option::is_none")] @@ -787,6 +800,7 @@ impl<'a> Default for CreateSubscriptionAddInvoiceItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionAddInvoiceItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -879,6 +893,7 @@ impl<'de> serde::Deserialize<'de> for CreateSubscriptionAddInvoiceItemsPriceData /// Automatic tax settings for this subscription. /// We recommend you only include this parameter when the existing value is being changed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionAutomaticTax<'a> { /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -897,6 +912,7 @@ impl<'a> CreateSubscriptionAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -971,6 +987,7 @@ impl<'de> serde::Deserialize<'de> for CreateSubscriptionAutomaticTaxLiabilityTyp /// Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. /// When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionBillingCycleAnchorConfig { /// The day of the month the billing_cycle_anchor should be. Ranges from 1 to 31. pub day_of_month: i64, @@ -994,6 +1011,7 @@ impl CreateSubscriptionBillingCycleAnchorConfig { } /// All invoices will be billed using the specified settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionInvoiceSettings<'a> { /// The account tax IDs associated with the subscription. /// Will be set on invoices generated by the subscription. @@ -1017,6 +1035,7 @@ impl<'a> Default for CreateSubscriptionInvoiceSettings<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionInvoiceSettingsIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1090,6 +1109,7 @@ impl<'de> serde::Deserialize<'de> for CreateSubscriptionInvoiceSettingsIssuerTyp } /// A list of up to 20 subscription items, each with an attached price. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionItems<'a> { /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// When updating, pass an empty string to remove previously-defined thresholds. @@ -1143,6 +1163,7 @@ impl<'a> Default for CreateSubscriptionItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -1183,6 +1204,7 @@ impl<'a> CreateSubscriptionItemsPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionItemsPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: CreateSubscriptionItemsPriceDataRecurringInterval, @@ -1409,6 +1431,7 @@ impl<'de> serde::Deserialize<'de> for CreateSubscriptionPaymentBehavior { } /// Payment settings to pass to invoices created by the subscription. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionPaymentSettings<'a> { /// Payment-method-specific configuration to provide to invoices created by the subscription. #[serde(skip_serializing_if = "Option::is_none")] @@ -1440,6 +1463,7 @@ impl<'a> Default for CreateSubscriptionPaymentSettings<'a> { } /// Payment-method-specific configuration to provide to invoices created by the subscription. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptions<'a> { /// This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] @@ -1486,6 +1510,7 @@ impl<'a> Default for CreateSubscriptionPaymentSettingsPaymentMethodOptions<'a> { } /// This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebit { /// Additional fields for Mandate creation #[serde(skip_serializing_if = "Option::is_none")] @@ -1508,6 +1533,7 @@ impl Default for CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebit } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions { /// Transaction type of the mandate. #[serde(skip_serializing_if = "Option::is_none")] @@ -1659,6 +1685,7 @@ impl<'de> serde::Deserialize<'de> } /// This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsBancontact { /// Preferred language of the Bancontact authorization page that the customer is redirected to. #[serde(skip_serializing_if = "Option::is_none")] @@ -1747,6 +1774,7 @@ impl<'de> serde::Deserialize<'de> } /// This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCard<'a> { /// Configuration options for setting up an eMandate for cards issued in India. #[serde(skip_serializing_if = "Option::is_none")] @@ -1776,6 +1804,7 @@ impl<'a> Default for CreateSubscriptionPaymentSettingsPaymentMethodOptionsCard<' } /// Configuration options for setting up an eMandate for cards issued in India. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions<'a> { /// Amount to be charged for future payments. #[serde(skip_serializing_if = "Option::is_none")] @@ -2022,6 +2051,7 @@ impl<'de> serde::Deserialize<'de> } /// This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount<'a> { /// Additional fields for Financial Connections Session creation #[serde(skip_serializing_if = "Option::is_none")] @@ -2046,6 +2076,7 @@ impl<'a> Default for CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBank } /// Additional fields for Financial Connections Session creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections<'a> { /// The list of permissions to request. /// If this parameter is passed, the `payment_method` permission must be included. @@ -2458,6 +2489,7 @@ impl<'de> serde::Deserialize<'de> for CreateSubscriptionPaymentSettingsSaveDefau /// Specifies an interval for how often to bill for any pending invoice items. /// It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionPendingInvoiceItemInterval { /// Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. pub interval: CreateSubscriptionPendingInvoiceItemIntervalInterval, @@ -2602,6 +2634,7 @@ impl<'de> serde::Deserialize<'de> for CreateSubscriptionProrationBehavior { /// Can be at most two years from `billing_cycle_anchor`. /// See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreateSubscriptionTrialEnd { Now, @@ -2609,6 +2642,7 @@ pub enum CreateSubscriptionTrialEnd { } /// Settings related to subscription trials. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionTrialSettings { /// Defines how the subscription should behave when the user's free trial ends. pub end_behavior: CreateSubscriptionTrialSettingsEndBehavior, @@ -2620,6 +2654,7 @@ impl CreateSubscriptionTrialSettings { } /// Defines how the subscription should behave when the user's free trial ends. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionTrialSettingsEndBehavior { /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. pub missing_payment_method: CreateSubscriptionTrialSettingsEndBehaviorMissingPaymentMethod, @@ -2703,6 +2738,7 @@ impl<'de> serde::Deserialize<'de> /// To start subscriptions where the first invoice always begins in a `draft` status, use [subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules#managing) instead. /// Schedules provide the flexibility to model more complex billing configurations that change over time. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscription<'a> { inner: CreateSubscriptionBuilder<'a>, } @@ -2996,6 +3032,7 @@ impl StripeRequest for CreateSubscription<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ResumeSubscriptionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] billing_cycle_anchor: Option, @@ -3140,6 +3177,7 @@ impl<'de> serde::Deserialize<'de> for ResumeSubscriptionProrationBehavior { /// If payment succeeds the subscription will become `active`, and if payment fails the subscription will be `past_due`. /// The resumption invoice will void automatically if not paid by the expiration date. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ResumeSubscription<'a> { inner: ResumeSubscriptionBuilder<'a>, subscription: &'a stripe_shared::SubscriptionId, @@ -3209,6 +3247,7 @@ impl StripeRequest for ResumeSubscription<'_> { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateSubscriptionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] add_invoice_items: Option<&'a [UpdateSubscriptionAddInvoiceItems<'a>]>, @@ -3319,6 +3358,7 @@ impl<'a> UpdateSubscriptionBuilder<'a> { /// A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. /// You may pass up to 20 items. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionAddInvoiceItems<'a> { /// The coupons to redeem into discounts for the item. #[serde(skip_serializing_if = "Option::is_none")] @@ -3348,6 +3388,7 @@ impl<'a> Default for UpdateSubscriptionAddInvoiceItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionAddInvoiceItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -3440,6 +3481,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSubscriptionAddInvoiceItemsPriceData /// Automatic tax settings for this subscription. /// We recommend you only include this parameter when the existing value is being changed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionAutomaticTax<'a> { /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -3458,6 +3500,7 @@ impl<'a> UpdateSubscriptionAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -3589,6 +3632,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSubscriptionBillingCycleAnchor { } /// Details about why this subscription was cancelled #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionCancellationDetails<'a> { /// Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. #[serde(skip_serializing_if = "Option::is_none")] @@ -3685,6 +3729,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSubscriptionCancellationDetailsFeedb } /// All invoices will be billed using the specified settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionInvoiceSettings<'a> { /// The account tax IDs associated with the subscription. /// Will be set on invoices generated by the subscription. @@ -3708,6 +3753,7 @@ impl<'a> Default for UpdateSubscriptionInvoiceSettings<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionInvoiceSettingsIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -3781,6 +3827,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSubscriptionInvoiceSettingsIssuerTyp } /// A list of up to 20 subscription items, each with an attached price. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionItems<'a> { /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// When updating, pass an empty string to remove previously-defined thresholds. @@ -3848,6 +3895,7 @@ impl<'a> Default for UpdateSubscriptionItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -3888,6 +3936,7 @@ impl<'a> UpdateSubscriptionItemsPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionItemsPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: UpdateSubscriptionItemsPriceDataRecurringInterval, @@ -4034,6 +4083,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSubscriptionItemsPriceDataTaxBehavio /// Note that the subscription status will be unchanged and will not be updated to `paused`. /// Learn more about [pausing collection](/billing/subscriptions/pause-payment). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionPauseCollection { /// The payment collection behavior for this subscription while paused. /// One of `keep_as_draft`, `mark_uncollectible`, or `void`. @@ -4187,6 +4237,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSubscriptionPaymentBehavior { } /// Payment settings to pass to invoices created by the subscription. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionPaymentSettings<'a> { /// Payment-method-specific configuration to provide to invoices created by the subscription. #[serde(skip_serializing_if = "Option::is_none")] @@ -4218,6 +4269,7 @@ impl<'a> Default for UpdateSubscriptionPaymentSettings<'a> { } /// Payment-method-specific configuration to provide to invoices created by the subscription. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptions<'a> { /// This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. #[serde(skip_serializing_if = "Option::is_none")] @@ -4264,6 +4316,7 @@ impl<'a> Default for UpdateSubscriptionPaymentSettingsPaymentMethodOptions<'a> { } /// This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebit { /// Additional fields for Mandate creation #[serde(skip_serializing_if = "Option::is_none")] @@ -4286,6 +4339,7 @@ impl Default for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebit } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions { /// Transaction type of the mandate. #[serde(skip_serializing_if = "Option::is_none")] @@ -4437,6 +4491,7 @@ impl<'de> serde::Deserialize<'de> } /// This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsBancontact { /// Preferred language of the Bancontact authorization page that the customer is redirected to. #[serde(skip_serializing_if = "Option::is_none")] @@ -4525,6 +4580,7 @@ impl<'de> serde::Deserialize<'de> } /// This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCard<'a> { /// Configuration options for setting up an eMandate for cards issued in India. #[serde(skip_serializing_if = "Option::is_none")] @@ -4554,6 +4610,7 @@ impl<'a> Default for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCard<' } /// Configuration options for setting up an eMandate for cards issued in India. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions<'a> { /// Amount to be charged for future payments. #[serde(skip_serializing_if = "Option::is_none")] @@ -4800,6 +4857,7 @@ impl<'de> serde::Deserialize<'de> } /// This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccount<'a> { /// Additional fields for Financial Connections Session creation #[serde(skip_serializing_if = "Option::is_none")] @@ -4824,6 +4882,7 @@ impl<'a> Default for UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBank } /// Additional fields for Financial Connections Session creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections<'a> { /// The list of permissions to request. /// If this parameter is passed, the `payment_method` permission must be included. @@ -5236,6 +5295,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSubscriptionPaymentSettingsSaveDefau /// Specifies an interval for how often to bill for any pending invoice items. /// It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionPendingInvoiceItemInterval { /// Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. pub interval: UpdateSubscriptionPendingInvoiceItemIntervalInterval, @@ -5380,6 +5440,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSubscriptionProrationBehavior { /// The special value `now` can be provided to end the customer's trial immediately. /// Can be at most two years from `billing_cycle_anchor`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpdateSubscriptionTrialEnd { Now, @@ -5387,6 +5448,7 @@ pub enum UpdateSubscriptionTrialEnd { } /// Settings related to subscription trials. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionTrialSettings { /// Defines how the subscription should behave when the user's free trial ends. pub end_behavior: UpdateSubscriptionTrialSettingsEndBehavior, @@ -5398,6 +5460,7 @@ impl UpdateSubscriptionTrialSettings { } /// Defines how the subscription should behave when the user's free trial ends. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionTrialSettingsEndBehavior { /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. pub missing_payment_method: UpdateSubscriptionTrialSettingsEndBehaviorMissingPaymentMethod, @@ -5504,6 +5567,7 @@ impl<'de> serde::Deserialize<'de> /// Updating the quantity on a subscription many times in an hour may result in [rate limiting](https://stripe.com/docs/rate-limits). /// If you need to bill for a frequently changing quantity, consider integrating [usage-based billing](https://stripe.com/docs/billing/subscriptions/usage-based) instead. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscription<'a> { inner: UpdateSubscriptionBuilder<'a>, subscription_exposed_id: &'a stripe_shared::SubscriptionId, @@ -5793,6 +5857,7 @@ impl StripeRequest for UpdateSubscription<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DiscountsDataParam<'a> { /// ID of the coupon to create a new discount for. #[serde(skip_serializing_if = "Option::is_none")] @@ -5815,6 +5880,7 @@ impl<'a> Default for DiscountsDataParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BillingThresholdsParam { /// Monetary threshold that triggers the subscription to advance to a new billing period #[serde(skip_serializing_if = "Option::is_none")] @@ -5835,6 +5901,7 @@ impl Default for BillingThresholdsParam { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ItemBillingThresholdsParam { /// Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)). pub usage_gte: i64, @@ -5845,6 +5912,7 @@ impl ItemBillingThresholdsParam { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct EuBankTransferParam<'a> { /// The desired country code of the bank account information. /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. @@ -5856,6 +5924,7 @@ impl<'a> EuBankTransferParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct TransferDataSpecs<'a> { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. @@ -5871,6 +5940,7 @@ impl<'a> TransferDataSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BankTransferParam<'a> { /// Configuration for eu_bank_transfer funding type. #[serde(skip_serializing_if = "Option::is_none")] @@ -5892,6 +5962,7 @@ impl<'a> Default for BankTransferParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct InvoicePaymentMethodOptionsParam<'a> { /// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-billing/src/subscription_item/requests.rs b/generated/async-stripe-billing/src/subscription_item/requests.rs index b872777ba..1a0b486b9 100644 --- a/generated/async-stripe-billing/src/subscription_item/requests.rs +++ b/generated/async-stripe-billing/src/subscription_item/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct DeleteSubscriptionItemBuilder { #[serde(skip_serializing_if = "Option::is_none")] clear_usage: Option, @@ -79,6 +80,7 @@ impl<'de> serde::Deserialize<'de> for DeleteSubscriptionItemProrationBehavior { /// Deletes an item from the subscription. /// Removing a subscription item from a subscription will not cancel the subscription. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteSubscriptionItem<'a> { inner: DeleteSubscriptionItemBuilder, item: &'a stripe_shared::SubscriptionItemId, @@ -138,6 +140,7 @@ impl StripeRequest for DeleteSubscriptionItem<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListSubscriptionItemBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -156,6 +159,7 @@ impl<'a> ListSubscriptionItemBuilder<'a> { } /// Returns a list of your subscription items for a given subscription. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListSubscriptionItem<'a> { inner: ListSubscriptionItemBuilder<'a>, } @@ -223,6 +227,7 @@ impl StripeRequest for ListSubscriptionItem<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveSubscriptionItemBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -234,6 +239,7 @@ impl<'a> RetrieveSubscriptionItemBuilder<'a> { } /// Retrieves the subscription item with the given ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveSubscriptionItem<'a> { inner: RetrieveSubscriptionItemBuilder<'a>, item: &'a stripe_shared::SubscriptionItemId, @@ -277,6 +283,7 @@ impl StripeRequest for RetrieveSubscriptionItem<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UsageRecordSummariesSubscriptionItemBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -299,6 +306,7 @@ impl<'a> UsageRecordSummariesSubscriptionItemBuilder<'a> { /// The first list item represents the most current usage period that hasn’t ended yet. /// Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UsageRecordSummariesSubscriptionItem<'a> { inner: UsageRecordSummariesSubscriptionItemBuilder<'a>, subscription_item: &'a stripe_shared::SubscriptionItemId, @@ -377,6 +385,7 @@ impl StripeRequest for UsageRecordSummariesSubscriptionItem<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateSubscriptionItemBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] billing_thresholds: Option, @@ -503,6 +512,7 @@ impl<'de> serde::Deserialize<'de> for CreateSubscriptionItemPaymentBehavior { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionItemPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -543,6 +553,7 @@ impl<'a> CreateSubscriptionItemPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionItemPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: CreateSubscriptionItemPriceDataRecurringInterval, @@ -745,6 +756,7 @@ impl<'de> serde::Deserialize<'de> for CreateSubscriptionItemProrationBehavior { } /// Adds a new item to an existing subscription. No existing items will be changed or replaced. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionItem<'a> { inner: CreateSubscriptionItemBuilder<'a>, } @@ -870,6 +882,7 @@ impl StripeRequest for CreateSubscriptionItem<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateSubscriptionItemBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] billing_thresholds: Option, @@ -997,6 +1010,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSubscriptionItemPaymentBehavior { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionItemPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -1037,6 +1051,7 @@ impl<'a> UpdateSubscriptionItemPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionItemPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: UpdateSubscriptionItemPriceDataRecurringInterval, @@ -1239,6 +1254,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSubscriptionItemProrationBehavior { } /// Updates the plan or quantity of an item on a current subscription. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionItem<'a> { inner: UpdateSubscriptionItemBuilder<'a>, item: &'a stripe_shared::SubscriptionItemId, @@ -1374,6 +1390,7 @@ impl StripeRequest for UpdateSubscriptionItem<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ItemBillingThresholdsParam { /// Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)). pub usage_gte: i64, @@ -1384,6 +1401,7 @@ impl ItemBillingThresholdsParam { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DiscountsDataParam<'a> { /// ID of the coupon to create a new discount for. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-billing/src/subscription_schedule/requests.rs b/generated/async-stripe-billing/src/subscription_schedule/requests.rs index 9c2bde00d..076819f06 100644 --- a/generated/async-stripe-billing/src/subscription_schedule/requests.rs +++ b/generated/async-stripe-billing/src/subscription_schedule/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListSubscriptionScheduleBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] canceled_at: Option, @@ -43,6 +44,7 @@ impl<'a> ListSubscriptionScheduleBuilder<'a> { } /// Retrieves the list of your subscription schedules. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListSubscriptionSchedule<'a> { inner: ListSubscriptionScheduleBuilder<'a>, } @@ -145,6 +147,7 @@ impl StripeRequest for ListSubscriptionSchedule<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveSubscriptionScheduleBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -157,6 +160,7 @@ impl<'a> RetrieveSubscriptionScheduleBuilder<'a> { /// Retrieves the details of an existing subscription schedule. /// You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveSubscriptionSchedule<'a> { inner: RetrieveSubscriptionScheduleBuilder<'a>, schedule: &'a stripe_shared::SubscriptionScheduleId, @@ -200,6 +204,7 @@ impl StripeRequest for RetrieveSubscriptionSchedule<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateSubscriptionScheduleBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] customer: Option<&'a str>, @@ -234,6 +239,7 @@ impl<'a> CreateSubscriptionScheduleBuilder<'a> { } /// Object representing the subscription schedule's default settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionScheduleDefaultSettings<'a> { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. @@ -301,6 +307,7 @@ impl<'a> Default for CreateSubscriptionScheduleDefaultSettings<'a> { } /// Default settings for automatic tax computation. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionScheduleDefaultSettingsAutomaticTax<'a> { /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -319,6 +326,7 @@ impl<'a> CreateSubscriptionScheduleDefaultSettingsAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionScheduleDefaultSettingsAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -511,6 +519,7 @@ impl<'de> serde::Deserialize<'de> for CreateSubscriptionScheduleDefaultSettingsC } /// All invoices will be billed using the specified settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionScheduleDefaultSettingsInvoiceSettings<'a> { /// The account tax IDs associated with the subscription schedule. /// Will be set on invoices generated by the subscription schedule. @@ -538,6 +547,7 @@ impl<'a> Default for CreateSubscriptionScheduleDefaultSettingsInvoiceSettings<'a /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionScheduleDefaultSettingsInvoiceSettingsIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -611,6 +621,7 @@ impl<'de> serde::Deserialize<'de> /// Each phase can be customized to have different durations, plans, and coupons. /// If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionSchedulePhases<'a> { /// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. /// You may pass up to 20 items. @@ -738,6 +749,7 @@ impl<'a> CreateSubscriptionSchedulePhases<'a> { /// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. /// You may pass up to 20 items. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionSchedulePhasesAddInvoiceItems<'a> { /// The coupons to redeem into discounts for the item. #[serde(skip_serializing_if = "Option::is_none")] @@ -767,6 +779,7 @@ impl<'a> Default for CreateSubscriptionSchedulePhasesAddInvoiceItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionSchedulePhasesAddInvoiceItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -856,6 +869,7 @@ impl<'de> serde::Deserialize<'de> } /// Automatic tax settings for this phase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionSchedulePhasesAutomaticTax<'a> { /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -874,6 +888,7 @@ impl<'a> CreateSubscriptionSchedulePhasesAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionSchedulePhasesAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1068,6 +1083,7 @@ impl<'de> serde::Deserialize<'de> for CreateSubscriptionSchedulePhasesCollection } /// All invoices will be billed using the specified settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionSchedulePhasesInvoiceSettings<'a> { /// 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. @@ -1095,6 +1111,7 @@ impl<'a> Default for CreateSubscriptionSchedulePhasesInvoiceSettings<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionSchedulePhasesInvoiceSettingsIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1168,6 +1185,7 @@ impl<'de> serde::Deserialize<'de> for CreateSubscriptionSchedulePhasesInvoiceSet } /// List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionSchedulePhasesItems<'a> { /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// When updating, pass an empty string to remove previously-defined thresholds. @@ -1222,6 +1240,7 @@ impl<'a> Default for CreateSubscriptionSchedulePhasesItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionSchedulePhasesItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -1262,6 +1281,7 @@ impl<'a> CreateSubscriptionSchedulePhasesItemsPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionSchedulePhasesItemsPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: CreateSubscriptionSchedulePhasesItemsPriceDataRecurringInterval, @@ -1474,6 +1494,7 @@ impl<'de> serde::Deserialize<'de> for CreateSubscriptionSchedulePhasesProrationB /// We recommend using `now` so that it starts the subscription immediately. /// You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreateSubscriptionScheduleStartDate { Timestamp(stripe_types::Timestamp), @@ -1482,6 +1503,7 @@ pub enum CreateSubscriptionScheduleStartDate { /// Creates a new subscription schedule object. /// Each customer can have up to 500 active or scheduled subscriptions. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionSchedule<'a> { inner: CreateSubscriptionScheduleBuilder<'a>, } @@ -1581,6 +1603,7 @@ impl StripeRequest for CreateSubscriptionSchedule<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateSubscriptionScheduleBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] default_settings: Option>, @@ -1609,6 +1632,7 @@ impl<'a> UpdateSubscriptionScheduleBuilder<'a> { } /// Object representing the subscription schedule's default settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionScheduleDefaultSettings<'a> { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. @@ -1676,6 +1700,7 @@ impl<'a> Default for UpdateSubscriptionScheduleDefaultSettings<'a> { } /// Default settings for automatic tax computation. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionScheduleDefaultSettingsAutomaticTax<'a> { /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -1694,6 +1719,7 @@ impl<'a> UpdateSubscriptionScheduleDefaultSettingsAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionScheduleDefaultSettingsAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1886,6 +1912,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSubscriptionScheduleDefaultSettingsC } /// All invoices will be billed using the specified settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionScheduleDefaultSettingsInvoiceSettings<'a> { /// The account tax IDs associated with the subscription schedule. /// Will be set on invoices generated by the subscription schedule. @@ -1913,6 +1940,7 @@ impl<'a> Default for UpdateSubscriptionScheduleDefaultSettingsInvoiceSettings<'a /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionScheduleDefaultSettingsInvoiceSettingsIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1987,6 +2015,7 @@ impl<'de> serde::Deserialize<'de> /// If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. /// Note that past phases can be omitted. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionSchedulePhases<'a> { /// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. /// You may pass up to 20 items. @@ -2119,6 +2148,7 @@ impl<'a> UpdateSubscriptionSchedulePhases<'a> { /// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. /// You may pass up to 20 items. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionSchedulePhasesAddInvoiceItems<'a> { /// The coupons to redeem into discounts for the item. #[serde(skip_serializing_if = "Option::is_none")] @@ -2148,6 +2178,7 @@ impl<'a> Default for UpdateSubscriptionSchedulePhasesAddInvoiceItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionSchedulePhasesAddInvoiceItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -2237,6 +2268,7 @@ impl<'de> serde::Deserialize<'de> } /// Automatic tax settings for this phase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionSchedulePhasesAutomaticTax<'a> { /// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. pub enabled: bool, @@ -2255,6 +2287,7 @@ impl<'a> UpdateSubscriptionSchedulePhasesAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionSchedulePhasesAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -2450,6 +2483,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSubscriptionSchedulePhasesCollection /// The date at which this phase of the subscription schedule ends. /// If set, `iterations` must not be set. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpdateSubscriptionSchedulePhasesEndDate { Timestamp(stripe_types::Timestamp), @@ -2457,6 +2491,7 @@ pub enum UpdateSubscriptionSchedulePhasesEndDate { } /// All invoices will be billed using the specified settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionSchedulePhasesInvoiceSettings<'a> { /// 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. @@ -2484,6 +2519,7 @@ impl<'a> Default for UpdateSubscriptionSchedulePhasesInvoiceSettings<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionSchedulePhasesInvoiceSettingsIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -2557,6 +2593,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSubscriptionSchedulePhasesInvoiceSet } /// List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionSchedulePhasesItems<'a> { /// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. /// When updating, pass an empty string to remove previously-defined thresholds. @@ -2611,6 +2648,7 @@ impl<'a> Default for UpdateSubscriptionSchedulePhasesItems<'a> { } /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionSchedulePhasesItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -2651,6 +2689,7 @@ impl<'a> UpdateSubscriptionSchedulePhasesItemsPriceData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionSchedulePhasesItemsPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: UpdateSubscriptionSchedulePhasesItemsPriceDataRecurringInterval, @@ -2862,6 +2901,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSubscriptionSchedulePhasesProrationB /// The date at which this phase of the subscription schedule starts or `now`. /// Must be set on the first phase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpdateSubscriptionSchedulePhasesStartDate { Timestamp(stripe_types::Timestamp), @@ -2870,6 +2910,7 @@ pub enum UpdateSubscriptionSchedulePhasesStartDate { /// Sets the phase to trialing from the start date to this date. /// Must be before the phase end date, can not be combined with `trial`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpdateSubscriptionSchedulePhasesTrialEnd { Timestamp(stripe_types::Timestamp), @@ -2939,6 +2980,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSubscriptionScheduleProrationBehavio } /// Updates an existing subscription schedule. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSubscriptionSchedule<'a> { inner: UpdateSubscriptionScheduleBuilder<'a>, schedule: &'a stripe_shared::SubscriptionScheduleId, @@ -3026,6 +3068,7 @@ impl StripeRequest for UpdateSubscriptionSchedule<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CancelSubscriptionScheduleBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -3042,6 +3085,7 @@ impl<'a> CancelSubscriptionScheduleBuilder<'a> { /// Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). /// A subscription schedule can only be canceled if its status is `not_started` or `active`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CancelSubscriptionSchedule<'a> { inner: CancelSubscriptionScheduleBuilder<'a>, schedule: &'a stripe_shared::SubscriptionScheduleId, @@ -3100,6 +3144,7 @@ impl StripeRequest for CancelSubscriptionSchedule<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ReleaseSubscriptionScheduleBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -3115,6 +3160,7 @@ impl<'a> ReleaseSubscriptionScheduleBuilder<'a> { /// A schedule can only be released if its status is `not_started` or `active`. /// If the subscription schedule is currently associated with a subscription, releasing it will remove its `subscription` property and set the subscription’s ID to the `released_subscription` property. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ReleaseSubscriptionSchedule<'a> { inner: ReleaseSubscriptionScheduleBuilder<'a>, schedule: &'a stripe_shared::SubscriptionScheduleId, @@ -3167,6 +3213,7 @@ impl StripeRequest for ReleaseSubscriptionSchedule<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BillingThresholdsParam { /// Monetary threshold that triggers the subscription to advance to a new billing period #[serde(skip_serializing_if = "Option::is_none")] @@ -3187,6 +3234,7 @@ impl Default for BillingThresholdsParam { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct TransferDataSpecs<'a> { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. @@ -3202,6 +3250,7 @@ impl<'a> TransferDataSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DiscountsDataParam<'a> { /// ID of the coupon to create a new discount for. #[serde(skip_serializing_if = "Option::is_none")] @@ -3224,6 +3273,7 @@ impl<'a> Default for DiscountsDataParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ItemBillingThresholdsParam { /// Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)). pub usage_gte: i64, diff --git a/generated/async-stripe-billing/src/tax_id/requests.rs b/generated/async-stripe-billing/src/tax_id/requests.rs index 663adb43a..2db0cdc3e 100644 --- a/generated/async-stripe-billing/src/tax_id/requests.rs +++ b/generated/async-stripe-billing/src/tax_id/requests.rs @@ -4,6 +4,7 @@ use stripe_client_core::{ /// Deletes an existing `tax_id` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteCustomerTaxId<'a> { customer: &'a stripe_shared::CustomerId, id: &'a str, @@ -43,6 +44,7 @@ impl StripeRequest for DeleteCustomerTaxId<'_> { } /// Deletes an existing account or customer `tax_id` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteIdTaxId<'a> { id: &'a stripe_shared::TaxIdId, } @@ -79,6 +81,7 @@ impl StripeRequest for DeleteIdTaxId<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListCustomerTaxIdBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -96,6 +99,7 @@ impl<'a> ListCustomerTaxIdBuilder<'a> { } /// Returns a list of tax IDs for a customer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListCustomerTaxId<'a> { inner: ListCustomerTaxIdBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -170,6 +174,7 @@ impl StripeRequest for ListCustomerTaxId<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveCustomerTaxIdBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -181,6 +186,7 @@ impl<'a> RetrieveCustomerTaxIdBuilder<'a> { } /// Retrieves the `tax_id` object with the given identifier. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveCustomerTaxId<'a> { inner: RetrieveCustomerTaxIdBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -226,6 +232,7 @@ impl StripeRequest for RetrieveCustomerTaxId<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTaxIdBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -245,6 +252,7 @@ impl<'a> ListTaxIdBuilder<'a> { } /// The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTaxIdOwner<'a> { /// Account the tax ID belongs to. Required when `type=account` #[serde(skip_serializing_if = "Option::is_none")] @@ -324,6 +332,7 @@ impl<'de> serde::Deserialize<'de> for ListTaxIdOwnerType { } /// Returns a list of tax IDs. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTaxId<'a> { inner: ListTaxIdBuilder<'a>, } @@ -400,6 +409,7 @@ impl StripeRequest for ListTaxId<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveIdTaxIdBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -411,6 +421,7 @@ impl<'a> RetrieveIdTaxIdBuilder<'a> { } /// Retrieves an account or customer `tax_id` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveIdTaxId<'a> { inner: RetrieveIdTaxIdBuilder<'a>, id: &'a stripe_shared::TaxIdId, @@ -453,6 +464,7 @@ impl StripeRequest for RetrieveIdTaxId<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateCustomerTaxIdBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -732,6 +744,7 @@ impl<'de> serde::Deserialize<'de> for CreateCustomerTaxIdType { } /// Creates a new `tax_id` object for a customer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCustomerTaxId<'a> { inner: CreateCustomerTaxIdBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -779,6 +792,7 @@ impl StripeRequest for CreateCustomerTaxId<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTaxIdBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -795,6 +809,7 @@ impl<'a> CreateTaxIdBuilder<'a> { } /// The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxIdOwner<'a> { /// Account the tax ID belongs to. Required when `type=account` #[serde(skip_serializing_if = "Option::is_none")] @@ -1139,6 +1154,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxIdType { } /// Creates a new account or customer `tax_id` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxId<'a> { inner: CreateTaxIdBuilder<'a>, } diff --git a/generated/async-stripe-billing/src/test_helpers_test_clock/requests.rs b/generated/async-stripe-billing/src/test_helpers_test_clock/requests.rs index 521fd2a95..7116e7dfb 100644 --- a/generated/async-stripe-billing/src/test_helpers_test_clock/requests.rs +++ b/generated/async-stripe-billing/src/test_helpers_test_clock/requests.rs @@ -4,6 +4,7 @@ use stripe_client_core::{ /// Deletes a test clock. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteTestHelpersTestClock<'a> { test_clock: &'a stripe_shared::TestHelpersTestClockId, } @@ -40,6 +41,7 @@ impl StripeRequest for DeleteTestHelpersTestClock<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTestHelpersTestClockBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -57,6 +59,7 @@ impl<'a> ListTestHelpersTestClockBuilder<'a> { } /// Returns a list of your test clocks. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTestHelpersTestClock<'a> { inner: ListTestHelpersTestClockBuilder<'a>, } @@ -129,6 +132,7 @@ impl StripeRequest for ListTestHelpersTestClock<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTestHelpersTestClockBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -140,6 +144,7 @@ impl<'a> RetrieveTestHelpersTestClockBuilder<'a> { } /// Retrieves a test clock. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTestHelpersTestClock<'a> { inner: RetrieveTestHelpersTestClockBuilder<'a>, test_clock: &'a stripe_shared::TestHelpersTestClockId, @@ -183,6 +188,7 @@ impl StripeRequest for RetrieveTestHelpersTestClock<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTestHelpersTestClockBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -197,6 +203,7 @@ impl<'a> CreateTestHelpersTestClockBuilder<'a> { } /// Creates a new test clock that can be attached to new customers and quotes. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTestHelpersTestClock<'a> { inner: CreateTestHelpersTestClockBuilder<'a>, } @@ -242,6 +249,7 @@ impl StripeRequest for CreateTestHelpersTestClock<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct AdvanceTestHelpersTestClockBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -255,6 +263,7 @@ impl<'a> AdvanceTestHelpersTestClockBuilder<'a> { /// Starts advancing a test clock to a specified time in the future. /// Advancement is done when status changes to `Ready`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct AdvanceTestHelpersTestClock<'a> { inner: AdvanceTestHelpersTestClockBuilder<'a>, test_clock: &'a stripe_shared::TestHelpersTestClockId, diff --git a/generated/async-stripe-billing/src/usage_record/requests.rs b/generated/async-stripe-billing/src/usage_record/requests.rs index 8ed83b2c5..e86111612 100644 --- a/generated/async-stripe-billing/src/usage_record/requests.rs +++ b/generated/async-stripe-billing/src/usage_record/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateSubscriptionItemUsageRecordBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] action: Option, @@ -81,6 +82,7 @@ impl<'de> serde::Deserialize<'de> for CreateSubscriptionItemUsageRecordAction { /// When passing `"now"`, Stripe records usage for the current time. /// Default is `"now"` if a value is not provided. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreateSubscriptionItemUsageRecordTimestamp { Now, @@ -99,6 +101,7 @@ pub enum CreateSubscriptionItemUsageRecordTimestamp { /// The default pricing model for metered billing is [per-unit pricing](https://stripe.com/docs/api/plans/object#plan_object-billing_scheme). /// For finer granularity, you can configure metered billing to have a [tiered pricing](https://stripe.com/docs/billing/subscriptions/tiers) model. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSubscriptionItemUsageRecord<'a> { inner: CreateSubscriptionItemUsageRecordBuilder<'a>, subscription_item: &'a stripe_shared::SubscriptionItemId, diff --git a/generated/async-stripe-billing/src/usage_record/types.rs b/generated/async-stripe-billing/src/usage_record/types.rs index dd9136ec9..a2dea369c 100644 --- a/generated/async-stripe-billing/src/usage_record/types.rs +++ b/generated/async-stripe-billing/src/usage_record/types.rs @@ -8,6 +8,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct UsageRecord { /// Unique identifier for the object. diff --git a/generated/async-stripe-billing/src/usage_record_summary/requests.rs b/generated/async-stripe-billing/src/usage_record_summary/requests.rs index 2c2b9ba23..0a5e7a4cf 100644 --- a/generated/async-stripe-billing/src/usage_record_summary/requests.rs +++ b/generated/async-stripe-billing/src/usage_record_summary/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListSubscriptionItemUsageRecordSummaryBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -25,6 +26,7 @@ impl<'a> ListSubscriptionItemUsageRecordSummaryBuilder<'a> { /// The first list item represents the most current usage period that hasn’t ended yet. /// Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListSubscriptionItemUsageRecordSummary<'a> { inner: ListSubscriptionItemUsageRecordSummaryBuilder<'a>, subscription_item: &'a stripe_shared::SubscriptionItemId, diff --git a/generated/async-stripe-checkout/Cargo.toml b/generated/async-stripe-checkout/Cargo.toml index 2e430bd38..302665751 100644 --- a/generated/async-stripe-checkout/Cargo.toml +++ b/generated/async-stripe-checkout/Cargo.toml @@ -28,7 +28,9 @@ async-stripe-shared = {path = "../../generated/async-stripe-shared"} [features] serialize = ["async-stripe-types/serialize","async-stripe-shared/serialize"] +serialize_extra = ["async-stripe-types/serialize_extra","async-stripe-shared/serialize_extra"] deserialize = ["async-stripe-types/deserialize","async-stripe-shared/deserialize", "dep:serde_json"] +deserialize_extra = ["async-stripe-types/deserialize_extra","async-stripe-shared/deserialize_extra", "dep:serde_json"] checkout_session = [] full = ["checkout_session"] diff --git a/generated/async-stripe-checkout/src/checkout_session/requests.rs b/generated/async-stripe-checkout/src/checkout_session/requests.rs index 2fbd0104b..df01fe187 100644 --- a/generated/async-stripe-checkout/src/checkout_session/requests.rs +++ b/generated/async-stripe-checkout/src/checkout_session/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListCheckoutSessionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -46,6 +47,7 @@ impl<'a> ListCheckoutSessionBuilder<'a> { } /// Only return the Checkout Sessions for the Customer details specified. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListCheckoutSessionCustomerDetails<'a> { /// Customer's email address. pub email: &'a str, @@ -57,6 +59,7 @@ impl<'a> ListCheckoutSessionCustomerDetails<'a> { } /// Returns a list of Checkout Sessions. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListCheckoutSession<'a> { inner: ListCheckoutSessionBuilder<'a>, } @@ -167,6 +170,7 @@ impl StripeRequest for ListCheckoutSession<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveCheckoutSessionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -178,6 +182,7 @@ impl<'a> RetrieveCheckoutSessionBuilder<'a> { } /// Retrieves a Session object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveCheckoutSession<'a> { inner: RetrieveCheckoutSessionBuilder<'a>, session: &'a stripe_checkout::CheckoutSessionId, @@ -221,6 +226,7 @@ impl StripeRequest for RetrieveCheckoutSession<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListLineItemsCheckoutSessionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -239,6 +245,7 @@ impl<'a> ListLineItemsCheckoutSessionBuilder<'a> { /// When retrieving a Checkout Session, there is an includable **line_items** property containing the first handful of those items. /// There is also a URL where you can retrieve the full (paginated) list of line items. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListLineItemsCheckoutSession<'a> { inner: ListLineItemsCheckoutSessionBuilder<'a>, session: &'a stripe_checkout::CheckoutSessionId, @@ -314,6 +321,7 @@ impl StripeRequest for ListLineItemsCheckoutSession<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateCheckoutSessionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] after_expiration: Option, @@ -444,6 +452,7 @@ impl<'a> CreateCheckoutSessionBuilder<'a> { } /// Configure actions after a Checkout Session has expired. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionAfterExpiration { /// Configure a Checkout Session that can be used to recover an expired session. #[serde(skip_serializing_if = "Option::is_none")] @@ -461,6 +470,7 @@ impl Default for CreateCheckoutSessionAfterExpiration { } /// Configure a Checkout Session that can be used to recover an expired session. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionAfterExpirationRecovery { /// Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` #[serde(skip_serializing_if = "Option::is_none")] @@ -477,6 +487,7 @@ impl CreateCheckoutSessionAfterExpirationRecovery { } /// Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionAutomaticTax<'a> { /// Set to true to enable automatic taxes. pub enabled: bool, @@ -495,6 +506,7 @@ impl<'a> CreateCheckoutSessionAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -568,6 +580,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionAutomaticTaxLiability } /// Configure fields for the Checkout Session to gather active consent from customers. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionConsentCollection { /// Determines the display of payment method reuse agreement text in the UI. /// If set to `hidden`, it will hide legal text related to the reuse of a payment method. @@ -598,6 +611,7 @@ impl Default for CreateCheckoutSessionConsentCollection { /// Determines the display of payment method reuse agreement text in the UI. /// If set to `hidden`, it will hide legal text related to the reuse of a payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement { /// Determines the position and visibility of the payment method reuse agreement in the UI. /// When set to `auto`, Stripe's. @@ -800,6 +814,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionConsentCollectionTerm /// Collect additional information from your customer using custom fields. /// Up to 3 fields are supported. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionCustomFields<'a> { /// Configuration for `type=dropdown` fields. #[serde(skip_serializing_if = "Option::is_none")] @@ -834,6 +849,7 @@ impl<'a> CreateCheckoutSessionCustomFields<'a> { } /// Configuration for `type=dropdown` fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionCustomFieldsDropdown<'a> { /// The options available for the customer to select. Up to 200 options allowed. pub options: &'a [CreateCheckoutSessionCustomFieldsDropdownOptions<'a>], @@ -845,6 +861,7 @@ impl<'a> CreateCheckoutSessionCustomFieldsDropdown<'a> { } /// The options available for the customer to select. Up to 200 options allowed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionCustomFieldsDropdownOptions<'a> { /// The label for the option, displayed to the customer. Up to 100 characters. pub label: &'a str, @@ -859,6 +876,7 @@ impl<'a> CreateCheckoutSessionCustomFieldsDropdownOptions<'a> { } /// The label for the field, displayed to the customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionCustomFieldsLabel<'a> { /// Custom text for the label, displayed to the customer. Up to 50 characters. pub custom: &'a str, @@ -926,6 +944,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionCustomFieldsLabelType } /// Configuration for `type=numeric` fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionCustomFieldsNumeric { /// The maximum character length constraint for the customer's input. #[serde(skip_serializing_if = "Option::is_none")] @@ -946,6 +965,7 @@ impl Default for CreateCheckoutSessionCustomFieldsNumeric { } /// Configuration for `type=text` fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionCustomFieldsText { /// The maximum character length constraint for the customer's input. #[serde(skip_serializing_if = "Option::is_none")] @@ -1025,6 +1045,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionCustomFieldsType { } /// Display additional text for your customers using custom text. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionCustomText<'a> { /// Custom text that should be displayed after the payment confirmation button. #[serde(skip_serializing_if = "Option::is_none")] @@ -1122,6 +1143,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionCustomerCreation { /// Controls what fields on Customer can be updated by the Checkout Session. /// Can only be provided when `customer` is provided. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionCustomerUpdate { /// Describes whether Checkout saves the billing address onto `customer.address`. /// To always collect a full billing address, use `billing_address_collection`. Defaults to `never`. @@ -1319,6 +1341,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionCustomerUpdateShippin } /// The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionDiscounts<'a> { /// The ID of the coupon to apply to this Session. #[serde(skip_serializing_if = "Option::is_none")] @@ -1339,6 +1362,7 @@ impl<'a> Default for CreateCheckoutSessionDiscounts<'a> { } /// Generate a post-purchase Invoice for one-time payments. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionInvoiceCreation<'a> { /// Set to `true` to enable invoice creation. pub enabled: bool, @@ -1353,6 +1377,7 @@ impl<'a> CreateCheckoutSessionInvoiceCreation<'a> { } /// Parameters passed when creating invoices for payment-mode Checkout Sessions. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionInvoiceCreationInvoiceData<'a> { /// The account tax IDs associated with the invoice. #[serde(skip_serializing_if = "Option::is_none")] @@ -1401,6 +1426,7 @@ impl<'a> Default for CreateCheckoutSessionInvoiceCreationInvoiceData<'a> { } /// Default custom fields to be displayed on invoices for this customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionInvoiceCreationInvoiceDataCustomFields<'a> { /// The name of the custom field. This may be up to 40 characters. pub name: &'a str, @@ -1415,6 +1441,7 @@ impl<'a> CreateCheckoutSessionInvoiceCreationInvoiceDataCustomFields<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionInvoiceCreationInvoiceDataIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1488,6 +1515,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionInvoiceCreationInvoic } /// Default options for invoice PDF rendering for this customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionInvoiceCreationInvoiceDataRenderingOptions { /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// One of `exclude_tax` or `include_inclusive_tax`. @@ -1582,6 +1610,7 @@ impl<'de> serde::Deserialize<'de> /// For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. /// Line items with one-time Prices will be on the initial invoice only. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionLineItems<'a> { /// When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. #[serde(skip_serializing_if = "Option::is_none")] @@ -1625,6 +1654,7 @@ impl<'a> Default for CreateCheckoutSessionLineItems<'a> { } /// When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionLineItemsAdjustableQuantity { /// Set to true if the quantity can be adjusted to any non-negative integer. /// By default customers will be able to remove the line item by setting the quantity to 0. @@ -1647,6 +1677,7 @@ impl CreateCheckoutSessionLineItemsAdjustableQuantity { /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. /// One of `price` or `price_data` is required. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionLineItemsPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -1691,6 +1722,7 @@ impl<'a> CreateCheckoutSessionLineItemsPriceData<'a> { } /// Data used to generate a new product object inline. One of `product` or `product_data` is required. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionLineItemsPriceDataProductData<'a> { /// The product's description, meant to be displayable to the customer. /// Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. @@ -1718,6 +1750,7 @@ impl<'a> CreateCheckoutSessionLineItemsPriceDataProductData<'a> { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionLineItemsPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: CreateCheckoutSessionLineItemsPriceDataRecurringInterval, @@ -1862,6 +1895,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionLineItemsPriceDataTax } /// A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentIntentData<'a> { /// 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. /// The amount of the application fee collected will be capped at the total payment amount. @@ -2095,6 +2129,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionPaymentIntentDataSetu } /// Shipping information for this payment. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentIntentDataShipping<'a> { /// Shipping address. pub address: CreateCheckoutSessionPaymentIntentDataShippingAddress<'a>, @@ -2121,6 +2156,7 @@ impl<'a> CreateCheckoutSessionPaymentIntentDataShipping<'a> { } /// Shipping address. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentIntentDataShippingAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -2148,6 +2184,7 @@ impl<'a> CreateCheckoutSessionPaymentIntentDataShippingAddress<'a> { /// The parameters used to automatically create a Transfer when the payment succeeds. /// For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentIntentDataTransferData<'a> { /// The amount that will be transferred automatically when a charge succeeds. #[serde(skip_serializing_if = "Option::is_none")] @@ -2229,6 +2266,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionPaymentMethodCollecti } /// This parameter allows you to set some attributes on the payment method created during a Checkout session. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodData { /// Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. /// Only set this field if you wish to override the allow_redisplay value determined by Checkout. @@ -2309,6 +2347,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionPaymentMethodDataAllo } /// Payment-method-specific configuration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptions<'a> { /// contains details about the ACSS Debit payment method options. #[serde(skip_serializing_if = "Option::is_none")] @@ -2452,6 +2491,7 @@ impl<'a> Default for CreateCheckoutSessionPaymentMethodOptions<'a> { } /// contains details about the ACSS Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsAcssDebit<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -2553,6 +2593,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionPaymentMethodOptionsA } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsAcssDebitMandateOptions<'a> { /// A URL for custom mandate text to render during confirmation step. /// The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,. @@ -2914,6 +2955,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Affirm payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsAffirm { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -2998,6 +3040,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Afterpay Clearpay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsAfterpayClearpay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -3085,6 +3128,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Alipay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsAlipay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -3169,6 +3213,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the AmazonPay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsAmazonPay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -3253,6 +3298,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the AU Becs Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsAuBecsDebit { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -3334,6 +3380,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Bacs Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsBacsDebit { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -3421,6 +3468,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Bancontact payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsBancontact { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -3502,6 +3550,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Boleto payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsBoleto { /// The number of calendar days before a Boleto voucher expires. /// For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. @@ -3596,6 +3645,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Card payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsCard<'a> { /// Installment options for card payments #[serde(skip_serializing_if = "Option::is_none")] @@ -3646,6 +3696,7 @@ impl<'a> Default for CreateCheckoutSessionPaymentMethodOptionsCard<'a> { } /// Installment options for card payments #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsCardInstallments { /// Setting to true enables installments for this Checkout Session. /// Setting to false will prevent any installment plan from applying to a payment. @@ -3791,6 +3842,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Cashapp Pay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsCashapp { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -3878,6 +3930,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Customer Balance payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsCustomerBalance<'a> { /// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. #[serde(skip_serializing_if = "Option::is_none")] @@ -3909,6 +3962,7 @@ impl<'a> Default for CreateCheckoutSessionPaymentMethodOptionsCustomerBalance<'a } /// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransfer<'a> { /// Configuration for eu_bank_transfer funding type. #[serde(skip_serializing_if = "Option::is_none")] @@ -3933,6 +3987,7 @@ impl<'a> CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransfer<'a } /// Configuration for eu_bank_transfer funding type. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer<'a> { /// The desired country code of the bank account information. /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. @@ -4212,6 +4267,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the EPS payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsEps { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -4294,6 +4350,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionPaymentMethodOptionsE } /// contains details about the FPX payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsFpx { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -4376,6 +4433,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionPaymentMethodOptionsF } /// contains details about the Giropay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsGiropay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -4457,6 +4515,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Grabpay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsGrabpay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -4538,6 +4597,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Ideal payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsIdeal { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -4622,6 +4682,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Klarna payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsKlarna { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -4706,6 +4767,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Konbini payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsKonbini { /// The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. /// For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. @@ -4792,6 +4854,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Link payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsLink { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -4879,6 +4942,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Mobilepay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsMobilepay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -4960,6 +5024,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the OXXO payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsOxxo { /// The number of calendar days before an OXXO voucher expires. /// For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. @@ -5048,6 +5113,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the P24 payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsP24 { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -5133,6 +5199,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionPaymentMethodOptionsP } /// contains details about the PayNow payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsPaynow { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -5217,6 +5284,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the PayPal payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsPaypal<'a> { /// Controls when the funds will be captured from the customer's account. #[serde(skip_serializing_if = "Option::is_none")] @@ -5499,6 +5567,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Pix payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsPix { /// The number of seconds (between 10 and 1209600) after which Pix payment will expire. /// Defaults to 86400 seconds. @@ -5517,6 +5586,7 @@ impl Default for CreateCheckoutSessionPaymentMethodOptionsPix { } /// contains details about the RevolutPay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsRevolutPay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -5601,6 +5671,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Sepa Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsSepaDebit { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -5688,6 +5759,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Sofort payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsSofort { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -5772,6 +5844,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the Swish payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsSwish<'a> { /// The order reference that will be displayed to customers in the Swish application. /// Defaults to the `id` of the Payment Intent. @@ -5790,6 +5863,7 @@ impl<'a> Default for CreateCheckoutSessionPaymentMethodOptionsSwish<'a> { } /// contains details about the Us Bank Account payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsUsBankAccount<'a> { /// Additional fields for Financial Connections Session creation #[serde(skip_serializing_if = "Option::is_none")] @@ -5821,6 +5895,7 @@ impl<'a> Default for CreateCheckoutSessionPaymentMethodOptionsUsBankAccount<'a> } /// Additional fields for Financial Connections Session creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsUsBankAccountFinancialConnections<'a> { /// The list of permissions to request. /// If this parameter is passed, the `payment_method` permission must be included. @@ -6109,6 +6184,7 @@ impl<'de> serde::Deserialize<'de> } /// contains details about the WeChat Pay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPaymentMethodOptionsWechatPay<'a> { /// The app ID registered with WeChat Pay. Only required when client is ios or android. #[serde(skip_serializing_if = "Option::is_none")] @@ -6422,6 +6498,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionPaymentMethodTypes { /// before using this feature. /// Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionPhoneNumberCollection { /// Set to `true` to enable phone number collection. pub enabled: bool, @@ -6434,6 +6511,7 @@ impl CreateCheckoutSessionPhoneNumberCollection { /// Controls saved payment method settings for the session. /// Only available in `payment` and `subscription` mode. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionSavedPaymentMethodOptions<'a> { /// Controls which payment methods are eligible to be redisplayed to returning customers. /// Corresponds to `allow_redisplay` on the payment method. @@ -6577,6 +6655,7 @@ impl<'de> serde::Deserialize<'de> } /// A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionSetupIntentData<'a> { /// An arbitrary string attached to the object. Often useful for displaying to users. #[serde(skip_serializing_if = "Option::is_none")] @@ -6603,6 +6682,7 @@ impl<'a> Default for CreateCheckoutSessionSetupIntentData<'a> { } /// When set, provides configuration for Checkout to collect a shipping address from a customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionShippingAddressCollection<'a> { /// An array of two-letter ISO country codes representing which countries Checkout should provide as options for. /// shipping locations. @@ -7385,6 +7465,7 @@ impl<'de> serde::Deserialize<'de> } /// The shipping rate options to apply to this Session. Up to a maximum of 5. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionShippingOptions<'a> { /// The ID of the Shipping Rate to use for this shipping option. #[serde(skip_serializing_if = "Option::is_none")] @@ -7405,6 +7486,7 @@ impl<'a> Default for CreateCheckoutSessionShippingOptions<'a> { } /// Parameters to be passed to Shipping Rate creation for this shipping option #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionShippingOptionsShippingRateData<'a> { /// The estimated range for how long shipping will take, meant to be displayable to the customer. /// This will appear on CheckoutSessions. @@ -7452,6 +7534,7 @@ impl<'a> CreateCheckoutSessionShippingOptionsShippingRateData<'a> { /// The estimated range for how long shipping will take, meant to be displayable to the customer. /// This will appear on CheckoutSessions. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimate { /// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. #[serde(skip_serializing_if = "Option::is_none")] @@ -7474,6 +7557,7 @@ impl Default for CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEst } /// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximum { /// A unit of time. pub unit: CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMaximumUnit, @@ -7563,6 +7647,7 @@ impl<'de> serde::Deserialize<'de> } /// The lower bound of the estimated range. If empty, represents no lower bound. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimum { /// A unit of time. pub unit: CreateCheckoutSessionShippingOptionsShippingRateDataDeliveryEstimateMinimumUnit, @@ -7652,6 +7737,7 @@ impl<'de> serde::Deserialize<'de> } /// Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmount<'a> { /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -7676,6 +7762,7 @@ impl<'a> CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmount<'a> { /// Shipping rates defined in each available currency option. /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionShippingOptionsShippingRateDataFixedAmountCurrencyOptions { /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -7880,6 +7967,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionShippingOptionsShippi } /// A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionSubscriptionData<'a> { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. @@ -7957,6 +8045,7 @@ impl<'a> Default for CreateCheckoutSessionSubscriptionData<'a> { } /// All invoices will be billed using the specified settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionSubscriptionDataInvoiceSettings<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. @@ -7976,6 +8065,7 @@ impl<'a> Default for CreateCheckoutSessionSubscriptionDataInvoiceSettings<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionSubscriptionDataInvoiceSettingsIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -8110,6 +8200,7 @@ impl<'de> serde::Deserialize<'de> for CreateCheckoutSessionSubscriptionDataProra } /// If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionSubscriptionDataTransferData<'a> { /// A non-negative decimal between 0 and 100, with at most two decimal places. /// This represents the percentage of the subscription invoice total that will be transferred to the destination account. @@ -8126,6 +8217,7 @@ impl<'a> CreateCheckoutSessionSubscriptionDataTransferData<'a> { } /// Settings related to subscription trials. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionSubscriptionDataTrialSettings { /// Defines how the subscription should behave when the user's free trial ends. pub end_behavior: CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehavior, @@ -8139,6 +8231,7 @@ impl CreateCheckoutSessionSubscriptionDataTrialSettings { } /// Defines how the subscription should behave when the user's free trial ends. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionSubscriptionDataTrialSettingsEndBehavior { /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. pub missing_payment_method: @@ -8220,6 +8313,7 @@ impl<'de> serde::Deserialize<'de> } /// Controls tax ID collection settings for the session. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSessionTaxIdCollection { /// Set to true to enable Tax ID collection. pub enabled: bool, @@ -8231,6 +8325,7 @@ impl CreateCheckoutSessionTaxIdCollection { } /// Creates a Session object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCheckoutSession<'a> { inner: CreateCheckoutSessionBuilder<'a>, } @@ -8604,6 +8699,7 @@ impl StripeRequest for CreateCheckoutSession<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ExpireCheckoutSessionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -8617,6 +8713,7 @@ impl<'a> ExpireCheckoutSessionBuilder<'a> { /// /// After it expires, a customer can’t complete a Session and customers loading the Session see a message saying the Session is expired. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ExpireCheckoutSession<'a> { inner: ExpireCheckoutSessionBuilder<'a>, session: &'a stripe_checkout::CheckoutSessionId, @@ -8661,6 +8758,7 @@ impl StripeRequest for ExpireCheckoutSession<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CustomTextPositionParam<'a> { /// Text may be up to 1200 characters in length. pub message: &'a str, diff --git a/generated/async-stripe-checkout/src/checkout_session/types.rs b/generated/async-stripe-checkout/src/checkout_session/types.rs index 2c56434ac..f3b5abe65 100644 --- a/generated/async-stripe-checkout/src/checkout_session/types.rs +++ b/generated/async-stripe-checkout/src/checkout_session/types.rs @@ -15,6 +15,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct CheckoutSession { /// When set, provides configuration for actions to take if this Checkout Session expires. diff --git a/generated/async-stripe-connect/Cargo.toml b/generated/async-stripe-connect/Cargo.toml index 8f4e1b5eb..532a1877b 100644 --- a/generated/async-stripe-connect/Cargo.toml +++ b/generated/async-stripe-connect/Cargo.toml @@ -28,7 +28,9 @@ async-stripe-shared = {path = "../../generated/async-stripe-shared"} [features] serialize = ["async-stripe-types/serialize","async-stripe-shared/serialize"] +serialize_extra = ["async-stripe-types/serialize_extra","async-stripe-shared/serialize_extra"] deserialize = ["async-stripe-types/deserialize","async-stripe-shared/deserialize", "dep:serde_json"] +deserialize_extra = ["async-stripe-types/deserialize_extra","async-stripe-shared/deserialize_extra", "dep:serde_json"] account = [] account_link = [] account_session = [] diff --git a/generated/async-stripe-connect/src/account/requests.rs b/generated/async-stripe-connect/src/account/requests.rs index 963c5e00c..1e023d81a 100644 --- a/generated/async-stripe-connect/src/account/requests.rs +++ b/generated/async-stripe-connect/src/account/requests.rs @@ -11,6 +11,7 @@ use stripe_client_core::{ /// /// If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteAccount<'a> { account: &'a stripe_shared::AccountId, } @@ -47,6 +48,7 @@ impl StripeRequest for DeleteAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveForMyAccountAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -58,6 +60,7 @@ impl<'a> RetrieveForMyAccountAccountBuilder<'a> { } /// Retrieves the details of an account. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveForMyAccountAccount<'a> { inner: RetrieveForMyAccountAccountBuilder<'a>, } @@ -103,6 +106,7 @@ impl StripeRequest for RetrieveForMyAccountAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -123,6 +127,7 @@ impl<'a> ListAccountBuilder<'a> { /// Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). /// If you’re not a platform, the list is empty. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListAccount<'a> { inner: ListAccountBuilder<'a>, } @@ -199,6 +204,7 @@ impl StripeRequest for ListAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -210,6 +216,7 @@ impl<'a> RetrieveAccountBuilder<'a> { } /// Retrieves the details of an account. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveAccount<'a> { inner: RetrieveAccountBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -252,6 +259,7 @@ impl StripeRequest for RetrieveAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CapabilitiesAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -264,6 +272,7 @@ impl<'a> CapabilitiesAccountBuilder<'a> { /// Returns a list of capabilities associated with the account. /// The capabilities are returned sorted by creation date, with the most recent capability appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CapabilitiesAccount<'a> { inner: CapabilitiesAccountBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -318,6 +327,7 @@ impl StripeRequest for CapabilitiesAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct PersonsAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -343,6 +353,7 @@ impl<'a> PersonsAccountBuilder<'a> { } /// Filters on the list of people returned based on the person's relationship to the account's company. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PersonsAccountRelationship { /// A filter on the list of people returned based on whether these people are directors of the account's company. #[serde(skip_serializing_if = "Option::is_none")] @@ -379,6 +390,7 @@ impl Default for PersonsAccountRelationship { /// Returns a list of people associated with the account’s legal entity. /// The people are returned sorted by creation date, with the most recent people appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PersonsAccount<'a> { inner: PersonsAccountBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -458,6 +470,7 @@ impl StripeRequest for PersonsAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] account_token: Option<&'a str>, @@ -522,6 +535,7 @@ impl<'a> CreateAccountBuilder<'a> { /// This field is available for any `business_type`. /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountCompany<'a> { /// The company's primary address. #[serde(skip_serializing_if = "Option::is_none")] @@ -621,6 +635,7 @@ impl<'a> Default for CreateAccountCompany<'a> { } /// The Kana variation of the company's primary address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountCompanyAddressKana<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -664,6 +679,7 @@ impl<'a> Default for CreateAccountCompanyAddressKana<'a> { } /// The Kanji variation of the company's primary address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountCompanyAddressKanji<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -830,6 +846,7 @@ impl<'de> serde::Deserialize<'de> for CreateAccountCompanyStructure { } /// A hash of configuration describing the account controller's attributes. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountController { /// A hash of configuration for who pays Stripe fees for product usage on this account. #[serde(skip_serializing_if = "Option::is_none")] @@ -857,6 +874,7 @@ impl Default for CreateAccountController { } /// A hash of configuration for who pays Stripe fees for product usage on this account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountControllerFees { /// A value indicating the responsible payer of Stripe fees on this account. /// Defaults to `account`. @@ -934,6 +952,7 @@ impl<'de> serde::Deserialize<'de> for CreateAccountControllerFeesPayer { } /// A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountControllerLosses { /// A value indicating who is liable when this account can't pay back negative balances resulting from payments. /// Defaults to `stripe`. @@ -1068,6 +1087,7 @@ impl<'de> serde::Deserialize<'de> for CreateAccountControllerRequirementCollecti } /// A hash of configuration for Stripe-hosted dashboards. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountControllerStripeDashboard { /// Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). /// Defaults to `full`. @@ -1149,6 +1169,7 @@ impl<'de> serde::Deserialize<'de> for CreateAccountControllerStripeDashboardType /// This field is null unless `business_type` is set to `individual`. /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountIndividual<'a> { /// The individual's primary address. #[serde(skip_serializing_if = "Option::is_none")] @@ -1263,6 +1284,7 @@ impl<'a> Default for CreateAccountIndividual<'a> { } /// The Kana variation of the the individual's primary address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountIndividualAddressKana<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -1306,6 +1328,7 @@ impl<'a> Default for CreateAccountIndividualAddressKana<'a> { } /// The Kanji variation of the the individual's primary address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountIndividualAddressKanji<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -1405,6 +1428,7 @@ impl<'de> serde::Deserialize<'de> for CreateAccountIndividualPoliticalExposure { } /// Options for customizing how the account functions within Stripe. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountSettings<'a> { /// Settings specific to Bacs Direct Debit. #[serde(skip_serializing_if = "Option::is_none")] @@ -1448,6 +1472,7 @@ impl<'a> Default for CreateAccountSettings<'a> { } /// Settings specific to the account's payouts. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountSettingsPayouts<'a> { /// A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. /// For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances). @@ -1475,6 +1500,7 @@ impl<'a> Default for CreateAccountSettingsPayouts<'a> { /// Details on when funds from charges are available, and when they are paid out to an external account. /// For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountSettingsPayoutsSchedule { /// The number of days charge funds are held before being paid out. /// May also be set to `minimum`, representing the lowest available value for the account country. @@ -1514,6 +1540,7 @@ impl Default for CreateAccountSettingsPayoutsSchedule { /// The `delay_days` parameter remains at the last configured value if `interval` is `manual`. /// [Learn more about controlling payout delay days](https://docs.stripe.com/connect/manage-payout-schedule). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreateAccountSettingsPayoutsScheduleDelayDays { Minimum, @@ -1725,6 +1752,7 @@ impl<'de> serde::Deserialize<'de> for CreateAccountType { /// Connect Onboarding won’t ask for the prefilled information during account onboarding. /// You can prefill any information on the account. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccount<'a> { inner: CreateAccountBuilder<'a>, } @@ -1878,6 +1906,7 @@ impl StripeRequest for CreateAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] account_token: Option<&'a str>, @@ -1932,6 +1961,7 @@ impl<'a> UpdateAccountBuilder<'a> { /// This field is available for any `business_type`. /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountCompany<'a> { /// The company's primary address. #[serde(skip_serializing_if = "Option::is_none")] @@ -2031,6 +2061,7 @@ impl<'a> Default for UpdateAccountCompany<'a> { } /// The Kana variation of the company's primary address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountCompanyAddressKana<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -2074,6 +2105,7 @@ impl<'a> Default for UpdateAccountCompanyAddressKana<'a> { } /// The Kanji variation of the company's primary address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountCompanyAddressKanji<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -2242,6 +2274,7 @@ impl<'de> serde::Deserialize<'de> for UpdateAccountCompanyStructure { /// This field is null unless `business_type` is set to `individual`. /// Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountIndividual<'a> { /// The individual's primary address. #[serde(skip_serializing_if = "Option::is_none")] @@ -2356,6 +2389,7 @@ impl<'a> Default for UpdateAccountIndividual<'a> { } /// The Kana variation of the the individual's primary address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountIndividualAddressKana<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -2399,6 +2433,7 @@ impl<'a> Default for UpdateAccountIndividualAddressKana<'a> { } /// The Kanji variation of the the individual's primary address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountIndividualAddressKanji<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -2498,6 +2533,7 @@ impl<'de> serde::Deserialize<'de> for UpdateAccountIndividualPoliticalExposure { } /// Options for customizing how the account functions within Stripe. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountSettings<'a> { /// Settings specific to Bacs Direct Debit payments. #[serde(skip_serializing_if = "Option::is_none")] @@ -2545,6 +2581,7 @@ impl<'a> Default for UpdateAccountSettings<'a> { } /// Settings specific to the account's use of Invoices. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountSettingsInvoices<'a> { /// The list of default Account Tax IDs to automatically include on invoices. /// Account Tax IDs get added when an invoice is finalized. @@ -2563,6 +2600,7 @@ impl<'a> Default for UpdateAccountSettingsInvoices<'a> { } /// Settings specific to the account's payouts. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountSettingsPayouts<'a> { /// A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. /// For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances). @@ -2590,6 +2628,7 @@ impl<'a> Default for UpdateAccountSettingsPayouts<'a> { /// Details on when funds from charges are available, and when they are paid out to an external account. /// For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountSettingsPayoutsSchedule { /// The number of days charge funds are held before being paid out. /// May also be set to `minimum`, representing the lowest available value for the account country. @@ -2629,6 +2668,7 @@ impl Default for UpdateAccountSettingsPayoutsSchedule { /// The `delay_days` parameter remains at the last configured value if `interval` is `manual`. /// [Learn more about controlling payout delay days](https://docs.stripe.com/connect/manage-payout-schedule). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpdateAccountSettingsPayoutsScheduleDelayDays { Minimum, @@ -2790,6 +2830,7 @@ impl<'de> serde::Deserialize<'de> for UpdateAccountSettingsPayoutsScheduleWeekly /// Refer to our. /// [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccount<'a> { inner: UpdateAccountBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -2922,6 +2963,7 @@ impl StripeRequest for UpdateAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RejectAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -2938,6 +2980,7 @@ impl<'a> RejectAccountBuilder<'a> { /// Test-mode accounts can be rejected at any time. /// Live-mode accounts can only be rejected after all balances are zero. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RejectAccount<'a> { inner: RejectAccountBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -2982,6 +3025,7 @@ impl StripeRequest for RejectAccount<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct AnnualRevenueSpecs<'a> { /// A non-negative integer representing the amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). pub amount: i64, @@ -2999,6 +3043,7 @@ impl<'a> AnnualRevenueSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct MonthlyEstimatedRevenueSpecs { /// A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). pub amount: i64, @@ -3012,6 +3057,7 @@ impl MonthlyEstimatedRevenueSpecs { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct AddressSpecs<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -3043,6 +3089,7 @@ impl<'a> Default for AddressSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CapabilityParam { /// Passing true requests the capability for the account, if it is not already requested. /// A requested capability may not immediately become active. @@ -3061,6 +3108,7 @@ impl Default for CapabilityParam { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CompanyOwnershipDeclaration<'a> { /// The Unix timestamp marking when the beneficial owner attestation was made. #[serde(skip_serializing_if = "Option::is_none")] @@ -3083,6 +3131,7 @@ impl<'a> Default for CompanyOwnershipDeclaration<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct VerificationDocumentSpecs<'a> { /// The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. /// The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. @@ -3104,6 +3153,7 @@ impl<'a> Default for VerificationDocumentSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DocumentsParam<'a> { /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] @@ -3120,6 +3170,7 @@ impl<'a> Default for DocumentsParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DateOfBirthSpecs { /// The day of birth, between 1 and 31. pub day: i64, @@ -3134,6 +3185,7 @@ impl DateOfBirthSpecs { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct IndividualRelationshipSpecs<'a> { /// 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. @@ -3163,6 +3215,7 @@ impl<'a> Default for IndividualRelationshipSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PersonVerificationDocumentSpecs<'a> { /// The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. /// The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. @@ -3184,6 +3237,7 @@ impl<'a> Default for PersonVerificationDocumentSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BacsDebitPaymentsSpecs<'a> { /// The Bacs Direct Debit Display Name for this account. /// For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. @@ -3205,6 +3259,7 @@ impl<'a> Default for BacsDebitPaymentsSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BrandingSettingsSpecs<'a> { /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. /// Must be square and at least 128px x 128px. @@ -3232,6 +3287,7 @@ impl<'a> Default for BrandingSettingsSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SettingsTermsOfServiceSpecs<'a> { /// The Unix timestamp marking when the account representative accepted the service agreement. #[serde(skip_serializing_if = "Option::is_none")] @@ -3254,6 +3310,7 @@ impl<'a> Default for SettingsTermsOfServiceSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeclineChargeOnSpecs { /// Whether Stripe automatically declines charges with an incorrect ZIP or postal code. /// This setting only applies when a ZIP or postal code is provided and they fail bank verification. @@ -3275,6 +3332,7 @@ impl Default for DeclineChargeOnSpecs { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PaymentsSettingsSpecs<'a> { /// The default text that appears on credit card statements when a charge is made. /// This field prefixes any dynamic `statement_descriptor` specified on the charge. @@ -3302,6 +3360,7 @@ impl<'a> Default for PaymentsSettingsSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct TosAcceptanceSpecs<'a> { /// The Unix timestamp marking when the account representative accepted their service agreement. #[serde(skip_serializing_if = "Option::is_none")] @@ -3327,6 +3386,7 @@ impl<'a> Default for TosAcceptanceSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BusinessProfileSpecs<'a> { /// The applicant's gross annual revenue for its preceding fiscal year. #[serde(skip_serializing_if = "Option::is_none")] @@ -3388,6 +3448,7 @@ impl<'a> Default for BusinessProfileSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CapabilitiesParam { /// The acss_debit_payments capability. #[serde(skip_serializing_if = "Option::is_none")] @@ -3562,6 +3623,7 @@ impl Default for CapabilitiesParam { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct VerificationSpecs<'a> { /// A document verifying the business. #[serde(skip_serializing_if = "Option::is_none")] @@ -3578,6 +3640,7 @@ impl<'a> Default for VerificationSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DocumentsSpecs<'a> { /// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. /// Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check. @@ -3621,6 +3684,7 @@ impl<'a> Default for DocumentsSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PersonVerificationSpecs<'a> { /// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. #[serde(skip_serializing_if = "Option::is_none")] @@ -3640,6 +3704,7 @@ impl<'a> Default for PersonVerificationSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CardIssuingSettingsSpecs<'a> { /// Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://docs.stripe.com/issuing/connect/tos_acceptance). #[serde(skip_serializing_if = "Option::is_none")] @@ -3656,6 +3721,7 @@ impl<'a> Default for CardIssuingSettingsSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CardPaymentsSettingsSpecs<'a> { /// Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. #[serde(skip_serializing_if = "Option::is_none")] @@ -3692,6 +3758,7 @@ impl<'a> Default for CardPaymentsSettingsSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct TreasurySettingsSpecs<'a> { /// Details on the account's acceptance of the Stripe Treasury Services Agreement. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-connect/src/account_link/requests.rs b/generated/async-stripe-connect/src/account_link/requests.rs index daed9987e..7d0361eef 100644 --- a/generated/async-stripe-connect/src/account_link/requests.rs +++ b/generated/async-stripe-connect/src/account_link/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateAccountLinkBuilder<'a> { account: &'a str, #[serde(skip_serializing_if = "Option::is_none")] @@ -88,6 +89,7 @@ impl<'de> serde::Deserialize<'de> for CreateAccountLinkCollect { } /// Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountLinkCollectionOptions { /// Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). /// If you don't specify `collection_options`, the default value is `currently_due`. @@ -276,6 +278,7 @@ impl<'de> serde::Deserialize<'de> for CreateAccountLinkType { } /// Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountLink<'a> { inner: CreateAccountLinkBuilder<'a>, } diff --git a/generated/async-stripe-connect/src/account_link/types.rs b/generated/async-stripe-connect/src/account_link/types.rs index 459afd29b..ff2ba974b 100644 --- a/generated/async-stripe-connect/src/account_link/types.rs +++ b/generated/async-stripe-connect/src/account_link/types.rs @@ -5,6 +5,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct AccountLink { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-connect/src/account_session/requests.rs b/generated/async-stripe-connect/src/account_session/requests.rs index edbbeeb72..8ba76688f 100644 --- a/generated/async-stripe-connect/src/account_session/requests.rs +++ b/generated/async-stripe-connect/src/account_session/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateAccountSessionBuilder<'a> { account: &'a str, components: CreateAccountSessionComponents, @@ -17,6 +18,7 @@ impl<'a> CreateAccountSessionBuilder<'a> { /// Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. /// whether it has been enabled or not). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountSessionComponents { /// Configuration for the account management embedded component. #[serde(skip_serializing_if = "Option::is_none")] @@ -68,6 +70,7 @@ impl Default for CreateAccountSessionComponents { } /// Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountSession<'a> { inner: CreateAccountSessionBuilder<'a>, } @@ -109,6 +112,7 @@ impl StripeRequest for CreateAccountSession<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct AccountFeaturesParam { /// Whether to allow platforms to control bank account collection for their connected accounts. /// This feature can only be false for custom accounts (or accounts where the platform is compliance owner). @@ -127,6 +131,7 @@ impl Default for AccountFeaturesParam { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PayoutsFeaturesParam { /// Whether to allow payout schedule to be changed. /// Default `true` when Stripe owns Loss Liability, default `false` otherwise. @@ -152,6 +157,7 @@ impl Default for PayoutsFeaturesParam { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BaseConfigParam { /// Whether the embedded component is enabled. pub enabled: bool, @@ -166,6 +172,7 @@ impl BaseConfigParam { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PaymentsFeaturesParam { /// Whether to allow capturing and cancelling payment intents. This is `true` by default. #[serde(skip_serializing_if = "Option::is_none")] @@ -198,6 +205,7 @@ impl Default for PaymentsFeaturesParam { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct AccountConfigParam { /// Whether the embedded component is enabled. pub enabled: bool, @@ -211,6 +219,7 @@ impl AccountConfigParam { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PayoutsConfigParam { /// Whether the embedded component is enabled. pub enabled: bool, @@ -224,6 +233,7 @@ impl PayoutsConfigParam { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PaymentsConfigParam { /// Whether the embedded component is enabled. pub enabled: bool, diff --git a/generated/async-stripe-connect/src/account_session/types.rs b/generated/async-stripe-connect/src/account_session/types.rs index 3106dea8a..97475b4b5 100644 --- a/generated/async-stripe-connect/src/account_session/types.rs +++ b/generated/async-stripe-connect/src/account_session/types.rs @@ -8,6 +8,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct AccountSession { /// The ID of the account the AccountSession was created for diff --git a/generated/async-stripe-connect/src/application_fee/requests.rs b/generated/async-stripe-connect/src/application_fee/requests.rs index 7db409737..43a29dc8f 100644 --- a/generated/async-stripe-connect/src/application_fee/requests.rs +++ b/generated/async-stripe-connect/src/application_fee/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListApplicationFeeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] charge: Option<&'a str>, @@ -32,6 +33,7 @@ impl<'a> ListApplicationFeeBuilder<'a> { /// Returns a list of application fees you’ve previously collected. /// The application fees are returned in sorted order, with the most recent fees appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListApplicationFee<'a> { inner: ListApplicationFeeBuilder<'a>, } @@ -113,6 +115,7 @@ impl StripeRequest for ListApplicationFee<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveApplicationFeeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -125,6 +128,7 @@ impl<'a> RetrieveApplicationFeeBuilder<'a> { /// Retrieves the details of an application fee that your account has collected. /// The same information is returned when refunding the application fee. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveApplicationFee<'a> { inner: RetrieveApplicationFeeBuilder<'a>, id: &'a stripe_shared::ApplicationFeeId, diff --git a/generated/async-stripe-connect/src/application_fee_refund/requests.rs b/generated/async-stripe-connect/src/application_fee_refund/requests.rs index 64a3f3fea..17dfffd28 100644 --- a/generated/async-stripe-connect/src/application_fee_refund/requests.rs +++ b/generated/async-stripe-connect/src/application_fee_refund/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveApplicationFeeRefundBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -14,6 +15,7 @@ impl<'a> RetrieveApplicationFeeRefundBuilder<'a> { } /// By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveApplicationFeeRefund<'a> { inner: RetrieveApplicationFeeRefundBuilder<'a>, fee: &'a stripe_shared::ApplicationFeeId, @@ -59,6 +61,7 @@ impl StripeRequest for RetrieveApplicationFeeRefund<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListIdApplicationFeeRefundBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -78,6 +81,7 @@ impl<'a> ListIdApplicationFeeRefundBuilder<'a> { /// Note that the 10 most recent refunds are always available by default on the application fee object. /// If you need more than those 10, you can use this API method and the `limit` and `starting_after` parameters to page through additional refunds. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListIdApplicationFeeRefund<'a> { inner: ListIdApplicationFeeRefundBuilder<'a>, id: &'a stripe_shared::ApplicationFeeId, @@ -153,6 +157,7 @@ impl StripeRequest for ListIdApplicationFeeRefund<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateApplicationFeeRefundBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -169,6 +174,7 @@ impl<'a> UpdateApplicationFeeRefundBuilder<'a> { /// /// This request only accepts metadata as an argument. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateApplicationFeeRefund<'a> { inner: UpdateApplicationFeeRefundBuilder<'a>, fee: &'a stripe_shared::ApplicationFeeId, @@ -222,6 +228,7 @@ impl StripeRequest for UpdateApplicationFeeRefund<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateIdApplicationFeeRefundBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -245,6 +252,7 @@ impl<'a> CreateIdApplicationFeeRefundBuilder<'a> { /// This method will raise an error when called on an already-refunded application fee, /// or when trying to refund more money than is left on an application fee. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIdApplicationFeeRefund<'a> { inner: CreateIdApplicationFeeRefundBuilder<'a>, id: &'a stripe_shared::ApplicationFeeId, diff --git a/generated/async-stripe-connect/src/apps_secret/requests.rs b/generated/async-stripe-connect/src/apps_secret/requests.rs index 982460484..15f402a21 100644 --- a/generated/async-stripe-connect/src/apps_secret/requests.rs +++ b/generated/async-stripe-connect/src/apps_secret/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListAppsSecretBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -22,6 +23,7 @@ impl<'a> ListAppsSecretBuilder<'a> { /// Specifies the scoping of the secret. /// Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListAppsSecretScope<'a> { /// The secret scope type. #[serde(rename = "type")] @@ -93,6 +95,7 @@ impl<'de> serde::Deserialize<'de> for ListAppsSecretScopeType { } /// List all secrets stored on the given scope. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListAppsSecret<'a> { inner: ListAppsSecretBuilder<'a>, } @@ -159,6 +162,7 @@ impl StripeRequest for ListAppsSecret<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct FindAppsSecretBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -173,6 +177,7 @@ impl<'a> FindAppsSecretBuilder<'a> { /// Specifies the scoping of the secret. /// Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct FindAppsSecretScope<'a> { /// The secret scope type. #[serde(rename = "type")] @@ -244,6 +249,7 @@ impl<'de> serde::Deserialize<'de> for FindAppsSecretScopeType { } /// Finds a secret in the secret store by name and scope. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct FindAppsSecret<'a> { inner: FindAppsSecretBuilder<'a>, } @@ -284,6 +290,7 @@ impl StripeRequest for FindAppsSecret<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateAppsSecretBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -301,6 +308,7 @@ impl<'a> CreateAppsSecretBuilder<'a> { /// Specifies the scoping of the secret. /// Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAppsSecretScope<'a> { /// The secret scope type. #[serde(rename = "type")] @@ -372,6 +380,7 @@ impl<'de> serde::Deserialize<'de> for CreateAppsSecretScopeType { } /// Create or replace a secret in the secret store. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAppsSecret<'a> { inner: CreateAppsSecretBuilder<'a>, } @@ -417,6 +426,7 @@ impl StripeRequest for CreateAppsSecret<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct DeleteWhereAppsSecretBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -431,6 +441,7 @@ impl<'a> DeleteWhereAppsSecretBuilder<'a> { /// Specifies the scoping of the secret. /// Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteWhereAppsSecretScope<'a> { /// The secret scope type. #[serde(rename = "type")] @@ -503,6 +514,7 @@ impl<'de> serde::Deserialize<'de> for DeleteWhereAppsSecretScopeType { } /// Deletes a secret from the secret store by name and scope. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteWhereAppsSecret<'a> { inner: DeleteWhereAppsSecretBuilder<'a>, } diff --git a/generated/async-stripe-connect/src/apps_secret/types.rs b/generated/async-stripe-connect/src/apps_secret/types.rs index 157434491..905635926 100644 --- a/generated/async-stripe-connect/src/apps_secret/types.rs +++ b/generated/async-stripe-connect/src/apps_secret/types.rs @@ -12,6 +12,7 @@ /// /// Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects). #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct AppsSecret { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-connect/src/capability/requests.rs b/generated/async-stripe-connect/src/capability/requests.rs index 7a56890a4..2bded0fa7 100644 --- a/generated/async-stripe-connect/src/capability/requests.rs +++ b/generated/async-stripe-connect/src/capability/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListAccountCapabilityBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -15,6 +16,7 @@ impl<'a> ListAccountCapabilityBuilder<'a> { /// Returns a list of capabilities associated with the account. /// The capabilities are returned sorted by creation date, with the most recent capability appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListAccountCapability<'a> { inner: ListAccountCapabilityBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -69,6 +71,7 @@ impl StripeRequest for ListAccountCapability<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveCapabilityBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -80,6 +83,7 @@ impl<'a> RetrieveCapabilityBuilder<'a> { } /// Retrieves information about the specified Account Capability. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveCapability<'a> { inner: RetrieveCapabilityBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -128,6 +132,7 @@ impl StripeRequest for RetrieveCapability<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateCapabilityBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -142,6 +147,7 @@ impl<'a> UpdateCapabilityBuilder<'a> { /// Updates an existing Account Capability. /// Request or remove a capability by updating its `requested` parameter. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCapability<'a> { inner: UpdateCapabilityBuilder<'a>, account: &'a stripe_shared::AccountId, diff --git a/generated/async-stripe-connect/src/country_spec/requests.rs b/generated/async-stripe-connect/src/country_spec/requests.rs index dda39c776..36c8d68f4 100644 --- a/generated/async-stripe-connect/src/country_spec/requests.rs +++ b/generated/async-stripe-connect/src/country_spec/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListCountrySpecBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -20,6 +21,7 @@ impl<'a> ListCountrySpecBuilder<'a> { } /// Lists all Country Spec objects available in the API. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListCountrySpec<'a> { inner: ListCountrySpecBuilder<'a>, } @@ -91,6 +93,7 @@ impl StripeRequest for ListCountrySpec<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveCountrySpecBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -102,6 +105,7 @@ impl<'a> RetrieveCountrySpecBuilder<'a> { } /// Returns a Country Spec for a given Country code. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveCountrySpec<'a> { inner: RetrieveCountrySpecBuilder<'a>, country: &'a stripe_connect::CountrySpecId, diff --git a/generated/async-stripe-connect/src/country_spec/types.rs b/generated/async-stripe-connect/src/country_spec/types.rs index d9d2d1d24..91404fa63 100644 --- a/generated/async-stripe-connect/src/country_spec/types.rs +++ b/generated/async-stripe-connect/src/country_spec/types.rs @@ -7,6 +7,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct CountrySpec { /// The default currency for this country. This applies to both payment methods and bank accounts. diff --git a/generated/async-stripe-connect/src/external_account/requests.rs b/generated/async-stripe-connect/src/external_account/requests.rs index 182c19e5a..3dceb9544 100644 --- a/generated/async-stripe-connect/src/external_account/requests.rs +++ b/generated/async-stripe-connect/src/external_account/requests.rs @@ -4,6 +4,7 @@ use stripe_client_core::{ /// Delete a specified external account for a given account. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteExternalAccount<'a> { account: &'a stripe_shared::AccountId, id: &'a str, @@ -45,6 +46,7 @@ impl StripeRequest for DeleteExternalAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListAccountExternalAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -120,6 +122,7 @@ impl<'de> serde::Deserialize<'de> for ListAccountExternalAccountObject { } /// List external accounts for an account. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListAccountExternalAccount<'a> { inner: ListAccountExternalAccountBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -199,6 +202,7 @@ impl StripeRequest for ListAccountExternalAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveExternalAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -210,6 +214,7 @@ impl<'a> RetrieveExternalAccountBuilder<'a> { } /// Retrieve a specified external account for a given account. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveExternalAccount<'a> { inner: RetrieveExternalAccountBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -258,6 +263,7 @@ impl StripeRequest for RetrieveExternalAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateAccountExternalAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] default_for_currency: Option, @@ -274,6 +280,7 @@ impl<'a> CreateAccountExternalAccountBuilder<'a> { } /// Create an external account for a given account. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountExternalAccount<'a> { inner: CreateAccountExternalAccountBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -330,6 +337,7 @@ impl StripeRequest for CreateAccountExternalAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateExternalAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] account_holder_name: Option<&'a str>, @@ -508,6 +516,7 @@ impl<'de> serde::Deserialize<'de> for UpdateExternalAccountAccountType { } /// Documents that may be submitted to satisfy various informational requests. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateExternalAccountDocuments<'a> { /// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. /// Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check. @@ -528,6 +537,7 @@ impl<'a> Default for UpdateExternalAccountDocuments<'a> { /// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. /// Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateExternalAccountDocumentsBankAccountOwnershipVerification<'a> { /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] @@ -552,6 +562,7 @@ impl<'a> Default for UpdateExternalAccountDocumentsBankAccountOwnershipVerificat /// You can re-enable a disabled bank account by performing an update call without providing any /// arguments or changes. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateExternalAccount<'a> { inner: UpdateExternalAccountBuilder<'a>, account: &'a stripe_shared::AccountId, diff --git a/generated/async-stripe-connect/src/login_link/requests.rs b/generated/async-stripe-connect/src/login_link/requests.rs index 981ff6e68..ffa5026a6 100644 --- a/generated/async-stripe-connect/src/login_link/requests.rs +++ b/generated/async-stripe-connect/src/login_link/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateAccountLoginLinkBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -16,6 +17,7 @@ impl<'a> CreateAccountLoginLinkBuilder<'a> { /// /// **You can only create login links for accounts that use the Express Dashboard and are connected to your platform**. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountLoginLink<'a> { inner: CreateAccountLoginLinkBuilder<'a>, account: &'a stripe_shared::AccountId, diff --git a/generated/async-stripe-connect/src/login_link/types.rs b/generated/async-stripe-connect/src/login_link/types.rs index fb8c73052..bcce2c298 100644 --- a/generated/async-stripe-connect/src/login_link/types.rs +++ b/generated/async-stripe-connect/src/login_link/types.rs @@ -3,6 +3,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct LoginLink { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-connect/src/person/requests.rs b/generated/async-stripe-connect/src/person/requests.rs index 8b3983c87..47be591e0 100644 --- a/generated/async-stripe-connect/src/person/requests.rs +++ b/generated/async-stripe-connect/src/person/requests.rs @@ -6,6 +6,7 @@ use stripe_client_core::{ /// Any person with a relationship for an account can be deleted through the API, except if the person is the `account_opener`. /// If your integration is using the `executive` parameter, you cannot delete the only verified `executive` on file. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeletePerson<'a> { account: &'a stripe_shared::AccountId, person: &'a str, @@ -44,6 +45,7 @@ impl StripeRequest for DeletePerson<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListAccountPersonBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -69,6 +71,7 @@ impl<'a> ListAccountPersonBuilder<'a> { } /// Filters on the list of people returned based on the person's relationship to the account's company. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListAccountPersonRelationship { /// A filter on the list of people returned based on whether these people are directors of the account's company. #[serde(skip_serializing_if = "Option::is_none")] @@ -105,6 +108,7 @@ impl Default for ListAccountPersonRelationship { /// Returns a list of people associated with the account’s legal entity. /// The people are returned sorted by creation date, with the most recent people appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListAccountPerson<'a> { inner: ListAccountPersonBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -184,6 +188,7 @@ impl StripeRequest for ListAccountPerson<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrievePersonBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -195,6 +200,7 @@ impl<'a> RetrievePersonBuilder<'a> { } /// Retrieves an existing person. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrievePerson<'a> { inner: RetrievePersonBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -240,6 +246,7 @@ impl StripeRequest for RetrievePerson<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateAccountPersonBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] additional_tos_acceptances: Option>, @@ -334,6 +341,7 @@ impl<'a> CreateAccountPersonBuilder<'a> { } /// The Kana variation of the person's address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountPersonAddressKana<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -377,6 +385,7 @@ impl<'a> Default for CreateAccountPersonAddressKana<'a> { } /// The Kanji variation of the person's address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountPersonAddressKanji<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -420,6 +429,7 @@ impl<'a> Default for CreateAccountPersonAddressKanji<'a> { } /// Creates a new person. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateAccountPerson<'a> { inner: CreateAccountPersonBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -609,6 +619,7 @@ impl StripeRequest for CreateAccountPerson<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdatePersonBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] additional_tos_acceptances: Option>, @@ -703,6 +714,7 @@ impl<'a> UpdatePersonBuilder<'a> { } /// The Kana variation of the person's address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePersonAddressKana<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -746,6 +758,7 @@ impl<'a> Default for UpdatePersonAddressKana<'a> { } /// The Kanji variation of the person's address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePersonAddressKanji<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -789,6 +802,7 @@ impl<'a> Default for UpdatePersonAddressKanji<'a> { } /// Updates an existing person. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePerson<'a> { inner: UpdatePersonBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -981,6 +995,7 @@ impl StripeRequest for UpdatePerson<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SettingsTermsOfServiceSpecs<'a> { /// The Unix timestamp marking when the account representative accepted the service agreement. #[serde(skip_serializing_if = "Option::is_none")] @@ -1003,6 +1018,7 @@ impl<'a> Default for SettingsTermsOfServiceSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct AddressSpecs<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -1034,6 +1050,7 @@ impl<'a> Default for AddressSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DateOfBirthSpecs { /// The day of birth, between 1 and 31. pub day: i64, @@ -1048,6 +1065,7 @@ impl DateOfBirthSpecs { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DocumentsParam<'a> { /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1064,6 +1082,7 @@ impl<'a> Default for DocumentsParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RelationshipSpecs<'a> { /// 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. @@ -1110,6 +1129,7 @@ impl<'a> Default for RelationshipSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PersonVerificationDocumentSpecs<'a> { /// The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. /// The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. @@ -1131,6 +1151,7 @@ impl<'a> Default for PersonVerificationDocumentSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PersonAdditionalTosAcceptancesSpecs<'a> { /// Details on the legal guardian's acceptance of the main Stripe service agreement. #[serde(skip_serializing_if = "Option::is_none")] @@ -1147,6 +1168,7 @@ impl<'a> Default for PersonAdditionalTosAcceptancesSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PersonDocumentsSpecs<'a> { /// One or more documents that demonstrate proof that this person is authorized to represent the company. #[serde(skip_serializing_if = "Option::is_none")] @@ -1169,6 +1191,7 @@ impl<'a> Default for PersonDocumentsSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PersonVerificationSpecs<'a> { /// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-connect/src/topup/requests.rs b/generated/async-stripe-connect/src/topup/requests.rs index cb56f6b41..3bb38e827 100644 --- a/generated/async-stripe-connect/src/topup/requests.rs +++ b/generated/async-stripe-connect/src/topup/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTopupBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -96,6 +97,7 @@ impl<'de> serde::Deserialize<'de> for ListTopupStatus { } /// Returns a list of top-ups. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTopup<'a> { inner: ListTopupBuilder<'a>, } @@ -184,6 +186,7 @@ impl StripeRequest for ListTopup<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTopupBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -196,6 +199,7 @@ impl<'a> RetrieveTopupBuilder<'a> { /// Retrieves the details of a top-up that has previously been created. /// Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTopup<'a> { inner: RetrieveTopupBuilder<'a>, topup: &'a stripe_shared::TopupId, @@ -238,6 +242,7 @@ impl StripeRequest for RetrieveTopup<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTopupBuilder<'a> { amount: i64, currency: stripe_types::Currency, @@ -270,6 +275,7 @@ impl<'a> CreateTopupBuilder<'a> { } /// Top up the balance of an account #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTopup<'a> { inner: CreateTopupBuilder<'a>, } @@ -340,6 +346,7 @@ impl StripeRequest for CreateTopup<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateTopupBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] description: Option<&'a str>, @@ -355,6 +362,7 @@ impl<'a> UpdateTopupBuilder<'a> { } /// Updates the metadata of a top-up. Other top-up details are not editable by design. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTopup<'a> { inner: UpdateTopupBuilder<'a>, topup: &'a stripe_shared::TopupId, @@ -410,6 +418,7 @@ impl StripeRequest for UpdateTopup<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CancelTopupBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -421,6 +430,7 @@ impl<'a> CancelTopupBuilder<'a> { } /// Cancels a top-up. Only pending top-ups can be canceled. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CancelTopup<'a> { inner: CancelTopupBuilder<'a>, topup: &'a stripe_shared::TopupId, diff --git a/generated/async-stripe-connect/src/transfer/requests.rs b/generated/async-stripe-connect/src/transfer/requests.rs index 570658ffd..163f9a08c 100644 --- a/generated/async-stripe-connect/src/transfer/requests.rs +++ b/generated/async-stripe-connect/src/transfer/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -35,6 +36,7 @@ impl<'a> ListTransferBuilder<'a> { /// Returns a list of existing transfers sent to connected accounts. /// The transfers are returned in sorted order, with the most recently created transfers appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTransfer<'a> { inner: ListTransferBuilder<'a>, } @@ -121,6 +123,7 @@ impl StripeRequest for ListTransfer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -133,6 +136,7 @@ impl<'a> RetrieveTransferBuilder<'a> { /// Retrieves the details of an existing transfer. /// Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTransfer<'a> { inner: RetrieveTransferBuilder<'a>, transfer: &'a stripe_shared::TransferId, @@ -175,6 +179,7 @@ impl StripeRequest for RetrieveTransfer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -271,6 +276,7 @@ impl<'de> serde::Deserialize<'de> for CreateTransferSourceType { /// To send funds from your Stripe account to a connected account, you create a new transfer object. /// Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTransfer<'a> { inner: CreateTransferBuilder<'a>, } @@ -349,6 +355,7 @@ impl StripeRequest for CreateTransfer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] description: Option<&'a str>, @@ -367,6 +374,7 @@ impl<'a> UpdateTransferBuilder<'a> { /// /// This request accepts only metadata as an argument. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTransfer<'a> { inner: UpdateTransferBuilder<'a>, transfer: &'a stripe_shared::TransferId, diff --git a/generated/async-stripe-connect/src/transfer_reversal/requests.rs b/generated/async-stripe-connect/src/transfer_reversal/requests.rs index ac2f72785..e9b8ace92 100644 --- a/generated/async-stripe-connect/src/transfer_reversal/requests.rs +++ b/generated/async-stripe-connect/src/transfer_reversal/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListIdTransferReversalBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -22,6 +23,7 @@ impl<'a> ListIdTransferReversalBuilder<'a> { /// Note that the 10 most recent reversals are always available by default on the transfer object. /// If you need more than those 10, you can use this API method and the `limit` and `starting_after` parameters to page through additional reversals. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListIdTransferReversal<'a> { inner: ListIdTransferReversalBuilder<'a>, id: &'a stripe_shared::TransferId, @@ -97,6 +99,7 @@ impl StripeRequest for ListIdTransferReversal<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTransferReversalBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -108,6 +111,7 @@ impl<'a> RetrieveTransferReversalBuilder<'a> { } /// By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTransferReversal<'a> { inner: RetrieveTransferReversalBuilder<'a>, id: &'a str, @@ -153,6 +157,7 @@ impl StripeRequest for RetrieveTransferReversal<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateIdTransferReversalBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -184,6 +189,7 @@ impl<'a> CreateIdTransferReversalBuilder<'a> { /// Once entirely reversed, a transfer can’t be reversed again. /// This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIdTransferReversal<'a> { inner: CreateIdTransferReversalBuilder<'a>, id: &'a stripe_shared::TransferId, @@ -257,6 +263,7 @@ impl StripeRequest for CreateIdTransferReversal<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateTransferReversalBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -273,6 +280,7 @@ impl<'a> UpdateTransferReversalBuilder<'a> { /// /// This request only accepts metadata and description as arguments. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTransferReversal<'a> { inner: UpdateTransferReversalBuilder<'a>, id: &'a str, diff --git a/generated/async-stripe-core/Cargo.toml b/generated/async-stripe-core/Cargo.toml index f7ca519a5..6175d2155 100644 --- a/generated/async-stripe-core/Cargo.toml +++ b/generated/async-stripe-core/Cargo.toml @@ -28,7 +28,9 @@ async-stripe-shared = {path = "../../generated/async-stripe-shared"} [features] serialize = ["async-stripe-types/serialize","async-stripe-shared/serialize"] +serialize_extra = ["async-stripe-types/serialize_extra","async-stripe-shared/serialize_extra"] deserialize = ["async-stripe-types/deserialize","async-stripe-shared/deserialize", "dep:serde_json"] +deserialize_extra = ["async-stripe-types/deserialize_extra","async-stripe-shared/deserialize_extra", "dep:serde_json"] balance = [] balance_transaction = [] cash_balance = [] diff --git a/generated/async-stripe-core/src/balance/requests.rs b/generated/async-stripe-core/src/balance/requests.rs index fcd614f68..0612238d5 100644 --- a/generated/async-stripe-core/src/balance/requests.rs +++ b/generated/async-stripe-core/src/balance/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveForMyAccountBalanceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -15,6 +16,7 @@ impl<'a> RetrieveForMyAccountBalanceBuilder<'a> { /// Retrieves the current account balance, based on the authentication that was used to make the request. /// For a sample request, see [Accounting for negative balances](https://stripe.com/docs/connect/account-balances#accounting-for-negative-balances). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveForMyAccountBalance<'a> { inner: RetrieveForMyAccountBalanceBuilder<'a>, } diff --git a/generated/async-stripe-core/src/balance/types.rs b/generated/async-stripe-core/src/balance/types.rs index b41be1a1c..9ac70d016 100644 --- a/generated/async-stripe-core/src/balance/types.rs +++ b/generated/async-stripe-core/src/balance/types.rs @@ -12,6 +12,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Balance { /// Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). diff --git a/generated/async-stripe-core/src/balance_transaction/requests.rs b/generated/async-stripe-core/src/balance_transaction/requests.rs index ed8eef9d8..84eb35e73 100644 --- a/generated/async-stripe-core/src/balance_transaction/requests.rs +++ b/generated/async-stripe-core/src/balance_transaction/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListBalanceTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -44,6 +45,7 @@ impl<'a> ListBalanceTransactionBuilder<'a> { /// /// Note that this endpoint was previously called “Balance history” and used the path `/v1/balance/history`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListBalanceTransaction<'a> { inner: ListBalanceTransactionBuilder<'a>, } @@ -144,6 +146,7 @@ impl StripeRequest for ListBalanceTransaction<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveBalanceTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -157,6 +160,7 @@ impl<'a> RetrieveBalanceTransactionBuilder<'a> { /// /// Note that this endpoint previously used the path `/v1/balance/history/:id`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveBalanceTransaction<'a> { inner: RetrieveBalanceTransactionBuilder<'a>, id: &'a stripe_shared::BalanceTransactionId, diff --git a/generated/async-stripe-core/src/cash_balance/requests.rs b/generated/async-stripe-core/src/cash_balance/requests.rs index 3d0d449d1..3844f9802 100644 --- a/generated/async-stripe-core/src/cash_balance/requests.rs +++ b/generated/async-stripe-core/src/cash_balance/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveCashBalanceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -14,6 +15,7 @@ impl<'a> RetrieveCashBalanceBuilder<'a> { } /// Retrieves a customer’s cash balance. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveCashBalance<'a> { inner: RetrieveCashBalanceBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -57,6 +59,7 @@ impl StripeRequest for RetrieveCashBalance<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateCashBalanceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -70,6 +73,7 @@ impl<'a> UpdateCashBalanceBuilder<'a> { } /// A hash of settings for this cash balance. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCashBalanceSettings { /// Controls how funds transferred by the customer are applied to payment intents and invoices. /// Valid options are `automatic`, `manual`, or `merchant_default`. @@ -152,6 +156,7 @@ impl<'de> serde::Deserialize<'de> for UpdateCashBalanceSettingsReconciliationMod } /// Changes the settings on a customer’s cash balance. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCashBalance<'a> { inner: UpdateCashBalanceBuilder<'a>, customer: &'a stripe_shared::CustomerId, diff --git a/generated/async-stripe-core/src/charge/requests.rs b/generated/async-stripe-core/src/charge/requests.rs index 0b96ad0f1..9c68b1bce 100644 --- a/generated/async-stripe-core/src/charge/requests.rs +++ b/generated/async-stripe-core/src/charge/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListChargeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -38,6 +39,7 @@ impl<'a> ListChargeBuilder<'a> { /// Returns a list of charges you’ve previously created. /// The charges are returned in sorted order, with the most recent charges appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListCharge<'a> { inner: ListChargeBuilder<'a>, } @@ -129,6 +131,7 @@ impl StripeRequest for ListCharge<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveChargeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -142,6 +145,7 @@ impl<'a> RetrieveChargeBuilder<'a> { /// Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. /// The same information is returned when creating or refunding the charge. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveCharge<'a> { inner: RetrieveChargeBuilder<'a>, charge: &'a stripe_shared::ChargeId, @@ -184,6 +188,7 @@ impl StripeRequest for RetrieveCharge<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct SearchChargeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -205,6 +210,7 @@ impl<'a> SearchChargeBuilder<'a> { /// Occasionally, propagation of new or updated data can be up. /// to an hour behind during outages. Search functionality is not available to merchants in India. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SearchCharge<'a> { inner: SearchChargeBuilder<'a>, } @@ -264,6 +270,7 @@ impl StripeRequest for SearchCharge<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateChargeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -330,6 +337,7 @@ impl<'a> CreateChargeBuilder<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateChargeDestination<'a> { /// ID of an existing, connected Stripe account. pub account: &'a str, @@ -347,6 +355,7 @@ impl<'a> CreateChargeDestination<'a> { /// Options to configure Radar. /// See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateChargeRadarOptions<'a> { /// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. #[serde(skip_serializing_if = "Option::is_none")] @@ -365,6 +374,7 @@ impl<'a> Default for CreateChargeRadarOptions<'a> { /// An optional dictionary including the account to automatically transfer to as part of a destination charge. /// [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateChargeTransferData<'a> { /// The amount transferred to the destination account, if specified. /// By default, the entire charge amount is transferred to the destination account. @@ -382,6 +392,7 @@ impl<'a> CreateChargeTransferData<'a> { /// to initiate a new payment instead. Confirmation of the PaymentIntent creates the `Charge` /// object used to request payment. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCharge<'a> { inner: CreateChargeBuilder<'a>, } @@ -544,6 +555,7 @@ impl StripeRequest for CreateCharge<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateChargeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] customer: Option<&'a str>, @@ -581,6 +593,7 @@ impl<'a> UpdateChargeBuilder<'a> { /// If you believe a charge is safe, include a `user_report` key with a value of `safe`. /// Stripe will use the information you send to improve our fraud detection algorithms. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateChargeFraudDetails { /// Either `safe` or `fraudulent`. pub user_report: UpdateChargeFraudDetailsUserReport, @@ -649,6 +662,7 @@ impl<'de> serde::Deserialize<'de> for UpdateChargeFraudDetailsUserReport { /// Updates the specified charge by setting the values of the parameters passed. /// Any parameters not provided will be left unchanged. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCharge<'a> { inner: UpdateChargeBuilder<'a>, charge: &'a stripe_shared::ChargeId, @@ -738,6 +752,7 @@ impl StripeRequest for UpdateCharge<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CaptureChargeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -776,6 +791,7 @@ impl<'a> CaptureChargeBuilder<'a> { /// An optional dictionary including the account to automatically transfer to as part of a destination charge. /// [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CaptureChargeTransferData { /// The amount transferred to the destination account, if specified. /// By default, the entire charge amount is transferred to the destination account. @@ -799,6 +815,7 @@ impl Default for CaptureChargeTransferData { /// Don’t use this method to capture a PaymentIntent-initiated charge. /// Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CaptureCharge<'a> { inner: CaptureChargeBuilder<'a>, charge: &'a stripe_shared::ChargeId, @@ -893,6 +910,7 @@ impl StripeRequest for CaptureCharge<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct OptionalFieldsAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -924,6 +942,7 @@ impl<'a> Default for OptionalFieldsAddress<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct OptionalFieldsShipping<'a> { /// Shipping address. pub address: OptionalFieldsAddress<'a>, diff --git a/generated/async-stripe-core/src/customer/requests.rs b/generated/async-stripe-core/src/customer/requests.rs index e2654a2b8..6b139a1bf 100644 --- a/generated/async-stripe-core/src/customer/requests.rs +++ b/generated/async-stripe-core/src/customer/requests.rs @@ -6,6 +6,7 @@ use stripe_client_core::{ /// It cannot be undone. /// Also immediately cancels any active subscriptions on the customer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteCustomer<'a> { customer: &'a stripe_shared::CustomerId, } @@ -43,6 +44,7 @@ impl StripeRequest for DeleteCustomer<'_> { } /// Removes the currently applied discount on a customer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteDiscountCustomer<'a> { customer: &'a stripe_shared::CustomerId, } @@ -79,6 +81,7 @@ impl StripeRequest for DeleteDiscountCustomer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListCustomerBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -111,6 +114,7 @@ impl<'a> ListCustomerBuilder<'a> { /// Returns a list of your customers. /// The customers are returned sorted by creation date, with the most recent customers appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListCustomer<'a> { inner: ListCustomerBuilder<'a>, } @@ -199,6 +203,7 @@ impl StripeRequest for ListCustomer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveCustomerBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -210,6 +215,7 @@ impl<'a> RetrieveCustomerBuilder<'a> { } /// Retrieves a Customer object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveCustomer<'a> { inner: RetrieveCustomerBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -332,6 +338,7 @@ const _: () = { }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct BalanceTransactionsCustomerBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -349,6 +356,7 @@ impl<'a> BalanceTransactionsCustomerBuilder<'a> { } /// Returns a list of transactions that updated the customer’s [balances](https://stripe.com/docs/billing/customer/balance). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BalanceTransactionsCustomer<'a> { inner: BalanceTransactionsCustomerBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -428,6 +436,7 @@ impl StripeRequest for BalanceTransactionsCustomer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListPaymentMethodsCustomerBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] allow_redisplay: Option, @@ -677,6 +686,7 @@ impl<'de> serde::Deserialize<'de> for ListPaymentMethodsCustomerType { } /// Returns a list of PaymentMethods for a given Customer #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListPaymentMethodsCustomer<'a> { inner: ListPaymentMethodsCustomerBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -768,6 +778,7 @@ impl StripeRequest for ListPaymentMethodsCustomer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrievePaymentMethodCustomerBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -779,6 +790,7 @@ impl<'a> RetrievePaymentMethodCustomerBuilder<'a> { } /// Retrieves a PaymentMethod object for a given Customer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrievePaymentMethodCustomer<'a> { inner: RetrievePaymentMethodCustomerBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -827,6 +839,7 @@ impl StripeRequest for RetrievePaymentMethodCustomer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct SearchCustomerBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -848,6 +861,7 @@ impl<'a> SearchCustomerBuilder<'a> { /// Occasionally, propagation of new or updated data can be up. /// to an hour behind during outages. Search functionality is not available to merchants in India. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SearchCustomer<'a> { inner: SearchCustomerBuilder<'a>, } @@ -907,6 +921,7 @@ impl StripeRequest for SearchCustomer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateCustomerBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] address: Option>, @@ -986,6 +1001,7 @@ impl<'a> CreateCustomerBuilder<'a> { } /// Balance information and default balance settings for this customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCustomerCashBalance { /// Settings controlling the behavior of the customer's cash balance, /// such as reconciliation of funds received. @@ -1005,6 +1021,7 @@ impl Default for CreateCustomerCashBalance { /// Settings controlling the behavior of the customer's cash balance, /// such as reconciliation of funds received. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCustomerCashBalanceSettings { /// Controls how funds transferred by the customer are applied to payment intents and invoices. /// Valid options are `automatic`, `manual`, or `merchant_default`. @@ -1087,6 +1104,7 @@ impl<'de> serde::Deserialize<'de> for CreateCustomerCashBalanceSettingsReconcili } /// Default invoice settings for this customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCustomerInvoiceSettings<'a> { /// The list of up to 4 default custom fields to be displayed on invoices for this customer. /// When updating, pass an empty string to remove previously-defined fields. @@ -1119,6 +1137,7 @@ impl<'a> Default for CreateCustomerInvoiceSettings<'a> { } /// Default options for invoice PDF rendering for this customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCustomerInvoiceSettingsRenderingOptions { /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// One of `exclude_tax` or `include_inclusive_tax`. @@ -1202,6 +1221,7 @@ impl<'de> serde::Deserialize<'de> } /// Tax details about the customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCustomerTax<'a> { /// A recent IP address of the customer used for tax reporting and tax location inference. /// Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. @@ -1282,6 +1302,7 @@ impl<'de> serde::Deserialize<'de> for CreateCustomerTaxValidateLocation { } /// The customer's tax IDs. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCustomerTaxIdData<'a> { /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `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`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `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")] @@ -1561,6 +1582,7 @@ impl<'de> serde::Deserialize<'de> for CreateCustomerTaxIdDataType { } /// Creates a new customer object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCustomer<'a> { inner: CreateCustomerBuilder<'a>, } @@ -1722,6 +1744,7 @@ impl StripeRequest for CreateCustomer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateCustomerBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] address: Option>, @@ -1795,6 +1818,7 @@ impl<'a> UpdateCustomerBuilder<'a> { } /// Balance information and default balance settings for this customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCustomerCashBalance { /// Settings controlling the behavior of the customer's cash balance, /// such as reconciliation of funds received. @@ -1814,6 +1838,7 @@ impl Default for UpdateCustomerCashBalance { /// Settings controlling the behavior of the customer's cash balance, /// such as reconciliation of funds received. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCustomerCashBalanceSettings { /// Controls how funds transferred by the customer are applied to payment intents and invoices. /// Valid options are `automatic`, `manual`, or `merchant_default`. @@ -1896,6 +1921,7 @@ impl<'de> serde::Deserialize<'de> for UpdateCustomerCashBalanceSettingsReconcili } /// Default invoice settings for this customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCustomerInvoiceSettings<'a> { /// The list of up to 4 default custom fields to be displayed on invoices for this customer. /// When updating, pass an empty string to remove previously-defined fields. @@ -1928,6 +1954,7 @@ impl<'a> Default for UpdateCustomerInvoiceSettings<'a> { } /// Default options for invoice PDF rendering for this customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCustomerInvoiceSettingsRenderingOptions { /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// One of `exclude_tax` or `include_inclusive_tax`. @@ -2011,6 +2038,7 @@ impl<'de> serde::Deserialize<'de> } /// Tax details about the customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCustomerTax<'a> { /// A recent IP address of the customer used for tax reporting and tax location inference. /// Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. @@ -2098,6 +2126,7 @@ impl<'de> serde::Deserialize<'de> for UpdateCustomerTaxValidateLocation { /// /// This request accepts mostly the same arguments as the customer creation call. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCustomer<'a> { inner: UpdateCustomerBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -2251,6 +2280,7 @@ impl StripeRequest for UpdateCustomer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateFundingInstructionsCustomerBuilder<'a> { bank_transfer: CreateFundingInstructionsCustomerBankTransfer<'a>, currency: stripe_types::Currency, @@ -2269,6 +2299,7 @@ impl<'a> CreateFundingInstructionsCustomerBuilder<'a> { } /// Additional parameters for `bank_transfer` funding types #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateFundingInstructionsCustomerBankTransfer<'a> { /// Configuration for eu_bank_transfer funding type. #[serde(skip_serializing_if = "Option::is_none")] @@ -2291,6 +2322,7 @@ impl<'a> CreateFundingInstructionsCustomerBankTransfer<'a> { } /// Configuration for eu_bank_transfer funding type. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateFundingInstructionsCustomerBankTransferEuBankTransfer<'a> { /// The desired country code of the bank account information. /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. @@ -2495,6 +2527,7 @@ impl<'de> serde::Deserialize<'de> for CreateFundingInstructionsCustomerFundingTy /// funding instructions will be retrieved. /// In other words, we will return the same funding instructions each time. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateFundingInstructionsCustomer<'a> { inner: CreateFundingInstructionsCustomerBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -2553,6 +2586,7 @@ impl StripeRequest for CreateFundingInstructionsCustomer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct FundCashBalanceCustomerBuilder<'a> { amount: i64, currency: stripe_types::Currency, @@ -2568,6 +2602,7 @@ impl<'a> FundCashBalanceCustomerBuilder<'a> { } /// Create an incoming testmode bank transfer #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct FundCashBalanceCustomer<'a> { inner: FundCashBalanceCustomerBuilder<'a>, customer: &'a str, @@ -2622,6 +2657,7 @@ impl StripeRequest for FundCashBalanceCustomer<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct OptionalFieldsAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -2653,6 +2689,7 @@ impl<'a> Default for OptionalFieldsAddress<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CustomFieldParams<'a> { /// The name of the custom field. This may be up to 40 characters. pub name: &'a str, @@ -2665,6 +2702,7 @@ impl<'a> CustomFieldParams<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CustomerShipping<'a> { /// Customer shipping address. pub address: OptionalFieldsAddress<'a>, diff --git a/generated/async-stripe-core/src/customer_balance_transaction/requests.rs b/generated/async-stripe-core/src/customer_balance_transaction/requests.rs index e35b8f9be..85bcedccf 100644 --- a/generated/async-stripe-core/src/customer_balance_transaction/requests.rs +++ b/generated/async-stripe-core/src/customer_balance_transaction/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListCustomerCustomerBalanceTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -20,6 +21,7 @@ impl<'a> ListCustomerCustomerBalanceTransactionBuilder<'a> { } /// Returns a list of transactions that updated the customer’s [balances](https://stripe.com/docs/billing/customer/balance). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListCustomerCustomerBalanceTransaction<'a> { inner: ListCustomerCustomerBalanceTransactionBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -99,6 +101,7 @@ impl StripeRequest for ListCustomerCustomerBalanceTransaction<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveCustomerBalanceTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -110,6 +113,7 @@ impl<'a> RetrieveCustomerBalanceTransactionBuilder<'a> { } /// Retrieves a specific customer balance transaction that updated the customer’s [balances](https://stripe.com/docs/billing/customer/balance). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveCustomerBalanceTransaction<'a> { inner: RetrieveCustomerBalanceTransactionBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -158,6 +162,7 @@ impl StripeRequest for RetrieveCustomerBalanceTransaction<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateCustomerCustomerBalanceTransactionBuilder<'a> { amount: i64, currency: stripe_types::Currency, @@ -175,6 +180,7 @@ impl<'a> CreateCustomerCustomerBalanceTransactionBuilder<'a> { } /// Creates an immutable transaction that updates the customer’s credit [balance](https://stripe.com/docs/billing/customer/balance). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCustomerCustomerBalanceTransaction<'a> { inner: CreateCustomerCustomerBalanceTransactionBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -241,6 +247,7 @@ impl StripeRequest for CreateCustomerCustomerBalanceTransaction<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateCustomerBalanceTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] description: Option<&'a str>, @@ -256,6 +263,7 @@ impl<'a> UpdateCustomerBalanceTransactionBuilder<'a> { } /// Most credit balance transaction fields are immutable, but you may update its `description` and `metadata`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCustomerBalanceTransaction<'a> { inner: UpdateCustomerBalanceTransactionBuilder<'a>, customer: &'a stripe_shared::CustomerId, diff --git a/generated/async-stripe-core/src/customer_cash_balance_transaction/requests.rs b/generated/async-stripe-core/src/customer_cash_balance_transaction/requests.rs index 62b3e2486..70e78addc 100644 --- a/generated/async-stripe-core/src/customer_cash_balance_transaction/requests.rs +++ b/generated/async-stripe-core/src/customer_cash_balance_transaction/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListCustomerCustomerCashBalanceTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -20,6 +21,7 @@ impl<'a> ListCustomerCustomerCashBalanceTransactionBuilder<'a> { } /// Returns a list of transactions that modified the customer’s [cash balance](https://stripe.com/docs/payments/customer-balance). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListCustomerCustomerCashBalanceTransaction<'a> { inner: ListCustomerCustomerCashBalanceTransactionBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -99,6 +101,7 @@ impl StripeRequest for ListCustomerCustomerCashBalanceTransaction<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveCustomerCashBalanceTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -110,6 +113,7 @@ impl<'a> RetrieveCustomerCashBalanceTransactionBuilder<'a> { } /// Retrieves a specific cash balance transaction, which updated the customer’s [cash balance](https://stripe.com/docs/payments/customer-balance). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveCustomerCashBalanceTransaction<'a> { inner: RetrieveCustomerCashBalanceTransactionBuilder<'a>, customer: &'a stripe_shared::CustomerId, diff --git a/generated/async-stripe-core/src/customer_session/requests.rs b/generated/async-stripe-core/src/customer_session/requests.rs index f5ca4dc21..aca29bf4f 100644 --- a/generated/async-stripe-core/src/customer_session/requests.rs +++ b/generated/async-stripe-core/src/customer_session/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateCustomerSessionBuilder<'a> { components: CreateCustomerSessionComponents, customer: &'a str, @@ -16,6 +17,7 @@ impl<'a> CreateCustomerSessionBuilder<'a> { } /// Configuration for each component. Exactly 1 component must be enabled. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCustomerSessionComponents { /// Configuration for buy button. #[serde(skip_serializing_if = "Option::is_none")] @@ -36,6 +38,7 @@ impl Default for CreateCustomerSessionComponents { } /// Configuration for buy button. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCustomerSessionComponentsBuyButton { /// Whether the buy button is enabled. pub enabled: bool, @@ -47,6 +50,7 @@ impl CreateCustomerSessionComponentsBuyButton { } /// Configuration for the pricing table. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCustomerSessionComponentsPricingTable { /// Whether the pricing table is enabled. pub enabled: bool, @@ -58,6 +62,7 @@ impl CreateCustomerSessionComponentsPricingTable { } /// Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCustomerSession<'a> { inner: CreateCustomerSessionBuilder<'a>, } diff --git a/generated/async-stripe-core/src/customer_session/types.rs b/generated/async-stripe-core/src/customer_session/types.rs index 16b448dc7..4cb353113 100644 --- a/generated/async-stripe-core/src/customer_session/types.rs +++ b/generated/async-stripe-core/src/customer_session/types.rs @@ -1,6 +1,7 @@ /// A customer session allows you to grant client access to Stripe's frontend SDKs (like StripeJs) /// control over a customer. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct CustomerSession { /// The client secret of this customer session. diff --git a/generated/async-stripe-core/src/dispute/requests.rs b/generated/async-stripe-core/src/dispute/requests.rs index 98afb1b1d..8302c209e 100644 --- a/generated/async-stripe-core/src/dispute/requests.rs +++ b/generated/async-stripe-core/src/dispute/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListDisputeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] charge: Option<&'a str>, @@ -34,6 +35,7 @@ impl<'a> ListDisputeBuilder<'a> { } /// Returns a list of your disputes. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListDispute<'a> { inner: ListDisputeBuilder<'a>, } @@ -119,6 +121,7 @@ impl StripeRequest for ListDispute<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveDisputeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -130,6 +133,7 @@ impl<'a> RetrieveDisputeBuilder<'a> { } /// Retrieves the dispute with the given ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveDispute<'a> { inner: RetrieveDisputeBuilder<'a>, dispute: &'a stripe_shared::DisputeId, @@ -172,6 +176,7 @@ impl StripeRequest for RetrieveDispute<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateDisputeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] evidence: Option>, @@ -191,6 +196,7 @@ impl<'a> UpdateDisputeBuilder<'a> { /// Updating any field in the hash will submit all fields in the hash for review. /// The combined character count of all fields is limited to 150,000. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateDisputeEvidence<'a> { /// Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. /// This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. @@ -334,6 +340,7 @@ impl<'a> Default for UpdateDisputeEvidence<'a> { /// Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. /// To figure out which evidence fields to provide, see our [guide to dispute types](https://stripe.com/docs/disputes/categories). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateDispute<'a> { inner: UpdateDisputeBuilder<'a>, dispute: &'a stripe_shared::DisputeId, @@ -398,6 +405,7 @@ impl StripeRequest for UpdateDispute<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CloseDisputeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -412,6 +420,7 @@ impl<'a> CloseDisputeBuilder<'a> { /// The status of the dispute will change from `needs_response` to `lost`. /// _Closing a dispute is irreversible_. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CloseDispute<'a> { inner: CloseDisputeBuilder<'a>, dispute: &'a stripe_shared::DisputeId, diff --git a/generated/async-stripe-core/src/event/requests.rs b/generated/async-stripe-core/src/event/requests.rs index 78e8e8aef..91f330f4d 100644 --- a/generated/async-stripe-core/src/event/requests.rs +++ b/generated/async-stripe-core/src/event/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListEventBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -39,6 +40,7 @@ impl<'a> ListEventBuilder<'a> { /// List events, going back up to 30 days. /// Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) `api_version` attribute (not according to your current Stripe API version or `Stripe-Version` header). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListEvent<'a> { inner: ListEventBuilder<'a>, } @@ -134,6 +136,7 @@ impl StripeRequest for ListEvent<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveEventBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -146,6 +149,7 @@ impl<'a> RetrieveEventBuilder<'a> { /// Retrieves the details of an event. /// Supply the unique identifier of the event, which you might have received in a webhook. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveEvent<'a> { inner: RetrieveEventBuilder<'a>, id: &'a stripe_shared::EventId, diff --git a/generated/async-stripe-core/src/file/requests.rs b/generated/async-stripe-core/src/file/requests.rs index 23c6b2964..716811b52 100644 --- a/generated/async-stripe-core/src/file/requests.rs +++ b/generated/async-stripe-core/src/file/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListFileBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -32,6 +33,7 @@ impl<'a> ListFileBuilder<'a> { /// Returns a list of the files that your account has access to. /// Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListFile<'a> { inner: ListFileBuilder<'a>, } @@ -114,6 +116,7 @@ impl StripeRequest for ListFile<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveFileBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -127,6 +130,7 @@ impl<'a> RetrieveFileBuilder<'a> { /// After you supply a unique file ID, Stripe returns the corresponding file object. /// Learn how to [access file contents](https://stripe.com/docs/file-upload#download-file-contents). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveFile<'a> { inner: RetrieveFileBuilder<'a>, file: &'a stripe_shared::FileId, diff --git a/generated/async-stripe-core/src/file_link/requests.rs b/generated/async-stripe-core/src/file_link/requests.rs index 6019c3f6b..ee7798514 100644 --- a/generated/async-stripe-core/src/file_link/requests.rs +++ b/generated/async-stripe-core/src/file_link/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListFileLinkBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -34,6 +35,7 @@ impl<'a> ListFileLinkBuilder<'a> { } /// Returns a list of file links. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListFileLink<'a> { inner: ListFileLinkBuilder<'a>, } @@ -120,6 +122,7 @@ impl StripeRequest for ListFileLink<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveFileLinkBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -131,6 +134,7 @@ impl<'a> RetrieveFileLinkBuilder<'a> { } /// Retrieves the file link with the given ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveFileLink<'a> { inner: RetrieveFileLinkBuilder<'a>, link: &'a stripe_shared::FileLinkId, @@ -173,6 +177,7 @@ impl StripeRequest for RetrieveFileLink<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateFileLinkBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -189,6 +194,7 @@ impl<'a> CreateFileLinkBuilder<'a> { } /// Creates a new file link object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateFileLink<'a> { inner: CreateFileLinkBuilder<'a>, } @@ -242,6 +248,7 @@ impl StripeRequest for CreateFileLink<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateFileLinkBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -257,6 +264,7 @@ impl<'a> UpdateFileLinkBuilder<'a> { } /// A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpdateFileLinkExpiresAt { Now, @@ -264,6 +272,7 @@ pub enum UpdateFileLinkExpiresAt { } /// Updates an existing file link object. Expired links can no longer be updated. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateFileLink<'a> { inner: UpdateFileLinkBuilder<'a>, link: &'a stripe_shared::FileLinkId, diff --git a/generated/async-stripe-core/src/mandate/requests.rs b/generated/async-stripe-core/src/mandate/requests.rs index bdab9ed24..b28a71185 100644 --- a/generated/async-stripe-core/src/mandate/requests.rs +++ b/generated/async-stripe-core/src/mandate/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveMandateBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -14,6 +15,7 @@ impl<'a> RetrieveMandateBuilder<'a> { } /// Retrieves a Mandate object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveMandate<'a> { inner: RetrieveMandateBuilder<'a>, mandate: &'a stripe_shared::MandateId, diff --git a/generated/async-stripe-core/src/payment_intent/requests.rs b/generated/async-stripe-core/src/payment_intent/requests.rs index 8bc493b16..aa1de9c58 100644 --- a/generated/async-stripe-core/src/payment_intent/requests.rs +++ b/generated/async-stripe-core/src/payment_intent/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListPaymentIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -31,6 +32,7 @@ impl<'a> ListPaymentIntentBuilder<'a> { } /// Returns a list of PaymentIntents. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListPaymentIntent<'a> { inner: ListPaymentIntentBuilder<'a>, } @@ -113,6 +115,7 @@ impl StripeRequest for ListPaymentIntent<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrievePaymentIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] client_secret: Option<&'a str>, @@ -132,6 +135,7 @@ impl<'a> RetrievePaymentIntentBuilder<'a> { /// If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. /// Refer to the [payment intent](https://stripe.com/docs/api#payment_intent_object) object reference for more details. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrievePaymentIntent<'a> { inner: RetrievePaymentIntentBuilder<'a>, intent: &'a stripe_shared::PaymentIntentId, @@ -181,6 +185,7 @@ impl StripeRequest for RetrievePaymentIntent<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct SearchPaymentIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -202,6 +207,7 @@ impl<'a> SearchPaymentIntentBuilder<'a> { /// Occasionally, propagation of new or updated data can be up. /// to an hour behind during outages. Search functionality is not available to merchants in India. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SearchPaymentIntent<'a> { inner: SearchPaymentIntentBuilder<'a>, } @@ -262,6 +268,7 @@ impl StripeRequest for SearchPaymentIntent<'_> { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreatePaymentIntentBuilder<'a> { amount: i64, #[serde(skip_serializing_if = "Option::is_none")] @@ -366,6 +373,7 @@ impl<'a> CreatePaymentIntentBuilder<'a> { } /// When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentAutomaticPaymentMethods { /// Controls whether this PaymentIntent will accept redirect-based payment methods. /// @@ -445,6 +453,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentAutomaticPaymentMethods /// This hash contains details about the Mandate to create. /// This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentMandateData<'a> { /// This hash contains details about the customer acceptance of the Mandate. pub customer_acceptance: CreatePaymentIntentMandateDataCustomerAcceptance<'a>, @@ -456,6 +465,7 @@ impl<'a> CreatePaymentIntentMandateData<'a> { } /// This hash contains details about the customer acceptance of the Mandate. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentMandateDataCustomerAcceptance<'a> { /// The time at which the customer accepted the Mandate. #[serde(skip_serializing_if = "Option::is_none")] @@ -540,6 +550,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentMandateDataCustomerAcce /// Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). /// This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreatePaymentIntentOffSession { Bool(bool), @@ -550,6 +561,7 @@ pub enum CreatePaymentIntentOffSession { /// in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method). /// property on the PaymentIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodData<'a> { /// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -814,6 +826,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodDataAllowR } /// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodDataAuBecsDebit<'a> { /// The account number for the bank account. pub account_number: &'a str, @@ -827,6 +840,7 @@ impl<'a> CreatePaymentIntentPaymentMethodDataAuBecsDebit<'a> { } /// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodDataBacsDebit<'a> { /// Account number of the bank account that the funds will be debited from. #[serde(skip_serializing_if = "Option::is_none")] @@ -847,6 +861,7 @@ impl<'a> Default for CreatePaymentIntentPaymentMethodDataBacsDebit<'a> { } /// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodDataBillingDetails<'a> { /// Billing address. #[serde(skip_serializing_if = "Option::is_none")] @@ -873,6 +888,7 @@ impl<'a> Default for CreatePaymentIntentPaymentMethodDataBillingDetails<'a> { } /// Billing address. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodDataBillingDetailsAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -905,6 +921,7 @@ impl<'a> Default for CreatePaymentIntentPaymentMethodDataBillingDetailsAddress<' } /// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodDataBoleto<'a> { /// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) pub tax_id: &'a str, @@ -916,6 +933,7 @@ impl<'a> CreatePaymentIntentPaymentMethodDataBoleto<'a> { } /// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodDataEps { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -1069,6 +1087,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodDataEpsBan } /// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodDataFpx { /// Account holder type for FPX transaction #[serde(skip_serializing_if = "Option::is_none")] @@ -1259,6 +1278,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodDataFpxBan } /// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodDataIdeal { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -1376,6 +1396,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodDataIdealB } /// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodDataKlarna { /// Customer's date of birth #[serde(skip_serializing_if = "Option::is_none")] @@ -1393,6 +1414,7 @@ impl Default for CreatePaymentIntentPaymentMethodDataKlarna { } /// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodDataP24 { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -1540,6 +1562,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodDataP24Ban } /// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodDataSepaDebit<'a> { /// IBAN of the bank account. pub iban: &'a str, @@ -1551,6 +1574,7 @@ impl<'a> CreatePaymentIntentPaymentMethodDataSepaDebit<'a> { } /// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodDataSofort { /// Two-letter ISO code representing the country the bank account is located in. pub country: CreatePaymentIntentPaymentMethodDataSofortCountry, @@ -1788,6 +1812,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodDataType { } /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodDataUsBankAccount<'a> { /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] @@ -1938,6 +1963,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodDataUsBank } /// Payment method-specific configuration for this PaymentIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptions<'a> { /// If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. #[serde(skip_serializing_if = "Option::is_none")] @@ -2102,6 +2128,7 @@ impl<'a> Default for CreatePaymentIntentPaymentMethodOptions<'a> { } /// If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsAcssDebit<'a> { /// Additional fields for Mandate creation #[serde(skip_serializing_if = "Option::is_none")] @@ -2134,6 +2161,7 @@ impl<'a> Default for CreatePaymentIntentPaymentMethodOptionsAcssDebit<'a> { } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptions<'a> { /// A URL for custom mandate text to render during confirmation step. /// The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,. @@ -2426,6 +2454,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsAffirm<'a> { /// Controls when the funds will be captured from the customer's account. /// @@ -2583,6 +2612,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsAfterpayClearpay<'a> { /// Controls when the funds will be captured from the customer's account. /// @@ -2738,6 +2768,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsAlipay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -2829,6 +2860,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsAmazonPay { /// Controls when the funds will be captured from the customer's account. /// @@ -2981,6 +3013,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsAuBecsDebit { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -3072,6 +3105,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsBacsDebit { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -3163,6 +3197,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsBancontact { /// Preferred language of the Bancontact authorization page that the customer is redirected to. #[serde(skip_serializing_if = "Option::is_none")] @@ -3317,6 +3352,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsBlik<'a> { /// The 6-digit BLIK code that a customer has generated using their banking application. /// Can only be set on confirmation. @@ -3407,6 +3443,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodOptionsBli } /// If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsBoleto { /// The number of calendar days before a Boleto voucher expires. /// For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. @@ -3505,6 +3542,7 @@ impl<'de> serde::Deserialize<'de> } /// Configuration for any card payments attempted on this PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsCard<'a> { /// Controls when the funds will be captured from the customer's account. /// @@ -3679,6 +3717,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodOptionsCar /// /// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsCardInstallments { /// Setting to true enables installments for this PaymentIntent. /// This will cause the response to contain a list of available installment plans. @@ -3703,6 +3742,7 @@ impl Default for CreatePaymentIntentPaymentMethodOptionsCardInstallments { /// The selected installment plan to use for this payment attempt. /// This parameter can only be provided during confirmation. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan { /// For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. pub count: u64, @@ -3835,6 +3875,7 @@ impl<'de> serde::Deserialize<'de> } /// Configuration options for setting up an eMandate for cards issued in India. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsCardMandateOptions<'a> { /// Amount to be charged for future payments. pub amount: i64, @@ -4528,6 +4569,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodOptionsCar /// If 3D Secure authentication was performed with a third-party provider, /// the authentication details to use for this payment. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecure<'a> { /// The `transStatus` returned from the card Issuer’s ACS in the ARes. #[serde(skip_serializing_if = "Option::is_none")] @@ -4792,6 +4834,7 @@ impl<'de> serde::Deserialize<'de> /// explicit card brand choice. The parameter `payment_method_options.card.network`` /// must be populated accordingly #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions<'a> { /// Cartes Bancaires-specific 3DS fields. #[serde(skip_serializing_if = "Option::is_none")] @@ -4811,6 +4854,7 @@ impl<'a> Default for CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetw } /// Cartes Bancaires-specific 3DS fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires<'a> { /// The cryptogram calculation algorithm used by the card Issuer's ACS /// to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. @@ -4979,6 +5023,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsCashapp { /// Controls when the funds will be captured from the customer's account. /// @@ -5139,6 +5184,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsCustomerBalance<'a> { /// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. #[serde(skip_serializing_if = "Option::is_none")] @@ -5172,6 +5218,7 @@ impl<'a> Default for CreatePaymentIntentPaymentMethodOptionsCustomerBalance<'a> } /// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer<'a> { /// Configuration for the eu_bank_transfer funding type. #[serde(skip_serializing_if = "Option::is_none")] @@ -5457,6 +5504,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsEps { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -5543,6 +5591,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodOptionsEps } /// If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsFpx { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -5629,6 +5678,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodOptionsFpx } /// If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsGiropay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -5717,6 +5767,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsGrabpay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -5805,6 +5856,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsIdeal { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -5894,6 +5946,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodOptionsIde } /// If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsKlarna { /// Controls when the funds will be captured from the customer's account. /// @@ -6235,6 +6288,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsKonbini<'a> { /// An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. /// Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. @@ -6346,6 +6400,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsLink<'a> { /// Controls when the funds will be captured from the customer's account. /// @@ -6504,6 +6559,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodOptionsLin } /// If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsMobilepay { /// Controls when the funds will be captured from the customer's account. /// @@ -6657,6 +6713,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsOxxo { /// The number of calendar days before an OXXO voucher expires. /// For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. @@ -6747,6 +6804,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodOptionsOxx } /// If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsP24 { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -6836,6 +6894,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodOptionsP24 } /// If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsPaynow { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -6924,6 +6983,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsPaypal<'a> { /// Controls when the funds will be captured from the customer's account. #[serde(skip_serializing_if = "Option::is_none")] @@ -7204,6 +7264,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsPix { /// The number of seconds (between 10 and 1209600) after which Pix payment will expire. /// Defaults to 86400 seconds. @@ -7298,6 +7359,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodOptionsPix } /// If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsPromptpay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -7383,6 +7445,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsRevolutPay { /// Controls when the funds will be captured from the customer's account. /// @@ -7535,6 +7598,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsSepaDebit { /// Additional fields for Mandate creation #[serde(skip_serializing_if = "Option::is_none")] @@ -7630,6 +7694,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsSofort { /// Language shown to the payer on redirect. #[serde(skip_serializing_if = "Option::is_none")] @@ -7799,6 +7864,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsSwish<'a> { /// The order ID displayed in the Swish app after the payment is authorized. #[serde(skip_serializing_if = "Option::is_none")] @@ -7888,6 +7954,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodOptionsSwi } /// If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccount<'a> { /// Additional fields for Financial Connections Session creation #[serde(skip_serializing_if = "Option::is_none")] @@ -7938,6 +8005,7 @@ impl<'a> Default for CreatePaymentIntentPaymentMethodOptionsUsBankAccount<'a> { } /// Additional fields for Financial Connections Session creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections<'a> { /// The list of permissions to request. /// If this parameter is passed, the `payment_method` permission must be included. @@ -8107,6 +8175,7 @@ impl<'de> serde::Deserialize<'de> } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions { /// The method used to collect offline mandate customer acceptance. #[serde(skip_serializing_if = "Option::is_none")] @@ -8186,6 +8255,7 @@ impl<'de> serde::Deserialize<'de> } /// Additional fields for network related functions #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks<'a> { /// Triggers validations to run across the selected networks #[serde(skip_serializing_if = "Option::is_none")] @@ -8449,6 +8519,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsWechatPay<'a> { /// The app ID registered with WeChat Pay. Only required when client is ios or android. #[serde(skip_serializing_if = "Option::is_none")] @@ -8595,6 +8666,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentPaymentMethodOptionsZip { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -8681,6 +8753,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentIntentPaymentMethodOptionsZip } /// Shipping information for this PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentShipping<'a> { /// Shipping address. pub address: CreatePaymentIntentShippingAddress<'a>, @@ -8704,6 +8777,7 @@ impl<'a> CreatePaymentIntentShipping<'a> { } /// Shipping address. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentShippingAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -8737,6 +8811,7 @@ impl<'a> Default for CreatePaymentIntentShippingAddress<'a> { /// The parameters that you can use to automatically create a Transfer. /// Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntentTransferData<'a> { /// The amount that will be transferred automatically when a charge succeeds. /// The amount is capped at the total transaction amount and if no amount is set, @@ -8769,6 +8844,7 @@ impl<'a> CreatePaymentIntentTransferData<'a> { /// available in the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) when you supply /// `confirm=true`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentIntent<'a> { inner: CreatePaymentIntentBuilder<'a>, } @@ -9014,6 +9090,7 @@ impl StripeRequest for CreatePaymentIntent<'_> { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdatePaymentIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -9086,6 +9163,7 @@ impl<'a> UpdatePaymentIntentBuilder<'a> { /// in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method). /// property on the PaymentIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodData<'a> { /// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -9350,6 +9428,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodDataAllowR } /// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodDataAuBecsDebit<'a> { /// The account number for the bank account. pub account_number: &'a str, @@ -9363,6 +9442,7 @@ impl<'a> UpdatePaymentIntentPaymentMethodDataAuBecsDebit<'a> { } /// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodDataBacsDebit<'a> { /// Account number of the bank account that the funds will be debited from. #[serde(skip_serializing_if = "Option::is_none")] @@ -9383,6 +9463,7 @@ impl<'a> Default for UpdatePaymentIntentPaymentMethodDataBacsDebit<'a> { } /// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodDataBillingDetails<'a> { /// Billing address. #[serde(skip_serializing_if = "Option::is_none")] @@ -9409,6 +9490,7 @@ impl<'a> Default for UpdatePaymentIntentPaymentMethodDataBillingDetails<'a> { } /// Billing address. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodDataBillingDetailsAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -9441,6 +9523,7 @@ impl<'a> Default for UpdatePaymentIntentPaymentMethodDataBillingDetailsAddress<' } /// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodDataBoleto<'a> { /// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) pub tax_id: &'a str, @@ -9452,6 +9535,7 @@ impl<'a> UpdatePaymentIntentPaymentMethodDataBoleto<'a> { } /// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodDataEps { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -9605,6 +9689,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodDataEpsBan } /// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodDataFpx { /// Account holder type for FPX transaction #[serde(skip_serializing_if = "Option::is_none")] @@ -9795,6 +9880,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodDataFpxBan } /// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodDataIdeal { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -9912,6 +9998,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodDataIdealB } /// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodDataKlarna { /// Customer's date of birth #[serde(skip_serializing_if = "Option::is_none")] @@ -9929,6 +10016,7 @@ impl Default for UpdatePaymentIntentPaymentMethodDataKlarna { } /// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodDataP24 { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -10076,6 +10164,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodDataP24Ban } /// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodDataSepaDebit<'a> { /// IBAN of the bank account. pub iban: &'a str, @@ -10087,6 +10176,7 @@ impl<'a> UpdatePaymentIntentPaymentMethodDataSepaDebit<'a> { } /// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodDataSofort { /// Two-letter ISO code representing the country the bank account is located in. pub country: UpdatePaymentIntentPaymentMethodDataSofortCountry, @@ -10324,6 +10414,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodDataType { } /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodDataUsBankAccount<'a> { /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] @@ -10474,6 +10565,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodDataUsBank } /// Payment-method-specific configuration for this PaymentIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptions<'a> { /// If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. #[serde(skip_serializing_if = "Option::is_none")] @@ -10638,6 +10730,7 @@ impl<'a> Default for UpdatePaymentIntentPaymentMethodOptions<'a> { } /// If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsAcssDebit<'a> { /// Additional fields for Mandate creation #[serde(skip_serializing_if = "Option::is_none")] @@ -10670,6 +10763,7 @@ impl<'a> Default for UpdatePaymentIntentPaymentMethodOptionsAcssDebit<'a> { } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsAcssDebitMandateOptions<'a> { /// A URL for custom mandate text to render during confirmation step. /// The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,. @@ -10962,6 +11056,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsAffirm<'a> { /// Controls when the funds will be captured from the customer's account. /// @@ -11119,6 +11214,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsAfterpayClearpay<'a> { /// Controls when the funds will be captured from the customer's account. /// @@ -11274,6 +11370,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsAlipay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -11365,6 +11462,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsAmazonPay { /// Controls when the funds will be captured from the customer's account. /// @@ -11517,6 +11615,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsAuBecsDebit { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -11608,6 +11707,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsBacsDebit { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -11699,6 +11799,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsBancontact { /// Preferred language of the Bancontact authorization page that the customer is redirected to. #[serde(skip_serializing_if = "Option::is_none")] @@ -11853,6 +11954,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsBlik<'a> { /// The 6-digit BLIK code that a customer has generated using their banking application. /// Can only be set on confirmation. @@ -11943,6 +12045,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodOptionsBli } /// If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsBoleto { /// The number of calendar days before a Boleto voucher expires. /// For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. @@ -12041,6 +12144,7 @@ impl<'de> serde::Deserialize<'de> } /// Configuration for any card payments attempted on this PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsCard<'a> { /// Controls when the funds will be captured from the customer's account. /// @@ -12215,6 +12319,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodOptionsCar /// /// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsCardInstallments { /// Setting to true enables installments for this PaymentIntent. /// This will cause the response to contain a list of available installment plans. @@ -12239,6 +12344,7 @@ impl Default for UpdatePaymentIntentPaymentMethodOptionsCardInstallments { /// The selected installment plan to use for this payment attempt. /// This parameter can only be provided during confirmation. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsCardInstallmentsPlan { /// For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. pub count: u64, @@ -12371,6 +12477,7 @@ impl<'de> serde::Deserialize<'de> } /// Configuration options for setting up an eMandate for cards issued in India. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsCardMandateOptions<'a> { /// Amount to be charged for future payments. pub amount: i64, @@ -13064,6 +13171,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodOptionsCar /// If 3D Secure authentication was performed with a third-party provider, /// the authentication details to use for this payment. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecure<'a> { /// The `transStatus` returned from the card Issuer’s ACS in the ARes. #[serde(skip_serializing_if = "Option::is_none")] @@ -13328,6 +13436,7 @@ impl<'de> serde::Deserialize<'de> /// explicit card brand choice. The parameter `payment_method_options.card.network`` /// must be populated accordingly #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions<'a> { /// Cartes Bancaires-specific 3DS fields. #[serde(skip_serializing_if = "Option::is_none")] @@ -13347,6 +13456,7 @@ impl<'a> Default for UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetw } /// Cartes Bancaires-specific 3DS fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires<'a> { /// The cryptogram calculation algorithm used by the card Issuer's ACS /// to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. @@ -13515,6 +13625,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsCashapp { /// Controls when the funds will be captured from the customer's account. /// @@ -13675,6 +13786,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsCustomerBalance<'a> { /// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. #[serde(skip_serializing_if = "Option::is_none")] @@ -13708,6 +13820,7 @@ impl<'a> Default for UpdatePaymentIntentPaymentMethodOptionsCustomerBalance<'a> } /// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer<'a> { /// Configuration for the eu_bank_transfer funding type. #[serde(skip_serializing_if = "Option::is_none")] @@ -13993,6 +14106,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsEps { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -14079,6 +14193,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodOptionsEps } /// If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsFpx { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -14165,6 +14280,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodOptionsFpx } /// If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsGiropay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -14253,6 +14369,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsGrabpay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -14341,6 +14458,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsIdeal { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -14430,6 +14548,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodOptionsIde } /// If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsKlarna { /// Controls when the funds will be captured from the customer's account. /// @@ -14771,6 +14890,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsKonbini<'a> { /// An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. /// Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. @@ -14882,6 +15002,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsLink<'a> { /// Controls when the funds will be captured from the customer's account. /// @@ -15040,6 +15161,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodOptionsLin } /// If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsMobilepay { /// Controls when the funds will be captured from the customer's account. /// @@ -15193,6 +15315,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsOxxo { /// The number of calendar days before an OXXO voucher expires. /// For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. @@ -15283,6 +15406,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodOptionsOxx } /// If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsP24 { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -15372,6 +15496,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodOptionsP24 } /// If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsPaynow { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -15460,6 +15585,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsPaypal<'a> { /// Controls when the funds will be captured from the customer's account. #[serde(skip_serializing_if = "Option::is_none")] @@ -15740,6 +15866,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsPix { /// The number of seconds (between 10 and 1209600) after which Pix payment will expire. /// Defaults to 86400 seconds. @@ -15834,6 +15961,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodOptionsPix } /// If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsPromptpay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -15919,6 +16047,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsRevolutPay { /// Controls when the funds will be captured from the customer's account. /// @@ -16071,6 +16200,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsSepaDebit { /// Additional fields for Mandate creation #[serde(skip_serializing_if = "Option::is_none")] @@ -16166,6 +16296,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsSofort { /// Language shown to the payer on redirect. #[serde(skip_serializing_if = "Option::is_none")] @@ -16335,6 +16466,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsSwish<'a> { /// The order ID displayed in the Swish app after the payment is authorized. #[serde(skip_serializing_if = "Option::is_none")] @@ -16424,6 +16556,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodOptionsSwi } /// If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccount<'a> { /// Additional fields for Financial Connections Session creation #[serde(skip_serializing_if = "Option::is_none")] @@ -16474,6 +16607,7 @@ impl<'a> Default for UpdatePaymentIntentPaymentMethodOptionsUsBankAccount<'a> { } /// Additional fields for Financial Connections Session creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections<'a> { /// The list of permissions to request. /// If this parameter is passed, the `payment_method` permission must be included. @@ -16643,6 +16777,7 @@ impl<'de> serde::Deserialize<'de> } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions { /// The method used to collect offline mandate customer acceptance. #[serde(skip_serializing_if = "Option::is_none")] @@ -16722,6 +16857,7 @@ impl<'de> serde::Deserialize<'de> } /// Additional fields for network related functions #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsUsBankAccountNetworks<'a> { /// Triggers validations to run across the selected networks #[serde(skip_serializing_if = "Option::is_none")] @@ -16985,6 +17121,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsWechatPay<'a> { /// The app ID registered with WeChat Pay. Only required when client is ios or android. #[serde(skip_serializing_if = "Option::is_none")] @@ -17131,6 +17268,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentPaymentMethodOptionsZip { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -17217,6 +17355,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentIntentPaymentMethodOptionsZip } /// Shipping information for this PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentShipping<'a> { /// Shipping address. pub address: UpdatePaymentIntentShippingAddress<'a>, @@ -17240,6 +17379,7 @@ impl<'a> UpdatePaymentIntentShipping<'a> { } /// Shipping address. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntentShippingAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -17278,6 +17418,7 @@ impl<'a> Default for UpdatePaymentIntentShippingAddress<'a> { /// update and confirm at the same time, we recommend updating properties through /// the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) instead. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentIntent<'a> { inner: UpdatePaymentIntentBuilder<'a>, intent: &'a stripe_shared::PaymentIntentId, @@ -17459,6 +17600,7 @@ impl StripeRequest for UpdatePaymentIntent<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ApplyCustomerBalancePaymentIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -17474,6 +17616,7 @@ impl<'a> ApplyCustomerBalancePaymentIntentBuilder<'a> { } /// Manually reconcile the remaining amount for a `customer_balance` PaymentIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ApplyCustomerBalancePaymentIntent<'a> { inner: ApplyCustomerBalancePaymentIntentBuilder<'a>, intent: &'a stripe_shared::PaymentIntentId, @@ -17537,6 +17680,7 @@ impl StripeRequest for ApplyCustomerBalancePaymentIntent<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CancelPaymentIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] cancellation_reason: Option, @@ -17621,6 +17765,7 @@ impl<'de> serde::Deserialize<'de> for CancelPaymentIntentCancellationReason { /// You can’t cancel the PaymentIntent for a Checkout Session. /// [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CancelPaymentIntent<'a> { inner: CancelPaymentIntentBuilder<'a>, intent: &'a stripe_shared::PaymentIntentId, @@ -17673,6 +17818,7 @@ impl StripeRequest for CancelPaymentIntent<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CapturePaymentIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount_to_capture: Option, @@ -17711,6 +17857,7 @@ impl<'a> CapturePaymentIntentBuilder<'a> { /// /// Learn more about [separate authorization and capture](https://stripe.com/docs/payments/capture-later). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CapturePaymentIntent<'a> { inner: CapturePaymentIntentBuilder<'a>, intent: &'a stripe_shared::PaymentIntentId, @@ -17804,6 +17951,7 @@ impl StripeRequest for CapturePaymentIntent<'_> { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ConfirmPaymentIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] capture_method: Option, @@ -17864,12 +18012,14 @@ impl<'a> ConfirmPaymentIntentBuilder<'a> { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum ConfirmPaymentIntentMandateData<'a> { SecretKeyParam(ConfirmPaymentIntentSecretKeyParam<'a>), ClientKeyParam(ConfirmPaymentIntentClientKeyParam<'a>), } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentSecretKeyParam<'a> { /// This hash contains details about the customer acceptance of the Mandate. pub customer_acceptance: ConfirmPaymentIntentSecretKeyParamCustomerAcceptance<'a>, @@ -17883,6 +18033,7 @@ impl<'a> ConfirmPaymentIntentSecretKeyParam<'a> { } /// This hash contains details about the customer acceptance of the Mandate. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentSecretKeyParamCustomerAcceptance<'a> { /// The time at which the customer accepted the Mandate. #[serde(skip_serializing_if = "Option::is_none")] @@ -17964,6 +18115,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentSecretKeyParamCustomer } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentClientKeyParam<'a> { /// This hash contains details about the customer acceptance of the Mandate. pub customer_acceptance: ConfirmPaymentIntentClientKeyParamCustomerAcceptance<'a>, @@ -17977,6 +18129,7 @@ impl<'a> ConfirmPaymentIntentClientKeyParam<'a> { } /// This hash contains details about the customer acceptance of the Mandate. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentClientKeyParamCustomerAcceptance<'a> { /// If this is a Mandate accepted online, this hash contains details about the online acceptance. pub online: ConfirmPaymentIntentClientKeyParamCustomerAcceptanceOnline<'a>, @@ -17994,6 +18147,7 @@ impl<'a> ConfirmPaymentIntentClientKeyParamCustomerAcceptance<'a> { } /// If this is a Mandate accepted online, this hash contains details about the online acceptance. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentClientKeyParamCustomerAcceptanceOnline<'a> { /// The IP address from which the Mandate was accepted by the customer. #[serde(skip_serializing_if = "Option::is_none")] @@ -18070,6 +18224,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentClientKeyParamCustomer /// Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. /// Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum ConfirmPaymentIntentOffSession { Bool(bool), @@ -18080,6 +18235,7 @@ pub enum ConfirmPaymentIntentOffSession { /// in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method). /// property on the PaymentIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodData<'a> { /// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -18344,6 +18500,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodDataAllow } /// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodDataAuBecsDebit<'a> { /// The account number for the bank account. pub account_number: &'a str, @@ -18357,6 +18514,7 @@ impl<'a> ConfirmPaymentIntentPaymentMethodDataAuBecsDebit<'a> { } /// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodDataBacsDebit<'a> { /// Account number of the bank account that the funds will be debited from. #[serde(skip_serializing_if = "Option::is_none")] @@ -18377,6 +18535,7 @@ impl<'a> Default for ConfirmPaymentIntentPaymentMethodDataBacsDebit<'a> { } /// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodDataBillingDetails<'a> { /// Billing address. #[serde(skip_serializing_if = "Option::is_none")] @@ -18403,6 +18562,7 @@ impl<'a> Default for ConfirmPaymentIntentPaymentMethodDataBillingDetails<'a> { } /// Billing address. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodDataBillingDetailsAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -18435,6 +18595,7 @@ impl<'a> Default for ConfirmPaymentIntentPaymentMethodDataBillingDetailsAddress< } /// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodDataBoleto<'a> { /// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) pub tax_id: &'a str, @@ -18446,6 +18607,7 @@ impl<'a> ConfirmPaymentIntentPaymentMethodDataBoleto<'a> { } /// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodDataEps { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -18599,6 +18761,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodDataEpsBa } /// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodDataFpx { /// Account holder type for FPX transaction #[serde(skip_serializing_if = "Option::is_none")] @@ -18789,6 +18952,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodDataFpxBa } /// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodDataIdeal { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -18906,6 +19070,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodDataIdeal } /// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodDataKlarna { /// Customer's date of birth #[serde(skip_serializing_if = "Option::is_none")] @@ -18923,6 +19088,7 @@ impl Default for ConfirmPaymentIntentPaymentMethodDataKlarna { } /// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodDataP24 { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -19070,6 +19236,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodDataP24Ba } /// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodDataSepaDebit<'a> { /// IBAN of the bank account. pub iban: &'a str, @@ -19081,6 +19248,7 @@ impl<'a> ConfirmPaymentIntentPaymentMethodDataSepaDebit<'a> { } /// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodDataSofort { /// Two-letter ISO code representing the country the bank account is located in. pub country: ConfirmPaymentIntentPaymentMethodDataSofortCountry, @@ -19318,6 +19486,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodDataType } /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodDataUsBankAccount<'a> { /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] @@ -19470,6 +19639,7 @@ impl<'de> serde::Deserialize<'de> } /// Payment method-specific configuration for this PaymentIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptions<'a> { /// If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. #[serde(skip_serializing_if = "Option::is_none")] @@ -19634,6 +19804,7 @@ impl<'a> Default for ConfirmPaymentIntentPaymentMethodOptions<'a> { } /// If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsAcssDebit<'a> { /// Additional fields for Mandate creation #[serde(skip_serializing_if = "Option::is_none")] @@ -19667,6 +19838,7 @@ impl<'a> Default for ConfirmPaymentIntentPaymentMethodOptionsAcssDebit<'a> { } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsAcssDebitMandateOptions<'a> { /// A URL for custom mandate text to render during confirmation step. /// The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,. @@ -19959,6 +20131,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsAffirm<'a> { /// Controls when the funds will be captured from the customer's account. /// @@ -20116,6 +20289,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsAfterpayClearpay<'a> { /// Controls when the funds will be captured from the customer's account. /// @@ -20275,6 +20449,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsAlipay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -20366,6 +20541,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsAmazonPay { /// Controls when the funds will be captured from the customer's account. /// @@ -20518,6 +20694,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsAuBecsDebit { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -20609,6 +20786,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsBacsDebit { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -20700,6 +20878,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsBancontact { /// Preferred language of the Bancontact authorization page that the customer is redirected to. #[serde(skip_serializing_if = "Option::is_none")] @@ -20854,6 +21033,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsBlik<'a> { /// The 6-digit BLIK code that a customer has generated using their banking application. /// Can only be set on confirmation. @@ -20944,6 +21124,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodOptionsBl } /// If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsBoleto { /// The number of calendar days before a Boleto voucher expires. /// For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. @@ -21042,6 +21223,7 @@ impl<'de> serde::Deserialize<'de> } /// Configuration for any card payments attempted on this PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsCard<'a> { /// Controls when the funds will be captured from the customer's account. /// @@ -21216,6 +21398,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodOptionsCa /// /// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsCardInstallments { /// Setting to true enables installments for this PaymentIntent. /// This will cause the response to contain a list of available installment plans. @@ -21240,6 +21423,7 @@ impl Default for ConfirmPaymentIntentPaymentMethodOptionsCardInstallments { /// The selected installment plan to use for this payment attempt. /// This parameter can only be provided during confirmation. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsCardInstallmentsPlan { /// For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. pub count: u64, @@ -21368,6 +21552,7 @@ impl<'de> serde::Deserialize<'de> } /// Configuration options for setting up an eMandate for cards issued in India. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsCardMandateOptions<'a> { /// Amount to be charged for future payments. pub amount: i64, @@ -22069,6 +22254,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodOptionsCa /// If 3D Secure authentication was performed with a third-party provider, /// the authentication details to use for this payment. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsCardThreeDSecure<'a> { /// The `transStatus` returned from the card Issuer’s ACS in the ARes. #[serde(skip_serializing_if = "Option::is_none")] @@ -22335,6 +22521,7 @@ impl<'de> serde::Deserialize<'de> /// explicit card brand choice. The parameter `payment_method_options.card.network`` /// must be populated accordingly #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions<'a> { /// Cartes Bancaires-specific 3DS fields. #[serde(skip_serializing_if = "Option::is_none")] @@ -22354,6 +22541,7 @@ impl<'a> Default for ConfirmPaymentIntentPaymentMethodOptionsCardThreeDSecureNet } /// Cartes Bancaires-specific 3DS fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires<'a> { /// The cryptogram calculation algorithm used by the card Issuer's ACS /// to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. @@ -22510,6 +22698,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsCashapp { /// Controls when the funds will be captured from the customer's account. /// @@ -22670,6 +22859,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsCustomerBalance<'a> { /// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. #[serde(skip_serializing_if = "Option::is_none")] @@ -22703,6 +22893,7 @@ impl<'a> Default for ConfirmPaymentIntentPaymentMethodOptionsCustomerBalance<'a> } /// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer<'a> { /// Configuration for the eu_bank_transfer funding type. #[serde(skip_serializing_if = "Option::is_none")] @@ -22988,6 +23179,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsEps { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -23074,6 +23266,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodOptionsEp } /// If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsFpx { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -23160,6 +23353,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodOptionsFp } /// If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsGiropay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -23248,6 +23442,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsGrabpay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -23336,6 +23531,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsIdeal { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -23427,6 +23623,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsKlarna { /// Controls when the funds will be captured from the customer's account. /// @@ -23770,6 +23967,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsKonbini<'a> { /// An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. /// Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. @@ -23881,6 +24079,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsLink<'a> { /// Controls when the funds will be captured from the customer's account. /// @@ -24039,6 +24238,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodOptionsLi } /// If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsMobilepay { /// Controls when the funds will be captured from the customer's account. /// @@ -24192,6 +24392,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsOxxo { /// The number of calendar days before an OXXO voucher expires. /// For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. @@ -24282,6 +24483,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodOptionsOx } /// If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsP24 { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -24371,6 +24573,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodOptionsP2 } /// If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsPaynow { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -24459,6 +24662,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsPaypal<'a> { /// Controls when the funds will be captured from the customer's account. #[serde(skip_serializing_if = "Option::is_none")] @@ -24741,6 +24945,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsPix { /// The number of seconds (between 10 and 1209600) after which Pix payment will expire. /// Defaults to 86400 seconds. @@ -24835,6 +25040,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodOptionsPi } /// If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsPromptpay { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -24920,6 +25126,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsRevolutPay { /// Controls when the funds will be captured from the customer's account. /// @@ -25072,6 +25279,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsSepaDebit { /// Additional fields for Mandate creation #[serde(skip_serializing_if = "Option::is_none")] @@ -25167,6 +25375,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsSofort { /// Language shown to the payer on redirect. #[serde(skip_serializing_if = "Option::is_none")] @@ -25336,6 +25545,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsSwish<'a> { /// The order ID displayed in the Swish app after the payment is authorized. #[serde(skip_serializing_if = "Option::is_none")] @@ -25427,6 +25637,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsUsBankAccount<'a> { /// Additional fields for Financial Connections Session creation #[serde(skip_serializing_if = "Option::is_none")] @@ -25478,6 +25689,7 @@ impl<'a> Default for ConfirmPaymentIntentPaymentMethodOptionsUsBankAccount<'a> { } /// Additional fields for Financial Connections Session creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections<'a> { /// The list of permissions to request. /// If this parameter is passed, the `payment_method` permission must be included. @@ -25644,6 +25856,7 @@ impl<'de> serde::Deserialize<'de> } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions { /// The method used to collect offline mandate customer acceptance. #[serde(skip_serializing_if = "Option::is_none")] @@ -25723,6 +25936,7 @@ impl<'de> serde::Deserialize<'de> } /// Additional fields for network related functions #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsUsBankAccountNetworks<'a> { /// Triggers validations to run across the selected networks #[serde(skip_serializing_if = "Option::is_none")] @@ -25986,6 +26200,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsWechatPay<'a> { /// The app ID registered with WeChat Pay. Only required when client is ios or android. #[serde(skip_serializing_if = "Option::is_none")] @@ -26132,6 +26347,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentPaymentMethodOptionsZip { /// Indicates that you intend to make future payments with this PaymentIntent's payment method. /// @@ -26218,6 +26434,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmPaymentIntentPaymentMethodOptionsZi } /// Shipping information for this PaymentIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentShipping<'a> { /// Shipping address. pub address: ConfirmPaymentIntentShippingAddress<'a>, @@ -26241,6 +26458,7 @@ impl<'a> ConfirmPaymentIntentShipping<'a> { } /// Shipping address. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntentShippingAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -26294,6 +26512,7 @@ impl<'a> Default for ConfirmPaymentIntentShippingAddress<'a> { /// explicitly re-confirm the PaymentIntent to initiate the next payment /// attempt. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmPaymentIntent<'a> { inner: ConfirmPaymentIntentBuilder<'a>, intent: &'a stripe_shared::PaymentIntentId, @@ -26446,6 +26665,7 @@ impl StripeRequest for ConfirmPaymentIntent<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct IncrementAuthorizationPaymentIntentBuilder<'a> { amount: i64, #[serde(skip_serializing_if = "Option::is_none")] @@ -26499,6 +26719,7 @@ impl<'a> IncrementAuthorizationPaymentIntentBuilder<'a> { /// /// Learn more about [incremental authorizations](https://stripe.com/docs/terminal/features/incremental-authorizations). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct IncrementAuthorizationPaymentIntent<'a> { inner: IncrementAuthorizationPaymentIntentBuilder<'a>, intent: &'a stripe_shared::PaymentIntentId, @@ -26578,6 +26799,7 @@ impl StripeRequest for IncrementAuthorizationPaymentIntent<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct VerifyMicrodepositsPaymentIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amounts: Option<&'a [i64]>, @@ -26593,6 +26815,7 @@ impl<'a> VerifyMicrodepositsPaymentIntentBuilder<'a> { } /// Verifies microdeposits on a PaymentIntent object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct VerifyMicrodepositsPaymentIntent<'a> { inner: VerifyMicrodepositsPaymentIntentBuilder<'a>, intent: &'a stripe_shared::PaymentIntentId, @@ -26650,6 +26873,7 @@ impl StripeRequest for VerifyMicrodepositsPaymentIntent<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct OnlineParam<'a> { /// The IP address from which the Mandate was accepted by the customer. pub ip_address: &'a str, @@ -26662,6 +26886,7 @@ impl<'a> OnlineParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PaymentMethodParam<'a> { /// Customer's bank account number. pub account_number: &'a str, @@ -26680,6 +26905,7 @@ impl<'a> PaymentMethodParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DateOfBirth { /// The day of birth, between 1 and 31. pub day: i64, @@ -26694,6 +26920,7 @@ impl DateOfBirth { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RadarOptionsWithHiddenOptions<'a> { /// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. #[serde(skip_serializing_if = "Option::is_none")] @@ -26710,6 +26937,7 @@ impl<'a> Default for RadarOptionsWithHiddenOptions<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PaymentMethodOptionsParam { /// Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity). #[serde(skip_serializing_if = "Option::is_none")] @@ -26733,6 +26961,7 @@ impl Default for PaymentMethodOptionsParam { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct EuBankTransferParams<'a> { /// The desired country code of the bank account information. /// Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. @@ -26744,6 +26973,7 @@ impl<'a> EuBankTransferParams<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct TransferDataUpdateParams { /// The amount that will be transferred automatically when a charge succeeds. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-core/src/payment_source/requests.rs b/generated/async-stripe-core/src/payment_source/requests.rs index 6533c30b7..4af295c18 100644 --- a/generated/async-stripe-core/src/payment_source/requests.rs +++ b/generated/async-stripe-core/src/payment_source/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListCustomerPaymentSourceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -22,6 +23,7 @@ impl<'a> ListCustomerPaymentSourceBuilder<'a> { } /// List sources for a specified customer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListCustomerPaymentSource<'a> { inner: ListCustomerPaymentSourceBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -101,6 +103,7 @@ impl StripeRequest for ListCustomerPaymentSource<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrievePaymentSourceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -112,6 +115,7 @@ impl<'a> RetrievePaymentSourceBuilder<'a> { } /// Retrieve a specified source for a given customer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrievePaymentSource<'a> { inner: RetrievePaymentSourceBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -157,6 +161,7 @@ impl StripeRequest for RetrievePaymentSource<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateCustomerPaymentSourceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -177,6 +182,7 @@ impl<'a> CreateCustomerPaymentSourceBuilder<'a> { /// However, if the owner already has a default, then it will not change. /// To change the default, you should [update the customer](https://stripe.com/docs/api#update_customer) to have a new `default_source`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCustomerPaymentSource<'a> { inner: CreateCustomerPaymentSourceBuilder<'a>, customer: &'a stripe_shared::CustomerId, diff --git a/generated/async-stripe-core/src/payout/requests.rs b/generated/async-stripe-core/src/payout/requests.rs index a01729be8..8e3a87421 100644 --- a/generated/async-stripe-core/src/payout/requests.rs +++ b/generated/async-stripe-core/src/payout/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListPayoutBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] arrival_date: Option, @@ -38,6 +39,7 @@ impl<'a> ListPayoutBuilder<'a> { /// Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. /// The payouts return in sorted order, with the most recently created payouts appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListPayout<'a> { inner: ListPayoutBuilder<'a>, } @@ -129,6 +131,7 @@ impl StripeRequest for ListPayout<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrievePayoutBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -142,6 +145,7 @@ impl<'a> RetrievePayoutBuilder<'a> { /// Supply the unique payout ID from either a payout creation request or the payout list. /// Stripe returns the corresponding payout information. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrievePayout<'a> { inner: RetrievePayoutBuilder<'a>, payout: &'a stripe_shared::PayoutId, @@ -184,6 +188,7 @@ impl StripeRequest for RetrievePayout<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreatePayoutBuilder<'a> { amount: i64, currency: stripe_types::Currency, @@ -344,6 +349,7 @@ impl<'de> serde::Deserialize<'de> for CreatePayoutSourceType { /// If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. /// The [balance object](https://stripe.com/docs/api#balance_object) details available and pending amounts by source type. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePayout<'a> { inner: CreatePayoutBuilder<'a>, } @@ -426,6 +432,7 @@ impl StripeRequest for CreatePayout<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdatePayoutBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -441,6 +448,7 @@ impl<'a> UpdatePayoutBuilder<'a> { /// We don’t change parameters that you don’t provide. /// This request only accepts the metadata as arguments. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePayout<'a> { inner: UpdatePayoutBuilder<'a>, payout: &'a stripe_shared::PayoutId, @@ -491,6 +499,7 @@ impl StripeRequest for UpdatePayout<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CancelPayoutBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -504,6 +513,7 @@ impl<'a> CancelPayoutBuilder<'a> { /// Stripe refunds the funds to your available balance. /// You can’t cancel automatic Stripe payouts. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CancelPayout<'a> { inner: CancelPayoutBuilder<'a>, payout: &'a stripe_shared::PayoutId, @@ -547,6 +557,7 @@ impl StripeRequest for CancelPayout<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ReversePayoutBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -564,6 +575,7 @@ impl<'a> ReversePayoutBuilder<'a> { /// /// By requesting a reversal through `/v1/payouts/:id/reverse`, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ReversePayout<'a> { inner: ReversePayoutBuilder<'a>, payout: &'a stripe_shared::PayoutId, diff --git a/generated/async-stripe-core/src/refund/requests.rs b/generated/async-stripe-core/src/refund/requests.rs index 26d59d3e8..a561eb869 100644 --- a/generated/async-stripe-core/src/refund/requests.rs +++ b/generated/async-stripe-core/src/refund/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListRefundBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] charge: Option<&'a str>, @@ -35,6 +36,7 @@ impl<'a> ListRefundBuilder<'a> { /// Returns a list of all refunds you created. /// We return the refunds in sorted order, with the most recent refunds appearing first The 10 most recent refunds are always available by default on the Charge object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListRefund<'a> { inner: ListRefundBuilder<'a>, } @@ -121,6 +123,7 @@ impl StripeRequest for ListRefund<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveRefundBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -132,6 +135,7 @@ impl<'a> RetrieveRefundBuilder<'a> { } /// Retrieves the details of an existing refund. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveRefund<'a> { inner: RetrieveRefundBuilder<'a>, refund: &'a stripe_shared::RefundId, @@ -174,6 +178,7 @@ impl StripeRequest for RetrieveRefund<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateRefundBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -342,6 +347,7 @@ impl<'de> serde::Deserialize<'de> for CreateRefundReason { /// This method will raise an error when called on an already-refunded charge, /// or when trying to refund more money than is left on a charge. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateRefund<'a> { inner: CreateRefundBuilder<'a>, } @@ -453,6 +459,7 @@ impl StripeRequest for CreateRefund<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateRefundBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -469,6 +476,7 @@ impl<'a> UpdateRefundBuilder<'a> { /// /// This request only accepts `metadata` as an argument. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateRefund<'a> { inner: UpdateRefundBuilder<'a>, refund: &'a stripe_shared::RefundId, @@ -519,6 +527,7 @@ impl StripeRequest for UpdateRefund<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CancelRefundBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -533,6 +542,7 @@ impl<'a> CancelRefundBuilder<'a> { /// You can’t cancel refunds in other states. /// Only refunds for payment methods that require customer action can enter the `requires_action` state. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CancelRefund<'a> { inner: CancelRefundBuilder<'a>, refund: &'a stripe_shared::RefundId, @@ -576,6 +586,7 @@ impl StripeRequest for CancelRefund<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ExpireRefundBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -587,6 +598,7 @@ impl<'a> ExpireRefundBuilder<'a> { } /// Expire a refund with a status of `requires_action`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ExpireRefund<'a> { inner: ExpireRefundBuilder<'a>, refund: &'a str, diff --git a/generated/async-stripe-core/src/setup_attempt/requests.rs b/generated/async-stripe-core/src/setup_attempt/requests.rs index 2ed8d26ec..b154e5a73 100644 --- a/generated/async-stripe-core/src/setup_attempt/requests.rs +++ b/generated/async-stripe-core/src/setup_attempt/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListSetupAttemptBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -30,6 +31,7 @@ impl<'a> ListSetupAttemptBuilder<'a> { } /// Returns a list of SetupAttempts that associate with a provided SetupIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListSetupAttempt<'a> { inner: ListSetupAttemptBuilder<'a>, } diff --git a/generated/async-stripe-core/src/setup_intent/requests.rs b/generated/async-stripe-core/src/setup_intent/requests.rs index 1f537f203..e78d389f0 100644 --- a/generated/async-stripe-core/src/setup_intent/requests.rs +++ b/generated/async-stripe-core/src/setup_intent/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListSetupIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] attach_to_self: Option, @@ -37,6 +38,7 @@ impl<'a> ListSetupIntentBuilder<'a> { } /// Returns a list of SetupIntents. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListSetupIntent<'a> { inner: ListSetupIntentBuilder<'a>, } @@ -132,6 +134,7 @@ impl StripeRequest for ListSetupIntent<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveSetupIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] client_secret: Option<&'a str>, @@ -151,6 +154,7 @@ impl<'a> RetrieveSetupIntentBuilder<'a> { /// When retrieved with a publishable key, only a subset of properties will be returned. /// Please refer to the [SetupIntent](https://stripe.com/docs/api#setup_intent_object) object reference for more details. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveSetupIntent<'a> { inner: RetrieveSetupIntentBuilder<'a>, intent: &'a stripe_shared::SetupIntentId, @@ -200,6 +204,7 @@ impl StripeRequest for RetrieveSetupIntent<'_> { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateSetupIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] attach_to_self: Option, @@ -270,6 +275,7 @@ impl<'a> CreateSetupIntentBuilder<'a> { } /// When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentAutomaticPaymentMethods { /// Controls whether this SetupIntent will accept redirect-based payment methods. /// @@ -349,6 +355,7 @@ impl<'de> serde::Deserialize<'de> for CreateSetupIntentAutomaticPaymentMethodsAl /// This hash contains details about the mandate to create. /// This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentMandateData<'a> { /// This hash contains details about the customer acceptance of the Mandate. pub customer_acceptance: CreateSetupIntentMandateDataCustomerAcceptance<'a>, @@ -360,6 +367,7 @@ impl<'a> CreateSetupIntentMandateData<'a> { } /// This hash contains details about the customer acceptance of the Mandate. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentMandateDataCustomerAcceptance<'a> { /// The time at which the customer accepted the Mandate. #[serde(skip_serializing_if = "Option::is_none")] @@ -443,6 +451,7 @@ impl<'de> serde::Deserialize<'de> for CreateSetupIntentMandateDataCustomerAccept /// When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method). /// value in the SetupIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodData<'a> { /// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -707,6 +716,7 @@ impl<'de> serde::Deserialize<'de> for CreateSetupIntentPaymentMethodDataAllowRed } /// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodDataAuBecsDebit<'a> { /// The account number for the bank account. pub account_number: &'a str, @@ -720,6 +730,7 @@ impl<'a> CreateSetupIntentPaymentMethodDataAuBecsDebit<'a> { } /// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodDataBacsDebit<'a> { /// Account number of the bank account that the funds will be debited from. #[serde(skip_serializing_if = "Option::is_none")] @@ -740,6 +751,7 @@ impl<'a> Default for CreateSetupIntentPaymentMethodDataBacsDebit<'a> { } /// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodDataBoleto<'a> { /// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) pub tax_id: &'a str, @@ -751,6 +763,7 @@ impl<'a> CreateSetupIntentPaymentMethodDataBoleto<'a> { } /// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodDataEps { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -904,6 +917,7 @@ impl<'de> serde::Deserialize<'de> for CreateSetupIntentPaymentMethodDataEpsBank } /// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodDataFpx { /// Account holder type for FPX transaction #[serde(skip_serializing_if = "Option::is_none")] @@ -1094,6 +1108,7 @@ impl<'de> serde::Deserialize<'de> for CreateSetupIntentPaymentMethodDataFpxBank } /// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodDataIdeal { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -1211,6 +1226,7 @@ impl<'de> serde::Deserialize<'de> for CreateSetupIntentPaymentMethodDataIdealBan } /// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodDataKlarna { /// Customer's date of birth #[serde(skip_serializing_if = "Option::is_none")] @@ -1228,6 +1244,7 @@ impl Default for CreateSetupIntentPaymentMethodDataKlarna { } /// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodDataP24 { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -1375,6 +1392,7 @@ impl<'de> serde::Deserialize<'de> for CreateSetupIntentPaymentMethodDataP24Bank } /// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodDataSepaDebit<'a> { /// IBAN of the bank account. pub iban: &'a str, @@ -1386,6 +1404,7 @@ impl<'a> CreateSetupIntentPaymentMethodDataSepaDebit<'a> { } /// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodDataSofort { /// Two-letter ISO code representing the country the bank account is located in. pub country: CreateSetupIntentPaymentMethodDataSofortCountry, @@ -1623,6 +1642,7 @@ impl<'de> serde::Deserialize<'de> for CreateSetupIntentPaymentMethodDataType { } /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodDataUsBankAccount<'a> { /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] @@ -1773,6 +1793,7 @@ impl<'de> serde::Deserialize<'de> for CreateSetupIntentPaymentMethodDataUsBankAc } /// Payment method-specific configuration for this SetupIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodOptions<'a> { /// If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. #[serde(skip_serializing_if = "Option::is_none")] @@ -1822,6 +1843,7 @@ impl<'a> Default for CreateSetupIntentPaymentMethodOptions<'a> { } /// If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodOptionsAcssDebit<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -1906,6 +1928,7 @@ impl<'de> serde::Deserialize<'de> for CreateSetupIntentPaymentMethodOptionsAcssD } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions<'a> { /// A URL for custom mandate text to render during confirmation step. /// The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,. @@ -2193,6 +2216,7 @@ impl<'de> serde::Deserialize<'de> } /// Configuration for any card setup attempted on this SetupIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodOptionsCard<'a> { /// Configuration options for setting up an eMandate for cards issued in India. #[serde(skip_serializing_if = "Option::is_none")] @@ -2237,6 +2261,7 @@ impl<'a> Default for CreateSetupIntentPaymentMethodOptionsCard<'a> { } /// Configuration options for setting up an eMandate for cards issued in India. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodOptionsCardMandateOptions<'a> { /// Amount to be charged for future payments. pub amount: i64, @@ -2630,6 +2655,7 @@ impl<'de> serde::Deserialize<'de> for CreateSetupIntentPaymentMethodOptionsCardR /// If 3D Secure authentication was performed with a third-party provider, /// the authentication details to use for this setup. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecure<'a> { /// The `transStatus` returned from the card Issuer’s ACS in the ARes. #[serde(skip_serializing_if = "Option::is_none")] @@ -2831,6 +2857,7 @@ impl<'de> serde::Deserialize<'de> /// explicit card brand choice. The parameter `payment_method_options.card.network`` /// must be populated accordingly #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions<'a> { /// Cartes Bancaires-specific 3DS fields. #[serde(skip_serializing_if = "Option::is_none")] @@ -2850,6 +2877,7 @@ impl<'a> Default for CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetwor } /// Cartes Bancaires-specific 3DS fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires<'a> { /// The cryptogram calculation algorithm used by the card Issuer's ACS /// to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. @@ -3016,6 +3044,7 @@ impl<'de> serde::Deserialize<'de> for CreateSetupIntentPaymentMethodOptionsCardT } /// If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodOptionsSepaDebit { /// Additional fields for Mandate creation #[serde(skip_serializing_if = "Option::is_none")] @@ -3034,6 +3063,7 @@ impl Default for CreateSetupIntentPaymentMethodOptionsSepaDebit { } /// If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccount<'a> { /// Additional fields for Financial Connections Session creation #[serde(skip_serializing_if = "Option::is_none")] @@ -3067,6 +3097,7 @@ impl<'a> Default for CreateSetupIntentPaymentMethodOptionsUsBankAccount<'a> { } /// Additional fields for Financial Connections Session creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections<'a> { /// The list of permissions to request. /// If this parameter is passed, the `payment_method` permission must be included. @@ -3236,6 +3267,7 @@ impl<'de> serde::Deserialize<'de> } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptions { /// The method used to collect offline mandate customer acceptance. #[serde(skip_serializing_if = "Option::is_none")] @@ -3315,6 +3347,7 @@ impl<'de> serde::Deserialize<'de> } /// Additional fields for network related functions #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentPaymentMethodOptionsUsBankAccountNetworks<'a> { /// Triggers validations to run across the selected networks #[serde(skip_serializing_if = "Option::is_none")] @@ -3448,6 +3481,7 @@ impl<'de> serde::Deserialize<'de> } /// If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntentSingleUse { /// Amount the customer is granting permission to collect later. /// A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). @@ -3524,6 +3558,7 @@ impl<'de> serde::Deserialize<'de> for CreateSetupIntentUsage { /// After you create the SetupIntent, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm). /// it to collect any required permissions to charge the payment method later. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSetupIntent<'a> { inner: CreateSetupIntentBuilder<'a>, } @@ -3699,6 +3734,7 @@ impl StripeRequest for CreateSetupIntent<'_> { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateSetupIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] attach_to_self: Option, @@ -3743,6 +3779,7 @@ impl<'a> UpdateSetupIntentBuilder<'a> { /// When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method). /// value in the SetupIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodData<'a> { /// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -4007,6 +4044,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSetupIntentPaymentMethodDataAllowRed } /// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodDataAuBecsDebit<'a> { /// The account number for the bank account. pub account_number: &'a str, @@ -4020,6 +4058,7 @@ impl<'a> UpdateSetupIntentPaymentMethodDataAuBecsDebit<'a> { } /// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodDataBacsDebit<'a> { /// Account number of the bank account that the funds will be debited from. #[serde(skip_serializing_if = "Option::is_none")] @@ -4040,6 +4079,7 @@ impl<'a> Default for UpdateSetupIntentPaymentMethodDataBacsDebit<'a> { } /// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodDataBoleto<'a> { /// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) pub tax_id: &'a str, @@ -4051,6 +4091,7 @@ impl<'a> UpdateSetupIntentPaymentMethodDataBoleto<'a> { } /// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodDataEps { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -4204,6 +4245,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSetupIntentPaymentMethodDataEpsBank } /// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodDataFpx { /// Account holder type for FPX transaction #[serde(skip_serializing_if = "Option::is_none")] @@ -4394,6 +4436,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSetupIntentPaymentMethodDataFpxBank } /// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodDataIdeal { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -4511,6 +4554,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSetupIntentPaymentMethodDataIdealBan } /// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodDataKlarna { /// Customer's date of birth #[serde(skip_serializing_if = "Option::is_none")] @@ -4528,6 +4572,7 @@ impl Default for UpdateSetupIntentPaymentMethodDataKlarna { } /// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodDataP24 { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -4675,6 +4720,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSetupIntentPaymentMethodDataP24Bank } /// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodDataSepaDebit<'a> { /// IBAN of the bank account. pub iban: &'a str, @@ -4686,6 +4732,7 @@ impl<'a> UpdateSetupIntentPaymentMethodDataSepaDebit<'a> { } /// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodDataSofort { /// Two-letter ISO code representing the country the bank account is located in. pub country: UpdateSetupIntentPaymentMethodDataSofortCountry, @@ -4923,6 +4970,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSetupIntentPaymentMethodDataType { } /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodDataUsBankAccount<'a> { /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] @@ -5073,6 +5121,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSetupIntentPaymentMethodDataUsBankAc } /// Payment method-specific configuration for this SetupIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodOptions<'a> { /// If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. #[serde(skip_serializing_if = "Option::is_none")] @@ -5122,6 +5171,7 @@ impl<'a> Default for UpdateSetupIntentPaymentMethodOptions<'a> { } /// If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodOptionsAcssDebit<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -5206,6 +5256,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSetupIntentPaymentMethodOptionsAcssD } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodOptionsAcssDebitMandateOptions<'a> { /// A URL for custom mandate text to render during confirmation step. /// The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,. @@ -5493,6 +5544,7 @@ impl<'de> serde::Deserialize<'de> } /// Configuration for any card setup attempted on this SetupIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodOptionsCard<'a> { /// Configuration options for setting up an eMandate for cards issued in India. #[serde(skip_serializing_if = "Option::is_none")] @@ -5537,6 +5589,7 @@ impl<'a> Default for UpdateSetupIntentPaymentMethodOptionsCard<'a> { } /// Configuration options for setting up an eMandate for cards issued in India. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodOptionsCardMandateOptions<'a> { /// Amount to be charged for future payments. pub amount: i64, @@ -5930,6 +5983,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSetupIntentPaymentMethodOptionsCardR /// If 3D Secure authentication was performed with a third-party provider, /// the authentication details to use for this setup. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecure<'a> { /// The `transStatus` returned from the card Issuer’s ACS in the ARes. #[serde(skip_serializing_if = "Option::is_none")] @@ -6131,6 +6185,7 @@ impl<'de> serde::Deserialize<'de> /// explicit card brand choice. The parameter `payment_method_options.card.network`` /// must be populated accordingly #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions<'a> { /// Cartes Bancaires-specific 3DS fields. #[serde(skip_serializing_if = "Option::is_none")] @@ -6150,6 +6205,7 @@ impl<'a> Default for UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetwor } /// Cartes Bancaires-specific 3DS fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires<'a> { /// The cryptogram calculation algorithm used by the card Issuer's ACS /// to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. @@ -6316,6 +6372,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSetupIntentPaymentMethodOptionsCardT } /// If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodOptionsSepaDebit { /// Additional fields for Mandate creation #[serde(skip_serializing_if = "Option::is_none")] @@ -6334,6 +6391,7 @@ impl Default for UpdateSetupIntentPaymentMethodOptionsSepaDebit { } /// If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccount<'a> { /// Additional fields for Financial Connections Session creation #[serde(skip_serializing_if = "Option::is_none")] @@ -6367,6 +6425,7 @@ impl<'a> Default for UpdateSetupIntentPaymentMethodOptionsUsBankAccount<'a> { } /// Additional fields for Financial Connections Session creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections<'a> { /// The list of permissions to request. /// If this parameter is passed, the `payment_method` permission must be included. @@ -6536,6 +6595,7 @@ impl<'de> serde::Deserialize<'de> } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountMandateOptions { /// The method used to collect offline mandate customer acceptance. #[serde(skip_serializing_if = "Option::is_none")] @@ -6615,6 +6675,7 @@ impl<'de> serde::Deserialize<'de> } /// Additional fields for network related functions #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntentPaymentMethodOptionsUsBankAccountNetworks<'a> { /// Triggers validations to run across the selected networks #[serde(skip_serializing_if = "Option::is_none")] @@ -6748,6 +6809,7 @@ impl<'de> serde::Deserialize<'de> } /// Updates a SetupIntent object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSetupIntent<'a> { inner: UpdateSetupIntentBuilder<'a>, intent: &'a stripe_shared::SetupIntentId, @@ -6865,6 +6927,7 @@ impl StripeRequest for UpdateSetupIntent<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CancelSetupIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] cancellation_reason: Option, @@ -6881,6 +6944,7 @@ impl<'a> CancelSetupIntentBuilder<'a> { /// /// After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CancelSetupIntent<'a> { inner: CancelSetupIntentBuilder<'a>, intent: &'a stripe_shared::SetupIntentId, @@ -6933,6 +6997,7 @@ impl StripeRequest for CancelSetupIntent<'_> { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ConfirmSetupIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] confirmation_token: Option<&'a str>, @@ -6966,12 +7031,14 @@ impl<'a> ConfirmSetupIntentBuilder<'a> { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum ConfirmSetupIntentMandateData<'a> { SecretKeyParam(ConfirmSetupIntentSecretKeyParam<'a>), ClientKeyParam(ConfirmSetupIntentClientKeyParam<'a>), } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentSecretKeyParam<'a> { /// This hash contains details about the customer acceptance of the Mandate. pub customer_acceptance: ConfirmSetupIntentSecretKeyParamCustomerAcceptance<'a>, @@ -6985,6 +7052,7 @@ impl<'a> ConfirmSetupIntentSecretKeyParam<'a> { } /// This hash contains details about the customer acceptance of the Mandate. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentSecretKeyParamCustomerAcceptance<'a> { /// The time at which the customer accepted the Mandate. #[serde(skip_serializing_if = "Option::is_none")] @@ -7066,6 +7134,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmSetupIntentSecretKeyParamCustomerAc } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentClientKeyParam<'a> { /// This hash contains details about the customer acceptance of the Mandate. pub customer_acceptance: ConfirmSetupIntentClientKeyParamCustomerAcceptance<'a>, @@ -7079,6 +7148,7 @@ impl<'a> ConfirmSetupIntentClientKeyParam<'a> { } /// This hash contains details about the customer acceptance of the Mandate. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentClientKeyParamCustomerAcceptance<'a> { /// If this is a Mandate accepted online, this hash contains details about the online acceptance. pub online: ConfirmSetupIntentClientKeyParamCustomerAcceptanceOnline<'a>, @@ -7096,6 +7166,7 @@ impl<'a> ConfirmSetupIntentClientKeyParamCustomerAcceptance<'a> { } /// If this is a Mandate accepted online, this hash contains details about the online acceptance. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentClientKeyParamCustomerAcceptanceOnline<'a> { /// The IP address from which the Mandate was accepted by the customer. #[serde(skip_serializing_if = "Option::is_none")] @@ -7172,6 +7243,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmSetupIntentClientKeyParamCustomerAc /// When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method). /// value in the SetupIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodData<'a> { /// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -7436,6 +7508,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmSetupIntentPaymentMethodDataAllowRe } /// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodDataAuBecsDebit<'a> { /// The account number for the bank account. pub account_number: &'a str, @@ -7449,6 +7522,7 @@ impl<'a> ConfirmSetupIntentPaymentMethodDataAuBecsDebit<'a> { } /// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodDataBacsDebit<'a> { /// Account number of the bank account that the funds will be debited from. #[serde(skip_serializing_if = "Option::is_none")] @@ -7469,6 +7543,7 @@ impl<'a> Default for ConfirmSetupIntentPaymentMethodDataBacsDebit<'a> { } /// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodDataBoleto<'a> { /// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) pub tax_id: &'a str, @@ -7480,6 +7555,7 @@ impl<'a> ConfirmSetupIntentPaymentMethodDataBoleto<'a> { } /// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodDataEps { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -7633,6 +7709,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmSetupIntentPaymentMethodDataEpsBank } /// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodDataFpx { /// Account holder type for FPX transaction #[serde(skip_serializing_if = "Option::is_none")] @@ -7823,6 +7900,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmSetupIntentPaymentMethodDataFpxBank } /// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodDataIdeal { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -7940,6 +8018,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmSetupIntentPaymentMethodDataIdealBa } /// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodDataKlarna { /// Customer's date of birth #[serde(skip_serializing_if = "Option::is_none")] @@ -7957,6 +8036,7 @@ impl Default for ConfirmSetupIntentPaymentMethodDataKlarna { } /// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodDataP24 { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -8104,6 +8184,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmSetupIntentPaymentMethodDataP24Bank } /// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodDataSepaDebit<'a> { /// IBAN of the bank account. pub iban: &'a str, @@ -8115,6 +8196,7 @@ impl<'a> ConfirmSetupIntentPaymentMethodDataSepaDebit<'a> { } /// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodDataSofort { /// Two-letter ISO code representing the country the bank account is located in. pub country: ConfirmSetupIntentPaymentMethodDataSofortCountry, @@ -8352,6 +8434,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmSetupIntentPaymentMethodDataType { } /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodDataUsBankAccount<'a> { /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] @@ -8502,6 +8585,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmSetupIntentPaymentMethodDataUsBankA } /// Payment method-specific configuration for this SetupIntent. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodOptions<'a> { /// If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. #[serde(skip_serializing_if = "Option::is_none")] @@ -8551,6 +8635,7 @@ impl<'a> Default for ConfirmSetupIntentPaymentMethodOptions<'a> { } /// If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodOptionsAcssDebit<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -8635,6 +8720,7 @@ impl<'de> serde::Deserialize<'de> for ConfirmSetupIntentPaymentMethodOptionsAcss } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodOptionsAcssDebitMandateOptions<'a> { /// A URL for custom mandate text to render during confirmation step. /// The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,. @@ -8922,6 +9008,7 @@ impl<'de> serde::Deserialize<'de> } /// Configuration for any card setup attempted on this SetupIntent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodOptionsCard<'a> { /// Configuration options for setting up an eMandate for cards issued in India. #[serde(skip_serializing_if = "Option::is_none")] @@ -8966,6 +9053,7 @@ impl<'a> Default for ConfirmSetupIntentPaymentMethodOptionsCard<'a> { } /// Configuration options for setting up an eMandate for cards issued in India. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodOptionsCardMandateOptions<'a> { /// Amount to be charged for future payments. pub amount: i64, @@ -9357,6 +9445,7 @@ impl<'de> serde::Deserialize<'de> /// If 3D Secure authentication was performed with a third-party provider, /// the authentication details to use for this setup. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodOptionsCardThreeDSecure<'a> { /// The `transStatus` returned from the card Issuer’s ACS in the ARes. #[serde(skip_serializing_if = "Option::is_none")] @@ -9558,6 +9647,7 @@ impl<'de> serde::Deserialize<'de> /// explicit card brand choice. The parameter `payment_method_options.card.network`` /// must be populated accordingly #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptions<'a> { /// Cartes Bancaires-specific 3DS fields. #[serde(skip_serializing_if = "Option::is_none")] @@ -9577,6 +9667,7 @@ impl<'a> Default for ConfirmSetupIntentPaymentMethodOptionsCardThreeDSecureNetwo } /// Cartes Bancaires-specific 3DS fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires<'a> { /// The cryptogram calculation algorithm used by the card Issuer's ACS /// to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. @@ -9745,6 +9836,7 @@ impl<'de> serde::Deserialize<'de> } /// If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodOptionsSepaDebit { /// Additional fields for Mandate creation #[serde(skip_serializing_if = "Option::is_none")] @@ -9763,6 +9855,7 @@ impl Default for ConfirmSetupIntentPaymentMethodOptionsSepaDebit { } /// If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodOptionsUsBankAccount<'a> { /// Additional fields for Financial Connections Session creation #[serde(skip_serializing_if = "Option::is_none")] @@ -9796,6 +9889,7 @@ impl<'a> Default for ConfirmSetupIntentPaymentMethodOptionsUsBankAccount<'a> { } /// Additional fields for Financial Connections Session creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections<'a> { /// The list of permissions to request. /// If this parameter is passed, the `payment_method` permission must be included. @@ -9965,6 +10059,7 @@ impl<'de> serde::Deserialize<'de> } /// Additional fields for Mandate creation #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodOptionsUsBankAccountMandateOptions { /// The method used to collect offline mandate customer acceptance. #[serde(skip_serializing_if = "Option::is_none")] @@ -10044,6 +10139,7 @@ impl<'de> serde::Deserialize<'de> } /// Additional fields for network related functions #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntentPaymentMethodOptionsUsBankAccountNetworks<'a> { /// Triggers validations to run across the selected networks #[serde(skip_serializing_if = "Option::is_none")] @@ -10190,6 +10286,7 @@ impl<'de> serde::Deserialize<'de> /// `requires_payment_method` status or the `canceled` status if the /// confirmation limit is reached. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ConfirmSetupIntent<'a> { inner: ConfirmSetupIntentBuilder<'a>, intent: &'a stripe_shared::SetupIntentId, @@ -10278,6 +10375,7 @@ impl StripeRequest for ConfirmSetupIntent<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct VerifyMicrodepositsSetupIntentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amounts: Option<&'a [i64]>, @@ -10293,6 +10391,7 @@ impl<'a> VerifyMicrodepositsSetupIntentBuilder<'a> { } /// Verifies microdeposits on a SetupIntent object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct VerifyMicrodepositsSetupIntent<'a> { inner: VerifyMicrodepositsSetupIntentBuilder<'a>, intent: &'a stripe_shared::SetupIntentId, @@ -10350,6 +10449,7 @@ impl StripeRequest for VerifyMicrodepositsSetupIntent<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct OnlineParam<'a> { /// The IP address from which the Mandate was accepted by the customer. pub ip_address: &'a str, @@ -10362,6 +10462,7 @@ impl<'a> OnlineParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PaymentMethodParam<'a> { /// Customer's bank account number. pub account_number: &'a str, @@ -10380,6 +10481,7 @@ impl<'a> PaymentMethodParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BillingDetailsAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -10411,6 +10513,7 @@ impl<'a> Default for BillingDetailsAddress<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DateOfBirth { /// The day of birth, between 1 and 31. pub day: i64, @@ -10425,6 +10528,7 @@ impl DateOfBirth { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RadarOptionsWithHiddenOptions<'a> { /// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. #[serde(skip_serializing_if = "Option::is_none")] @@ -10441,6 +10545,7 @@ impl<'a> Default for RadarOptionsWithHiddenOptions<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SetupIntentPaymentMethodOptionsParam<'a> { /// \[Deprecated\] This is a legacy parameter that no longer has any function. #[serde(skip_serializing_if = "Option::is_none")] @@ -10457,6 +10562,7 @@ impl<'a> Default for SetupIntentPaymentMethodOptionsParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PaymentMethodOptionsParam<'a> { /// The PayPal Billing Agreement ID (BAID). /// This is an ID generated by PayPal which represents the mandate between the merchant and the customer. @@ -10474,6 +10580,7 @@ impl<'a> Default for PaymentMethodOptionsParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BillingDetailsInnerParams<'a> { /// Billing address. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-core/src/token/requests.rs b/generated/async-stripe-core/src/token/requests.rs index 6c7c2f98e..fa3b60896 100644 --- a/generated/async-stripe-core/src/token/requests.rs +++ b/generated/async-stripe-core/src/token/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTokenBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -14,6 +15,7 @@ impl<'a> RetrieveTokenBuilder<'a> { } /// Retrieves the token with the given ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveToken<'a> { inner: RetrieveTokenBuilder<'a>, token: &'a stripe_core::TokenId, @@ -56,6 +58,7 @@ impl StripeRequest for RetrieveToken<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTokenBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] account: Option>, @@ -90,6 +93,7 @@ impl<'a> CreateTokenBuilder<'a> { } /// Information for the account this token represents. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenAccount<'a> { /// The business type. #[serde(skip_serializing_if = "Option::is_none")] @@ -179,6 +183,7 @@ impl<'de> serde::Deserialize<'de> for CreateTokenAccountBusinessType { } /// Information about the company or business. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenAccountCompany<'a> { /// The company's primary address. #[serde(skip_serializing_if = "Option::is_none")] @@ -282,6 +287,7 @@ impl<'a> Default for CreateTokenAccountCompany<'a> { } /// The Kana variation of the company's primary address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenAccountCompanyAddressKana<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -325,6 +331,7 @@ impl<'a> Default for CreateTokenAccountCompanyAddressKana<'a> { } /// The Kanji variation of the company's primary address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenAccountCompanyAddressKanji<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -368,6 +375,7 @@ impl<'a> Default for CreateTokenAccountCompanyAddressKanji<'a> { } /// This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenAccountCompanyOwnershipDeclaration<'a> { /// The Unix timestamp marking when the beneficial owner attestation was made. #[serde(skip_serializing_if = "Option::is_none")] @@ -514,6 +522,7 @@ impl<'de> serde::Deserialize<'de> for CreateTokenAccountCompanyStructure { } /// Information on the verification state of the company. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenAccountCompanyVerification<'a> { /// A document verifying the business. #[serde(skip_serializing_if = "Option::is_none")] @@ -531,6 +540,7 @@ impl<'a> Default for CreateTokenAccountCompanyVerification<'a> { } /// A document verifying the business. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenAccountCompanyVerificationDocument<'a> { /// The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. /// The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. @@ -553,6 +563,7 @@ impl<'a> Default for CreateTokenAccountCompanyVerificationDocument<'a> { } /// Information about the person represented by the account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenAccountIndividual<'a> { /// The individual's primary address. #[serde(skip_serializing_if = "Option::is_none")] @@ -667,6 +678,7 @@ impl<'a> Default for CreateTokenAccountIndividual<'a> { } /// The Kana variation of the the individual's primary address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenAccountIndividualAddressKana<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -710,6 +722,7 @@ impl<'a> Default for CreateTokenAccountIndividualAddressKana<'a> { } /// The Kanji variation of the the individual's primary address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenAccountIndividualAddressKanji<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -811,6 +824,7 @@ impl<'de> serde::Deserialize<'de> for CreateTokenAccountIndividualPoliticalExpos } /// Describes the person’s relationship to the account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenAccountIndividualRelationship<'a> { /// 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. @@ -841,6 +855,7 @@ impl<'a> Default for CreateTokenAccountIndividualRelationship<'a> { } /// The bank account this token will represent. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenBankAccount<'a> { /// The name of the person or business that owns the bank account. /// This field is required when attaching the bank account to a `Customer` object. @@ -1018,6 +1033,7 @@ impl<'de> serde::Deserialize<'de> for CreateTokenBankAccountAccountType { /// If you also pass in a customer, the card must be the ID of a card belonging to the customer. /// Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreateTokenCard<'a> { CreditCardSpecs(CreateTokenCreditCardSpecs<'a>), @@ -1027,6 +1043,7 @@ pub enum CreateTokenCard<'a> { /// If you also pass in a customer, the card must be the ID of a card belonging to the customer. /// Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenCreditCardSpecs<'a> { /// City / District / Suburb / Town / Village. #[serde(skip_serializing_if = "Option::is_none")] @@ -1087,6 +1104,7 @@ impl<'a> CreateTokenCreditCardSpecs<'a> { } /// Contains information about card networks used to process the payment. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenCreditCardSpecsNetworks { /// The customer's preferred card network for co-branded cards. /// Supports `cartes_bancaires`, `mastercard`, or `visa`. @@ -1169,6 +1187,7 @@ impl<'de> serde::Deserialize<'de> for CreateTokenCreditCardSpecsNetworksPreferre } /// The updated CVC value this token represents. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenCvcUpdate<'a> { /// The CVC value, in string form. pub cvc: &'a str, @@ -1180,6 +1199,7 @@ impl<'a> CreateTokenCvcUpdate<'a> { } /// Information for the person this token represents. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenPerson<'a> { /// Details on the legal guardian's acceptance of the required Stripe agreements. #[serde(skip_serializing_if = "Option::is_none")] @@ -1307,6 +1327,7 @@ impl<'a> Default for CreateTokenPerson<'a> { } /// Details on the legal guardian's acceptance of the required Stripe agreements. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenPersonAdditionalTosAcceptances<'a> { /// Details on the legal guardian's acceptance of the main Stripe service agreement. #[serde(skip_serializing_if = "Option::is_none")] @@ -1324,6 +1345,7 @@ impl<'a> Default for CreateTokenPersonAdditionalTosAcceptances<'a> { } /// Details on the legal guardian's acceptance of the main Stripe service agreement. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenPersonAdditionalTosAcceptancesAccount<'a> { /// The Unix timestamp marking when the account representative accepted the service agreement. #[serde(skip_serializing_if = "Option::is_none")] @@ -1347,6 +1369,7 @@ impl<'a> Default for CreateTokenPersonAdditionalTosAcceptancesAccount<'a> { } /// The Kana variation of the person's address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenPersonAddressKana<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -1390,6 +1413,7 @@ impl<'a> Default for CreateTokenPersonAddressKana<'a> { } /// The Kanji variation of the person's address (Japan only). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenPersonAddressKanji<'a> { /// City or ward. #[serde(skip_serializing_if = "Option::is_none")] @@ -1433,6 +1457,7 @@ impl<'a> Default for CreateTokenPersonAddressKanji<'a> { } /// Documents that may be submitted to satisfy various informational requests. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenPersonDocuments<'a> { /// One or more documents that demonstrate proof that this person is authorized to represent the company. #[serde(skip_serializing_if = "Option::is_none")] @@ -1456,6 +1481,7 @@ impl<'a> Default for CreateTokenPersonDocuments<'a> { } /// The relationship that this person has with the account's legal entity. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenPersonRelationship<'a> { /// 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. @@ -1503,6 +1529,7 @@ impl<'a> Default for CreateTokenPersonRelationship<'a> { } /// The PII this token represents. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTokenPii<'a> { /// The `id_number` for the PII, in string form. #[serde(skip_serializing_if = "Option::is_none")] @@ -1523,6 +1550,7 @@ impl<'a> Default for CreateTokenPii<'a> { /// You can only use this token once. /// To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where controller.requirement_collection is `application`, which includes Custom accounts. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateToken<'a> { inner: CreateTokenBuilder<'a>, } @@ -1608,6 +1636,7 @@ impl StripeRequest for CreateToken<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct AddressSpecs<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -1639,6 +1668,7 @@ impl<'a> Default for AddressSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DateOfBirthSpecs { /// The day of birth, between 1 and 31. pub day: i64, @@ -1653,6 +1683,7 @@ impl DateOfBirthSpecs { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PersonVerificationDocumentSpecs<'a> { /// The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. /// The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. @@ -1674,6 +1705,7 @@ impl<'a> Default for PersonVerificationDocumentSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DocumentsParam<'a> { /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1690,6 +1722,7 @@ impl<'a> Default for DocumentsParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PersonVerificationSpecs<'a> { /// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-core/src/token/types.rs b/generated/async-stripe-core/src/token/types.rs index 2d9bedc72..029f48660 100644 --- a/generated/async-stripe-core/src/token/types.rs +++ b/generated/async-stripe-core/src/token/types.rs @@ -21,6 +21,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Token { pub bank_account: Option, @@ -34,7 +35,7 @@ pub struct Token { /// 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, /// Type of the token: `account`, `bank_account`, `card`, or `pii`. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: String, /// Determines if you have already used this token (you can only use tokens once). pub used: bool, diff --git a/generated/async-stripe-fraud/Cargo.toml b/generated/async-stripe-fraud/Cargo.toml index 28330afc4..86cee5cfc 100644 --- a/generated/async-stripe-fraud/Cargo.toml +++ b/generated/async-stripe-fraud/Cargo.toml @@ -28,7 +28,9 @@ async-stripe-shared = {path = "../../generated/async-stripe-shared"} [features] serialize = ["async-stripe-types/serialize","async-stripe-shared/serialize"] +serialize_extra = ["async-stripe-types/serialize_extra","async-stripe-shared/serialize_extra"] deserialize = ["async-stripe-types/deserialize","async-stripe-shared/deserialize", "dep:serde_json"] +deserialize_extra = ["async-stripe-types/deserialize_extra","async-stripe-shared/deserialize_extra", "dep:serde_json"] radar_early_fraud_warning = [] radar_value_list = [] radar_value_list_item = [] diff --git a/generated/async-stripe-fraud/src/deleted_radar_value_list.rs b/generated/async-stripe-fraud/src/deleted_radar_value_list.rs index 4fed4ce2d..3af7ba142 100644 --- a/generated/async-stripe-fraud/src/deleted_radar_value_list.rs +++ b/generated/async-stripe-fraud/src/deleted_radar_value_list.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedRadarValueList { #[allow(dead_code)] diff --git a/generated/async-stripe-fraud/src/deleted_radar_value_list_item.rs b/generated/async-stripe-fraud/src/deleted_radar_value_list_item.rs index b6c12083e..5379e75dc 100644 --- a/generated/async-stripe-fraud/src/deleted_radar_value_list_item.rs +++ b/generated/async-stripe-fraud/src/deleted_radar_value_list_item.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedRadarValueListItem { #[allow(dead_code)] diff --git a/generated/async-stripe-fraud/src/radar_early_fraud_warning/requests.rs b/generated/async-stripe-fraud/src/radar_early_fraud_warning/requests.rs index d272f8ea3..e872fa52e 100644 --- a/generated/async-stripe-fraud/src/radar_early_fraud_warning/requests.rs +++ b/generated/async-stripe-fraud/src/radar_early_fraud_warning/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListRadarEarlyFraudWarningBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] charge: Option<&'a str>, @@ -34,6 +35,7 @@ impl<'a> ListRadarEarlyFraudWarningBuilder<'a> { } /// Returns a list of early fraud warnings. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListRadarEarlyFraudWarning<'a> { inner: ListRadarEarlyFraudWarningBuilder<'a>, } @@ -121,6 +123,7 @@ impl StripeRequest for ListRadarEarlyFraudWarning<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveRadarEarlyFraudWarningBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -134,6 +137,7 @@ impl<'a> RetrieveRadarEarlyFraudWarningBuilder<'a> { /// /// Please refer to the [early fraud warning](https://stripe.com/docs/api#early_fraud_warning_object) object reference for more details. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveRadarEarlyFraudWarning<'a> { inner: RetrieveRadarEarlyFraudWarningBuilder<'a>, early_fraud_warning: &'a stripe_fraud::RadarEarlyFraudWarningId, diff --git a/generated/async-stripe-fraud/src/radar_early_fraud_warning/types.rs b/generated/async-stripe-fraud/src/radar_early_fraud_warning/types.rs index d2bdb23ae..c3d98dad5 100644 --- a/generated/async-stripe-fraud/src/radar_early_fraud_warning/types.rs +++ b/generated/async-stripe-fraud/src/radar_early_fraud_warning/types.rs @@ -3,6 +3,7 @@ /// /// Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings). #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct RadarEarlyFraudWarning { /// An EFW is actionable if it has not received a dispute and has not been fully refunded. diff --git a/generated/async-stripe-fraud/src/radar_value_list/requests.rs b/generated/async-stripe-fraud/src/radar_value_list/requests.rs index 57c9fc72e..828068372 100644 --- a/generated/async-stripe-fraud/src/radar_value_list/requests.rs +++ b/generated/async-stripe-fraud/src/radar_value_list/requests.rs @@ -5,6 +5,7 @@ use stripe_client_core::{ /// Deletes a `ValueList` object, also deleting any items contained within the value list. /// To be deleted, a value list must not be referenced in any rules. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteRadarValueList<'a> { value_list: &'a stripe_fraud::RadarValueListId, } @@ -41,6 +42,7 @@ impl StripeRequest for DeleteRadarValueList<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListRadarValueListBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] alias: Option<&'a str>, @@ -73,6 +75,7 @@ impl<'a> ListRadarValueListBuilder<'a> { /// Returns a list of `ValueList` objects. /// The objects are sorted in descending order by creation date, with the most recently created object appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListRadarValueList<'a> { inner: ListRadarValueListBuilder<'a>, } @@ -159,6 +162,7 @@ impl StripeRequest for ListRadarValueList<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveRadarValueListBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -170,6 +174,7 @@ impl<'a> RetrieveRadarValueListBuilder<'a> { } /// Retrieves a `ValueList` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveRadarValueList<'a> { inner: RetrieveRadarValueListBuilder<'a>, value_list: &'a stripe_fraud::RadarValueListId, @@ -213,6 +218,7 @@ impl StripeRequest for RetrieveRadarValueList<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateRadarValueListBuilder<'a> { alias: &'a str, #[serde(skip_serializing_if = "Option::is_none")] @@ -230,6 +236,7 @@ impl<'a> CreateRadarValueListBuilder<'a> { } /// Creates a new `ValueList` object, which can then be referenced in rules. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateRadarValueList<'a> { inner: CreateRadarValueListBuilder<'a>, } @@ -285,6 +292,7 @@ impl StripeRequest for CreateRadarValueList<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateRadarValueListBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] alias: Option<&'a str>, @@ -304,6 +312,7 @@ impl<'a> UpdateRadarValueListBuilder<'a> { /// Any parameters not provided will be left unchanged. /// Note that `item_type` is immutable. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateRadarValueList<'a> { inner: UpdateRadarValueListBuilder<'a>, value_list: &'a stripe_fraud::RadarValueListId, diff --git a/generated/async-stripe-fraud/src/radar_value_list/types.rs b/generated/async-stripe-fraud/src/radar_value_list/types.rs index 27be4c154..491712fc7 100644 --- a/generated/async-stripe-fraud/src/radar_value_list/types.rs +++ b/generated/async-stripe-fraud/src/radar_value_list/types.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct RadarValueList { /// The name of the value list for use in rules. diff --git a/generated/async-stripe-fraud/src/radar_value_list_item/requests.rs b/generated/async-stripe-fraud/src/radar_value_list_item/requests.rs index 13b519ca7..8c90b6d30 100644 --- a/generated/async-stripe-fraud/src/radar_value_list_item/requests.rs +++ b/generated/async-stripe-fraud/src/radar_value_list_item/requests.rs @@ -4,6 +4,7 @@ use stripe_client_core::{ /// Deletes a `ValueListItem` object, removing it from its parent value list. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteRadarValueListItem<'a> { item: &'a stripe_fraud::RadarValueListItemId, } @@ -40,6 +41,7 @@ impl StripeRequest for DeleteRadarValueListItem<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListRadarValueListItemBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -71,6 +73,7 @@ impl<'a> ListRadarValueListItemBuilder<'a> { /// Returns a list of `ValueListItem` objects. /// The objects are sorted in descending order by creation date, with the most recently created object appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListRadarValueListItem<'a> { inner: ListRadarValueListItemBuilder<'a>, } @@ -148,6 +151,7 @@ impl StripeRequest for ListRadarValueListItem<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveRadarValueListItemBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -159,6 +163,7 @@ impl<'a> RetrieveRadarValueListItemBuilder<'a> { } /// Retrieves a `ValueListItem` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveRadarValueListItem<'a> { inner: RetrieveRadarValueListItemBuilder<'a>, item: &'a stripe_fraud::RadarValueListItemId, @@ -202,6 +207,7 @@ impl StripeRequest for RetrieveRadarValueListItem<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateRadarValueListItemBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -215,6 +221,7 @@ impl<'a> CreateRadarValueListItemBuilder<'a> { } /// Creates a new `ValueListItem` object, which is added to the specified parent value list. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateRadarValueListItem<'a> { inner: CreateRadarValueListItemBuilder<'a>, } diff --git a/generated/async-stripe-fraud/src/radar_value_list_item/types.rs b/generated/async-stripe-fraud/src/radar_value_list_item/types.rs index 579f92f00..e227dd4c8 100644 --- a/generated/async-stripe-fraud/src/radar_value_list_item/types.rs +++ b/generated/async-stripe-fraud/src/radar_value_list_item/types.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct RadarValueListItem { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-fraud/src/review/requests.rs b/generated/async-stripe-fraud/src/review/requests.rs index 07dc5b7a7..5cd2dc004 100644 --- a/generated/async-stripe-fraud/src/review/requests.rs +++ b/generated/async-stripe-fraud/src/review/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListReviewBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -23,6 +24,7 @@ impl<'a> ListReviewBuilder<'a> { /// Returns a list of `Review` objects that have `open` set to `true`. /// The objects are sorted in descending order by creation date, with the most recently created object appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListReview<'a> { inner: ListReviewBuilder<'a>, } @@ -99,6 +101,7 @@ impl StripeRequest for ListReview<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveReviewBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -110,6 +113,7 @@ impl<'a> RetrieveReviewBuilder<'a> { } /// Retrieves a `Review` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveReview<'a> { inner: RetrieveReviewBuilder<'a>, review: &'a stripe_shared::ReviewId, @@ -152,6 +156,7 @@ impl StripeRequest for RetrieveReview<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ApproveReviewBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -163,6 +168,7 @@ impl<'a> ApproveReviewBuilder<'a> { } /// Approves a `Review` object, closing it and removing it from the list of reviews. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ApproveReview<'a> { inner: ApproveReviewBuilder<'a>, review: &'a stripe_shared::ReviewId, diff --git a/generated/async-stripe-issuing/Cargo.toml b/generated/async-stripe-issuing/Cargo.toml index 3665755b2..5327b07df 100644 --- a/generated/async-stripe-issuing/Cargo.toml +++ b/generated/async-stripe-issuing/Cargo.toml @@ -28,7 +28,9 @@ async-stripe-shared = {path = "../../generated/async-stripe-shared"} [features] serialize = ["async-stripe-types/serialize","async-stripe-shared/serialize"] +serialize_extra = ["async-stripe-types/serialize_extra","async-stripe-shared/serialize_extra"] deserialize = ["async-stripe-types/deserialize","async-stripe-shared/deserialize", "dep:serde_json"] +deserialize_extra = ["async-stripe-types/deserialize_extra","async-stripe-shared/deserialize_extra", "dep:serde_json"] issuing_authorization = [] issuing_card = [] issuing_cardholder = [] diff --git a/generated/async-stripe-issuing/src/issuing_authorization/requests.rs b/generated/async-stripe-issuing/src/issuing_authorization/requests.rs index cffc6a5f7..9dec86100 100644 --- a/generated/async-stripe-issuing/src/issuing_authorization/requests.rs +++ b/generated/async-stripe-issuing/src/issuing_authorization/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListIssuingAuthorizationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] card: Option<&'a str>, @@ -38,6 +39,7 @@ impl<'a> ListIssuingAuthorizationBuilder<'a> { /// Returns a list of Issuing `Authorization` objects. /// The objects are sorted in descending order by creation date, with the most recently created object appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListIssuingAuthorization<'a> { inner: ListIssuingAuthorizationBuilder<'a>, } @@ -130,6 +132,7 @@ impl StripeRequest for ListIssuingAuthorization<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveIssuingAuthorizationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -141,6 +144,7 @@ impl<'a> RetrieveIssuingAuthorizationBuilder<'a> { } /// Retrieves an Issuing `Authorization` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveIssuingAuthorization<'a> { inner: RetrieveIssuingAuthorizationBuilder<'a>, authorization: &'a stripe_shared::IssuingAuthorizationId, @@ -184,6 +188,7 @@ impl StripeRequest for RetrieveIssuingAuthorization<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateIssuingAuthorizationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -198,6 +203,7 @@ impl<'a> UpdateIssuingAuthorizationBuilder<'a> { /// Updates the specified Issuing `Authorization` object by setting the values of the parameters passed. /// Any parameters not provided will be left unchanged. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingAuthorization<'a> { inner: UpdateIssuingAuthorizationBuilder<'a>, authorization: &'a stripe_shared::IssuingAuthorizationId, @@ -249,6 +255,7 @@ impl StripeRequest for UpdateIssuingAuthorization<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ApproveIssuingAuthorizationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -268,6 +275,7 @@ impl<'a> ApproveIssuingAuthorizationBuilder<'a> { /// This method is deprecated. /// Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ApproveIssuingAuthorization<'a> { inner: ApproveIssuingAuthorizationBuilder<'a>, authorization: &'a stripe_shared::IssuingAuthorizationId, @@ -328,6 +336,7 @@ impl StripeRequest for ApproveIssuingAuthorization<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct DeclineIssuingAuthorizationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -344,6 +353,7 @@ impl<'a> DeclineIssuingAuthorizationBuilder<'a> { /// This method is deprecated. /// Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeclineIssuingAuthorization<'a> { inner: DeclineIssuingAuthorizationBuilder<'a>, authorization: &'a stripe_shared::IssuingAuthorizationId, @@ -398,6 +408,7 @@ impl StripeRequest for DeclineIssuingAuthorization<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateIssuingAuthorizationBuilder<'a> { amount: i64, #[serde(skip_serializing_if = "Option::is_none")] @@ -440,6 +451,7 @@ impl<'a> CreateIssuingAuthorizationBuilder<'a> { /// Detailed breakdown of amount components. /// These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingAuthorizationAmountDetails { /// The ATM withdrawal fee. #[serde(skip_serializing_if = "Option::is_none")] @@ -460,6 +472,7 @@ impl Default for CreateIssuingAuthorizationAmountDetails { } /// Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingAuthorizationMerchantData<'a> { /// A categorization of the seller's type of business. /// See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. @@ -1540,6 +1553,7 @@ impl<'de> serde::Deserialize<'de> for CreateIssuingAuthorizationMerchantDataCate } /// Details about the authorization, such as identifiers, set by the card network. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingAuthorizationNetworkData<'a> { /// Identifier assigned to the acquirer by the card network. #[serde(skip_serializing_if = "Option::is_none")] @@ -1557,6 +1571,7 @@ impl<'a> Default for CreateIssuingAuthorizationNetworkData<'a> { } /// Verifications that Stripe performed on information that the cardholder provided to the merchant. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingAuthorizationVerificationData { /// Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1718,6 +1733,7 @@ impl<'de> serde::Deserialize<'de> } /// The exemption applied to this authorization. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingAuthorizationVerificationDataAuthenticationExemption { /// The entity that requested the exemption, either the acquiring merchant or the Issuing user. pub claimed_by: CreateIssuingAuthorizationVerificationDataAuthenticationExemptionClaimedBy, @@ -1980,6 +1996,7 @@ impl<'de> serde::Deserialize<'de> for CreateIssuingAuthorizationVerificationData } /// 3D Secure details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingAuthorizationVerificationDataThreeDSecure { /// The outcome of the 3D Secure authentication request. pub result: CreateIssuingAuthorizationVerificationDataThreeDSecureResult, @@ -2116,6 +2133,7 @@ impl<'de> serde::Deserialize<'de> for CreateIssuingAuthorizationWallet { } /// Create a test-mode authorization. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingAuthorization<'a> { inner: CreateIssuingAuthorizationBuilder<'a>, } @@ -2215,6 +2233,7 @@ impl StripeRequest for CreateIssuingAuthorization<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CaptureIssuingAuthorizationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] capture_amount: Option, @@ -2237,6 +2256,7 @@ impl<'a> CaptureIssuingAuthorizationBuilder<'a> { } /// Additional purchase information that is optionally provided by the merchant. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CaptureIssuingAuthorizationPurchaseDetails<'a> { /// Information about the flight that was purchased with this transaction. #[serde(skip_serializing_if = "Option::is_none")] @@ -2266,6 +2286,7 @@ impl<'a> Default for CaptureIssuingAuthorizationPurchaseDetails<'a> { } /// Information about the flight that was purchased with this transaction. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CaptureIssuingAuthorizationPurchaseDetailsFlight<'a> { /// The time that the flight departed. #[serde(skip_serializing_if = "Option::is_none")] @@ -2301,6 +2322,7 @@ impl<'a> Default for CaptureIssuingAuthorizationPurchaseDetailsFlight<'a> { } /// The legs of the trip. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CaptureIssuingAuthorizationPurchaseDetailsFlightSegments<'a> { /// The three-letter IATA airport code of the flight's destination. #[serde(skip_serializing_if = "Option::is_none")] @@ -2340,6 +2362,7 @@ impl<'a> Default for CaptureIssuingAuthorizationPurchaseDetailsFlightSegments<'a } /// Information about fuel that was purchased with this transaction. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CaptureIssuingAuthorizationPurchaseDetailsFuel<'a> { /// The type of fuel that was purchased. /// One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. @@ -2497,6 +2520,7 @@ impl<'de> serde::Deserialize<'de> for CaptureIssuingAuthorizationPurchaseDetails } /// Information about lodging that was purchased with this transaction. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CaptureIssuingAuthorizationPurchaseDetailsLodging { /// The time of checking into the lodging. #[serde(skip_serializing_if = "Option::is_none")] @@ -2517,6 +2541,7 @@ impl Default for CaptureIssuingAuthorizationPurchaseDetailsLodging { } /// The line items in the purchase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CaptureIssuingAuthorizationPurchaseDetailsReceipt<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub description: Option<&'a str>, @@ -2539,6 +2564,7 @@ impl<'a> Default for CaptureIssuingAuthorizationPurchaseDetailsReceipt<'a> { } /// Capture a test-mode authorization. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CaptureIssuingAuthorization<'a> { inner: CaptureIssuingAuthorizationBuilder<'a>, authorization: &'a str, @@ -2607,6 +2633,7 @@ impl StripeRequest for CaptureIssuingAuthorization<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ExpireIssuingAuthorizationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -2618,6 +2645,7 @@ impl<'a> ExpireIssuingAuthorizationBuilder<'a> { } /// Expire a test-mode Authorization. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ExpireIssuingAuthorization<'a> { inner: ExpireIssuingAuthorizationBuilder<'a>, authorization: &'a str, @@ -2664,6 +2692,7 @@ impl StripeRequest for ExpireIssuingAuthorization<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct IncrementIssuingAuthorizationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -2678,6 +2707,7 @@ impl<'a> IncrementIssuingAuthorizationBuilder<'a> { } /// Increment a test-mode Authorization. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct IncrementIssuingAuthorization<'a> { inner: IncrementIssuingAuthorizationBuilder<'a>, authorization: &'a str, @@ -2729,6 +2759,7 @@ impl StripeRequest for IncrementIssuingAuthorization<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ReverseIssuingAuthorizationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -2742,6 +2773,7 @@ impl<'a> ReverseIssuingAuthorizationBuilder<'a> { } /// Reverse a test-mode Authorization. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ReverseIssuingAuthorization<'a> { inner: ReverseIssuingAuthorizationBuilder<'a>, authorization: &'a str, diff --git a/generated/async-stripe-issuing/src/issuing_card/requests.rs b/generated/async-stripe-issuing/src/issuing_card/requests.rs index 85bc9e5f3..ce9e3ce92 100644 --- a/generated/async-stripe-issuing/src/issuing_card/requests.rs +++ b/generated/async-stripe-issuing/src/issuing_card/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListIssuingCardBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] cardholder: Option<&'a str>, @@ -51,6 +52,7 @@ impl<'a> ListIssuingCardBuilder<'a> { /// Returns a list of Issuing `Card` objects. /// The objects are sorted in descending order by creation date, with the most recently created object appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListIssuingCard<'a> { inner: ListIssuingCardBuilder<'a>, } @@ -161,6 +163,7 @@ impl StripeRequest for ListIssuingCard<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveIssuingCardBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -172,6 +175,7 @@ impl<'a> RetrieveIssuingCardBuilder<'a> { } /// Retrieves an Issuing `Card` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveIssuingCard<'a> { inner: RetrieveIssuingCardBuilder<'a>, card: &'a stripe_shared::IssuingCardId, @@ -214,6 +218,7 @@ impl StripeRequest for RetrieveIssuingCard<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateIssuingCardBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] cardholder: Option<&'a str>, @@ -265,6 +270,7 @@ impl<'a> CreateIssuingCardBuilder<'a> { } /// The address where the card will be shipped. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingCardShipping<'a> { /// The address that the card is shipped to. pub address: CreateIssuingCardShippingAddress<'a>, @@ -302,6 +308,7 @@ impl<'a> CreateIssuingCardShipping<'a> { } /// The address that the card is shipped to. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingCardShippingAddress<'a> { /// City, district, suburb, town, or village. pub city: &'a str, @@ -325,6 +332,7 @@ impl<'a> CreateIssuingCardShippingAddress<'a> { } /// Customs information for the shipment. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingCardShippingCustoms<'a> { /// The Economic Operators Registration and Identification (EORI) number to use for Customs. /// Required for bulk shipments to Europe. @@ -459,6 +467,7 @@ impl<'de> serde::Deserialize<'de> for CreateIssuingCardShippingType { /// Rules that control spending for this card. /// Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingCardSpendingControls<'a> { /// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. /// All other categories will be blocked. @@ -2569,6 +2578,7 @@ impl<'de> serde::Deserialize<'de> for CreateIssuingCardSpendingControlsBlockedCa } /// Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingCardSpendingControlsSpendingLimits<'a> { /// Maximum amount allowed to spend per interval. pub amount: i64, @@ -3746,6 +3756,7 @@ impl<'de> serde::Deserialize<'de> for CreateIssuingCardStatus { } /// Creates an Issuing `Card` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingCard<'a> { inner: CreateIssuingCardBuilder<'a>, } @@ -3852,6 +3863,7 @@ impl StripeRequest for CreateIssuingCard<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateIssuingCardBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] cancellation_reason: Option, @@ -3940,6 +3952,7 @@ impl<'de> serde::Deserialize<'de> for UpdateIssuingCardCancellationReason { /// Rules that control spending for this card. /// Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingCardSpendingControls<'a> { /// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. /// All other categories will be blocked. @@ -6050,6 +6063,7 @@ impl<'de> serde::Deserialize<'de> for UpdateIssuingCardSpendingControlsBlockedCa } /// Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingCardSpendingControlsSpendingLimits<'a> { /// Maximum amount allowed to spend per interval. pub amount: i64, @@ -7171,6 +7185,7 @@ impl<'de> serde::Deserialize<'de> for UpdateIssuingCardSpendingControlsSpendingL /// Updates the specified Issuing `Card` object by setting the values of the parameters passed. /// Any parameters not provided will be left unchanged. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingCard<'a> { inner: UpdateIssuingCardBuilder<'a>, card: &'a stripe_shared::IssuingCardId, @@ -7255,6 +7270,7 @@ impl StripeRequest for UpdateIssuingCard<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct DeliverCardIssuingCardBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -7266,6 +7282,7 @@ impl<'a> DeliverCardIssuingCardBuilder<'a> { } /// Updates the shipping status of the specified Issuing `Card` object to `delivered`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeliverCardIssuingCard<'a> { inner: DeliverCardIssuingCardBuilder<'a>, card: &'a str, @@ -7312,6 +7329,7 @@ impl StripeRequest for DeliverCardIssuingCard<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct FailCardIssuingCardBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -7323,6 +7341,7 @@ impl<'a> FailCardIssuingCardBuilder<'a> { } /// Updates the shipping status of the specified Issuing `Card` object to `failure`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct FailCardIssuingCard<'a> { inner: FailCardIssuingCardBuilder<'a>, card: &'a str, @@ -7369,6 +7388,7 @@ impl StripeRequest for FailCardIssuingCard<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ReturnCardIssuingCardBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -7380,6 +7400,7 @@ impl<'a> ReturnCardIssuingCardBuilder<'a> { } /// Updates the shipping status of the specified Issuing `Card` object to `returned`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ReturnCardIssuingCard<'a> { inner: ReturnCardIssuingCardBuilder<'a>, card: &'a str, @@ -7426,6 +7447,7 @@ impl StripeRequest for ReturnCardIssuingCard<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ShipCardIssuingCardBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -7437,6 +7459,7 @@ impl<'a> ShipCardIssuingCardBuilder<'a> { } /// Updates the shipping status of the specified Issuing `Card` object to `shipped`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ShipCardIssuingCard<'a> { inner: ShipCardIssuingCardBuilder<'a>, card: &'a str, @@ -7484,6 +7507,7 @@ impl StripeRequest for ShipCardIssuingCard<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct EncryptedPinParam<'a> { /// The card's desired new PIN, encrypted under Stripe's public key. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-issuing/src/issuing_cardholder/requests.rs b/generated/async-stripe-issuing/src/issuing_cardholder/requests.rs index c8abf4908..54c9b6bf0 100644 --- a/generated/async-stripe-issuing/src/issuing_cardholder/requests.rs +++ b/generated/async-stripe-issuing/src/issuing_cardholder/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListIssuingCardholderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -42,6 +43,7 @@ impl<'a> ListIssuingCardholderBuilder<'a> { /// Returns a list of Issuing `Cardholder` objects. /// The objects are sorted in descending order by creation date, with the most recently created object appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListIssuingCardholder<'a> { inner: ListIssuingCardholderBuilder<'a>, } @@ -139,6 +141,7 @@ impl StripeRequest for ListIssuingCardholder<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveIssuingCardholderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -150,6 +153,7 @@ impl<'a> RetrieveIssuingCardholderBuilder<'a> { } /// Retrieves an Issuing `Cardholder` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveIssuingCardholder<'a> { inner: RetrieveIssuingCardholderBuilder<'a>, cardholder: &'a stripe_shared::IssuingCardholderId, @@ -193,6 +197,7 @@ impl StripeRequest for RetrieveIssuingCardholder<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateIssuingCardholderBuilder<'a> { billing: BillingSpecs<'a>, #[serde(skip_serializing_if = "Option::is_none")] @@ -239,6 +244,7 @@ impl<'a> CreateIssuingCardholderBuilder<'a> { /// Rules that control spending across this cardholder's cards. /// Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingCardholderSpendingControls<'a> { /// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. /// All other categories will be blocked. @@ -2353,6 +2359,7 @@ impl<'de> serde::Deserialize<'de> for CreateIssuingCardholderSpendingControlsBlo } /// Limit spending with amount-based rules that apply across this cardholder's cards. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingCardholderSpendingControlsSpendingLimits<'a> { /// Maximum amount allowed to spend per interval. pub amount: i64, @@ -3533,6 +3540,7 @@ impl<'de> serde::Deserialize<'de> for CreateIssuingCardholderStatus { } /// Creates a new Issuing `Cardholder` object that can be issued cards. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingCardholder<'a> { inner: CreateIssuingCardholderBuilder<'a>, } @@ -3634,6 +3642,7 @@ impl StripeRequest for CreateIssuingCardholder<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateIssuingCardholderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] billing: Option>, @@ -3675,6 +3684,7 @@ impl<'a> UpdateIssuingCardholderBuilder<'a> { /// Rules that control spending across this cardholder's cards. /// Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingCardholderSpendingControls<'a> { /// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. /// All other categories will be blocked. @@ -5789,6 +5799,7 @@ impl<'de> serde::Deserialize<'de> for UpdateIssuingCardholderSpendingControlsBlo } /// Limit spending with amount-based rules that apply across this cardholder's cards. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingCardholderSpendingControlsSpendingLimits<'a> { /// Maximum amount allowed to spend per interval. pub amount: i64, @@ -6970,6 +6981,7 @@ impl<'de> serde::Deserialize<'de> for UpdateIssuingCardholderStatus { /// Updates the specified Issuing `Cardholder` object by setting the values of the parameters passed. /// Any parameters not provided will be left unchanged. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingCardholder<'a> { inner: UpdateIssuingCardholderBuilder<'a>, cardholder: &'a stripe_shared::IssuingCardholderId, @@ -7073,6 +7085,7 @@ impl StripeRequest for UpdateIssuingCardholder<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RequiredAddress<'a> { /// City, district, suburb, town, or village. pub city: &'a str, @@ -7095,6 +7108,7 @@ impl<'a> RequiredAddress<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CompanyParam<'a> { /// The entity's business ID number. #[serde(skip_serializing_if = "Option::is_none")] @@ -7111,6 +7125,7 @@ impl<'a> Default for CompanyParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct TermsAcceptanceParam<'a> { /// The Unix timestamp marking when the cardholder accepted the Authorized User Terms. /// Required for Celtic Spend Card users. @@ -7135,6 +7150,7 @@ impl<'a> Default for TermsAcceptanceParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DateOfBirthSpecs { /// The day of birth, between 1 and 31. pub day: i64, @@ -7149,6 +7165,7 @@ impl DateOfBirthSpecs { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PersonVerificationDocumentParam<'a> { /// The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. #[serde(skip_serializing_if = "Option::is_none")] @@ -7168,6 +7185,7 @@ impl<'a> Default for PersonVerificationDocumentParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BillingSpecs<'a> { /// The cardholder’s billing address. pub address: RequiredAddress<'a>, @@ -7178,6 +7196,7 @@ impl<'a> BillingSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CardIssuingParam<'a> { /// Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). /// Required for cards backed by a Celtic program. @@ -7195,6 +7214,7 @@ impl<'a> Default for CardIssuingParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PersonVerificationParam<'a> { /// An identifying document, either a passport or local ID card. #[serde(skip_serializing_if = "Option::is_none")] @@ -7211,6 +7231,7 @@ impl<'a> Default for PersonVerificationParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct IndividualParam<'a> { /// Information related to the card_issuing program for this cardholder. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-issuing/src/issuing_dispute/requests.rs b/generated/async-stripe-issuing/src/issuing_dispute/requests.rs index a5ccb4549..a0a02c46a 100644 --- a/generated/async-stripe-issuing/src/issuing_dispute/requests.rs +++ b/generated/async-stripe-issuing/src/issuing_dispute/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListIssuingDisputeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -35,6 +36,7 @@ impl<'a> ListIssuingDisputeBuilder<'a> { /// Returns a list of Issuing `Dispute` objects. /// The objects are sorted in descending order by creation date, with the most recently created object appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListIssuingDispute<'a> { inner: ListIssuingDisputeBuilder<'a>, } @@ -121,6 +123,7 @@ impl StripeRequest for ListIssuingDispute<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveIssuingDisputeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -132,6 +135,7 @@ impl<'a> RetrieveIssuingDisputeBuilder<'a> { } /// Retrieves an Issuing `Dispute` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveIssuingDispute<'a> { inner: RetrieveIssuingDisputeBuilder<'a>, dispute: &'a stripe_shared::IssuingDisputeId, @@ -175,6 +179,7 @@ impl StripeRequest for RetrieveIssuingDispute<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateIssuingDisputeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -203,6 +208,7 @@ impl<'a> CreateIssuingDisputeBuilder<'a> { } /// Evidence provided for the dispute. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingDisputeEvidence<'a> { /// Evidence provided when `reason` is 'canceled'. #[serde(skip_serializing_if = "Option::is_none")] @@ -251,6 +257,7 @@ impl<'a> Default for CreateIssuingDisputeEvidence<'a> { } /// Evidence provided when `reason` is 'canceled'. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingDisputeEvidenceCanceled<'a> { /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. #[serde(skip_serializing_if = "Option::is_none")] @@ -422,6 +429,7 @@ impl<'de> serde::Deserialize<'de> for CreateIssuingDisputeEvidenceCanceledReturn } /// Evidence provided when `reason` is 'merchandise_not_as_described'. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingDisputeEvidenceMerchandiseNotAsDescribed<'a> { /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. #[serde(skip_serializing_if = "Option::is_none")] @@ -517,6 +525,7 @@ impl<'de> serde::Deserialize<'de> } /// Evidence provided when `reason` is 'not_received'. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingDisputeEvidenceNotReceived<'a> { /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. #[serde(skip_serializing_if = "Option::is_none")] @@ -610,6 +619,7 @@ impl<'de> serde::Deserialize<'de> for CreateIssuingDisputeEvidenceNotReceivedPro } /// Evidence provided when `reason` is 'other'. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingDisputeEvidenceOther<'a> { /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. #[serde(skip_serializing_if = "Option::is_none")] @@ -770,6 +780,7 @@ impl<'de> serde::Deserialize<'de> for CreateIssuingDisputeEvidenceReason { } /// Params for disputes related to Treasury FinancialAccounts #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingDisputeTreasury<'a> { /// The ID of the ReceivedDebit to initiate an Issuings dispute for. pub received_debit: &'a str, @@ -784,6 +795,7 @@ impl<'a> CreateIssuingDisputeTreasury<'a> { /// Stripe only validates that required evidence is present during submission. /// Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingDispute<'a> { inner: CreateIssuingDisputeBuilder<'a>, } @@ -859,6 +871,7 @@ impl StripeRequest for CreateIssuingDispute<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateIssuingDisputeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -876,6 +889,7 @@ impl<'a> UpdateIssuingDisputeBuilder<'a> { } /// Evidence provided for the dispute. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingDisputeEvidence<'a> { /// Evidence provided when `reason` is 'canceled'. #[serde(skip_serializing_if = "Option::is_none")] @@ -924,6 +938,7 @@ impl<'a> Default for UpdateIssuingDisputeEvidence<'a> { } /// Evidence provided when `reason` is 'canceled'. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingDisputeEvidenceCanceled<'a> { /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. #[serde(skip_serializing_if = "Option::is_none")] @@ -1095,6 +1110,7 @@ impl<'de> serde::Deserialize<'de> for UpdateIssuingDisputeEvidenceCanceledReturn } /// Evidence provided when `reason` is 'merchandise_not_as_described'. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingDisputeEvidenceMerchandiseNotAsDescribed<'a> { /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. #[serde(skip_serializing_if = "Option::is_none")] @@ -1190,6 +1206,7 @@ impl<'de> serde::Deserialize<'de> } /// Evidence provided when `reason` is 'not_received'. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingDisputeEvidenceNotReceived<'a> { /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. #[serde(skip_serializing_if = "Option::is_none")] @@ -1283,6 +1300,7 @@ impl<'de> serde::Deserialize<'de> for UpdateIssuingDisputeEvidenceNotReceivedPro } /// Evidence provided when `reason` is 'other'. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingDisputeEvidenceOther<'a> { /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. #[serde(skip_serializing_if = "Option::is_none")] @@ -1445,6 +1463,7 @@ impl<'de> serde::Deserialize<'de> for UpdateIssuingDisputeEvidenceReason { /// Any parameters not provided will be left unchanged. /// Properties on the `evidence` object can be unset by passing in an empty string. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingDispute<'a> { inner: UpdateIssuingDisputeBuilder<'a>, dispute: &'a stripe_shared::IssuingDisputeId, @@ -1506,6 +1525,7 @@ impl StripeRequest for UpdateIssuingDispute<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct SubmitIssuingDisputeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -1521,6 +1541,7 @@ impl<'a> SubmitIssuingDisputeBuilder<'a> { /// Stripe validates that all evidence fields required for the dispute’s reason are present. /// For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SubmitIssuingDispute<'a> { inner: SubmitIssuingDisputeBuilder<'a>, dispute: &'a stripe_shared::IssuingDisputeId, @@ -1573,6 +1594,7 @@ impl StripeRequest for SubmitIssuingDispute<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct Duplicate<'a> { /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. #[serde(skip_serializing_if = "Option::is_none")] @@ -1612,6 +1634,7 @@ impl<'a> Default for Duplicate<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct Fraudulent<'a> { /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. #[serde(skip_serializing_if = "Option::is_none")] @@ -1631,6 +1654,7 @@ impl<'a> Default for Fraudulent<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ServiceNotAsDescribed<'a> { /// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-issuing/src/issuing_personalization_design/requests.rs b/generated/async-stripe-issuing/src/issuing_personalization_design/requests.rs index a621f7575..0f48fcd5a 100644 --- a/generated/async-stripe-issuing/src/issuing_personalization_design/requests.rs +++ b/generated/async-stripe-issuing/src/issuing_personalization_design/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListIssuingPersonalizationDesignBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -34,6 +35,7 @@ impl<'a> ListIssuingPersonalizationDesignBuilder<'a> { } /// Only return personalization designs with the given preferences. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListIssuingPersonalizationDesignPreferences { /// Only return the personalization design that's set as the default. /// A connected account uses the Connect platform's default design if no personalization design is set as the default. @@ -57,6 +59,7 @@ impl Default for ListIssuingPersonalizationDesignPreferences { /// Returns a list of personalization design objects. /// The objects are sorted in descending order by creation date, with the most recently created object appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListIssuingPersonalizationDesign<'a> { inner: ListIssuingPersonalizationDesignBuilder<'a>, } @@ -146,6 +149,7 @@ impl StripeRequest for ListIssuingPersonalizationDesign<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveIssuingPersonalizationDesignBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -157,6 +161,7 @@ impl<'a> RetrieveIssuingPersonalizationDesignBuilder<'a> { } /// Retrieves a personalization design object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveIssuingPersonalizationDesign<'a> { inner: RetrieveIssuingPersonalizationDesignBuilder<'a>, personalization_design: &'a stripe_shared::IssuingPersonalizationDesignId, @@ -203,6 +208,7 @@ impl StripeRequest for RetrieveIssuingPersonalizationDesign<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateIssuingPersonalizationDesignBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] card_logo: Option<&'a str>, @@ -239,6 +245,7 @@ impl<'a> CreateIssuingPersonalizationDesignBuilder<'a> { } /// Creates a personalization design object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIssuingPersonalizationDesign<'a> { inner: CreateIssuingPersonalizationDesignBuilder<'a>, } @@ -320,6 +327,7 @@ impl StripeRequest for CreateIssuingPersonalizationDesign<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateIssuingPersonalizationDesignBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] card_logo: Option<&'a str>, @@ -357,6 +365,7 @@ impl<'a> UpdateIssuingPersonalizationDesignBuilder<'a> { } /// Updates a card personalization object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingPersonalizationDesign<'a> { inner: UpdateIssuingPersonalizationDesignBuilder<'a>, personalization_design: &'a stripe_shared::IssuingPersonalizationDesignId, @@ -448,6 +457,7 @@ impl StripeRequest for UpdateIssuingPersonalizationDesign<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ActivateIssuingPersonalizationDesignBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -459,6 +469,7 @@ impl<'a> ActivateIssuingPersonalizationDesignBuilder<'a> { } /// Updates the `status` of the specified testmode personalization design object to `active`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ActivateIssuingPersonalizationDesign<'a> { inner: ActivateIssuingPersonalizationDesignBuilder<'a>, personalization_design: &'a str, @@ -507,6 +518,7 @@ impl StripeRequest for ActivateIssuingPersonalizationDesign<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct DeactivateIssuingPersonalizationDesignBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -518,6 +530,7 @@ impl<'a> DeactivateIssuingPersonalizationDesignBuilder<'a> { } /// Updates the `status` of the specified testmode personalization design object to `inactive`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeactivateIssuingPersonalizationDesign<'a> { inner: DeactivateIssuingPersonalizationDesignBuilder<'a>, personalization_design: &'a str, @@ -566,6 +579,7 @@ impl StripeRequest for DeactivateIssuingPersonalizationDesign<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RejectIssuingPersonalizationDesignBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -578,6 +592,7 @@ impl<'a> RejectIssuingPersonalizationDesignBuilder<'a> { } /// The reason(s) the personalization design was rejected. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RejectIssuingPersonalizationDesignRejectionReasons<'a> { /// The reason(s) the card logo was rejected. #[serde(skip_serializing_if = "Option::is_none")] @@ -749,6 +764,7 @@ impl<'de> serde::Deserialize<'de> } /// Updates the `status` of the specified testmode personalization design object to `rejected`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RejectIssuingPersonalizationDesign<'a> { inner: RejectIssuingPersonalizationDesignBuilder<'a>, personalization_design: &'a str, @@ -804,6 +820,7 @@ impl StripeRequest for RejectIssuingPersonalizationDesign<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CarrierTextParam<'a> { /// The footer body text of the carrier letter. #[serde(skip_serializing_if = "Option::is_none")] @@ -829,6 +846,7 @@ impl<'a> Default for CarrierTextParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PreferencesParam { /// Whether we use this personalization design to create cards when one isn't specified. /// A connected account uses the Connect platform's default design if no personalization design is set as the default design. diff --git a/generated/async-stripe-issuing/src/issuing_physical_bundle/requests.rs b/generated/async-stripe-issuing/src/issuing_physical_bundle/requests.rs index d35f46fe8..9646e2420 100644 --- a/generated/async-stripe-issuing/src/issuing_physical_bundle/requests.rs +++ b/generated/async-stripe-issuing/src/issuing_physical_bundle/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListIssuingPhysicalBundleBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -33,6 +34,7 @@ impl<'a> ListIssuingPhysicalBundleBuilder<'a> { /// Returns a list of physical bundle objects. /// The objects are sorted in descending order by creation date, with the most recently created object appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListIssuingPhysicalBundle<'a> { inner: ListIssuingPhysicalBundleBuilder<'a>, } @@ -115,6 +117,7 @@ impl StripeRequest for ListIssuingPhysicalBundle<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveIssuingPhysicalBundleBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -126,6 +129,7 @@ impl<'a> RetrieveIssuingPhysicalBundleBuilder<'a> { } /// Retrieves a physical bundle object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveIssuingPhysicalBundle<'a> { inner: RetrieveIssuingPhysicalBundleBuilder<'a>, physical_bundle: &'a stripe_shared::IssuingPhysicalBundleId, diff --git a/generated/async-stripe-issuing/src/issuing_token/requests.rs b/generated/async-stripe-issuing/src/issuing_token/requests.rs index 7dacb7bcc..3d44f9f8b 100644 --- a/generated/async-stripe-issuing/src/issuing_token/requests.rs +++ b/generated/async-stripe-issuing/src/issuing_token/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListIssuingTokenBuilder<'a> { card: &'a str, #[serde(skip_serializing_if = "Option::is_none")] @@ -33,6 +34,7 @@ impl<'a> ListIssuingTokenBuilder<'a> { } /// Lists all Issuing `Token` objects for a given card. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListIssuingToken<'a> { inner: ListIssuingTokenBuilder<'a>, } @@ -109,6 +111,7 @@ impl StripeRequest for ListIssuingToken<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveIssuingTokenBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -120,6 +123,7 @@ impl<'a> RetrieveIssuingTokenBuilder<'a> { } /// Retrieves an Issuing `Token` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveIssuingToken<'a> { inner: RetrieveIssuingTokenBuilder<'a>, token: &'a stripe_shared::IssuingTokenId, @@ -163,6 +167,7 @@ impl StripeRequest for RetrieveIssuingToken<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateIssuingTokenBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -233,6 +238,7 @@ impl<'de> serde::Deserialize<'de> for UpdateIssuingTokenStatus { } /// Attempts to update the specified Issuing `Token` object to the status specified. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingToken<'a> { inner: UpdateIssuingTokenBuilder<'a>, token: &'a stripe_shared::IssuingTokenId, diff --git a/generated/async-stripe-issuing/src/issuing_transaction/requests.rs b/generated/async-stripe-issuing/src/issuing_transaction/requests.rs index 40e708090..75d7e73f7 100644 --- a/generated/async-stripe-issuing/src/issuing_transaction/requests.rs +++ b/generated/async-stripe-issuing/src/issuing_transaction/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListIssuingTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] card: Option<&'a str>, @@ -39,6 +40,7 @@ impl<'a> ListIssuingTransactionBuilder<'a> { /// Returns a list of Issuing `Transaction` objects. /// The objects are sorted in descending order by creation date, with the most recently created object appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListIssuingTransaction<'a> { inner: ListIssuingTransactionBuilder<'a>, } @@ -131,6 +133,7 @@ impl StripeRequest for ListIssuingTransaction<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveIssuingTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -142,6 +145,7 @@ impl<'a> RetrieveIssuingTransactionBuilder<'a> { } /// Retrieves an Issuing `Transaction` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveIssuingTransaction<'a> { inner: RetrieveIssuingTransactionBuilder<'a>, transaction: &'a stripe_shared::IssuingTransactionId, @@ -185,6 +189,7 @@ impl StripeRequest for RetrieveIssuingTransaction<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateIssuingTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -199,6 +204,7 @@ impl<'a> UpdateIssuingTransactionBuilder<'a> { /// Updates the specified Issuing `Transaction` object by setting the values of the parameters passed. /// Any parameters not provided will be left unchanged. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIssuingTransaction<'a> { inner: UpdateIssuingTransactionBuilder<'a>, transaction: &'a stripe_shared::IssuingTransactionId, @@ -250,6 +256,7 @@ impl StripeRequest for UpdateIssuingTransaction<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RefundIssuingTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -263,6 +270,7 @@ impl<'a> RefundIssuingTransactionBuilder<'a> { } /// Refund a test-mode Transaction. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RefundIssuingTransaction<'a> { inner: RefundIssuingTransactionBuilder<'a>, transaction: &'a str, @@ -315,6 +323,7 @@ impl StripeRequest for RefundIssuingTransaction<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateForceCaptureIssuingTransactionBuilder<'a> { amount: i64, card: &'a str, @@ -341,6 +350,7 @@ impl<'a> CreateForceCaptureIssuingTransactionBuilder<'a> { } /// Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateForceCaptureIssuingTransactionMerchantData<'a> { /// A categorization of the seller's type of business. /// See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. @@ -1421,6 +1431,7 @@ impl<'de> serde::Deserialize<'de> for CreateForceCaptureIssuingTransactionMercha } /// Additional purchase information that is optionally provided by the merchant. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateForceCaptureIssuingTransactionPurchaseDetails<'a> { /// Information about the flight that was purchased with this transaction. #[serde(skip_serializing_if = "Option::is_none")] @@ -1450,6 +1461,7 @@ impl<'a> Default for CreateForceCaptureIssuingTransactionPurchaseDetails<'a> { } /// Information about fuel that was purchased with this transaction. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateForceCaptureIssuingTransactionPurchaseDetailsFuel<'a> { /// The type of fuel that was purchased. /// One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. @@ -1607,6 +1619,7 @@ impl<'de> serde::Deserialize<'de> for CreateForceCaptureIssuingTransactionPurcha } /// Allows the user to capture an arbitrary amount, also known as a forced capture. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateForceCaptureIssuingTransaction<'a> { inner: CreateForceCaptureIssuingTransactionBuilder<'a>, } @@ -1675,6 +1688,7 @@ impl StripeRequest for CreateForceCaptureIssuingTransaction<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateUnlinkedRefundIssuingTransactionBuilder<'a> { amount: i64, card: &'a str, @@ -1701,6 +1715,7 @@ impl<'a> CreateUnlinkedRefundIssuingTransactionBuilder<'a> { } /// Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateUnlinkedRefundIssuingTransactionMerchantData<'a> { /// A categorization of the seller's type of business. /// See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. @@ -2781,6 +2796,7 @@ impl<'de> serde::Deserialize<'de> for CreateUnlinkedRefundIssuingTransactionMerc } /// Additional purchase information that is optionally provided by the merchant. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateUnlinkedRefundIssuingTransactionPurchaseDetails<'a> { /// Information about the flight that was purchased with this transaction. #[serde(skip_serializing_if = "Option::is_none")] @@ -2810,6 +2826,7 @@ impl<'a> Default for CreateUnlinkedRefundIssuingTransactionPurchaseDetails<'a> { } /// Information about fuel that was purchased with this transaction. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateUnlinkedRefundIssuingTransactionPurchaseDetailsFuel<'a> { /// The type of fuel that was purchased. /// One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. @@ -2971,6 +2988,7 @@ impl<'de> serde::Deserialize<'de> } /// Allows the user to refund an arbitrary amount, also known as a unlinked refund. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateUnlinkedRefundIssuingTransaction<'a> { inner: CreateUnlinkedRefundIssuingTransactionBuilder<'a>, } @@ -3040,6 +3058,7 @@ impl StripeRequest for CreateUnlinkedRefundIssuingTransaction<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct FlightSegmentSpecs<'a> { /// The three-letter IATA airport code of the flight's destination. #[serde(skip_serializing_if = "Option::is_none")] @@ -3078,6 +3097,7 @@ impl<'a> Default for FlightSegmentSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct LodgingSpecs { /// The time of checking into the lodging. #[serde(skip_serializing_if = "Option::is_none")] @@ -3097,6 +3117,7 @@ impl Default for LodgingSpecs { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ReceiptSpecs<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub description: Option<&'a str>, @@ -3118,6 +3139,7 @@ impl<'a> Default for ReceiptSpecs<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct FlightSpecs<'a> { /// The time that the flight departed. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-misc/Cargo.toml b/generated/async-stripe-misc/Cargo.toml index 88def4996..373d99cb0 100644 --- a/generated/async-stripe-misc/Cargo.toml +++ b/generated/async-stripe-misc/Cargo.toml @@ -28,7 +28,9 @@ async-stripe-shared = {path = "../../generated/async-stripe-shared"} [features] serialize = ["async-stripe-types/serialize","async-stripe-shared/serialize"] +serialize_extra = ["async-stripe-types/serialize_extra","async-stripe-shared/serialize_extra"] deserialize = ["async-stripe-types/deserialize","async-stripe-shared/deserialize", "dep:serde_json"] +deserialize_extra = ["async-stripe-types/deserialize_extra","async-stripe-shared/deserialize_extra", "dep:serde_json"] apple_pay_domain = [] climate_order = [] climate_product = [] diff --git a/generated/async-stripe-misc/src/apple_pay_domain/requests.rs b/generated/async-stripe-misc/src/apple_pay_domain/requests.rs index ac62e3a0d..aff314371 100644 --- a/generated/async-stripe-misc/src/apple_pay_domain/requests.rs +++ b/generated/async-stripe-misc/src/apple_pay_domain/requests.rs @@ -4,6 +4,7 @@ use stripe_client_core::{ /// Delete an apple pay domain. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteApplePayDomain<'a> { domain: &'a str, } @@ -40,6 +41,7 @@ impl StripeRequest for DeleteApplePayDomain<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListApplePayDomainBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] domain_name: Option<&'a str>, @@ -65,6 +67,7 @@ impl<'a> ListApplePayDomainBuilder<'a> { } /// List apple pay domains. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListApplePayDomain<'a> { inner: ListApplePayDomainBuilder<'a>, } @@ -140,6 +143,7 @@ impl StripeRequest for ListApplePayDomain<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveApplePayDomainBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -151,6 +155,7 @@ impl<'a> RetrieveApplePayDomainBuilder<'a> { } /// Retrieve an apple pay domain. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveApplePayDomain<'a> { inner: RetrieveApplePayDomainBuilder<'a>, domain: &'a str, @@ -194,6 +199,7 @@ impl StripeRequest for RetrieveApplePayDomain<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateApplePayDomainBuilder<'a> { domain_name: &'a str, #[serde(skip_serializing_if = "Option::is_none")] @@ -206,6 +212,7 @@ impl<'a> CreateApplePayDomainBuilder<'a> { } /// Create an apple pay domain. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateApplePayDomain<'a> { inner: CreateApplePayDomainBuilder<'a>, } diff --git a/generated/async-stripe-misc/src/apple_pay_domain/types.rs b/generated/async-stripe-misc/src/apple_pay_domain/types.rs index a1bbd6f6d..d7cec444b 100644 --- a/generated/async-stripe-misc/src/apple_pay_domain/types.rs +++ b/generated/async-stripe-misc/src/apple_pay_domain/types.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ApplePayDomain { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-misc/src/climate_order/requests.rs b/generated/async-stripe-misc/src/climate_order/requests.rs index 66025642b..221dce53e 100644 --- a/generated/async-stripe-misc/src/climate_order/requests.rs +++ b/generated/async-stripe-misc/src/climate_order/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListClimateOrderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -21,6 +22,7 @@ impl<'a> ListClimateOrderBuilder<'a> { /// Lists all Climate order objects. The orders are returned sorted by creation date, with the /// most recently created orders appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListClimateOrder<'a> { inner: ListClimateOrderBuilder<'a>, } @@ -92,6 +94,7 @@ impl StripeRequest for ListClimateOrder<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveClimateOrderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -103,6 +106,7 @@ impl<'a> RetrieveClimateOrderBuilder<'a> { } /// Retrieves the details of a Climate order object with the given ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveClimateOrder<'a> { inner: RetrieveClimateOrderBuilder<'a>, order: &'a stripe_misc::ClimateOrderId, @@ -146,6 +150,7 @@ impl StripeRequest for RetrieveClimateOrder<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateClimateOrderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -177,6 +182,7 @@ impl<'a> CreateClimateOrderBuilder<'a> { /// Creates a Climate order object for a given Climate product. The order will be processed immediately /// after creation and payment will be deducted your Stripe balance. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateClimateOrder<'a> { inner: CreateClimateOrderBuilder<'a>, } @@ -248,6 +254,7 @@ impl StripeRequest for CreateClimateOrder<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateClimateOrderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] beneficiary: Option>, @@ -263,6 +270,7 @@ impl<'a> UpdateClimateOrderBuilder<'a> { } /// Updates the specified order by setting the values of the parameters passed. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateClimateOrder<'a> { inner: UpdateClimateOrderBuilder<'a>, order: &'a stripe_misc::ClimateOrderId, @@ -320,6 +328,7 @@ impl StripeRequest for UpdateClimateOrder<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CancelClimateOrderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -334,6 +343,7 @@ impl<'a> CancelClimateOrderBuilder<'a> { /// might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe /// provides 90 days advance notice and refunds the `amount_total`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CancelClimateOrder<'a> { inner: CancelClimateOrderBuilder<'a>, order: &'a stripe_misc::ClimateOrderId, @@ -378,6 +388,7 @@ impl StripeRequest for CancelClimateOrder<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BeneficiaryParams<'a> { /// Publicly displayable name for the end beneficiary of carbon removal. pub public_name: &'a str, diff --git a/generated/async-stripe-misc/src/climate_order/types.rs b/generated/async-stripe-misc/src/climate_order/types.rs index a3ac996e6..d345d0bf5 100644 --- a/generated/async-stripe-misc/src/climate_order/types.rs +++ b/generated/async-stripe-misc/src/climate_order/types.rs @@ -2,6 +2,7 @@ /// When you create an order, the. /// payment is deducted from your merchant balance. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ClimateOrder { /// Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. diff --git a/generated/async-stripe-misc/src/climate_product/requests.rs b/generated/async-stripe-misc/src/climate_product/requests.rs index 76e7d2451..9dc71bc30 100644 --- a/generated/async-stripe-misc/src/climate_product/requests.rs +++ b/generated/async-stripe-misc/src/climate_product/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListClimateProductBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -20,6 +21,7 @@ impl<'a> ListClimateProductBuilder<'a> { } /// Lists all available Climate product objects. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListClimateProduct<'a> { inner: ListClimateProductBuilder<'a>, } @@ -91,6 +93,7 @@ impl StripeRequest for ListClimateProduct<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveClimateProductBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -102,6 +105,7 @@ impl<'a> RetrieveClimateProductBuilder<'a> { } /// Retrieves the details of a Climate product with the given ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveClimateProduct<'a> { inner: RetrieveClimateProductBuilder<'a>, product: &'a stripe_misc::ClimateProductId, diff --git a/generated/async-stripe-misc/src/climate_product/types.rs b/generated/async-stripe-misc/src/climate_product/types.rs index c55190958..4ae88449d 100644 --- a/generated/async-stripe-misc/src/climate_product/types.rs +++ b/generated/async-stripe-misc/src/climate_product/types.rs @@ -1,6 +1,7 @@ /// A Climate product represents a type of carbon removal unit available for reservation. /// You can retrieve it to see the current price and availability. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ClimateProduct { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-misc/src/climate_supplier/requests.rs b/generated/async-stripe-misc/src/climate_supplier/requests.rs index 6de17a241..cccd2dc3d 100644 --- a/generated/async-stripe-misc/src/climate_supplier/requests.rs +++ b/generated/async-stripe-misc/src/climate_supplier/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListClimateSupplierBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -20,6 +21,7 @@ impl<'a> ListClimateSupplierBuilder<'a> { } /// Lists all available Climate supplier objects. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListClimateSupplier<'a> { inner: ListClimateSupplierBuilder<'a>, } @@ -91,6 +93,7 @@ impl StripeRequest for ListClimateSupplier<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveClimateSupplierBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -102,6 +105,7 @@ impl<'a> RetrieveClimateSupplierBuilder<'a> { } /// Retrieves a Climate supplier object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveClimateSupplier<'a> { inner: RetrieveClimateSupplierBuilder<'a>, supplier: &'a stripe_misc::ClimateSupplierId, diff --git a/generated/async-stripe-misc/src/climate_supplier/types.rs b/generated/async-stripe-misc/src/climate_supplier/types.rs index 24d61823d..164b58c71 100644 --- a/generated/async-stripe-misc/src/climate_supplier/types.rs +++ b/generated/async-stripe-misc/src/climate_supplier/types.rs @@ -1,5 +1,6 @@ /// A supplier of carbon removal. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ClimateSupplier { /// Unique identifier for the object. diff --git a/generated/async-stripe-misc/src/deleted_apple_pay_domain.rs b/generated/async-stripe-misc/src/deleted_apple_pay_domain.rs index 3b9c68a54..387898b23 100644 --- a/generated/async-stripe-misc/src/deleted_apple_pay_domain.rs +++ b/generated/async-stripe-misc/src/deleted_apple_pay_domain.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedApplePayDomain { #[allow(dead_code)] diff --git a/generated/async-stripe-misc/src/deleted_webhook_endpoint.rs b/generated/async-stripe-misc/src/deleted_webhook_endpoint.rs index 92e5f4a68..1152ba9c8 100644 --- a/generated/async-stripe-misc/src/deleted_webhook_endpoint.rs +++ b/generated/async-stripe-misc/src/deleted_webhook_endpoint.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedWebhookEndpoint { #[allow(dead_code)] diff --git a/generated/async-stripe-misc/src/entitlements_active_entitlement/requests.rs b/generated/async-stripe-misc/src/entitlements_active_entitlement/requests.rs index 69df061cc..1c3d6e6b4 100644 --- a/generated/async-stripe-misc/src/entitlements_active_entitlement/requests.rs +++ b/generated/async-stripe-misc/src/entitlements_active_entitlement/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListEntitlementsActiveEntitlementBuilder<'a> { customer: &'a str, #[serde(skip_serializing_if = "Option::is_none")] @@ -21,6 +22,7 @@ impl<'a> ListEntitlementsActiveEntitlementBuilder<'a> { } /// Retrieve a list of active entitlements for a customer #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListEntitlementsActiveEntitlement<'a> { inner: ListEntitlementsActiveEntitlementBuilder<'a>, } @@ -90,6 +92,7 @@ impl StripeRequest for ListEntitlementsActiveEntitlement<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveEntitlementsActiveEntitlementBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -101,6 +104,7 @@ impl<'a> RetrieveEntitlementsActiveEntitlementBuilder<'a> { } /// Retrieve an active entitlement #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveEntitlementsActiveEntitlement<'a> { inner: RetrieveEntitlementsActiveEntitlementBuilder<'a>, id: &'a stripe_misc::EntitlementsActiveEntitlementId, diff --git a/generated/async-stripe-misc/src/entitlements_active_entitlement/types.rs b/generated/async-stripe-misc/src/entitlements_active_entitlement/types.rs index f61fc0b32..3f6f2cc2e 100644 --- a/generated/async-stripe-misc/src/entitlements_active_entitlement/types.rs +++ b/generated/async-stripe-misc/src/entitlements_active_entitlement/types.rs @@ -1,5 +1,6 @@ /// An active entitlement describes access to a feature for a customer. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct EntitlementsActiveEntitlement { /// The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. diff --git a/generated/async-stripe-misc/src/entitlements_active_entitlement_summary.rs b/generated/async-stripe-misc/src/entitlements_active_entitlement_summary.rs index 4ce998c37..76083a7fb 100644 --- a/generated/async-stripe-misc/src/entitlements_active_entitlement_summary.rs +++ b/generated/async-stripe-misc/src/entitlements_active_entitlement_summary.rs @@ -1,5 +1,6 @@ /// A summary of a customer's active entitlements. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct EntitlementsActiveEntitlementSummary { /// The customer that is entitled to this feature. diff --git a/generated/async-stripe-misc/src/entitlements_feature/requests.rs b/generated/async-stripe-misc/src/entitlements_feature/requests.rs index b1953aca8..77528e4e9 100644 --- a/generated/async-stripe-misc/src/entitlements_feature/requests.rs +++ b/generated/async-stripe-misc/src/entitlements_feature/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListEntitlementsFeatureBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -20,6 +21,7 @@ impl<'a> ListEntitlementsFeatureBuilder<'a> { } /// Retrieve a list of features #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListEntitlementsFeature<'a> { inner: ListEntitlementsFeatureBuilder<'a>, } @@ -92,6 +94,7 @@ impl StripeRequest for ListEntitlementsFeature<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveEntitlementsFeatureBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -103,6 +106,7 @@ impl<'a> RetrieveEntitlementsFeatureBuilder<'a> { } /// Retrieves a feature #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveEntitlementsFeature<'a> { inner: RetrieveEntitlementsFeatureBuilder<'a>, id: &'a stripe_shared::EntitlementsFeatureId, @@ -146,6 +150,7 @@ impl StripeRequest for RetrieveEntitlementsFeature<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateEntitlementsFeatureBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -161,6 +166,7 @@ impl<'a> CreateEntitlementsFeatureBuilder<'a> { } /// Creates a feature #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateEntitlementsFeature<'a> { inner: CreateEntitlementsFeatureBuilder<'a>, } @@ -207,6 +213,7 @@ impl StripeRequest for CreateEntitlementsFeature<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateEntitlementsFeatureBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -224,6 +231,7 @@ impl<'a> UpdateEntitlementsFeatureBuilder<'a> { } /// Update a feature’s metadata or permanently deactivate it. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateEntitlementsFeature<'a> { inner: UpdateEntitlementsFeatureBuilder<'a>, id: &'a stripe_shared::EntitlementsFeatureId, diff --git a/generated/async-stripe-misc/src/ephemeral_key/requests.rs b/generated/async-stripe-misc/src/ephemeral_key/requests.rs index 47542019c..e6ad9bbf9 100644 --- a/generated/async-stripe-misc/src/ephemeral_key/requests.rs +++ b/generated/async-stripe-misc/src/ephemeral_key/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct DeleteEphemeralKeyBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -14,6 +15,7 @@ impl<'a> DeleteEphemeralKeyBuilder<'a> { } /// Invalidates a short-lived API key for a given resource. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteEphemeralKey<'a> { inner: DeleteEphemeralKeyBuilder<'a>, key: &'a stripe_misc::EphemeralKeyId, @@ -57,6 +59,7 @@ impl StripeRequest for DeleteEphemeralKey<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateEphemeralKeyBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] customer: Option<&'a str>, @@ -82,6 +85,7 @@ impl<'a> CreateEphemeralKeyBuilder<'a> { } /// Creates a short-lived API key for a given resource. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateEphemeralKey<'a> { inner: CreateEphemeralKeyBuilder<'a>, } diff --git a/generated/async-stripe-misc/src/ephemeral_key/types.rs b/generated/async-stripe-misc/src/ephemeral_key/types.rs index 8fe897a5b..01ca06bc7 100644 --- a/generated/async-stripe-misc/src/ephemeral_key/types.rs +++ b/generated/async-stripe-misc/src/ephemeral_key/types.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct EphemeralKey { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-misc/src/exchange_rate/requests.rs b/generated/async-stripe-misc/src/exchange_rate/requests.rs index 7bfbbd76a..1f25b7cff 100644 --- a/generated/async-stripe-misc/src/exchange_rate/requests.rs +++ b/generated/async-stripe-misc/src/exchange_rate/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListExchangeRateBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -21,6 +22,7 @@ impl<'a> ListExchangeRateBuilder<'a> { /// Returns a list of objects that contain the rates at which foreign currencies are converted to one another. /// Only shows the currencies for which Stripe supports. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListExchangeRate<'a> { inner: ListExchangeRateBuilder<'a>, } @@ -92,6 +94,7 @@ impl StripeRequest for ListExchangeRate<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveExchangeRateBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -103,6 +106,7 @@ impl<'a> RetrieveExchangeRateBuilder<'a> { } /// Retrieves the exchange rates from the given currency to every supported currency. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveExchangeRate<'a> { inner: RetrieveExchangeRateBuilder<'a>, rate_id: &'a stripe_misc::ExchangeRateId, diff --git a/generated/async-stripe-misc/src/exchange_rate/types.rs b/generated/async-stripe-misc/src/exchange_rate/types.rs index a7e4797c2..986c9f355 100644 --- a/generated/async-stripe-misc/src/exchange_rate/types.rs +++ b/generated/async-stripe-misc/src/exchange_rate/types.rs @@ -27,6 +27,7 @@ /// /// *Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.*. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ExchangeRate { /// Unique identifier for the object. diff --git a/generated/async-stripe-misc/src/financial_connections_account/requests.rs b/generated/async-stripe-misc/src/financial_connections_account/requests.rs index ec927e7a8..cfa190253 100644 --- a/generated/async-stripe-misc/src/financial_connections_account/requests.rs +++ b/generated/async-stripe-misc/src/financial_connections_account/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListFinancialConnectionsAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] account_holder: Option>, @@ -32,6 +33,7 @@ impl<'a> ListFinancialConnectionsAccountBuilder<'a> { /// If present, only return accounts that belong to the specified account holder. /// `account_holder[customer]` and `account_holder[account]` are mutually exclusive. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListFinancialConnectionsAccountAccountHolder<'a> { /// The ID of the Stripe account whose accounts will be retrieved. #[serde(skip_serializing_if = "Option::is_none")] @@ -52,6 +54,7 @@ impl<'a> Default for ListFinancialConnectionsAccountAccountHolder<'a> { } /// Returns a list of Financial Connections `Account` objects. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListFinancialConnectionsAccount<'a> { inner: ListFinancialConnectionsAccountBuilder<'a>, } @@ -139,6 +142,7 @@ impl StripeRequest for ListFinancialConnectionsAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveFinancialConnectionsAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -150,6 +154,7 @@ impl<'a> RetrieveFinancialConnectionsAccountBuilder<'a> { } /// Retrieves the details of an Financial Connections `Account`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveFinancialConnectionsAccount<'a> { inner: RetrieveFinancialConnectionsAccountBuilder<'a>, account: &'a stripe_misc::FinancialConnectionsAccountId, @@ -193,6 +198,7 @@ impl StripeRequest for RetrieveFinancialConnectionsAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListOwnersFinancialConnectionsAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -211,6 +217,7 @@ impl<'a> ListOwnersFinancialConnectionsAccountBuilder<'a> { } /// Lists all owners for a given `Account` #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListOwnersFinancialConnectionsAccount<'a> { inner: ListOwnersFinancialConnectionsAccountBuilder<'a>, account: &'a stripe_misc::FinancialConnectionsAccountId, @@ -293,6 +300,7 @@ impl StripeRequest for ListOwnersFinancialConnectionsAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct DisconnectFinancialConnectionsAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -306,6 +314,7 @@ impl<'a> DisconnectFinancialConnectionsAccountBuilder<'a> { /// You will no longer be able to access data associated with the account (e.g. /// balances, transactions). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DisconnectFinancialConnectionsAccount<'a> { inner: DisconnectFinancialConnectionsAccountBuilder<'a>, account: &'a stripe_misc::FinancialConnectionsAccountId, @@ -352,6 +361,7 @@ impl StripeRequest for DisconnectFinancialConnectionsAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RefreshFinancialConnectionsAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -423,6 +433,7 @@ impl<'de> serde::Deserialize<'de> for RefreshFinancialConnectionsAccountFeatures } /// Refreshes the data associated with a Financial Connections `Account`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RefreshFinancialConnectionsAccount<'a> { inner: RefreshFinancialConnectionsAccountBuilder<'a>, account: &'a stripe_misc::FinancialConnectionsAccountId, @@ -472,6 +483,7 @@ impl StripeRequest for RefreshFinancialConnectionsAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct SubscribeFinancialConnectionsAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -539,6 +551,7 @@ impl<'de> serde::Deserialize<'de> for SubscribeFinancialConnectionsAccountFeatur } /// Subscribes to periodic refreshes of data associated with a Financial Connections `Account`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SubscribeFinancialConnectionsAccount<'a> { inner: SubscribeFinancialConnectionsAccountBuilder<'a>, account: &'a stripe_misc::FinancialConnectionsAccountId, @@ -588,6 +601,7 @@ impl StripeRequest for SubscribeFinancialConnectionsAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UnsubscribeFinancialConnectionsAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -655,6 +669,7 @@ impl<'de> serde::Deserialize<'de> for UnsubscribeFinancialConnectionsAccountFeat } /// Unsubscribes from periodic refreshes of data associated with a Financial Connections `Account`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UnsubscribeFinancialConnectionsAccount<'a> { inner: UnsubscribeFinancialConnectionsAccountBuilder<'a>, account: &'a stripe_misc::FinancialConnectionsAccountId, diff --git a/generated/async-stripe-misc/src/financial_connections_account/types.rs b/generated/async-stripe-misc/src/financial_connections_account/types.rs index 0e8adaffd..3dd78f2f2 100644 --- a/generated/async-stripe-misc/src/financial_connections_account/types.rs +++ b/generated/async-stripe-misc/src/financial_connections_account/types.rs @@ -2,6 +2,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct FinancialConnectionsAccount { /// The account holder that this account belongs to. diff --git a/generated/async-stripe-misc/src/financial_connections_account_owner.rs b/generated/async-stripe-misc/src/financial_connections_account_owner.rs index a86d31f58..9591c8003 100644 --- a/generated/async-stripe-misc/src/financial_connections_account_owner.rs +++ b/generated/async-stripe-misc/src/financial_connections_account_owner.rs @@ -1,5 +1,6 @@ /// Describes an owner of an account. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct FinancialConnectionsAccountOwner { /// The email address of the owner. diff --git a/generated/async-stripe-misc/src/financial_connections_account_ownership.rs b/generated/async-stripe-misc/src/financial_connections_account_ownership.rs index 78e3d1d93..1143aafcb 100644 --- a/generated/async-stripe-misc/src/financial_connections_account_ownership.rs +++ b/generated/async-stripe-misc/src/financial_connections_account_ownership.rs @@ -1,5 +1,6 @@ /// Describes a snapshot of the owners of an account at a particular point in time. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct FinancialConnectionsAccountOwnership { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-misc/src/financial_connections_session/requests.rs b/generated/async-stripe-misc/src/financial_connections_session/requests.rs index bbb31496f..a44cfccf1 100644 --- a/generated/async-stripe-misc/src/financial_connections_session/requests.rs +++ b/generated/async-stripe-misc/src/financial_connections_session/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveFinancialConnectionsSessionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -14,6 +15,7 @@ impl<'a> RetrieveFinancialConnectionsSessionBuilder<'a> { } /// Retrieves the details of a Financial Connections `Session` #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveFinancialConnectionsSession<'a> { inner: RetrieveFinancialConnectionsSessionBuilder<'a>, session: &'a stripe_misc::FinancialConnectionsSessionId, @@ -57,6 +59,7 @@ impl StripeRequest for RetrieveFinancialConnectionsSession<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateFinancialConnectionsSessionBuilder<'a> { account_holder: CreateFinancialConnectionsSessionAccountHolder<'a>, #[serde(skip_serializing_if = "Option::is_none")] @@ -86,6 +89,7 @@ impl<'a> CreateFinancialConnectionsSessionBuilder<'a> { } /// The account holder to link accounts for. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateFinancialConnectionsSessionAccountHolder<'a> { /// The ID of the Stripe account whose accounts will be retrieved. /// Should only be present if `type` is `account`. @@ -164,6 +168,7 @@ impl<'de> serde::Deserialize<'de> for CreateFinancialConnectionsSessionAccountHo } /// Filters to restrict the kinds of accounts to collect. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateFinancialConnectionsSessionFilters<'a> { /// List of countries from which to collect accounts. pub countries: &'a [&'a str], @@ -176,6 +181,7 @@ impl<'a> CreateFinancialConnectionsSessionFilters<'a> { /// To launch the Financial Connections authorization flow, create a `Session`. /// The session’s `client_secret` can be used to launch the flow using Stripe.js. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateFinancialConnectionsSession<'a> { inner: CreateFinancialConnectionsSessionBuilder<'a>, } diff --git a/generated/async-stripe-misc/src/financial_connections_session/types.rs b/generated/async-stripe-misc/src/financial_connections_session/types.rs index 170080bac..e3af1d4ed 100644 --- a/generated/async-stripe-misc/src/financial_connections_session/types.rs +++ b/generated/async-stripe-misc/src/financial_connections_session/types.rs @@ -2,6 +2,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct FinancialConnectionsSession { /// The account holder for whom accounts are collected in this session. diff --git a/generated/async-stripe-misc/src/financial_connections_transaction/requests.rs b/generated/async-stripe-misc/src/financial_connections_transaction/requests.rs index f38a67b35..c12c0de8f 100644 --- a/generated/async-stripe-misc/src/financial_connections_transaction/requests.rs +++ b/generated/async-stripe-misc/src/financial_connections_transaction/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListFinancialConnectionsTransactionBuilder<'a> { account: &'a str, #[serde(skip_serializing_if = "Option::is_none")] @@ -34,6 +35,7 @@ impl<'a> ListFinancialConnectionsTransactionBuilder<'a> { /// A filter on the list based on the object `transaction_refresh` field. /// The value can be a dictionary with the following options:. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListFinancialConnectionsTransactionTransactionRefresh<'a> { /// Return results where the transactions were created or updated by a refresh that took place after this refresh (non-inclusive). pub after: &'a str, @@ -45,6 +47,7 @@ impl<'a> ListFinancialConnectionsTransactionTransactionRefresh<'a> { } /// Returns a list of Financial Connections `Transaction` objects. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListFinancialConnectionsTransaction<'a> { inner: ListFinancialConnectionsTransactionBuilder<'a>, } @@ -132,6 +135,7 @@ impl StripeRequest for ListFinancialConnectionsTransaction<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveFinancialConnectionsTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -143,6 +147,7 @@ impl<'a> RetrieveFinancialConnectionsTransactionBuilder<'a> { } /// Retrieves the details of a Financial Connections `Transaction` #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveFinancialConnectionsTransaction<'a> { inner: RetrieveFinancialConnectionsTransactionBuilder<'a>, transaction: &'a stripe_misc::FinancialConnectionsTransactionId, diff --git a/generated/async-stripe-misc/src/financial_connections_transaction/types.rs b/generated/async-stripe-misc/src/financial_connections_transaction/types.rs index a192c29dc..a4d99cbba 100644 --- a/generated/async-stripe-misc/src/financial_connections_transaction/types.rs +++ b/generated/async-stripe-misc/src/financial_connections_transaction/types.rs @@ -1,5 +1,6 @@ /// A Transaction represents a real transaction that affects a Financial Connections Account balance. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct FinancialConnectionsTransaction { /// The ID of the Financial Connections Account this transaction belongs to. diff --git a/generated/async-stripe-misc/src/forwarding_request/requests.rs b/generated/async-stripe-misc/src/forwarding_request/requests.rs index b1b4041f3..787698fc8 100644 --- a/generated/async-stripe-misc/src/forwarding_request/requests.rs +++ b/generated/async-stripe-misc/src/forwarding_request/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListForwardingRequestBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -23,6 +24,7 @@ impl<'a> ListForwardingRequestBuilder<'a> { /// Similar to other List endpoints, filters results based on created timestamp. /// You can pass gt, gte, lt, and lte timestamp values. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListForwardingRequestCreated { /// Return results where the `created` field is greater than this value. #[serde(skip_serializing_if = "Option::is_none")] @@ -49,6 +51,7 @@ impl Default for ListForwardingRequestCreated { } /// Lists all ForwardingRequest objects. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListForwardingRequest<'a> { inner: ListForwardingRequestBuilder<'a>, } @@ -123,6 +126,7 @@ impl StripeRequest for ListForwardingRequest<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveForwardingRequestBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -134,6 +138,7 @@ impl<'a> RetrieveForwardingRequestBuilder<'a> { } /// Retrieves a ForwardingRequest object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveForwardingRequest<'a> { inner: RetrieveForwardingRequestBuilder<'a>, id: &'a stripe_misc::ForwardingRequestId, @@ -177,6 +182,7 @@ impl StripeRequest for RetrieveForwardingRequest<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateForwardingRequestBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -197,6 +203,7 @@ impl<'a> CreateForwardingRequestBuilder<'a> { } /// The request body and headers to be sent to the destination endpoint. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateForwardingRequestRequest<'a> { /// The body payload to send to the destination endpoint. #[serde(skip_serializing_if = "Option::is_none")] @@ -219,6 +226,7 @@ impl<'a> Default for CreateForwardingRequestRequest<'a> { /// The headers to include in the forwarded request. /// Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateForwardingRequestRequestHeaders<'a> { /// The header name. pub name: &'a str, @@ -232,6 +240,7 @@ impl<'a> CreateForwardingRequestRequestHeaders<'a> { } /// Creates a ForwardingRequest object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateForwardingRequest<'a> { inner: CreateForwardingRequestBuilder<'a>, } diff --git a/generated/async-stripe-misc/src/forwarding_request/types.rs b/generated/async-stripe-misc/src/forwarding_request/types.rs index 68509c155..1fa0dda2c 100644 --- a/generated/async-stripe-misc/src/forwarding_request/types.rs +++ b/generated/async-stripe-misc/src/forwarding_request/types.rs @@ -16,6 +16,7 @@ /// /// Related guide: [Forward card details to third-party API endpoints](https://docs.stripe.com/payments/forwarding). #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ForwardingRequest { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-misc/src/identity_verification_report/requests.rs b/generated/async-stripe-misc/src/identity_verification_report/requests.rs index 1be7288c2..50503c29a 100644 --- a/generated/async-stripe-misc/src/identity_verification_report/requests.rs +++ b/generated/async-stripe-misc/src/identity_verification_report/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListIdentityVerificationReportBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] client_reference_id: Option<&'a str>, @@ -94,6 +95,7 @@ impl<'de> serde::Deserialize<'de> for ListIdentityVerificationReportType { } /// List all verification reports. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListIdentityVerificationReport<'a> { inner: ListIdentityVerificationReportBuilder<'a>, } @@ -189,6 +191,7 @@ impl StripeRequest for ListIdentityVerificationReport<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveIdentityVerificationReportBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -200,6 +203,7 @@ impl<'a> RetrieveIdentityVerificationReportBuilder<'a> { } /// Retrieves an existing VerificationReport #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveIdentityVerificationReport<'a> { inner: RetrieveIdentityVerificationReportBuilder<'a>, report: &'a stripe_misc::IdentityVerificationReportId, diff --git a/generated/async-stripe-misc/src/identity_verification_report/types.rs b/generated/async-stripe-misc/src/identity_verification_report/types.rs index b332d68b5..b8f0bdba4 100644 --- a/generated/async-stripe-misc/src/identity_verification_report/types.rs +++ b/generated/async-stripe-misc/src/identity_verification_report/types.rs @@ -12,6 +12,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct IdentityVerificationReport { /// A string to reference this user. @@ -30,7 +31,7 @@ pub struct IdentityVerificationReport { pub phone: Option, pub selfie: Option, /// Type of report. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: IdentityVerificationReportType, /// The configuration token of a Verification Flow from the dashboard. pub verification_flow: Option, diff --git a/generated/async-stripe-misc/src/identity_verification_session/requests.rs b/generated/async-stripe-misc/src/identity_verification_session/requests.rs index 9930d8035..bcf5b10cf 100644 --- a/generated/async-stripe-misc/src/identity_verification_session/requests.rs +++ b/generated/async-stripe-misc/src/identity_verification_session/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListIdentityVerificationSessionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] client_reference_id: Option<&'a str>, @@ -34,6 +35,7 @@ impl<'a> ListIdentityVerificationSessionBuilder<'a> { } /// Returns a list of VerificationSessions #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListIdentityVerificationSession<'a> { inner: ListIdentityVerificationSessionBuilder<'a>, } @@ -124,6 +126,7 @@ impl StripeRequest for ListIdentityVerificationSession<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveIdentityVerificationSessionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -138,6 +141,7 @@ impl<'a> RetrieveIdentityVerificationSessionBuilder<'a> { /// When the session status is `requires_input`, you can use this method to retrieve a valid /// `client_secret` or `url` to allow re-submission. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveIdentityVerificationSession<'a> { inner: RetrieveIdentityVerificationSessionBuilder<'a>, session: &'a stripe_misc::IdentityVerificationSessionId, @@ -181,6 +185,7 @@ impl StripeRequest for RetrieveIdentityVerificationSession<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateIdentityVerificationSessionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] client_reference_id: Option<&'a str>, @@ -216,6 +221,7 @@ impl<'a> CreateIdentityVerificationSessionBuilder<'a> { } /// A set of options for the session’s verification checks. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIdentityVerificationSessionOptions<'a> { /// Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). #[serde(skip_serializing_if = "Option::is_none")] @@ -233,6 +239,7 @@ impl<'a> Default for CreateIdentityVerificationSessionOptions<'a> { } /// Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIdentityVerificationSessionOptionsDocument<'a> { /// Array of strings of allowed identity document types. /// If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. @@ -391,6 +398,7 @@ impl<'de> serde::Deserialize<'de> for CreateIdentityVerificationSessionType { /// /// Related guide: [Verify your users’ identity documents](https://stripe.com/docs/identity/verify-identity-documents). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateIdentityVerificationSession<'a> { inner: CreateIdentityVerificationSessionBuilder<'a>, } @@ -477,6 +485,7 @@ impl StripeRequest for CreateIdentityVerificationSession<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateIdentityVerificationSessionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -497,6 +506,7 @@ impl<'a> UpdateIdentityVerificationSessionBuilder<'a> { } /// A set of options for the session’s verification checks. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIdentityVerificationSessionOptions<'a> { /// Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). #[serde(skip_serializing_if = "Option::is_none")] @@ -514,6 +524,7 @@ impl<'a> Default for UpdateIdentityVerificationSessionOptions<'a> { } /// Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIdentityVerificationSessionOptionsDocument<'a> { /// Array of strings of allowed identity document types. /// If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. @@ -668,6 +679,7 @@ impl<'de> serde::Deserialize<'de> for UpdateIdentityVerificationSessionType { /// When the session status is `requires_input`, you can use this method to update the /// verification check and options. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateIdentityVerificationSession<'a> { inner: UpdateIdentityVerificationSessionBuilder<'a>, session: &'a stripe_misc::IdentityVerificationSessionId, @@ -737,6 +749,7 @@ impl StripeRequest for UpdateIdentityVerificationSession<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CancelIdentityVerificationSessionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -752,6 +765,7 @@ impl<'a> CancelIdentityVerificationSessionBuilder<'a> { /// This cannot be undone. /// [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CancelIdentityVerificationSession<'a> { inner: CancelIdentityVerificationSessionBuilder<'a>, session: &'a stripe_misc::IdentityVerificationSessionId, @@ -798,6 +812,7 @@ impl StripeRequest for CancelIdentityVerificationSession<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RedactIdentityVerificationSessionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -828,6 +843,7 @@ impl<'a> RedactIdentityVerificationSessionBuilder<'a> { /// /// [Learn more](https://stripe.com/docs/identity/verification-sessions#redact). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RedactIdentityVerificationSession<'a> { inner: RedactIdentityVerificationSessionBuilder<'a>, session: &'a stripe_misc::IdentityVerificationSessionId, @@ -875,6 +891,7 @@ impl StripeRequest for RedactIdentityVerificationSession<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ProvidedDetailsParam<'a> { /// Email of user being verified #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-misc/src/identity_verification_session/types.rs b/generated/async-stripe-misc/src/identity_verification_session/types.rs index 5859c8b2f..55536551e 100644 --- a/generated/async-stripe-misc/src/identity_verification_session/types.rs +++ b/generated/async-stripe-misc/src/identity_verification_session/types.rs @@ -12,6 +12,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct IdentityVerificationSession { /// A string to reference this user. @@ -49,7 +50,7 @@ pub struct IdentityVerificationSession { /// [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). pub status: stripe_misc::IdentityVerificationSessionStatus, /// The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: IdentityVerificationSessionType, /// The short-lived URL that you use to redirect a user to Stripe to submit their identity information. /// This URL expires after 48 hours and can only be used once. diff --git a/generated/async-stripe-misc/src/reporting_report_run/requests.rs b/generated/async-stripe-misc/src/reporting_report_run/requests.rs index 3e25c30c9..cceb589ac 100644 --- a/generated/async-stripe-misc/src/reporting_report_run/requests.rs +++ b/generated/async-stripe-misc/src/reporting_report_run/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListReportingReportRunBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -22,6 +23,7 @@ impl<'a> ListReportingReportRunBuilder<'a> { } /// Returns a list of Report Runs, with the most recent appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListReportingReportRun<'a> { inner: ListReportingReportRunBuilder<'a>, } @@ -99,6 +101,7 @@ impl StripeRequest for ListReportingReportRun<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveReportingReportRunBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -110,6 +113,7 @@ impl<'a> RetrieveReportingReportRunBuilder<'a> { } /// Retrieves the details of an existing Report Run. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveReportingReportRun<'a> { inner: RetrieveReportingReportRunBuilder<'a>, report_run: &'a stripe_misc::ReportingReportRunId, @@ -153,6 +157,7 @@ impl StripeRequest for RetrieveReportingReportRun<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateReportingReportRunBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -168,6 +173,7 @@ impl<'a> CreateReportingReportRunBuilder<'a> { /// Parameters specifying how the report should be run. /// Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateReportingReportRunParameters<'a> { /// The set of report columns to include in the report output. /// If omitted, the Report Type is run with its default column set. @@ -2232,6 +2238,7 @@ impl<'de> serde::Deserialize<'de> for CreateReportingReportRunParametersTimezone /// Creates a new object and begin running the report. /// (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateReportingReportRun<'a> { inner: CreateReportingReportRunBuilder<'a>, } diff --git a/generated/async-stripe-misc/src/reporting_report_run/types.rs b/generated/async-stripe-misc/src/reporting_report_run/types.rs index 5e787afdd..eb96ef034 100644 --- a/generated/async-stripe-misc/src/reporting_report_run/types.rs +++ b/generated/async-stripe-misc/src/reporting_report_run/types.rs @@ -9,6 +9,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ReportingReportRun { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-misc/src/reporting_report_type/requests.rs b/generated/async-stripe-misc/src/reporting_report_type/requests.rs index f559ca5a8..1a471ba78 100644 --- a/generated/async-stripe-misc/src/reporting_report_type/requests.rs +++ b/generated/async-stripe-misc/src/reporting_report_type/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListReportingReportTypeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -14,6 +15,7 @@ impl<'a> ListReportingReportTypeBuilder<'a> { } /// Returns a full list of Report Types. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListReportingReportType<'a> { inner: ListReportingReportTypeBuilder<'a>, } @@ -66,6 +68,7 @@ impl StripeRequest for ListReportingReportType<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveReportingReportTypeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -78,6 +81,7 @@ impl<'a> RetrieveReportingReportTypeBuilder<'a> { /// Retrieves the details of a Report Type. /// (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveReportingReportType<'a> { inner: RetrieveReportingReportTypeBuilder<'a>, report_type: &'a stripe_misc::ReportingReportTypeId, diff --git a/generated/async-stripe-misc/src/reporting_report_type/types.rs b/generated/async-stripe-misc/src/reporting_report_type/types.rs index 8d3c8b36a..76c52b9da 100644 --- a/generated/async-stripe-misc/src/reporting_report_type/types.rs +++ b/generated/async-stripe-misc/src/reporting_report_type/types.rs @@ -9,6 +9,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ReportingReportType { /// Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-misc/src/scheduled_query_run/requests.rs b/generated/async-stripe-misc/src/scheduled_query_run/requests.rs index 366f9b26a..574603c07 100644 --- a/generated/async-stripe-misc/src/scheduled_query_run/requests.rs +++ b/generated/async-stripe-misc/src/scheduled_query_run/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListScheduledQueryRunBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -20,6 +21,7 @@ impl<'a> ListScheduledQueryRunBuilder<'a> { } /// Returns a list of scheduled query runs. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListScheduledQueryRun<'a> { inner: ListScheduledQueryRunBuilder<'a>, } @@ -91,6 +93,7 @@ impl StripeRequest for ListScheduledQueryRun<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveScheduledQueryRunBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -102,6 +105,7 @@ impl<'a> RetrieveScheduledQueryRunBuilder<'a> { } /// Retrieves the details of an scheduled query run. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveScheduledQueryRun<'a> { inner: RetrieveScheduledQueryRunBuilder<'a>, scheduled_query_run: &'a str, diff --git a/generated/async-stripe-misc/src/scheduled_query_run/types.rs b/generated/async-stripe-misc/src/scheduled_query_run/types.rs index 75bd3f69d..e21fbaa3e 100644 --- a/generated/async-stripe-misc/src/scheduled_query_run/types.rs +++ b/generated/async-stripe-misc/src/scheduled_query_run/types.rs @@ -5,6 +5,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ScheduledQueryRun { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-misc/src/tax_calculation/requests.rs b/generated/async-stripe-misc/src/tax_calculation/requests.rs index 50b627d00..f3e836d74 100644 --- a/generated/async-stripe-misc/src/tax_calculation/requests.rs +++ b/generated/async-stripe-misc/src/tax_calculation/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListLineItemsTaxCalculationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -20,6 +21,7 @@ impl<'a> ListLineItemsTaxCalculationBuilder<'a> { } /// Retrieves the line items of a persisted tax calculation as a collection. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListLineItemsTaxCalculation<'a> { inner: ListLineItemsTaxCalculationBuilder<'a>, calculation: &'a stripe_misc::TaxCalculationId, @@ -98,6 +100,7 @@ impl StripeRequest for ListLineItemsTaxCalculation<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTaxCalculationBuilder<'a> { currency: stripe_types::Currency, #[serde(skip_serializing_if = "Option::is_none")] @@ -133,6 +136,7 @@ impl<'a> CreateTaxCalculationBuilder<'a> { } /// Details about the customer, including address and tax IDs. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxCalculationCustomerDetails<'a> { /// The customer's postal address (for example, home or business location). #[serde(skip_serializing_if = "Option::is_none")] @@ -172,6 +176,7 @@ impl<'a> Default for CreateTaxCalculationCustomerDetails<'a> { } /// The customer's postal address (for example, home or business location). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxCalculationCustomerDetailsAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -259,6 +264,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxCalculationCustomerDetailsAddress /// Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. /// Stripe Tax doesn't validate tax IDs for correctness. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxCalculationCustomerDetailsTaxIds<'a> { /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `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`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `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")] @@ -601,6 +607,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxCalculationCustomerDetailsTaxabil } /// A list of items the customer is purchasing. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxCalculationLineItems<'a> { /// A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). /// The minimum amount is $0.0 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). @@ -699,6 +706,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxCalculationLineItemsTaxBehavior { } /// Details about the address from which the goods are being shipped. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxCalculationShipFromDetails<'a> { /// The address from which the goods are being shipped from. pub address: CreateTaxCalculationShipFromDetailsAddress<'a>, @@ -710,6 +718,7 @@ impl<'a> CreateTaxCalculationShipFromDetails<'a> { } /// The address from which the goods are being shipped from. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxCalculationShipFromDetailsAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -737,6 +746,7 @@ impl<'a> CreateTaxCalculationShipFromDetailsAddress<'a> { } /// Shipping cost details to be used for the calculation. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxCalculationShippingCost<'a> { /// A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the shipping charge. /// If `tax_behavior=inclusive`, then this amount includes taxes. @@ -829,6 +839,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxCalculationShippingCostTaxBehavio } /// Calculates tax based on input and returns a Tax `Calculation` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxCalculation<'a> { inner: CreateTaxCalculationBuilder<'a>, } diff --git a/generated/async-stripe-misc/src/tax_calculation/types.rs b/generated/async-stripe-misc/src/tax_calculation/types.rs index ffc5ac064..e2d84edb7 100644 --- a/generated/async-stripe-misc/src/tax_calculation/types.rs +++ b/generated/async-stripe-misc/src/tax_calculation/types.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TaxCalculation { /// Total after taxes. diff --git a/generated/async-stripe-misc/src/tax_calculation_line_item.rs b/generated/async-stripe-misc/src/tax_calculation_line_item.rs index 4d8557d43..4ccadd552 100644 --- a/generated/async-stripe-misc/src/tax_calculation_line_item.rs +++ b/generated/async-stripe-misc/src/tax_calculation_line_item.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TaxCalculationLineItem { /// The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). diff --git a/generated/async-stripe-misc/src/tax_registration/requests.rs b/generated/async-stripe-misc/src/tax_registration/requests.rs index 1e27d0fba..719bd5151 100644 --- a/generated/async-stripe-misc/src/tax_registration/requests.rs +++ b/generated/async-stripe-misc/src/tax_registration/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTaxRegistrationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -83,6 +84,7 @@ impl<'de> serde::Deserialize<'de> for ListTaxRegistrationStatus { } /// Returns a list of Tax `Registration` objects. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTaxRegistration<'a> { inner: ListTaxRegistrationBuilder<'a>, } @@ -159,6 +161,7 @@ impl StripeRequest for ListTaxRegistration<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTaxRegistrationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -170,6 +173,7 @@ impl<'a> RetrieveTaxRegistrationBuilder<'a> { } /// Returns a Tax `Registration` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTaxRegistration<'a> { inner: RetrieveTaxRegistrationBuilder<'a>, id: &'a stripe_misc::TaxRegistrationId, @@ -213,6 +217,7 @@ impl StripeRequest for RetrieveTaxRegistration<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTaxRegistrationBuilder<'a> { active_from: CreateTaxRegistrationActiveFrom, country: &'a str, @@ -234,6 +239,7 @@ impl<'a> CreateTaxRegistrationBuilder<'a> { /// Time at which the Tax Registration becomes active. /// It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreateTaxRegistrationActiveFrom { Now, @@ -241,6 +247,7 @@ pub enum CreateTaxRegistrationActiveFrom { } /// Specific options for a registration in the specified `country`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptions<'a> { /// Options for the registration in AE. #[serde(skip_serializing_if = "Option::is_none")] @@ -452,6 +459,7 @@ impl<'a> Default for CreateTaxRegistrationCountryOptions<'a> { } /// Options for the registration in AE. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsAe { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -517,6 +525,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsAeType } /// Options for the registration in AT. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsAt { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -532,6 +541,7 @@ impl CreateTaxRegistrationCountryOptionsAt { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsAtStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsAtStandardPlaceOfSupplyScheme, @@ -663,6 +673,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsAtType } /// Options for the registration in AU. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsAu { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -728,6 +739,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsAuType } /// Options for the registration in BE. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsBe { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -743,6 +755,7 @@ impl CreateTaxRegistrationCountryOptionsBe { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsBeStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsBeStandardPlaceOfSupplyScheme, @@ -874,6 +887,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsBeType } /// Options for the registration in BG. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsBg { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -889,6 +903,7 @@ impl CreateTaxRegistrationCountryOptionsBg { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsBgStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsBgStandardPlaceOfSupplyScheme, @@ -1020,6 +1035,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsBgType } /// Options for the registration in CA. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsCa<'a> { /// Options for the provincial tax registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -1035,6 +1051,7 @@ impl<'a> CreateTaxRegistrationCountryOptionsCa<'a> { } /// Options for the provincial tax registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsCaProvinceStandard<'a> { /// Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). pub province: &'a str, @@ -1105,6 +1122,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsCaType } /// Options for the registration in CH. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsCh { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -1170,6 +1188,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsChType } /// Options for the registration in CL. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsCl { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -1235,6 +1254,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsClType } /// Options for the registration in CO. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsCo { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -1300,6 +1320,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsCoType } /// Options for the registration in CY. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsCy { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -1315,6 +1336,7 @@ impl CreateTaxRegistrationCountryOptionsCy { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsCyStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsCyStandardPlaceOfSupplyScheme, @@ -1446,6 +1468,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsCyType } /// Options for the registration in CZ. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsCz { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -1461,6 +1484,7 @@ impl CreateTaxRegistrationCountryOptionsCz { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsCzStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsCzStandardPlaceOfSupplyScheme, @@ -1592,6 +1616,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsCzType } /// Options for the registration in DE. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsDe { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -1607,6 +1632,7 @@ impl CreateTaxRegistrationCountryOptionsDe { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsDeStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsDeStandardPlaceOfSupplyScheme, @@ -1738,6 +1764,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsDeType } /// Options for the registration in DK. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsDk { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -1753,6 +1780,7 @@ impl CreateTaxRegistrationCountryOptionsDk { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsDkStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsDkStandardPlaceOfSupplyScheme, @@ -1884,6 +1912,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsDkType } /// Options for the registration in EE. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsEe { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -1899,6 +1928,7 @@ impl CreateTaxRegistrationCountryOptionsEe { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsEeStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsEeStandardPlaceOfSupplyScheme, @@ -2030,6 +2060,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsEeType } /// Options for the registration in ES. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsEs { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -2045,6 +2076,7 @@ impl CreateTaxRegistrationCountryOptionsEs { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsEsStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsEsStandardPlaceOfSupplyScheme, @@ -2176,6 +2208,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsEsType } /// Options for the registration in FI. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsFi { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -2191,6 +2224,7 @@ impl CreateTaxRegistrationCountryOptionsFi { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsFiStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsFiStandardPlaceOfSupplyScheme, @@ -2322,6 +2356,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsFiType } /// Options for the registration in FR. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsFr { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -2337,6 +2372,7 @@ impl CreateTaxRegistrationCountryOptionsFr { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsFrStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsFrStandardPlaceOfSupplyScheme, @@ -2468,6 +2504,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsFrType } /// Options for the registration in GB. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsGb { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -2533,6 +2570,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsGbType } /// Options for the registration in GR. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsGr { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -2548,6 +2586,7 @@ impl CreateTaxRegistrationCountryOptionsGr { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsGrStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsGrStandardPlaceOfSupplyScheme, @@ -2679,6 +2718,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsGrType } /// Options for the registration in HR. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsHr { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -2694,6 +2734,7 @@ impl CreateTaxRegistrationCountryOptionsHr { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsHrStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsHrStandardPlaceOfSupplyScheme, @@ -2825,6 +2866,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsHrType } /// Options for the registration in HU. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsHu { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -2840,6 +2882,7 @@ impl CreateTaxRegistrationCountryOptionsHu { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsHuStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsHuStandardPlaceOfSupplyScheme, @@ -2971,6 +3014,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsHuType } /// Options for the registration in ID. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsId { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -3036,6 +3080,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsIdType } /// Options for the registration in IE. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsIe { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -3051,6 +3096,7 @@ impl CreateTaxRegistrationCountryOptionsIe { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsIeStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsIeStandardPlaceOfSupplyScheme, @@ -3182,6 +3228,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsIeType } /// Options for the registration in IS. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsIs { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -3247,6 +3294,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsIsType } /// Options for the registration in IT. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsIt { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -3262,6 +3310,7 @@ impl CreateTaxRegistrationCountryOptionsIt { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsItStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsItStandardPlaceOfSupplyScheme, @@ -3393,6 +3442,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsItType } /// Options for the registration in JP. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsJp { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -3458,6 +3508,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsJpType } /// Options for the registration in KR. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsKr { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -3523,6 +3574,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsKrType } /// Options for the registration in LT. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsLt { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -3538,6 +3590,7 @@ impl CreateTaxRegistrationCountryOptionsLt { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsLtStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsLtStandardPlaceOfSupplyScheme, @@ -3669,6 +3722,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsLtType } /// Options for the registration in LU. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsLu { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -3684,6 +3738,7 @@ impl CreateTaxRegistrationCountryOptionsLu { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsLuStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsLuStandardPlaceOfSupplyScheme, @@ -3815,6 +3870,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsLuType } /// Options for the registration in LV. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsLv { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -3830,6 +3886,7 @@ impl CreateTaxRegistrationCountryOptionsLv { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsLvStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsLvStandardPlaceOfSupplyScheme, @@ -3961,6 +4018,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsLvType } /// Options for the registration in MT. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsMt { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -3976,6 +4034,7 @@ impl CreateTaxRegistrationCountryOptionsMt { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsMtStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsMtStandardPlaceOfSupplyScheme, @@ -4107,6 +4166,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsMtType } /// Options for the registration in MX. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsMx { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -4172,6 +4232,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsMxType } /// Options for the registration in MY. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsMy { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -4237,6 +4298,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsMyType } /// Options for the registration in NL. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsNl { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -4252,6 +4314,7 @@ impl CreateTaxRegistrationCountryOptionsNl { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsNlStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsNlStandardPlaceOfSupplyScheme, @@ -4383,6 +4446,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsNlType } /// Options for the registration in NO. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsNo { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -4448,6 +4512,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsNoType } /// Options for the registration in NZ. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsNz { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -4513,6 +4578,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsNzType } /// Options for the registration in PL. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsPl { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -4528,6 +4594,7 @@ impl CreateTaxRegistrationCountryOptionsPl { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsPlStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsPlStandardPlaceOfSupplyScheme, @@ -4659,6 +4726,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsPlType } /// Options for the registration in PT. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsPt { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -4674,6 +4742,7 @@ impl CreateTaxRegistrationCountryOptionsPt { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsPtStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsPtStandardPlaceOfSupplyScheme, @@ -4805,6 +4874,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsPtType } /// Options for the registration in RO. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsRo { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -4820,6 +4890,7 @@ impl CreateTaxRegistrationCountryOptionsRo { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsRoStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsRoStandardPlaceOfSupplyScheme, @@ -4951,6 +5022,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsRoType } /// Options for the registration in SA. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsSa { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -5016,6 +5088,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsSaType } /// Options for the registration in SE. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsSe { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -5031,6 +5104,7 @@ impl CreateTaxRegistrationCountryOptionsSe { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsSeStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsSeStandardPlaceOfSupplyScheme, @@ -5162,6 +5236,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsSeType } /// Options for the registration in SG. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsSg { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -5227,6 +5302,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsSgType } /// Options for the registration in SI. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsSi { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -5242,6 +5318,7 @@ impl CreateTaxRegistrationCountryOptionsSi { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsSiStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsSiStandardPlaceOfSupplyScheme, @@ -5373,6 +5450,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsSiType } /// Options for the registration in SK. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsSk { /// Options for the standard registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -5388,6 +5466,7 @@ impl CreateTaxRegistrationCountryOptionsSk { } /// Options for the standard registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsSkStandard { /// Place of supply scheme used in an EU standard registration. pub place_of_supply_scheme: CreateTaxRegistrationCountryOptionsSkStandardPlaceOfSupplyScheme, @@ -5519,6 +5598,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsSkType } /// Options for the registration in TH. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsTh { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -5584,6 +5664,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsThType } /// Options for the registration in TR. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsTr { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -5649,6 +5730,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsTrType } /// Options for the registration in US. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsUs<'a> { /// Options for the local amusement tax registration. #[serde(skip_serializing_if = "Option::is_none")] @@ -5669,6 +5751,7 @@ impl<'a> CreateTaxRegistrationCountryOptionsUs<'a> { } /// Options for the local amusement tax registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsUsLocalAmusementTax<'a> { /// A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. /// Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), and `68081` (Schiller Park). @@ -5681,6 +5764,7 @@ impl<'a> CreateTaxRegistrationCountryOptionsUsLocalAmusementTax<'a> { } /// Options for the local lease tax registration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsUsLocalLeaseTax<'a> { /// A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. /// Supported FIPS codes are: `14000` (Chicago). @@ -5755,6 +5839,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsUsType } /// Options for the registration in VN. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsVn { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -5820,6 +5905,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsVnType } /// Options for the registration in ZA. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistrationCountryOptionsZa { /// Type of registration to be created in `country`. #[serde(rename = "type")] @@ -5885,6 +5971,7 @@ impl<'de> serde::Deserialize<'de> for CreateTaxRegistrationCountryOptionsZaType } /// Creates a new Tax `Registration` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRegistration<'a> { inner: CreateTaxRegistrationBuilder<'a>, } @@ -5936,6 +6023,7 @@ impl StripeRequest for CreateTaxRegistration<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateTaxRegistrationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active_from: Option, @@ -5952,6 +6040,7 @@ impl<'a> UpdateTaxRegistrationBuilder<'a> { /// Time at which the registration becomes active. /// It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpdateTaxRegistrationActiveFrom { Now, @@ -5961,6 +6050,7 @@ pub enum UpdateTaxRegistrationActiveFrom { /// If not set, the registration will be active indefinitely. /// It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpdateTaxRegistrationExpiresAt { Now, @@ -5971,6 +6061,7 @@ pub enum UpdateTaxRegistrationExpiresAt { /// A registration cannot be deleted after it has been created. /// If you wish to end a registration you may do so by setting `expires_at`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTaxRegistration<'a> { inner: UpdateTaxRegistrationBuilder<'a>, id: &'a stripe_misc::TaxRegistrationId, diff --git a/generated/async-stripe-misc/src/tax_registration/types.rs b/generated/async-stripe-misc/src/tax_registration/types.rs index 2853da506..17dc80349 100644 --- a/generated/async-stripe-misc/src/tax_registration/types.rs +++ b/generated/async-stripe-misc/src/tax_registration/types.rs @@ -5,6 +5,7 @@ /// /// Related guide: [Using the Registrations API](https://stripe.com/docs/tax/registrations-api) #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TaxRegistration { /// Time at which the registration becomes active. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-misc/src/tax_settings/requests.rs b/generated/async-stripe-misc/src/tax_settings/requests.rs index 7f175376b..0fddd4e00 100644 --- a/generated/async-stripe-misc/src/tax_settings/requests.rs +++ b/generated/async-stripe-misc/src/tax_settings/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveForMyAccountTaxSettingsBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -14,6 +15,7 @@ impl<'a> RetrieveForMyAccountTaxSettingsBuilder<'a> { } /// Retrieves Tax `Settings` for a merchant. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveForMyAccountTaxSettings<'a> { inner: RetrieveForMyAccountTaxSettingsBuilder<'a>, } @@ -59,6 +61,7 @@ impl StripeRequest for RetrieveForMyAccountTaxSettings<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateTaxSettingsBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] defaults: Option>, @@ -74,6 +77,7 @@ impl<'a> UpdateTaxSettingsBuilder<'a> { } /// Default configuration to be used on Stripe Tax calculations. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTaxSettingsDefaults<'a> { /// Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. /// One of inclusive, exclusive, or inferred_by_currency. @@ -157,6 +161,7 @@ impl<'de> serde::Deserialize<'de> for UpdateTaxSettingsDefaultsTaxBehavior { } /// The place where your business is located. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTaxSettingsHeadOffice<'a> { /// The location of the business for tax purposes. pub address: UpdateTaxSettingsHeadOfficeAddress<'a>, @@ -168,6 +173,7 @@ impl<'a> UpdateTaxSettingsHeadOffice<'a> { } /// The location of the business for tax purposes. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTaxSettingsHeadOfficeAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -202,6 +208,7 @@ impl<'a> Default for UpdateTaxSettingsHeadOfficeAddress<'a> { /// Updates Tax `Settings` parameters used in tax calculations. /// All parameters are editable but none can be removed once set. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTaxSettings<'a> { inner: UpdateTaxSettingsBuilder<'a>, } diff --git a/generated/async-stripe-misc/src/tax_settings/types.rs b/generated/async-stripe-misc/src/tax_settings/types.rs index a8df04eb7..4ffbca67e 100644 --- a/generated/async-stripe-misc/src/tax_settings/types.rs +++ b/generated/async-stripe-misc/src/tax_settings/types.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TaxSettings { pub defaults: stripe_misc::TaxProductResourceTaxSettingsDefaults, diff --git a/generated/async-stripe-misc/src/tax_transaction/requests.rs b/generated/async-stripe-misc/src/tax_transaction/requests.rs index 260327a10..de36d22ec 100644 --- a/generated/async-stripe-misc/src/tax_transaction/requests.rs +++ b/generated/async-stripe-misc/src/tax_transaction/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTaxTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -14,6 +15,7 @@ impl<'a> RetrieveTaxTransactionBuilder<'a> { } /// Retrieves a Tax `Transaction` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTaxTransaction<'a> { inner: RetrieveTaxTransactionBuilder<'a>, transaction: &'a stripe_misc::TaxTransactionId, @@ -57,6 +59,7 @@ impl StripeRequest for RetrieveTaxTransaction<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListLineItemsTaxTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -74,6 +77,7 @@ impl<'a> ListLineItemsTaxTransactionBuilder<'a> { } /// Retrieves the line items of a committed standalone transaction as a collection. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListLineItemsTaxTransaction<'a> { inner: ListLineItemsTaxTransactionBuilder<'a>, transaction: &'a stripe_misc::TaxTransactionId, @@ -152,6 +156,7 @@ impl StripeRequest for ListLineItemsTaxTransaction<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateFromCalculationTaxTransactionBuilder<'a> { calculation: &'a str, #[serde(skip_serializing_if = "Option::is_none")] @@ -167,6 +172,7 @@ impl<'a> CreateFromCalculationTaxTransactionBuilder<'a> { } /// Creates a Tax `Transaction` from a calculation. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateFromCalculationTaxTransaction<'a> { inner: CreateFromCalculationTaxTransactionBuilder<'a>, } @@ -216,6 +222,7 @@ impl StripeRequest for CreateFromCalculationTaxTransaction<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateReversalTaxTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -251,6 +258,7 @@ impl<'a> CreateReversalTaxTransactionBuilder<'a> { } /// The line item amounts to reverse. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateReversalTaxTransactionLineItems<'a> { /// The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. pub amount: i64, @@ -338,6 +346,7 @@ impl<'de> serde::Deserialize<'de> for CreateReversalTaxTransactionMode { } /// The shipping cost to reverse. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateReversalTaxTransactionShippingCost { /// The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. pub amount: i64, @@ -351,6 +360,7 @@ impl CreateReversalTaxTransactionShippingCost { } /// Partially or fully reverses a previously created `Transaction`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateReversalTaxTransaction<'a> { inner: CreateReversalTaxTransactionBuilder<'a>, } diff --git a/generated/async-stripe-misc/src/tax_transaction/types.rs b/generated/async-stripe-misc/src/tax_transaction/types.rs index 93b8cd456..30dc4f43a 100644 --- a/generated/async-stripe-misc/src/tax_transaction/types.rs +++ b/generated/async-stripe-misc/src/tax_transaction/types.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TaxTransaction { /// Time at which the object was created. Measured in seconds since the Unix epoch. @@ -34,7 +35,7 @@ pub struct TaxTransaction { /// Timestamp of date at which the tax rules and rates in effect applies for the calculation. pub tax_date: stripe_types::Timestamp, /// If `reversal`, this transaction reverses an earlier transaction. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: TaxTransactionType, } #[doc(hidden)] diff --git a/generated/async-stripe-misc/src/tax_transaction_line_item.rs b/generated/async-stripe-misc/src/tax_transaction_line_item.rs index c96cedf3a..23d4aaaed 100644 --- a/generated/async-stripe-misc/src/tax_transaction_line_item.rs +++ b/generated/async-stripe-misc/src/tax_transaction_line_item.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TaxTransactionLineItem { /// The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). @@ -28,7 +29,7 @@ pub struct TaxTransactionLineItem { /// The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. pub tax_code: String, /// If `reversal`, this line item reverses an earlier transaction. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: TaxTransactionLineItemType, } #[doc(hidden)] diff --git a/generated/async-stripe-misc/src/webhook_endpoint/requests.rs b/generated/async-stripe-misc/src/webhook_endpoint/requests.rs index b323fa6de..934014235 100644 --- a/generated/async-stripe-misc/src/webhook_endpoint/requests.rs +++ b/generated/async-stripe-misc/src/webhook_endpoint/requests.rs @@ -4,6 +4,7 @@ use stripe_client_core::{ /// You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteWebhookEndpoint<'a> { webhook_endpoint: &'a stripe_misc::WebhookEndpointId, } @@ -40,6 +41,7 @@ impl StripeRequest for DeleteWebhookEndpoint<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListWebhookEndpointBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -57,6 +59,7 @@ impl<'a> ListWebhookEndpointBuilder<'a> { } /// Returns a list of your webhook endpoints. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListWebhookEndpoint<'a> { inner: ListWebhookEndpointBuilder<'a>, } @@ -128,6 +131,7 @@ impl StripeRequest for ListWebhookEndpoint<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveWebhookEndpointBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -139,6 +143,7 @@ impl<'a> RetrieveWebhookEndpointBuilder<'a> { } /// Retrieves the webhook endpoint with the given ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveWebhookEndpoint<'a> { inner: RetrieveWebhookEndpointBuilder<'a>, webhook_endpoint: &'a stripe_misc::WebhookEndpointId, @@ -182,6 +187,7 @@ impl StripeRequest for RetrieveWebhookEndpoint<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateWebhookEndpointBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] api_version: Option, @@ -1003,6 +1009,7 @@ impl<'de> serde::Deserialize<'de> for CreateWebhookEndpointEnabledEvents { /// If set to true, then a Connect webhook endpoint that notifies the specified `url` about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified `url` only about events from your account is created. /// You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateWebhookEndpoint<'a> { inner: CreateWebhookEndpointBuilder<'a>, } @@ -1067,6 +1074,7 @@ impl StripeRequest for CreateWebhookEndpoint<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateWebhookEndpointBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] description: Option<&'a str>, @@ -1885,6 +1893,7 @@ impl<'de> serde::Deserialize<'de> for UpdateWebhookEndpointEnabledEvents { /// Updates the webhook endpoint. /// You may edit the `url`, the list of `enabled_events`, and the status of your endpoint. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateWebhookEndpoint<'a> { inner: UpdateWebhookEndpointBuilder<'a>, webhook_endpoint: &'a stripe_misc::WebhookEndpointId, diff --git a/generated/async-stripe-misc/src/webhook_endpoint/types.rs b/generated/async-stripe-misc/src/webhook_endpoint/types.rs index 02b5689cc..7873d88ac 100644 --- a/generated/async-stripe-misc/src/webhook_endpoint/types.rs +++ b/generated/async-stripe-misc/src/webhook_endpoint/types.rs @@ -8,6 +8,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct WebhookEndpoint { /// The API version events are rendered as for this webhook endpoint. diff --git a/generated/async-stripe-payment/Cargo.toml b/generated/async-stripe-payment/Cargo.toml index c8766837f..bccdac9b2 100644 --- a/generated/async-stripe-payment/Cargo.toml +++ b/generated/async-stripe-payment/Cargo.toml @@ -28,7 +28,9 @@ async-stripe-shared = {path = "../../generated/async-stripe-shared"} [features] serialize = ["async-stripe-types/serialize","async-stripe-shared/serialize"] +serialize_extra = ["async-stripe-types/serialize_extra","async-stripe-shared/serialize_extra"] deserialize = ["async-stripe-types/deserialize","async-stripe-shared/deserialize", "dep:serde_json"] +deserialize_extra = ["async-stripe-types/deserialize_extra","async-stripe-shared/deserialize_extra", "dep:serde_json"] bank_account = [] card = [] confirmation_token = [] diff --git a/generated/async-stripe-payment/src/bank_account/requests.rs b/generated/async-stripe-payment/src/bank_account/requests.rs index ea9bf6ee0..bcb640f6d 100644 --- a/generated/async-stripe-payment/src/bank_account/requests.rs +++ b/generated/async-stripe-payment/src/bank_account/requests.rs @@ -4,6 +4,7 @@ use stripe_client_core::{ /// Delete a specified external account for a given account. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteAccountBankAccount<'a> { account: &'a stripe_shared::AccountId, id: &'a str, @@ -45,6 +46,7 @@ impl StripeRequest for DeleteAccountBankAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct DeleteCustomerBankAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -56,6 +58,7 @@ impl<'a> DeleteCustomerBankAccountBuilder<'a> { } /// Delete a specified source for a given customer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteCustomerBankAccount<'a> { inner: DeleteCustomerBankAccountBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -183,6 +186,7 @@ const _: () = { }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateAccountBankAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] account_holder_name: Option<&'a str>, @@ -361,6 +365,7 @@ impl<'de> serde::Deserialize<'de> for UpdateAccountBankAccountAccountType { } /// Documents that may be submitted to satisfy various informational requests. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountBankAccountDocuments<'a> { /// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. /// Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check. @@ -381,6 +386,7 @@ impl<'a> Default for UpdateAccountBankAccountDocuments<'a> { /// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. /// Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountBankAccountDocumentsBankAccountOwnershipVerification<'a> { /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] @@ -405,6 +411,7 @@ impl<'a> Default for UpdateAccountBankAccountDocumentsBankAccountOwnershipVerifi /// You can re-enable a disabled bank account by performing an update call without providing any /// arguments or changes. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountBankAccount<'a> { inner: UpdateAccountBankAccountBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -536,6 +543,7 @@ impl StripeRequest for UpdateAccountBankAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateCustomerBankAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] account_holder_name: Option<&'a str>, @@ -643,6 +651,7 @@ impl<'de> serde::Deserialize<'de> for UpdateCustomerBankAccountAccountHolderType } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCustomerBankAccountOwner<'a> { /// Owner's address. #[serde(skip_serializing_if = "Option::is_none")] @@ -669,6 +678,7 @@ impl<'a> Default for UpdateCustomerBankAccountOwner<'a> { } /// Owner's address. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCustomerBankAccountOwnerAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -701,6 +711,7 @@ impl<'a> Default for UpdateCustomerBankAccountOwnerAddress<'a> { } /// Update a specified source for a given customer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCustomerBankAccount<'a> { inner: UpdateCustomerBankAccountBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -915,6 +926,7 @@ const _: () = { }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct VerifyBankAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amounts: Option<&'a [i64]>, @@ -928,6 +940,7 @@ impl<'a> VerifyBankAccountBuilder<'a> { } /// Verify a specified bank account for a given customer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct VerifyBankAccount<'a> { inner: VerifyBankAccountBuilder<'a>, customer: &'a stripe_shared::CustomerId, diff --git a/generated/async-stripe-payment/src/card/requests.rs b/generated/async-stripe-payment/src/card/requests.rs index a088c9412..b8faaec5e 100644 --- a/generated/async-stripe-payment/src/card/requests.rs +++ b/generated/async-stripe-payment/src/card/requests.rs @@ -4,6 +4,7 @@ use stripe_client_core::{ /// Delete a specified external account for a given account. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteAccountCard<'a> { account: &'a stripe_shared::AccountId, id: &'a str, @@ -45,6 +46,7 @@ impl StripeRequest for DeleteAccountCard<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct DeleteCustomerCardBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -56,6 +58,7 @@ impl<'a> DeleteCustomerCardBuilder<'a> { } /// Delete a specified source for a given customer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteCustomerCard<'a> { inner: DeleteCustomerCardBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -183,6 +186,7 @@ const _: () = { }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateAccountCardBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] account_holder_name: Option<&'a str>, @@ -360,6 +364,7 @@ impl<'de> serde::Deserialize<'de> for UpdateAccountCardAccountType { } /// Documents that may be submitted to satisfy various informational requests. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountCardDocuments<'a> { /// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. /// Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check. @@ -380,6 +385,7 @@ impl<'a> Default for UpdateAccountCardDocuments<'a> { /// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. /// Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountCardDocumentsBankAccountOwnershipVerification<'a> { /// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. #[serde(skip_serializing_if = "Option::is_none")] @@ -404,6 +410,7 @@ impl<'a> Default for UpdateAccountCardDocumentsBankAccountOwnershipVerification< /// You can re-enable a disabled bank account by performing an update call without providing any /// arguments or changes. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateAccountCard<'a> { inner: UpdateAccountCardBuilder<'a>, account: &'a stripe_shared::AccountId, @@ -535,6 +542,7 @@ impl StripeRequest for UpdateAccountCard<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateCustomerCardBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] account_holder_name: Option<&'a str>, @@ -642,6 +650,7 @@ impl<'de> serde::Deserialize<'de> for UpdateCustomerCardAccountHolderType { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCustomerCardOwner<'a> { /// Owner's address. #[serde(skip_serializing_if = "Option::is_none")] @@ -668,6 +677,7 @@ impl<'a> Default for UpdateCustomerCardOwner<'a> { } /// Owner's address. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCustomerCardOwnerAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -700,6 +710,7 @@ impl<'a> Default for UpdateCustomerCardOwnerAddress<'a> { } /// Update a specified source for a given customer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCustomerCard<'a> { inner: UpdateCustomerCardBuilder<'a>, customer: &'a stripe_shared::CustomerId, diff --git a/generated/async-stripe-payment/src/confirmation_token/requests.rs b/generated/async-stripe-payment/src/confirmation_token/requests.rs index 7e68fcd11..802852161 100644 --- a/generated/async-stripe-payment/src/confirmation_token/requests.rs +++ b/generated/async-stripe-payment/src/confirmation_token/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveConfirmationTokenBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -14,6 +15,7 @@ impl<'a> RetrieveConfirmationTokenBuilder<'a> { } /// Retrieves an existing ConfirmationToken object #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveConfirmationToken<'a> { inner: RetrieveConfirmationTokenBuilder<'a>, confirmation_token: &'a stripe_payment::ConfirmationTokenId, @@ -57,6 +59,7 @@ impl StripeRequest for RetrieveConfirmationToken<'_> { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateConfirmationTokenBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -85,6 +88,7 @@ impl<'a> CreateConfirmationTokenBuilder<'a> { } /// If provided, this hash will be used to create a PaymentMethod. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodData<'a> { /// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -286,6 +290,7 @@ impl<'a> CreateConfirmationTokenPaymentMethodData<'a> { } /// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataAcssDebit<'a> { /// Customer's bank account number. pub account_number: &'a str, @@ -368,6 +373,7 @@ impl<'de> serde::Deserialize<'de> for CreateConfirmationTokenPaymentMethodDataAl } /// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataAuBecsDebit<'a> { /// The account number for the bank account. pub account_number: &'a str, @@ -381,6 +387,7 @@ impl<'a> CreateConfirmationTokenPaymentMethodDataAuBecsDebit<'a> { } /// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataBacsDebit<'a> { /// Account number of the bank account that the funds will be debited from. #[serde(skip_serializing_if = "Option::is_none")] @@ -401,6 +408,7 @@ impl<'a> Default for CreateConfirmationTokenPaymentMethodDataBacsDebit<'a> { } /// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataBillingDetails<'a> { /// Billing address. #[serde(skip_serializing_if = "Option::is_none")] @@ -427,6 +435,7 @@ impl<'a> Default for CreateConfirmationTokenPaymentMethodDataBillingDetails<'a> } /// Billing address. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataBillingDetailsAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -459,6 +468,7 @@ impl<'a> Default for CreateConfirmationTokenPaymentMethodDataBillingDetailsAddre } /// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataBoleto<'a> { /// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) pub tax_id: &'a str, @@ -470,6 +480,7 @@ impl<'a> CreateConfirmationTokenPaymentMethodDataBoleto<'a> { } /// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataEps { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -623,6 +634,7 @@ impl<'de> serde::Deserialize<'de> for CreateConfirmationTokenPaymentMethodDataEp } /// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataFpx { /// Account holder type for FPX transaction #[serde(skip_serializing_if = "Option::is_none")] @@ -813,6 +825,7 @@ impl<'de> serde::Deserialize<'de> for CreateConfirmationTokenPaymentMethodDataFp } /// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataIdeal { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -930,6 +943,7 @@ impl<'de> serde::Deserialize<'de> for CreateConfirmationTokenPaymentMethodDataId } /// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataKlarna { /// Customer's date of birth #[serde(skip_serializing_if = "Option::is_none")] @@ -947,6 +961,7 @@ impl Default for CreateConfirmationTokenPaymentMethodDataKlarna { } /// Customer's date of birth #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataKlarnaDob { /// The day of birth, between 1 and 31. pub day: i64, @@ -962,6 +977,7 @@ impl CreateConfirmationTokenPaymentMethodDataKlarnaDob { } /// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataP24 { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -1110,6 +1126,7 @@ impl<'de> serde::Deserialize<'de> for CreateConfirmationTokenPaymentMethodDataP2 /// Options to configure Radar. /// See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataRadarOptions<'a> { /// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. #[serde(skip_serializing_if = "Option::is_none")] @@ -1127,6 +1144,7 @@ impl<'a> Default for CreateConfirmationTokenPaymentMethodDataRadarOptions<'a> { } /// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataSepaDebit<'a> { /// IBAN of the bank account. pub iban: &'a str, @@ -1138,6 +1156,7 @@ impl<'a> CreateConfirmationTokenPaymentMethodDataSepaDebit<'a> { } /// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataSofort { /// Two-letter ISO code representing the country the bank account is located in. pub country: CreateConfirmationTokenPaymentMethodDataSofortCountry, @@ -1375,6 +1394,7 @@ impl<'de> serde::Deserialize<'de> for CreateConfirmationTokenPaymentMethodDataTy } /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenPaymentMethodDataUsBankAccount<'a> { /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] @@ -1523,6 +1543,7 @@ impl<'de> serde::Deserialize<'de> } /// Shipping information for this ConfirmationToken. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenShipping<'a> { /// Shipping address pub address: CreateConfirmationTokenShippingAddress<'a>, @@ -1539,6 +1560,7 @@ impl<'a> CreateConfirmationTokenShipping<'a> { } /// Shipping address #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationTokenShippingAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -1571,6 +1593,7 @@ impl<'a> Default for CreateConfirmationTokenShippingAddress<'a> { } /// Creates a test mode Confirmation Token server side for your integration tests. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateConfirmationToken<'a> { inner: CreateConfirmationTokenBuilder<'a>, } diff --git a/generated/async-stripe-payment/src/confirmation_token/types.rs b/generated/async-stripe-payment/src/confirmation_token/types.rs index f31ce3bd9..0759808f5 100644 --- a/generated/async-stripe-payment/src/confirmation_token/types.rs +++ b/generated/async-stripe-payment/src/confirmation_token/types.rs @@ -6,6 +6,7 @@ /// - [Finalize payments on the server](https://stripe.com/docs/payments/finalize-payments-on-the-server). /// - [Build two-step confirmation](https://stripe.com/docs/payments/build-a-two-step-confirmation). #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ConfirmationToken { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-payment/src/payment_link/requests.rs b/generated/async-stripe-payment/src/payment_link/requests.rs index 14e5d2a4f..3a9cb3867 100644 --- a/generated/async-stripe-payment/src/payment_link/requests.rs +++ b/generated/async-stripe-payment/src/payment_link/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListPaymentLinkBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -22,6 +23,7 @@ impl<'a> ListPaymentLinkBuilder<'a> { } /// Returns a list of your payment links. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListPaymentLink<'a> { inner: ListPaymentLinkBuilder<'a>, } @@ -98,6 +100,7 @@ impl StripeRequest for ListPaymentLink<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrievePaymentLinkBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -109,6 +112,7 @@ impl<'a> RetrievePaymentLinkBuilder<'a> { } /// Retrieve a payment link. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrievePaymentLink<'a> { inner: RetrievePaymentLinkBuilder<'a>, payment_link: &'a stripe_shared::PaymentLinkId, @@ -152,6 +156,7 @@ impl StripeRequest for RetrievePaymentLink<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListLineItemsPaymentLinkBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -170,6 +175,7 @@ impl<'a> ListLineItemsPaymentLinkBuilder<'a> { /// When retrieving a payment link, there is an includable **line_items** property containing the first handful of those items. /// There is also a URL where you can retrieve the full (paginated) list of line items. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListLineItemsPaymentLink<'a> { inner: ListLineItemsPaymentLinkBuilder<'a>, payment_link: &'a stripe_shared::PaymentLinkId, @@ -245,6 +251,7 @@ impl StripeRequest for ListLineItemsPaymentLink<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreatePaymentLinkBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] after_completion: Option>, @@ -338,6 +345,7 @@ impl<'a> CreatePaymentLinkBuilder<'a> { } /// Behavior after the purchase is complete. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkAfterCompletion<'a> { /// Configuration when `type=hosted_confirmation`. #[serde(skip_serializing_if = "Option::is_none")] @@ -412,6 +420,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentLinkAfterCompletionType { } /// Configuration for automatic tax collection. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkAutomaticTax<'a> { /// If `true`, tax will be calculated automatically using the customer's location. pub enabled: bool, @@ -430,6 +439,7 @@ impl<'a> CreatePaymentLinkAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -501,6 +511,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentLinkAutomaticTaxLiabilityType } /// Configure fields to gather active consent from customers. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkConsentCollection { /// Determines the display of payment method reuse agreement text in the UI. /// If set to `hidden`, it will hide legal text related to the reuse of a payment method. @@ -531,6 +542,7 @@ impl Default for CreatePaymentLinkConsentCollection { /// Determines the display of payment method reuse agreement text in the UI. /// If set to `hidden`, it will hide legal text related to the reuse of a payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreement { /// Determines the position and visibility of the payment method reuse agreement in the UI. /// When set to `auto`, Stripe's. @@ -727,6 +739,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentLinkConsentCollectionTermsOfS /// Collect additional information from your customer using custom fields. /// Up to 3 fields are supported. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkCustomFields<'a> { /// Configuration for `type=dropdown` fields. #[serde(skip_serializing_if = "Option::is_none")] @@ -761,6 +774,7 @@ impl<'a> CreatePaymentLinkCustomFields<'a> { } /// The label for the field, displayed to the customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkCustomFieldsLabel<'a> { /// Custom text for the label, displayed to the customer. Up to 50 characters. pub custom: &'a str, @@ -828,6 +842,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentLinkCustomFieldsLabelType { } /// Configuration for `type=numeric` fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkCustomFieldsNumeric { /// The maximum character length constraint for the customer's input. #[serde(skip_serializing_if = "Option::is_none")] @@ -848,6 +863,7 @@ impl Default for CreatePaymentLinkCustomFieldsNumeric { } /// Configuration for `type=text` fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkCustomFieldsText { /// The maximum character length constraint for the customer's input. #[serde(skip_serializing_if = "Option::is_none")] @@ -983,6 +999,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentLinkCustomerCreation { } /// Generate a post-purchase Invoice for one-time payments. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkInvoiceCreation<'a> { /// Whether the feature is enabled pub enabled: bool, @@ -997,6 +1014,7 @@ impl<'a> CreatePaymentLinkInvoiceCreation<'a> { } /// Invoice PDF configuration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkInvoiceCreationInvoiceData<'a> { /// The account tax IDs associated with the invoice. #[serde(skip_serializing_if = "Option::is_none")] @@ -1045,6 +1063,7 @@ impl<'a> Default for CreatePaymentLinkInvoiceCreationInvoiceData<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkInvoiceCreationInvoiceDataIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -1118,6 +1137,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentLinkInvoiceCreationInvoiceDat } /// Default options for invoice PDF rendering for this customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptions { /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// One of `exclude_tax` or `include_inclusive_tax`. @@ -1208,6 +1228,7 @@ impl<'de> serde::Deserialize<'de> /// Each line item represents an item being sold. /// Up to 20 line items are supported. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkLineItems<'a> { /// When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout. #[serde(skip_serializing_if = "Option::is_none")] @@ -1224,6 +1245,7 @@ impl<'a> CreatePaymentLinkLineItems<'a> { } /// A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkPaymentIntentData<'a> { /// Controls when the funds will be captured from the customer's account. #[serde(skip_serializing_if = "Option::is_none")] @@ -1477,6 +1499,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentLinkPaymentMethodCollection { /// /// We recommend that you review your privacy policy and check with your legal contacts. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkPhoneNumberCollection { /// Set to `true` to enable phone number collection. pub enabled: bool, @@ -1488,6 +1511,7 @@ impl CreatePaymentLinkPhoneNumberCollection { } /// Configuration for collecting the customer's shipping address. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkShippingAddressCollection<'a> { /// An array of two-letter ISO country codes representing which countries Checkout should provide as options for. /// shipping locations. @@ -2268,6 +2292,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentLinkShippingAddressCollection } /// The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkShippingOptions<'a> { /// The ID of the Shipping Rate to use for this shipping option. #[serde(skip_serializing_if = "Option::is_none")] @@ -2286,6 +2311,7 @@ impl<'a> Default for CreatePaymentLinkShippingOptions<'a> { /// When creating a subscription, the specified configuration data will be used. /// There must be at least one line item with a recurring price to use `subscription_data`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkSubscriptionData<'a> { /// 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 surfaces and certain local payment methods UIs. @@ -2325,6 +2351,7 @@ impl<'a> Default for CreatePaymentLinkSubscriptionData<'a> { } /// All invoices will be billed using the specified settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkSubscriptionDataInvoiceSettings<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. @@ -2344,6 +2371,7 @@ impl<'a> Default for CreatePaymentLinkSubscriptionDataInvoiceSettings<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -2417,6 +2445,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentLinkSubscriptionDataInvoiceSe } /// Settings related to subscription trials. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkSubscriptionDataTrialSettings { /// Defines how the subscription should behave when the user's free trial ends. pub end_behavior: CreatePaymentLinkSubscriptionDataTrialSettingsEndBehavior, @@ -2428,6 +2457,7 @@ impl CreatePaymentLinkSubscriptionDataTrialSettings { } /// Defines how the subscription should behave when the user's free trial ends. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkSubscriptionDataTrialSettingsEndBehavior { /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. pub missing_payment_method: @@ -2509,6 +2539,7 @@ impl<'de> serde::Deserialize<'de> } /// Controls tax ID collection during checkout. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkTaxIdCollection { /// Set to `true` to enable tax ID collection. pub enabled: bool, @@ -2520,6 +2551,7 @@ impl CreatePaymentLinkTaxIdCollection { } /// The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLinkTransferData<'a> { /// The amount that will be transferred automatically when a charge succeeds. #[serde(skip_serializing_if = "Option::is_none")] @@ -2537,6 +2569,7 @@ impl<'a> CreatePaymentLinkTransferData<'a> { } /// Creates a payment link. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentLink<'a> { inner: CreatePaymentLinkBuilder<'a>, } @@ -2765,6 +2798,7 @@ impl StripeRequest for CreatePaymentLink<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdatePaymentLinkBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -2832,6 +2866,7 @@ impl<'a> UpdatePaymentLinkBuilder<'a> { } /// Behavior after the purchase is complete. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkAfterCompletion<'a> { /// Configuration when `type=hosted_confirmation`. #[serde(skip_serializing_if = "Option::is_none")] @@ -2906,6 +2941,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentLinkAfterCompletionType { } /// Configuration for automatic tax collection. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkAutomaticTax<'a> { /// If `true`, tax will be calculated automatically using the customer's location. pub enabled: bool, @@ -2924,6 +2960,7 @@ impl<'a> UpdatePaymentLinkAutomaticTax<'a> { /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. /// The tax transaction is returned in the report of the connected account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkAutomaticTaxLiability<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -2996,6 +3033,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentLinkAutomaticTaxLiabilityType /// Collect additional information from your customer using custom fields. /// Up to 3 fields are supported. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkCustomFields<'a> { /// Configuration for `type=dropdown` fields. #[serde(skip_serializing_if = "Option::is_none")] @@ -3030,6 +3068,7 @@ impl<'a> UpdatePaymentLinkCustomFields<'a> { } /// The label for the field, displayed to the customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkCustomFieldsLabel<'a> { /// Custom text for the label, displayed to the customer. Up to 50 characters. pub custom: &'a str, @@ -3097,6 +3136,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentLinkCustomFieldsLabelType { } /// Configuration for `type=numeric` fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkCustomFieldsNumeric { /// The maximum character length constraint for the customer's input. #[serde(skip_serializing_if = "Option::is_none")] @@ -3117,6 +3157,7 @@ impl Default for UpdatePaymentLinkCustomFieldsNumeric { } /// Configuration for `type=text` fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkCustomFieldsText { /// The maximum character length constraint for the customer's input. #[serde(skip_serializing_if = "Option::is_none")] @@ -3252,6 +3293,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentLinkCustomerCreation { } /// Generate a post-purchase Invoice for one-time payments. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkInvoiceCreation<'a> { /// Whether the feature is enabled pub enabled: bool, @@ -3266,6 +3308,7 @@ impl<'a> UpdatePaymentLinkInvoiceCreation<'a> { } /// Invoice PDF configuration. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkInvoiceCreationInvoiceData<'a> { /// The account tax IDs associated with the invoice. #[serde(skip_serializing_if = "Option::is_none")] @@ -3314,6 +3357,7 @@ impl<'a> Default for UpdatePaymentLinkInvoiceCreationInvoiceData<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkInvoiceCreationInvoiceDataIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -3387,6 +3431,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentLinkInvoiceCreationInvoiceDat } /// Default options for invoice PDF rendering for this customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptions { /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. /// One of `exclude_tax` or `include_inclusive_tax`. @@ -3477,6 +3522,7 @@ impl<'de> serde::Deserialize<'de> /// Each line item represents an item being sold. /// Up to 20 line items are supported. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkLineItems<'a> { /// When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout. #[serde(skip_serializing_if = "Option::is_none")] @@ -3494,6 +3540,7 @@ impl<'a> UpdatePaymentLinkLineItems<'a> { } /// A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkPaymentIntentData<'a> { /// An arbitrary string attached to the object. Often useful for displaying to users. #[serde(skip_serializing_if = "Option::is_none")] @@ -3596,6 +3643,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentLinkPaymentMethodCollection { } /// Configuration for collecting the customer's shipping address. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkShippingAddressCollection<'a> { /// An array of two-letter ISO country codes representing which countries Checkout should provide as options for. /// shipping locations. @@ -4377,6 +4425,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentLinkShippingAddressCollection /// When creating a subscription, the specified configuration data will be used. /// There must be at least one line item with a recurring price to use `subscription_data`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkSubscriptionData<'a> { /// All invoices will be billed using the specified settings. #[serde(skip_serializing_if = "Option::is_none")] @@ -4402,6 +4451,7 @@ impl<'a> Default for UpdatePaymentLinkSubscriptionData<'a> { } /// All invoices will be billed using the specified settings. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkSubscriptionDataInvoiceSettings<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. @@ -4421,6 +4471,7 @@ impl<'a> Default for UpdatePaymentLinkSubscriptionDataInvoiceSettings<'a> { /// The connected account that issues the invoice. /// The invoice is presented with the branding and support information of the specified account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuer<'a> { /// The connected account being referenced when `type` is `account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -4494,6 +4545,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentLinkSubscriptionDataInvoiceSe } /// Settings related to subscription trials. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkSubscriptionDataTrialSettings { /// Defines how the subscription should behave when the user's free trial ends. pub end_behavior: UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehavior, @@ -4505,6 +4557,7 @@ impl UpdatePaymentLinkSubscriptionDataTrialSettings { } /// Defines how the subscription should behave when the user's free trial ends. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehavior { /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. pub missing_payment_method: @@ -4586,6 +4639,7 @@ impl<'de> serde::Deserialize<'de> } /// Updates a payment link. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentLink<'a> { inner: UpdatePaymentLinkBuilder<'a>, payment_link: &'a stripe_shared::PaymentLinkId, @@ -4762,6 +4816,7 @@ impl StripeRequest for UpdatePaymentLink<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct AfterCompletionConfirmationPageParams<'a> { /// A custom message to display to the customer after the purchase is complete. #[serde(skip_serializing_if = "Option::is_none")] @@ -4778,6 +4833,7 @@ impl<'a> Default for AfterCompletionConfirmationPageParams<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct AfterCompletionRedirectParams<'a> { /// The URL the customer will be redirected to after the purchase is complete. /// You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. @@ -4789,6 +4845,7 @@ impl<'a> AfterCompletionRedirectParams<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CustomFieldOptionParam<'a> { /// The label for the option, displayed to the customer. Up to 100 characters. pub label: &'a str, @@ -4802,6 +4859,7 @@ impl<'a> CustomFieldOptionParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CustomTextPositionParam<'a> { /// Text may be up to 1200 characters in length. pub message: &'a str, @@ -4812,6 +4870,7 @@ impl<'a> CustomTextPositionParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CustomFieldParams<'a> { /// The name of the custom field. This may be up to 40 characters. pub name: &'a str, @@ -4824,6 +4883,7 @@ impl<'a> CustomFieldParams<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct AdjustableQuantityParams { /// Set to true if the quantity can be adjusted to any non-negative Integer. pub enabled: bool, @@ -4844,6 +4904,7 @@ impl AdjustableQuantityParams { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CompletedSessionsParams { /// The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. pub limit: i64, @@ -4854,6 +4915,7 @@ impl CompletedSessionsParams { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CustomFieldDropdownParam<'a> { /// The options available for the customer to select. Up to 200 options allowed. pub options: &'a [CustomFieldOptionParam<'a>], @@ -4864,6 +4926,7 @@ impl<'a> CustomFieldDropdownParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CustomTextParam<'a> { /// Custom text that should be displayed after the payment confirmation button. #[serde(skip_serializing_if = "Option::is_none")] @@ -4894,6 +4957,7 @@ impl<'a> Default for CustomTextParam<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RestrictionsParams { /// Configuration for the `completed_sessions` restriction type. pub completed_sessions: CompletedSessionsParams, diff --git a/generated/async-stripe-payment/src/payment_method/requests.rs b/generated/async-stripe-payment/src/payment_method/requests.rs index 45d60903f..fd24f29f8 100644 --- a/generated/async-stripe-payment/src/payment_method/requests.rs +++ b/generated/async-stripe-payment/src/payment_method/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListPaymentMethodBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] customer: Option<&'a str>, @@ -192,6 +193,7 @@ impl<'de> serde::Deserialize<'de> for ListPaymentMethodType { /// Returns a list of PaymentMethods for Treasury flows. /// If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer’s PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list) API instead. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListPaymentMethod<'a> { inner: ListPaymentMethodBuilder<'a>, } @@ -275,6 +277,7 @@ impl StripeRequest for ListPaymentMethod<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrievePaymentMethodBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -287,6 +290,7 @@ impl<'a> RetrievePaymentMethodBuilder<'a> { /// Retrieves a PaymentMethod object attached to the StripeAccount. /// To retrieve a payment method attached to a Customer, you should use [Retrieve a Customer’s PaymentMethods](https://stripe.com/docs/api/payment_methods/customer). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrievePaymentMethod<'a> { inner: RetrievePaymentMethodBuilder<'a>, payment_method: &'a stripe_shared::PaymentMethodId, @@ -330,6 +334,7 @@ impl StripeRequest for RetrievePaymentMethod<'_> { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreatePaymentMethodBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] acss_debit: Option>, @@ -496,6 +501,7 @@ impl<'a> CreatePaymentMethodBuilder<'a> { } /// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodAcssDebit<'a> { /// Customer's bank account number. pub account_number: &'a str, @@ -576,6 +582,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentMethodAllowRedisplay { } /// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodAuBecsDebit<'a> { /// The account number for the bank account. pub account_number: &'a str, @@ -589,6 +596,7 @@ impl<'a> CreatePaymentMethodAuBecsDebit<'a> { } /// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodBacsDebit<'a> { /// Account number of the bank account that the funds will be debited from. #[serde(skip_serializing_if = "Option::is_none")] @@ -609,6 +617,7 @@ impl<'a> Default for CreatePaymentMethodBacsDebit<'a> { } /// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodBoleto<'a> { /// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) pub tax_id: &'a str, @@ -623,6 +632,7 @@ impl<'a> CreatePaymentMethodBoleto<'a> { /// When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). /// We strongly recommend using Stripe.js instead of interacting with this API directly. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreatePaymentMethodCard<'a> { CardDetailsParams(CreatePaymentMethodCardDetailsParams<'a>), @@ -633,6 +643,7 @@ pub enum CreatePaymentMethodCard<'a> { /// When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). /// We strongly recommend using Stripe.js instead of interacting with this API directly. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodCardDetailsParams<'a> { /// The card's CVC. It is highly recommended to always include this value. #[serde(skip_serializing_if = "Option::is_none")] @@ -654,6 +665,7 @@ impl<'a> CreatePaymentMethodCardDetailsParams<'a> { } /// Contains information about card networks used to process the payment. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodCardDetailsParamsNetworks { /// The customer's preferred card network for co-branded cards. /// Supports `cartes_bancaires`, `mastercard`, or `visa`. @@ -739,6 +751,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentMethodCardDetailsParamsNetwor /// When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). /// We strongly recommend using Stripe.js instead of interacting with this API directly. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodTokenParams<'a> { /// For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}. pub token: &'a str, @@ -750,6 +763,7 @@ impl<'a> CreatePaymentMethodTokenParams<'a> { } /// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodEps { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -903,6 +917,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentMethodEpsBank { } /// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodFpx { /// Account holder type for FPX transaction #[serde(skip_serializing_if = "Option::is_none")] @@ -1091,6 +1106,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentMethodFpxBank { } /// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodIdeal { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -1208,6 +1224,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentMethodIdealBank { } /// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodKlarna { /// Customer's date of birth #[serde(skip_serializing_if = "Option::is_none")] @@ -1225,6 +1242,7 @@ impl Default for CreatePaymentMethodKlarna { } /// Customer's date of birth #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodKlarnaDob { /// The day of birth, between 1 and 31. pub day: i64, @@ -1240,6 +1258,7 @@ impl CreatePaymentMethodKlarnaDob { } /// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodP24 { /// The customer's bank. #[serde(skip_serializing_if = "Option::is_none")] @@ -1388,6 +1407,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentMethodP24Bank { /// Options to configure Radar. /// See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodRadarOptions<'a> { /// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. #[serde(skip_serializing_if = "Option::is_none")] @@ -1405,6 +1425,7 @@ impl<'a> Default for CreatePaymentMethodRadarOptions<'a> { } /// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodSepaDebit<'a> { /// IBAN of the bank account. pub iban: &'a str, @@ -1416,6 +1437,7 @@ impl<'a> CreatePaymentMethodSepaDebit<'a> { } /// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodSofort { /// Two-letter ISO code representing the country the bank account is located in. pub country: CreatePaymentMethodSofortCountry, @@ -1654,6 +1676,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentMethodType { } /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodUsBankAccount<'a> { /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] @@ -1808,6 +1831,7 @@ impl<'de> serde::Deserialize<'de> for CreatePaymentMethodUsBankAccountAccountTyp /// /// Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents](https://stripe.com/docs/payments/accept-a-payment) API to accept a payment immediately or the [SetupIntent](https://stripe.com/docs/payments/save-and-reuse) API to collect payment method details ahead of a future payment. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethod<'a> { inner: CreatePaymentMethodBuilder<'a>, } @@ -2082,6 +2106,7 @@ impl StripeRequest for CreatePaymentMethod<'_> { } } #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdatePaymentMethodBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] allow_redisplay: Option, @@ -2175,6 +2200,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentMethodAllowRedisplay { } /// If this is a `card` PaymentMethod, this hash contains the user's card details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodCard { /// Two-digit number representing the card's expiration month. #[serde(skip_serializing_if = "Option::is_none")] @@ -2198,6 +2224,7 @@ impl Default for UpdatePaymentMethodCard { } /// Contains information about card networks used to process the payment. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodCardNetworks { /// The customer's preferred card network for co-branded cards. /// Supports `cartes_bancaires`, `mastercard`, or `visa`. @@ -2278,6 +2305,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentMethodCardNetworksPreferred { } /// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodUsBankAccount { /// Bank account holder type. #[serde(skip_serializing_if = "Option::is_none")] @@ -2414,6 +2442,7 @@ impl<'de> serde::Deserialize<'de> for UpdatePaymentMethodUsBankAccountAccountTyp } /// Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethod<'a> { inner: UpdatePaymentMethodBuilder<'a>, payment_method: &'a stripe_shared::PaymentMethodId, @@ -2492,6 +2521,7 @@ impl StripeRequest for UpdatePaymentMethod<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct AttachPaymentMethodBuilder<'a> { customer: &'a str, #[serde(skip_serializing_if = "Option::is_none")] @@ -2517,6 +2547,7 @@ impl<'a> AttachPaymentMethodBuilder<'a> { /// set `invoice_settings.default_payment_method`,. /// on the Customer to the PaymentMethod’s ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct AttachPaymentMethod<'a> { inner: AttachPaymentMethodBuilder<'a>, payment_method: &'a stripe_shared::PaymentMethodId, @@ -2560,6 +2591,7 @@ impl StripeRequest for AttachPaymentMethod<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct DetachPaymentMethodBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -2572,6 +2604,7 @@ impl<'a> DetachPaymentMethodBuilder<'a> { /// Detaches a PaymentMethod object from a Customer. /// After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DetachPaymentMethod<'a> { inner: DetachPaymentMethodBuilder<'a>, payment_method: &'a stripe_shared::PaymentMethodId, @@ -2616,6 +2649,7 @@ impl StripeRequest for DetachPaymentMethod<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BillingDetailsAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -2647,6 +2681,7 @@ impl<'a> Default for BillingDetailsAddress<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct BillingDetailsInnerParams<'a> { /// Billing address. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-payment/src/payment_method_configuration/requests.rs b/generated/async-stripe-payment/src/payment_method_configuration/requests.rs index 8fd39189f..fc109ea67 100644 --- a/generated/async-stripe-payment/src/payment_method_configuration/requests.rs +++ b/generated/async-stripe-payment/src/payment_method_configuration/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListPaymentMethodConfigurationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] application: Option<&'a str>, @@ -28,6 +29,7 @@ impl<'a> ListPaymentMethodConfigurationBuilder<'a> { } /// List payment method configurations #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListPaymentMethodConfiguration<'a> { inner: ListPaymentMethodConfigurationBuilder<'a>, } @@ -106,6 +108,7 @@ impl StripeRequest for ListPaymentMethodConfiguration<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrievePaymentMethodConfigurationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -117,6 +120,7 @@ impl<'a> RetrievePaymentMethodConfigurationBuilder<'a> { } /// Retrieve payment method configuration #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrievePaymentMethodConfiguration<'a> { inner: RetrievePaymentMethodConfigurationBuilder<'a>, configuration: &'a stripe_payment::PaymentMethodConfigurationId, @@ -163,6 +167,7 @@ impl StripeRequest for RetrievePaymentMethodConfiguration<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreatePaymentMethodConfigurationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] acss_debit: Option, @@ -299,6 +304,7 @@ impl<'a> CreatePaymentMethodConfigurationBuilder<'a> { } /// Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationAcssDebit { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -316,6 +322,7 @@ impl Default for CreatePaymentMethodConfigurationAcssDebit { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationAcssDebitDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -394,6 +401,7 @@ impl<'de> serde::Deserialize<'de> /// Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. /// Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationAffirm { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -411,6 +419,7 @@ impl Default for CreatePaymentMethodConfigurationAffirm { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationAffirmDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -488,6 +497,7 @@ impl<'de> serde::Deserialize<'de> /// Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. /// Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationAfterpayClearpay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -506,6 +516,7 @@ impl Default for CreatePaymentMethodConfigurationAfterpayClearpay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationAfterpayClearpayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -594,6 +605,7 @@ impl<'de> serde::Deserialize<'de> /// Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. /// Check this [page](https://stripe.com/docs/payments/alipay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationAlipay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -611,6 +623,7 @@ impl Default for CreatePaymentMethodConfigurationAlipay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationAlipayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -687,6 +700,7 @@ impl<'de> serde::Deserialize<'de> } /// Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationAmazonPay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -704,6 +718,7 @@ impl Default for CreatePaymentMethodConfigurationAmazonPay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationAmazonPayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -782,6 +797,7 @@ impl<'de> serde::Deserialize<'de> /// There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. /// Check this [page](https://stripe.com/docs/apple-pay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationApplePay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -799,6 +815,7 @@ impl Default for CreatePaymentMethodConfigurationApplePay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationApplePayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -875,6 +892,7 @@ impl<'de> serde::Deserialize<'de> } /// Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationApplePayLater { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -892,6 +910,7 @@ impl Default for CreatePaymentMethodConfigurationApplePayLater { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationApplePayLaterDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -974,6 +993,7 @@ impl<'de> serde::Deserialize<'de> /// Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. /// Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationAuBecsDebit { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -991,6 +1011,7 @@ impl Default for CreatePaymentMethodConfigurationAuBecsDebit { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationAuBecsDebitDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -1067,6 +1088,7 @@ impl<'de> serde::Deserialize<'de> } /// Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationBacsDebit { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -1084,6 +1106,7 @@ impl Default for CreatePaymentMethodConfigurationBacsDebit { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationBacsDebitDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -1162,6 +1185,7 @@ impl<'de> serde::Deserialize<'de> /// [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. /// Check this [page](https://stripe.com/docs/payments/bancontact) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationBancontact { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -1179,6 +1203,7 @@ impl Default for CreatePaymentMethodConfigurationBancontact { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationBancontactDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -1257,6 +1282,7 @@ impl<'de> serde::Deserialize<'de> /// When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. /// Check this [page](https://stripe.com/docs/payments/blik) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationBlik { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -1274,6 +1300,7 @@ impl Default for CreatePaymentMethodConfigurationBlik { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationBlikDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -1355,6 +1382,7 @@ impl<'de> serde::Deserialize<'de> /// Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. /// Check this [page](https://stripe.com/docs/payments/boleto) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationBoleto { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -1372,6 +1400,7 @@ impl Default for CreatePaymentMethodConfigurationBoleto { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationBoletoDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -1449,6 +1478,7 @@ impl<'de> serde::Deserialize<'de> /// Cards are a popular way for consumers and businesses to pay online or in person. /// Stripe supports global and local card networks. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationCard { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -1466,6 +1496,7 @@ impl Default for CreatePaymentMethodConfigurationCard { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationCardDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -1548,6 +1579,7 @@ impl<'de> serde::Deserialize<'de> /// More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. /// Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationCartesBancaires { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -1566,6 +1598,7 @@ impl Default for CreatePaymentMethodConfigurationCartesBancaires { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationCartesBancairesDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -1652,6 +1685,7 @@ impl<'de> serde::Deserialize<'de> /// Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. /// Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationCashapp { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -1669,6 +1703,7 @@ impl Default for CreatePaymentMethodConfigurationCashapp { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationCashappDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -1747,6 +1782,7 @@ impl<'de> serde::Deserialize<'de> /// The cash balance can be funded via a bank transfer. /// Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationCustomerBalance { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -1765,6 +1801,7 @@ impl Default for CreatePaymentMethodConfigurationCustomerBalance { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationCustomerBalanceDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -1852,6 +1889,7 @@ impl<'de> serde::Deserialize<'de> /// EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. /// Check this [page](https://stripe.com/docs/payments/eps) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationEps { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -1869,6 +1907,7 @@ impl Default for CreatePaymentMethodConfigurationEps { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationEpsDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -1952,6 +1991,7 @@ impl<'de> serde::Deserialize<'de> /// It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. /// Check this [page](https://stripe.com/docs/payments/fpx) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationFpx { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -1969,6 +2009,7 @@ impl Default for CreatePaymentMethodConfigurationFpx { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationFpxDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -2053,6 +2094,7 @@ impl<'de> serde::Deserialize<'de> /// giropay accounts for 10% of online checkouts in Germany. /// Check this [page](https://stripe.com/docs/payments/giropay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationGiropay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -2070,6 +2112,7 @@ impl Default for CreatePaymentMethodConfigurationGiropay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationGiropayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -2148,6 +2191,7 @@ impl<'de> serde::Deserialize<'de> /// Use the Google Pay API to request any credit or debit card stored in your customer's Google account. /// Check this [page](https://stripe.com/docs/google-pay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationGooglePay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -2165,6 +2209,7 @@ impl Default for CreatePaymentMethodConfigurationGooglePay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationGooglePayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -2243,6 +2288,7 @@ impl<'de> serde::Deserialize<'de> /// GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. /// Check this [page](https://stripe.com/docs/payments/grabpay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationGrabpay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -2260,6 +2306,7 @@ impl Default for CreatePaymentMethodConfigurationGrabpay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationGrabpayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -2338,6 +2385,7 @@ impl<'de> serde::Deserialize<'de> /// All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. /// Check this [page](https://stripe.com/docs/payments/ideal) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationIdeal { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -2355,6 +2403,7 @@ impl Default for CreatePaymentMethodConfigurationIdeal { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationIdealDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -2433,6 +2482,7 @@ impl<'de> serde::Deserialize<'de> /// JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. /// Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationJcb { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -2450,6 +2500,7 @@ impl Default for CreatePaymentMethodConfigurationJcb { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationJcbDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -2533,6 +2584,7 @@ impl<'de> serde::Deserialize<'de> /// These payment options make it convenient for customers to purchase items in all price ranges. /// Check this [page](https://stripe.com/docs/payments/klarna) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationKlarna { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -2550,6 +2602,7 @@ impl Default for CreatePaymentMethodConfigurationKlarna { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationKlarnaDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -2627,6 +2680,7 @@ impl<'de> serde::Deserialize<'de> /// Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. /// Check this [page](https://stripe.com/docs/payments/konbini) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationKonbini { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -2644,6 +2698,7 @@ impl Default for CreatePaymentMethodConfigurationKonbini { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationKonbiniDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -2721,6 +2776,7 @@ impl<'de> serde::Deserialize<'de> /// [Link](https://stripe.com/docs/payments/link) is a payment method network. /// With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationLink { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -2738,6 +2794,7 @@ impl Default for CreatePaymentMethodConfigurationLink { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationLinkDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -2820,6 +2877,7 @@ impl<'de> serde::Deserialize<'de> /// It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. /// Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationMobilepay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -2837,6 +2895,7 @@ impl Default for CreatePaymentMethodConfigurationMobilepay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationMobilepayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -2915,6 +2974,7 @@ impl<'de> serde::Deserialize<'de> /// OXXO allows customers to pay bills and online purchases in-store with cash. /// Check this [page](https://stripe.com/docs/payments/oxxo) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationOxxo { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -2932,6 +2992,7 @@ impl Default for CreatePaymentMethodConfigurationOxxo { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationOxxoDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -3014,6 +3075,7 @@ impl<'de> serde::Deserialize<'de> /// Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. /// Check this [page](https://stripe.com/docs/payments/p24) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationP24 { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -3031,6 +3093,7 @@ impl Default for CreatePaymentMethodConfigurationP24 { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationP24DisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -3112,6 +3175,7 @@ impl<'de> serde::Deserialize<'de> /// PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. /// Check this [page](https://stripe.com/docs/payments/paynow) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationPaynow { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -3129,6 +3193,7 @@ impl Default for CreatePaymentMethodConfigurationPaynow { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationPaynowDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -3206,6 +3271,7 @@ impl<'de> serde::Deserialize<'de> /// PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. /// Check this [page](https://stripe.com/docs/payments/paypal) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationPaypal { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -3223,6 +3289,7 @@ impl Default for CreatePaymentMethodConfigurationPaypal { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationPaypalDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -3300,6 +3367,7 @@ impl<'de> serde::Deserialize<'de> /// PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. /// Check this [page](https://stripe.com/docs/payments/promptpay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationPromptpay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -3317,6 +3385,7 @@ impl Default for CreatePaymentMethodConfigurationPromptpay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationPromptpayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -3394,6 +3463,7 @@ impl<'de> serde::Deserialize<'de> /// Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. /// Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationRevolutPay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -3411,6 +3481,7 @@ impl Default for CreatePaymentMethodConfigurationRevolutPay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationRevolutPayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -3488,6 +3559,7 @@ impl<'de> serde::Deserialize<'de> /// The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. /// SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationSepaDebit { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -3505,6 +3577,7 @@ impl Default for CreatePaymentMethodConfigurationSepaDebit { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationSepaDebitDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -3582,6 +3655,7 @@ impl<'de> serde::Deserialize<'de> /// Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. /// Check this [page](https://stripe.com/docs/payments/sofort) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationSofort { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -3599,6 +3673,7 @@ impl Default for CreatePaymentMethodConfigurationSofort { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationSofortDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -3677,6 +3752,7 @@ impl<'de> serde::Deserialize<'de> /// It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. /// Check this [page](https://stripe.com/docs/payments/swish) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationSwish { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -3694,6 +3770,7 @@ impl Default for CreatePaymentMethodConfigurationSwish { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationSwishDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -3771,6 +3848,7 @@ impl<'de> serde::Deserialize<'de> /// Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. /// Check this [page](https://stripe.com/docs/payments/ach-debit) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationUsBankAccount { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -3788,6 +3866,7 @@ impl Default for CreatePaymentMethodConfigurationUsBankAccount { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationUsBankAccountDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -3872,6 +3951,7 @@ impl<'de> serde::Deserialize<'de> /// WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. /// Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationWechatPay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -3889,6 +3969,7 @@ impl Default for CreatePaymentMethodConfigurationWechatPay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationWechatPayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -3966,6 +4047,7 @@ impl<'de> serde::Deserialize<'de> /// Zip gives your customers a way to split purchases over a series of payments. /// Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationZip { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -3983,6 +4065,7 @@ impl Default for CreatePaymentMethodConfigurationZip { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfigurationZipDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -4063,6 +4146,7 @@ impl<'de> serde::Deserialize<'de> } /// Creates a payment method configuration #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodConfiguration<'a> { inner: CreatePaymentMethodConfigurationBuilder<'a>, } @@ -4392,6 +4476,7 @@ impl StripeRequest for CreatePaymentMethodConfiguration<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdatePaymentMethodConfigurationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] acss_debit: Option, @@ -4528,6 +4613,7 @@ impl<'a> UpdatePaymentMethodConfigurationBuilder<'a> { } /// Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationAcssDebit { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -4545,6 +4631,7 @@ impl Default for UpdatePaymentMethodConfigurationAcssDebit { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationAcssDebitDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -4623,6 +4710,7 @@ impl<'de> serde::Deserialize<'de> /// Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. /// Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationAffirm { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -4640,6 +4728,7 @@ impl Default for UpdatePaymentMethodConfigurationAffirm { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationAffirmDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -4717,6 +4806,7 @@ impl<'de> serde::Deserialize<'de> /// Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. /// Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationAfterpayClearpay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -4735,6 +4825,7 @@ impl Default for UpdatePaymentMethodConfigurationAfterpayClearpay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationAfterpayClearpayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -4823,6 +4914,7 @@ impl<'de> serde::Deserialize<'de> /// Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. /// Check this [page](https://stripe.com/docs/payments/alipay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationAlipay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -4840,6 +4932,7 @@ impl Default for UpdatePaymentMethodConfigurationAlipay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationAlipayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -4916,6 +5009,7 @@ impl<'de> serde::Deserialize<'de> } /// Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationAmazonPay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -4933,6 +5027,7 @@ impl Default for UpdatePaymentMethodConfigurationAmazonPay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationAmazonPayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -5011,6 +5106,7 @@ impl<'de> serde::Deserialize<'de> /// There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. /// Check this [page](https://stripe.com/docs/apple-pay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationApplePay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -5028,6 +5124,7 @@ impl Default for UpdatePaymentMethodConfigurationApplePay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationApplePayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -5104,6 +5201,7 @@ impl<'de> serde::Deserialize<'de> } /// Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationApplePayLater { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -5121,6 +5219,7 @@ impl Default for UpdatePaymentMethodConfigurationApplePayLater { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationApplePayLaterDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -5203,6 +5302,7 @@ impl<'de> serde::Deserialize<'de> /// Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. /// Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationAuBecsDebit { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -5220,6 +5320,7 @@ impl Default for UpdatePaymentMethodConfigurationAuBecsDebit { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationAuBecsDebitDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -5296,6 +5397,7 @@ impl<'de> serde::Deserialize<'de> } /// Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationBacsDebit { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -5313,6 +5415,7 @@ impl Default for UpdatePaymentMethodConfigurationBacsDebit { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationBacsDebitDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -5391,6 +5494,7 @@ impl<'de> serde::Deserialize<'de> /// [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. /// Check this [page](https://stripe.com/docs/payments/bancontact) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationBancontact { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -5408,6 +5512,7 @@ impl Default for UpdatePaymentMethodConfigurationBancontact { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationBancontactDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -5486,6 +5591,7 @@ impl<'de> serde::Deserialize<'de> /// When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. /// Check this [page](https://stripe.com/docs/payments/blik) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationBlik { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -5503,6 +5609,7 @@ impl Default for UpdatePaymentMethodConfigurationBlik { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationBlikDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -5584,6 +5691,7 @@ impl<'de> serde::Deserialize<'de> /// Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. /// Check this [page](https://stripe.com/docs/payments/boleto) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationBoleto { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -5601,6 +5709,7 @@ impl Default for UpdatePaymentMethodConfigurationBoleto { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationBoletoDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -5678,6 +5787,7 @@ impl<'de> serde::Deserialize<'de> /// Cards are a popular way for consumers and businesses to pay online or in person. /// Stripe supports global and local card networks. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationCard { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -5695,6 +5805,7 @@ impl Default for UpdatePaymentMethodConfigurationCard { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationCardDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -5777,6 +5888,7 @@ impl<'de> serde::Deserialize<'de> /// More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. /// Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationCartesBancaires { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -5795,6 +5907,7 @@ impl Default for UpdatePaymentMethodConfigurationCartesBancaires { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationCartesBancairesDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -5881,6 +5994,7 @@ impl<'de> serde::Deserialize<'de> /// Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. /// Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationCashapp { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -5898,6 +6012,7 @@ impl Default for UpdatePaymentMethodConfigurationCashapp { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationCashappDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -5976,6 +6091,7 @@ impl<'de> serde::Deserialize<'de> /// The cash balance can be funded via a bank transfer. /// Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationCustomerBalance { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -5994,6 +6110,7 @@ impl Default for UpdatePaymentMethodConfigurationCustomerBalance { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationCustomerBalanceDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -6081,6 +6198,7 @@ impl<'de> serde::Deserialize<'de> /// EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. /// Check this [page](https://stripe.com/docs/payments/eps) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationEps { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -6098,6 +6216,7 @@ impl Default for UpdatePaymentMethodConfigurationEps { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationEpsDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -6181,6 +6300,7 @@ impl<'de> serde::Deserialize<'de> /// It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. /// Check this [page](https://stripe.com/docs/payments/fpx) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationFpx { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -6198,6 +6318,7 @@ impl Default for UpdatePaymentMethodConfigurationFpx { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationFpxDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -6282,6 +6403,7 @@ impl<'de> serde::Deserialize<'de> /// giropay accounts for 10% of online checkouts in Germany. /// Check this [page](https://stripe.com/docs/payments/giropay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationGiropay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -6299,6 +6421,7 @@ impl Default for UpdatePaymentMethodConfigurationGiropay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationGiropayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -6377,6 +6500,7 @@ impl<'de> serde::Deserialize<'de> /// Use the Google Pay API to request any credit or debit card stored in your customer's Google account. /// Check this [page](https://stripe.com/docs/google-pay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationGooglePay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -6394,6 +6518,7 @@ impl Default for UpdatePaymentMethodConfigurationGooglePay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationGooglePayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -6472,6 +6597,7 @@ impl<'de> serde::Deserialize<'de> /// GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. /// Check this [page](https://stripe.com/docs/payments/grabpay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationGrabpay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -6489,6 +6615,7 @@ impl Default for UpdatePaymentMethodConfigurationGrabpay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationGrabpayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -6567,6 +6694,7 @@ impl<'de> serde::Deserialize<'de> /// All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. /// Check this [page](https://stripe.com/docs/payments/ideal) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationIdeal { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -6584,6 +6712,7 @@ impl Default for UpdatePaymentMethodConfigurationIdeal { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationIdealDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -6662,6 +6791,7 @@ impl<'de> serde::Deserialize<'de> /// JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. /// Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationJcb { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -6679,6 +6809,7 @@ impl Default for UpdatePaymentMethodConfigurationJcb { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationJcbDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -6762,6 +6893,7 @@ impl<'de> serde::Deserialize<'de> /// These payment options make it convenient for customers to purchase items in all price ranges. /// Check this [page](https://stripe.com/docs/payments/klarna) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationKlarna { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -6779,6 +6911,7 @@ impl Default for UpdatePaymentMethodConfigurationKlarna { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationKlarnaDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -6856,6 +6989,7 @@ impl<'de> serde::Deserialize<'de> /// Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. /// Check this [page](https://stripe.com/docs/payments/konbini) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationKonbini { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -6873,6 +7007,7 @@ impl Default for UpdatePaymentMethodConfigurationKonbini { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationKonbiniDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -6950,6 +7085,7 @@ impl<'de> serde::Deserialize<'de> /// [Link](https://stripe.com/docs/payments/link) is a payment method network. /// With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationLink { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -6967,6 +7103,7 @@ impl Default for UpdatePaymentMethodConfigurationLink { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationLinkDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -7049,6 +7186,7 @@ impl<'de> serde::Deserialize<'de> /// It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. /// Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationMobilepay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -7066,6 +7204,7 @@ impl Default for UpdatePaymentMethodConfigurationMobilepay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationMobilepayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -7144,6 +7283,7 @@ impl<'de> serde::Deserialize<'de> /// OXXO allows customers to pay bills and online purchases in-store with cash. /// Check this [page](https://stripe.com/docs/payments/oxxo) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationOxxo { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -7161,6 +7301,7 @@ impl Default for UpdatePaymentMethodConfigurationOxxo { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationOxxoDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -7243,6 +7384,7 @@ impl<'de> serde::Deserialize<'de> /// Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. /// Check this [page](https://stripe.com/docs/payments/p24) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationP24 { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -7260,6 +7402,7 @@ impl Default for UpdatePaymentMethodConfigurationP24 { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationP24DisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -7341,6 +7484,7 @@ impl<'de> serde::Deserialize<'de> /// PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. /// Check this [page](https://stripe.com/docs/payments/paynow) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationPaynow { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -7358,6 +7502,7 @@ impl Default for UpdatePaymentMethodConfigurationPaynow { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationPaynowDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -7435,6 +7580,7 @@ impl<'de> serde::Deserialize<'de> /// PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. /// Check this [page](https://stripe.com/docs/payments/paypal) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationPaypal { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -7452,6 +7598,7 @@ impl Default for UpdatePaymentMethodConfigurationPaypal { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationPaypalDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -7529,6 +7676,7 @@ impl<'de> serde::Deserialize<'de> /// PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. /// Check this [page](https://stripe.com/docs/payments/promptpay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationPromptpay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -7546,6 +7694,7 @@ impl Default for UpdatePaymentMethodConfigurationPromptpay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationPromptpayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -7623,6 +7772,7 @@ impl<'de> serde::Deserialize<'de> /// Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. /// Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationRevolutPay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -7640,6 +7790,7 @@ impl Default for UpdatePaymentMethodConfigurationRevolutPay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationRevolutPayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -7717,6 +7868,7 @@ impl<'de> serde::Deserialize<'de> /// The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. /// SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationSepaDebit { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -7734,6 +7886,7 @@ impl Default for UpdatePaymentMethodConfigurationSepaDebit { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationSepaDebitDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -7811,6 +7964,7 @@ impl<'de> serde::Deserialize<'de> /// Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. /// Check this [page](https://stripe.com/docs/payments/sofort) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationSofort { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -7828,6 +7982,7 @@ impl Default for UpdatePaymentMethodConfigurationSofort { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationSofortDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -7906,6 +8061,7 @@ impl<'de> serde::Deserialize<'de> /// It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. /// Check this [page](https://stripe.com/docs/payments/swish) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationSwish { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -7923,6 +8079,7 @@ impl Default for UpdatePaymentMethodConfigurationSwish { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationSwishDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -8000,6 +8157,7 @@ impl<'de> serde::Deserialize<'de> /// Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. /// Check this [page](https://stripe.com/docs/payments/ach-debit) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationUsBankAccount { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -8017,6 +8175,7 @@ impl Default for UpdatePaymentMethodConfigurationUsBankAccount { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationUsBankAccountDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -8101,6 +8260,7 @@ impl<'de> serde::Deserialize<'de> /// WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. /// Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationWechatPay { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -8118,6 +8278,7 @@ impl Default for UpdatePaymentMethodConfigurationWechatPay { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationWechatPayDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -8195,6 +8356,7 @@ impl<'de> serde::Deserialize<'de> /// Zip gives your customers a way to split purchases over a series of payments. /// Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationZip { /// Whether or not the payment method should be displayed. #[serde(skip_serializing_if = "Option::is_none")] @@ -8212,6 +8374,7 @@ impl Default for UpdatePaymentMethodConfigurationZip { } /// Whether or not the payment method should be displayed. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfigurationZipDisplayPreference { /// The account's preference for whether or not to display this payment method. #[serde(skip_serializing_if = "Option::is_none")] @@ -8292,6 +8455,7 @@ impl<'de> serde::Deserialize<'de> } /// Update payment method configuration #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodConfiguration<'a> { inner: UpdatePaymentMethodConfigurationBuilder<'a>, configuration: &'a stripe_payment::PaymentMethodConfigurationId, diff --git a/generated/async-stripe-payment/src/payment_method_configuration/types.rs b/generated/async-stripe-payment/src/payment_method_configuration/types.rs index fd4c0ce00..e30c1863c 100644 --- a/generated/async-stripe-payment/src/payment_method_configuration/types.rs +++ b/generated/async-stripe-payment/src/payment_method_configuration/types.rs @@ -22,6 +22,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct PaymentMethodConfiguration { pub acss_debit: Option, diff --git a/generated/async-stripe-payment/src/payment_method_domain/requests.rs b/generated/async-stripe-payment/src/payment_method_domain/requests.rs index c8b40b63c..5a2c7ef88 100644 --- a/generated/async-stripe-payment/src/payment_method_domain/requests.rs +++ b/generated/async-stripe-payment/src/payment_method_domain/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListPaymentMethodDomainBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] domain_name: Option<&'a str>, @@ -31,6 +32,7 @@ impl<'a> ListPaymentMethodDomainBuilder<'a> { } /// Lists the details of existing payment method domains. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListPaymentMethodDomain<'a> { inner: ListPaymentMethodDomainBuilder<'a>, } @@ -114,6 +116,7 @@ impl StripeRequest for ListPaymentMethodDomain<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrievePaymentMethodDomainBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -125,6 +128,7 @@ impl<'a> RetrievePaymentMethodDomainBuilder<'a> { } /// Retrieves the details of an existing payment method domain. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrievePaymentMethodDomain<'a> { inner: RetrievePaymentMethodDomainBuilder<'a>, payment_method_domain: &'a stripe_payment::PaymentMethodDomainId, @@ -171,6 +175,7 @@ impl StripeRequest for RetrievePaymentMethodDomain<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreatePaymentMethodDomainBuilder<'a> { domain_name: &'a str, #[serde(skip_serializing_if = "Option::is_none")] @@ -185,6 +190,7 @@ impl<'a> CreatePaymentMethodDomainBuilder<'a> { } /// Creates a payment method domain. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePaymentMethodDomain<'a> { inner: CreatePaymentMethodDomainBuilder<'a>, } @@ -231,6 +237,7 @@ impl StripeRequest for CreatePaymentMethodDomain<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdatePaymentMethodDomainBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] enabled: Option, @@ -244,6 +251,7 @@ impl<'a> UpdatePaymentMethodDomainBuilder<'a> { } /// Updates an existing payment method domain. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePaymentMethodDomain<'a> { inner: UpdatePaymentMethodDomainBuilder<'a>, payment_method_domain: &'a stripe_payment::PaymentMethodDomainId, @@ -296,6 +304,7 @@ impl StripeRequest for UpdatePaymentMethodDomain<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ValidatePaymentMethodDomainBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -313,6 +322,7 @@ impl<'a> ValidatePaymentMethodDomainBuilder<'a> { /// /// Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ValidatePaymentMethodDomain<'a> { inner: ValidatePaymentMethodDomainBuilder<'a>, payment_method_domain: &'a stripe_payment::PaymentMethodDomainId, diff --git a/generated/async-stripe-payment/src/payment_method_domain/types.rs b/generated/async-stripe-payment/src/payment_method_domain/types.rs index 546f3df09..b9e74fd04 100644 --- a/generated/async-stripe-payment/src/payment_method_domain/types.rs +++ b/generated/async-stripe-payment/src/payment_method_domain/types.rs @@ -5,6 +5,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct PaymentMethodDomain { pub apple_pay: stripe_payment::PaymentMethodDomainResourcePaymentMethodStatus, diff --git a/generated/async-stripe-payment/src/source/requests.rs b/generated/async-stripe-payment/src/source/requests.rs index 4ce82feff..3521e2e8d 100644 --- a/generated/async-stripe-payment/src/source/requests.rs +++ b/generated/async-stripe-payment/src/source/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct DetachSourceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -14,6 +15,7 @@ impl<'a> DetachSourceBuilder<'a> { } /// Delete a specified source for a given customer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DetachSource<'a> { inner: DetachSourceBuilder<'a>, customer: &'a stripe_shared::CustomerId, @@ -139,6 +141,7 @@ const _: () = { }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveSourceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] client_secret: Option<&'a str>, @@ -153,6 +156,7 @@ impl<'a> RetrieveSourceBuilder<'a> { /// Retrieves an existing source object. /// Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveSource<'a> { inner: RetrieveSourceBuilder<'a>, source: &'a stripe_shared::SourceId, @@ -200,6 +204,7 @@ impl StripeRequest for RetrieveSource<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct SourceTransactionsSourceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -217,6 +222,7 @@ impl<'a> SourceTransactionsSourceBuilder<'a> { } /// List source transactions for a given source. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SourceTransactionsSource<'a> { inner: SourceTransactionsSourceBuilder<'a>, source: &'a stripe_shared::SourceId, @@ -292,6 +298,7 @@ impl StripeRequest for SourceTransactionsSource<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateSourceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -414,6 +421,7 @@ impl<'de> serde::Deserialize<'de> for CreateSourceFlow { } /// Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSourceMandate<'a> { /// The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. #[serde(skip_serializing_if = "Option::is_none")] @@ -451,6 +459,7 @@ impl<'a> Default for CreateSourceMandate<'a> { } /// The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSourceMandateAcceptance<'a> { /// The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. #[serde(skip_serializing_if = "Option::is_none")] @@ -737,6 +746,7 @@ impl<'de> serde::Deserialize<'de> for CreateSourceMandateNotificationMethod { /// Optional parameters for the receiver flow. /// Can be set only if the source is a receiver (`flow` is `receiver`). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSourceReceiver { /// The method Stripe should use to request information needed to process a refund or mispayment. /// Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). @@ -818,6 +828,7 @@ impl<'de> serde::Deserialize<'de> for CreateSourceReceiverRefundAttributesMethod /// Parameters required for the redirect flow. /// Required if the source is authenticated by a redirect (`flow` is `redirect`). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSourceRedirect<'a> { /// The URL you provide to redirect the customer back to you after they authenticated their payment. /// It can use your application URI scheme in the context of a mobile application. @@ -831,6 +842,7 @@ impl<'a> CreateSourceRedirect<'a> { /// Information about the items and shipping associated with the source. /// Required for transactional credit (for example Klarna) sources before you can charge it. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSourceSourceOrder<'a> { /// List of items constituting the order. #[serde(skip_serializing_if = "Option::is_none")] @@ -852,6 +864,7 @@ impl<'a> Default for CreateSourceSourceOrder<'a> { } /// List of items constituting the order. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSourceSourceOrderItems<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -1004,6 +1017,7 @@ impl<'de> serde::Deserialize<'de> for CreateSourceUsage { } /// Creates a new source object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateSource<'a> { inner: CreateSourceBuilder<'a>, } @@ -1135,6 +1149,7 @@ impl StripeRequest for CreateSource<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateSourceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -1163,6 +1178,7 @@ impl<'a> UpdateSourceBuilder<'a> { } /// Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSourceMandate<'a> { /// The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. #[serde(skip_serializing_if = "Option::is_none")] @@ -1200,6 +1216,7 @@ impl<'a> Default for UpdateSourceMandate<'a> { } /// The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSourceMandateAcceptance<'a> { /// The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. #[serde(skip_serializing_if = "Option::is_none")] @@ -1486,6 +1503,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSourceMandateNotificationMethod { /// Information about the items and shipping associated with the source. /// Required for transactional credit (for example Klarna) sources before you can charge it. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSourceSourceOrder<'a> { /// List of items constituting the order. #[serde(skip_serializing_if = "Option::is_none")] @@ -1507,6 +1525,7 @@ impl<'a> Default for UpdateSourceSourceOrder<'a> { } /// List of items constituting the order. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSourceSourceOrderItems<'a> { #[serde(skip_serializing_if = "Option::is_none")] pub amount: Option, @@ -1610,6 +1629,7 @@ impl<'de> serde::Deserialize<'de> for UpdateSourceSourceOrderItemsType { /// It is also possible to update type specific information for selected payment methods. /// Please refer to our [payment method guides](https://stripe.com/docs/sources) for more detail. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateSource<'a> { inner: UpdateSourceBuilder<'a>, source: &'a stripe_shared::SourceId, @@ -1681,6 +1701,7 @@ impl StripeRequest for UpdateSource<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct VerifySourceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -1693,6 +1714,7 @@ impl<'a> VerifySourceBuilder<'a> { } /// Verify a given source. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct VerifySource<'a> { inner: VerifySourceBuilder<'a>, source: &'a stripe_shared::SourceId, @@ -1737,6 +1759,7 @@ impl StripeRequest for VerifySource<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct MandateOfflineAcceptanceParams<'a> { /// An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. pub contact_email: &'a str, @@ -1747,6 +1770,7 @@ impl<'a> MandateOfflineAcceptanceParams<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct MandateOnlineAcceptanceParams<'a> { /// The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. #[serde(skip_serializing_if = "Option::is_none")] @@ -1769,6 +1793,7 @@ impl<'a> Default for MandateOnlineAcceptanceParams<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SourceAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -1800,6 +1825,7 @@ impl<'a> Default for SourceAddress<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct Address<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -1825,6 +1851,7 @@ impl<'a> Address<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct Owner<'a> { /// Owner's address. #[serde(skip_serializing_if = "Option::is_none")] @@ -1850,6 +1877,7 @@ impl<'a> Default for Owner<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct OrderShipping<'a> { /// Shipping address. pub address: Address<'a>, diff --git a/generated/async-stripe-payment/src/source_mandate_notification.rs b/generated/async-stripe-payment/src/source_mandate_notification.rs index 5d1f5c4a6..4395cf01b 100644 --- a/generated/async-stripe-payment/src/source_mandate_notification.rs +++ b/generated/async-stripe-payment/src/source_mandate_notification.rs @@ -2,6 +2,7 @@ /// a source mandate must be sent to the payer. They will trigger a webhook or /// deliver an email to the customer. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct SourceMandateNotification { pub acss_debit: Option, @@ -24,7 +25,7 @@ pub struct SourceMandateNotification { pub status: String, /// The type of source this mandate notification is attached to. /// Should be the source type identifier code for the payment method, such as `three_d_secure`. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: String, } #[doc(hidden)] diff --git a/generated/async-stripe-product/Cargo.toml b/generated/async-stripe-product/Cargo.toml index 5265166fd..e1a9209a9 100644 --- a/generated/async-stripe-product/Cargo.toml +++ b/generated/async-stripe-product/Cargo.toml @@ -28,7 +28,9 @@ async-stripe-shared = {path = "../../generated/async-stripe-shared"} [features] serialize = ["async-stripe-types/serialize","async-stripe-shared/serialize"] +serialize_extra = ["async-stripe-types/serialize_extra","async-stripe-shared/serialize_extra"] deserialize = ["async-stripe-types/deserialize","async-stripe-shared/deserialize", "dep:serde_json"] +deserialize_extra = ["async-stripe-types/deserialize_extra","async-stripe-shared/deserialize_extra", "dep:serde_json"] coupon = [] price = [] product = [] diff --git a/generated/async-stripe-product/src/coupon/requests.rs b/generated/async-stripe-product/src/coupon/requests.rs index f4df0782f..aeac98e79 100644 --- a/generated/async-stripe-product/src/coupon/requests.rs +++ b/generated/async-stripe-product/src/coupon/requests.rs @@ -6,6 +6,7 @@ use stripe_client_core::{ /// However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. /// You can also delete coupons via the API. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteCoupon<'a> { coupon: &'a stripe_shared::CouponId, } @@ -42,6 +43,7 @@ impl StripeRequest for DeleteCoupon<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListCouponBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -61,6 +63,7 @@ impl<'a> ListCouponBuilder<'a> { } /// Returns a list of your coupons. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListCoupon<'a> { inner: ListCouponBuilder<'a>, } @@ -138,6 +141,7 @@ impl StripeRequest for ListCoupon<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveCouponBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -149,6 +153,7 @@ impl<'a> RetrieveCouponBuilder<'a> { } /// Retrieves the coupon with the given ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveCoupon<'a> { inner: RetrieveCouponBuilder<'a>, coupon: &'a stripe_shared::CouponId, @@ -191,6 +196,7 @@ impl StripeRequest for RetrieveCoupon<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateCouponBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount_off: Option, @@ -240,6 +246,7 @@ impl<'a> CreateCouponBuilder<'a> { } /// A hash containing directions for what this Coupon will apply discounts to. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCouponAppliesTo<'a> { /// An array of Product IDs that this Coupon will apply to. #[serde(skip_serializing_if = "Option::is_none")] @@ -262,6 +269,7 @@ impl<'a> Default for CreateCouponAppliesTo<'a> { /// If you set an `amount_off`, that amount will be subtracted from any invoice’s subtotal. /// For example, an invoice with a subtotal of $100 will have a final total of $0 if a coupon with an `amount_off` of 20000 is applied to it and an invoice with a subtotal of $300 will have a final total of $100 if a coupon with an `amount_off` of 20000 is applied to it. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateCoupon<'a> { inner: CreateCouponBuilder<'a>, } @@ -378,6 +386,7 @@ impl StripeRequest for CreateCoupon<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateCouponBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] currency_options: Option<&'a std::collections::HashMap>, @@ -396,6 +405,7 @@ impl<'a> UpdateCouponBuilder<'a> { /// Updates the metadata of a coupon. /// Other coupon details (currency, duration, amount_off) are, by design, not editable. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateCoupon<'a> { inner: UpdateCouponBuilder<'a>, coupon: &'a stripe_shared::CouponId, @@ -462,6 +472,7 @@ impl StripeRequest for UpdateCoupon<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CurrencyOption { /// A positive integer representing the amount to subtract from an invoice total. pub amount_off: i64, diff --git a/generated/async-stripe-product/src/deleted_product_feature.rs b/generated/async-stripe-product/src/deleted_product_feature.rs index 43b93757a..591a7a1de 100644 --- a/generated/async-stripe-product/src/deleted_product_feature.rs +++ b/generated/async-stripe-product/src/deleted_product_feature.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedProductFeature { #[allow(dead_code)] diff --git a/generated/async-stripe-product/src/price/requests.rs b/generated/async-stripe-product/src/price/requests.rs index b7a0728f5..7f8be429a 100644 --- a/generated/async-stripe-product/src/price/requests.rs +++ b/generated/async-stripe-product/src/price/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListPriceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -47,6 +48,7 @@ impl<'a> ListPriceBuilder<'a> { } /// Only return prices with these recurring fields. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListPriceRecurring<'a> { /// Filter by billing frequency. Either `day`, `week`, `month` or `year`. #[serde(skip_serializing_if = "Option::is_none")] @@ -187,6 +189,7 @@ impl<'de> serde::Deserialize<'de> for ListPriceRecurringUsageType { /// Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). /// For the list of inactive prices, set `active` to false. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListPrice<'a> { inner: ListPriceBuilder<'a>, } @@ -294,6 +297,7 @@ impl StripeRequest for ListPrice<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrievePriceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -305,6 +309,7 @@ impl<'a> RetrievePriceBuilder<'a> { } /// Retrieves the price with the given ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrievePrice<'a> { inner: RetrievePriceBuilder<'a>, price: &'a stripe_shared::PriceId, @@ -347,6 +352,7 @@ impl StripeRequest for RetrievePrice<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct SearchPriceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -368,6 +374,7 @@ impl<'a> SearchPriceBuilder<'a> { /// Occasionally, propagation of new or updated data can be up. /// to an hour behind during outages. Search functionality is not available to merchants in India. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SearchPrice<'a> { inner: SearchPriceBuilder<'a>, } @@ -427,6 +434,7 @@ impl StripeRequest for SearchPrice<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreatePriceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -495,6 +503,7 @@ impl<'a> CreatePriceBuilder<'a> { /// Prices defined in each available currency option. /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePriceCurrencyOptions { /// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. #[serde(skip_serializing_if = "Option::is_none")] @@ -538,6 +547,7 @@ impl Default for CreatePriceCurrencyOptions { /// This parameter requires `billing_scheme` to be set to `tiered`. /// See also the documentation for `billing_scheme`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePriceCurrencyOptionsTiers { /// The flat billing amount for an entire tier, regardless of the number of units in the tier. #[serde(skip_serializing_if = "Option::is_none")] @@ -573,6 +583,7 @@ impl CreatePriceCurrencyOptionsTiers { /// The lower bound of a tier is the upper bound of the previous tier adding one. /// Use `inf` to define a fallback tier. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreatePriceCurrencyOptionsTiersUpTo { Inf, @@ -580,6 +591,7 @@ pub enum CreatePriceCurrencyOptionsTiersUpTo { } /// These fields can be used to create a new product that this price will belong to. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePriceProductData<'a> { /// Whether the product is currently available for purchase. Defaults to `true`. #[serde(skip_serializing_if = "Option::is_none")] @@ -628,6 +640,7 @@ impl<'a> CreatePriceProductData<'a> { } /// The recurring components of a price such as `interval` and `usage_type`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePriceRecurring<'a> { /// Specifies a usage aggregation strategy for prices of `usage_type=metered`. Defaults to `sum`. #[serde(skip_serializing_if = "Option::is_none")] @@ -852,6 +865,7 @@ impl<'de> serde::Deserialize<'de> for CreatePriceRecurringUsageType { /// This parameter requires `billing_scheme` to be set to `tiered`. /// See also the documentation for `billing_scheme`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePriceTiers<'a> { /// The flat billing amount for an entire tier, regardless of the number of units in the tier. #[serde(skip_serializing_if = "Option::is_none")] @@ -887,6 +901,7 @@ impl<'a> CreatePriceTiers<'a> { /// The lower bound of a tier is the upper bound of the previous tier adding one. /// Use `inf` to define a fallback tier. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreatePriceTiersUpTo { Inf, @@ -895,6 +910,7 @@ pub enum CreatePriceTiersUpTo { /// Apply a transformation to the reported usage or set quantity before computing the billed price. /// Cannot be combined with `tiers`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePriceTransformQuantity { /// Divide usage by this number. pub divide_by: i64, @@ -964,6 +980,7 @@ impl<'de> serde::Deserialize<'de> for CreatePriceTransformQuantityRound { } /// Creates a new price for an existing product. The price can be recurring or one-time. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePrice<'a> { inner: CreatePriceBuilder<'a>, } @@ -1112,6 +1129,7 @@ impl StripeRequest for CreatePrice<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdatePriceBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -1148,6 +1166,7 @@ impl<'a> UpdatePriceBuilder<'a> { /// Prices defined in each available currency option. /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePriceCurrencyOptions { /// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. #[serde(skip_serializing_if = "Option::is_none")] @@ -1191,6 +1210,7 @@ impl Default for UpdatePriceCurrencyOptions { /// This parameter requires `billing_scheme` to be set to `tiered`. /// See also the documentation for `billing_scheme`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePriceCurrencyOptionsTiers { /// The flat billing amount for an entire tier, regardless of the number of units in the tier. #[serde(skip_serializing_if = "Option::is_none")] @@ -1226,6 +1246,7 @@ impl UpdatePriceCurrencyOptionsTiers { /// The lower bound of a tier is the upper bound of the previous tier adding one. /// Use `inf` to define a fallback tier. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum UpdatePriceCurrencyOptionsTiersUpTo { Inf, @@ -1234,6 +1255,7 @@ pub enum UpdatePriceCurrencyOptionsTiersUpTo { /// Updates the specified price by setting the values of the parameters passed. /// Any parameters not provided are left unchanged. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePrice<'a> { inner: UpdatePriceBuilder<'a>, price: &'a stripe_shared::PriceId, @@ -1326,6 +1348,7 @@ impl StripeRequest for UpdatePrice<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CustomUnitAmount { /// Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. pub enabled: bool, diff --git a/generated/async-stripe-product/src/product/requests.rs b/generated/async-stripe-product/src/product/requests.rs index 004dd3c57..6f15c8b9f 100644 --- a/generated/async-stripe-product/src/product/requests.rs +++ b/generated/async-stripe-product/src/product/requests.rs @@ -6,6 +6,7 @@ use stripe_client_core::{ /// Deleting a product is only possible if it has no prices associated with it. /// Additionally, deleting a product with `type=good` is only possible if it has no SKUs associated with it. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteProduct<'a> { id: &'a stripe_shared::ProductId, } @@ -42,6 +43,7 @@ impl StripeRequest for DeleteProduct<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListProductBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -84,6 +86,7 @@ impl<'a> ListProductBuilder<'a> { /// Returns a list of your products. /// The products are returned sorted by creation date, with the most recently created products appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListProduct<'a> { inner: ListProductBuilder<'a>, } @@ -186,6 +189,7 @@ impl StripeRequest for ListProduct<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveProductBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -198,6 +202,7 @@ impl<'a> RetrieveProductBuilder<'a> { /// Retrieves the details of an existing product. /// Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveProduct<'a> { inner: RetrieveProductBuilder<'a>, id: &'a stripe_shared::ProductId, @@ -240,6 +245,7 @@ impl StripeRequest for RetrieveProduct<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct SearchProductBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -261,6 +267,7 @@ impl<'a> SearchProductBuilder<'a> { /// Occasionally, propagation of new or updated data can be up. /// to an hour behind during outages. Search functionality is not available to merchants in India. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SearchProduct<'a> { inner: SearchProductBuilder<'a>, } @@ -320,6 +327,7 @@ impl StripeRequest for SearchProduct<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateProductBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -379,6 +387,7 @@ impl<'a> CreateProductBuilder<'a> { /// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. /// This Price will be set as the default price for this product. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateProductDefaultPriceData<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -425,6 +434,7 @@ impl<'a> CreateProductDefaultPriceData<'a> { /// Prices defined in each available currency option. /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateProductDefaultPriceDataCurrencyOptions { /// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. #[serde(skip_serializing_if = "Option::is_none")] @@ -466,6 +476,7 @@ impl Default for CreateProductDefaultPriceDataCurrencyOptions { } /// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateProductDefaultPriceDataCurrencyOptionsCustomUnitAmount { /// Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. pub enabled: bool, @@ -553,6 +564,7 @@ impl<'de> serde::Deserialize<'de> for CreateProductDefaultPriceDataCurrencyOptio /// This parameter requires `billing_scheme` to be set to `tiered`. /// See also the documentation for `billing_scheme`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateProductDefaultPriceDataCurrencyOptionsTiers { /// The flat billing amount for an entire tier, regardless of the number of units in the tier. #[serde(skip_serializing_if = "Option::is_none")] @@ -588,6 +600,7 @@ impl CreateProductDefaultPriceDataCurrencyOptionsTiers { /// The lower bound of a tier is the upper bound of the previous tier adding one. /// Use `inf` to define a fallback tier. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] #[serde(untagged)] pub enum CreateProductDefaultPriceDataCurrencyOptionsTiersUpTo { Inf, @@ -595,6 +608,7 @@ pub enum CreateProductDefaultPriceDataCurrencyOptionsTiersUpTo { } /// The recurring components of a price such as `interval` and `interval_count`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateProductDefaultPriceDataRecurring { /// Specifies billing frequency. Either `day`, `week`, `month` or `year`. pub interval: CreateProductDefaultPriceDataRecurringInterval, @@ -737,6 +751,7 @@ impl<'de> serde::Deserialize<'de> for CreateProductDefaultPriceDataTaxBehavior { } /// Creates a new product object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateProduct<'a> { inner: CreateProductBuilder<'a>, } @@ -867,6 +882,7 @@ impl StripeRequest for CreateProduct<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateProductBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -920,6 +936,7 @@ impl<'a> UpdateProductBuilder<'a> { /// Updates the specific product by setting the values of the parameters passed. /// Any parameters not provided will be left unchanged. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateProduct<'a> { inner: UpdateProductBuilder<'a>, id: &'a stripe_shared::ProductId, @@ -1041,6 +1058,7 @@ impl StripeRequest for UpdateProduct<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct Features<'a> { /// The marketing feature name. Up to 80 characters long. pub name: &'a str, @@ -1051,6 +1069,7 @@ impl<'a> Features<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PackageDimensionsSpecs { /// Height, in inches. Maximum precision is 2 decimal places. pub height: f64, diff --git a/generated/async-stripe-product/src/product_feature/requests.rs b/generated/async-stripe-product/src/product_feature/requests.rs index 00960d687..713d4626b 100644 --- a/generated/async-stripe-product/src/product_feature/requests.rs +++ b/generated/async-stripe-product/src/product_feature/requests.rs @@ -4,6 +4,7 @@ use stripe_client_core::{ /// Deletes the feature attachment to a product #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteProductFeature<'a> { id: &'a str, product: &'a stripe_shared::ProductId, @@ -42,6 +43,7 @@ impl StripeRequest for DeleteProductFeature<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListProductProductFeatureBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -59,6 +61,7 @@ impl<'a> ListProductProductFeatureBuilder<'a> { } /// Retrieve a list of features for a product #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListProductProductFeature<'a> { inner: ListProductProductFeatureBuilder<'a>, product: &'a stripe_shared::ProductId, @@ -133,6 +136,7 @@ impl StripeRequest for ListProductProductFeature<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveProductFeatureBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -144,6 +148,7 @@ impl<'a> RetrieveProductFeatureBuilder<'a> { } /// Retrieves a product_feature, which represents a feature attachment to a product #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveProductFeature<'a> { inner: RetrieveProductFeatureBuilder<'a>, id: &'a str, @@ -189,6 +194,7 @@ impl StripeRequest for RetrieveProductFeature<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateProductProductFeatureBuilder<'a> { entitlement_feature: &'a str, #[serde(skip_serializing_if = "Option::is_none")] @@ -201,6 +207,7 @@ impl<'a> CreateProductProductFeatureBuilder<'a> { } /// Creates a product_feature, which represents a feature attachment to a product #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateProductProductFeature<'a> { inner: CreateProductProductFeatureBuilder<'a>, product: &'a stripe_shared::ProductId, diff --git a/generated/async-stripe-product/src/product_feature/types.rs b/generated/async-stripe-product/src/product_feature/types.rs index 213ce8592..3e65b0f85 100644 --- a/generated/async-stripe-product/src/product_feature/types.rs +++ b/generated/async-stripe-product/src/product_feature/types.rs @@ -1,6 +1,7 @@ /// A product_feature represents an attachment between a feature and a product. /// When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ProductFeature { pub entitlement_feature: stripe_shared::EntitlementsFeature, diff --git a/generated/async-stripe-product/src/promotion_code/requests.rs b/generated/async-stripe-product/src/promotion_code/requests.rs index be51e26d5..a16ea0465 100644 --- a/generated/async-stripe-product/src/promotion_code/requests.rs +++ b/generated/async-stripe-product/src/promotion_code/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListPromotionCodeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -40,6 +41,7 @@ impl<'a> ListPromotionCodeBuilder<'a> { } /// Returns a list of your promotion codes. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListPromotionCode<'a> { inner: ListPromotionCodeBuilder<'a>, } @@ -137,6 +139,7 @@ impl StripeRequest for ListPromotionCode<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrievePromotionCodeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -149,6 +152,7 @@ impl<'a> RetrievePromotionCodeBuilder<'a> { /// Retrieves the promotion code with the given ID. /// In order to retrieve a promotion code by the customer-facing `code` use [list](https://stripe.com/docs/api/promotion_codes/list) with the desired `code`. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrievePromotionCode<'a> { inner: RetrievePromotionCodeBuilder<'a>, promotion_code: &'a stripe_shared::PromotionCodeId, @@ -192,6 +196,7 @@ impl StripeRequest for RetrievePromotionCode<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreatePromotionCodeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -228,6 +233,7 @@ impl<'a> CreatePromotionCodeBuilder<'a> { } /// Settings that restrict the redemption of the promotion code. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePromotionCodeRestrictions<'a> { /// Promotion codes defined in each available currency option. /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). @@ -262,6 +268,7 @@ impl<'a> Default for CreatePromotionCodeRestrictions<'a> { /// A promotion code points to a coupon. /// You can optionally restrict the code to a specific customer, redemption limit, and expiration date. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreatePromotionCode<'a> { inner: CreatePromotionCodeBuilder<'a>, } @@ -345,6 +352,7 @@ impl StripeRequest for CreatePromotionCode<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdatePromotionCodeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -362,6 +370,7 @@ impl<'a> UpdatePromotionCodeBuilder<'a> { } /// Settings that restrict the redemption of the promotion code. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePromotionCodeRestrictions<'a> { /// Promotion codes defined in each available currency option. /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). @@ -382,6 +391,7 @@ impl<'a> Default for UpdatePromotionCodeRestrictions<'a> { /// Updates the specified promotion code by setting the values of the parameters passed. /// Most fields are, by design, not editable. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdatePromotionCode<'a> { inner: UpdatePromotionCodeBuilder<'a>, promotion_code: &'a stripe_shared::PromotionCodeId, @@ -445,6 +455,7 @@ impl StripeRequest for UpdatePromotionCode<'_> { } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CurrencyOption { /// Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-product/src/shipping_rate/requests.rs b/generated/async-stripe-product/src/shipping_rate/requests.rs index 16b0fb6f8..639ca8529 100644 --- a/generated/async-stripe-product/src/shipping_rate/requests.rs +++ b/generated/async-stripe-product/src/shipping_rate/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListShippingRateBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -34,6 +35,7 @@ impl<'a> ListShippingRateBuilder<'a> { } /// Returns a list of your shipping rates. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListShippingRate<'a> { inner: ListShippingRateBuilder<'a>, } @@ -121,6 +123,7 @@ impl StripeRequest for ListShippingRate<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveShippingRateBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -132,6 +135,7 @@ impl<'a> RetrieveShippingRateBuilder<'a> { } /// Returns the shipping rate object with the given ID. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveShippingRate<'a> { inner: RetrieveShippingRateBuilder<'a>, shipping_rate_token: &'a stripe_shared::ShippingRateId, @@ -175,6 +179,7 @@ impl StripeRequest for RetrieveShippingRate<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateShippingRateBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] delivery_estimate: Option, @@ -210,6 +215,7 @@ impl<'a> CreateShippingRateBuilder<'a> { /// The estimated range for how long shipping will take, meant to be displayable to the customer. /// This will appear on CheckoutSessions. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateShippingRateDeliveryEstimate { /// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. #[serde(skip_serializing_if = "Option::is_none")] @@ -230,6 +236,7 @@ impl Default for CreateShippingRateDeliveryEstimate { } /// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateShippingRateDeliveryEstimateMaximum { /// A unit of time. pub unit: CreateShippingRateDeliveryEstimateMaximumUnit, @@ -310,6 +317,7 @@ impl<'de> serde::Deserialize<'de> for CreateShippingRateDeliveryEstimateMaximumU } /// The lower bound of the estimated range. If empty, represents no lower bound. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateShippingRateDeliveryEstimateMinimum { /// A unit of time. pub unit: CreateShippingRateDeliveryEstimateMinimumUnit, @@ -390,6 +398,7 @@ impl<'de> serde::Deserialize<'de> for CreateShippingRateDeliveryEstimateMinimumU } /// Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateShippingRateFixedAmount<'a> { /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -414,6 +423,7 @@ impl<'a> CreateShippingRateFixedAmount<'a> { /// Shipping rates defined in each available currency option. /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateShippingRateFixedAmountCurrencyOptions { /// A non-negative integer in cents representing how much to charge. pub amount: i64, @@ -429,6 +439,7 @@ impl CreateShippingRateFixedAmountCurrencyOptions { } /// Creates a new shipping rate object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateShippingRate<'a> { inner: CreateShippingRateBuilder<'a>, } @@ -508,6 +519,7 @@ impl StripeRequest for CreateShippingRate<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateShippingRateBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -527,6 +539,7 @@ impl<'a> UpdateShippingRateBuilder<'a> { } /// Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateShippingRateFixedAmount<'a> { /// Shipping rates defined in each available currency option. /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). @@ -551,6 +564,7 @@ impl<'a> Default for UpdateShippingRateFixedAmount<'a> { /// Shipping rates defined in each available currency option. /// Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateShippingRateFixedAmountCurrencyOptions { /// A non-negative integer in cents representing how much to charge. #[serde(skip_serializing_if = "Option::is_none")] @@ -572,6 +586,7 @@ impl Default for UpdateShippingRateFixedAmountCurrencyOptions { } /// Updates an existing shipping rate object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateShippingRate<'a> { inner: UpdateShippingRateBuilder<'a>, shipping_rate_token: &'a stripe_shared::ShippingRateId, diff --git a/generated/async-stripe-product/src/tax_code/requests.rs b/generated/async-stripe-product/src/tax_code/requests.rs index edf9f350a..4db23cd14 100644 --- a/generated/async-stripe-product/src/tax_code/requests.rs +++ b/generated/async-stripe-product/src/tax_code/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTaxCodeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -20,6 +21,7 @@ impl<'a> ListTaxCodeBuilder<'a> { } /// A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTaxCode<'a> { inner: ListTaxCodeBuilder<'a>, } @@ -91,6 +93,7 @@ impl StripeRequest for ListTaxCode<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTaxCodeBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -103,6 +106,7 @@ impl<'a> RetrieveTaxCodeBuilder<'a> { /// Retrieves the details of an existing tax code. /// Supply the unique tax code ID and Stripe will return the corresponding tax code information. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTaxCode<'a> { inner: RetrieveTaxCodeBuilder<'a>, id: &'a stripe_shared::TaxCodeId, diff --git a/generated/async-stripe-product/src/tax_rate/requests.rs b/generated/async-stripe-product/src/tax_rate/requests.rs index cf1f88772..cef1a0acc 100644 --- a/generated/async-stripe-product/src/tax_rate/requests.rs +++ b/generated/async-stripe-product/src/tax_rate/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTaxRateBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -35,6 +36,7 @@ impl<'a> ListTaxRateBuilder<'a> { /// Returns a list of your tax rates. /// Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTaxRate<'a> { inner: ListTaxRateBuilder<'a>, } @@ -121,6 +123,7 @@ impl StripeRequest for ListTaxRate<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTaxRateBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -132,6 +135,7 @@ impl<'a> RetrieveTaxRateBuilder<'a> { } /// Retrieves a tax rate with the given ID #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTaxRate<'a> { inner: RetrieveTaxRateBuilder<'a>, tax_rate: &'a stripe_shared::TaxRateId, @@ -174,6 +178,7 @@ impl StripeRequest for RetrieveTaxRate<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTaxRateBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -214,6 +219,7 @@ impl<'a> CreateTaxRateBuilder<'a> { } /// Creates a new tax rate. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTaxRate<'a> { inner: CreateTaxRateBuilder<'a>, } @@ -297,6 +303,7 @@ impl StripeRequest for CreateTaxRate<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateTaxRateBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] active: Option, @@ -334,6 +341,7 @@ impl<'a> UpdateTaxRateBuilder<'a> { } /// Updates an existing tax rate. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTaxRate<'a> { inner: UpdateTaxRateBuilder<'a>, tax_rate: &'a stripe_shared::TaxRateId, diff --git a/generated/async-stripe-shared/Cargo.toml b/generated/async-stripe-shared/Cargo.toml index 8a3c55bdd..040aff8ac 100644 --- a/generated/async-stripe-shared/Cargo.toml +++ b/generated/async-stripe-shared/Cargo.toml @@ -27,5 +27,7 @@ async-stripe-types = {path = "../../async-stripe-types"} [features] serialize = ["async-stripe-types/serialize"] +serialize_extra = ["async-stripe-types/serialize_extra"] deserialize = ["async-stripe-types/deserialize", "dep:serde_json"] +deserialize_extra = ["async-stripe-types/deserialize_extra", "dep:serde_json"] diff --git a/generated/async-stripe-shared/src/account.rs b/generated/async-stripe-shared/src/account.rs index 6e6ba3876..706e11d74 100644 --- a/generated/async-stripe-shared/src/account.rs +++ b/generated/async-stripe-shared/src/account.rs @@ -13,6 +13,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Account { /// Business information about the account. @@ -55,7 +56,7 @@ pub struct Account { pub settings: Option, pub tos_acceptance: Option, /// The Stripe account type. Can be `standard`, `express`, `custom`, or `none`. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: Option, } #[doc(hidden)] diff --git a/generated/async-stripe-shared/src/application.rs b/generated/async-stripe-shared/src/application.rs index 1945eb58e..ea290f1e7 100644 --- a/generated/async-stripe-shared/src/application.rs +++ b/generated/async-stripe-shared/src/application.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Application { /// Unique identifier for the object. diff --git a/generated/async-stripe-shared/src/application_fee.rs b/generated/async-stripe-shared/src/application_fee.rs index 50b7d47a6..97db153f2 100644 --- a/generated/async-stripe-shared/src/application_fee.rs +++ b/generated/async-stripe-shared/src/application_fee.rs @@ -1,5 +1,6 @@ /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ApplicationFee { /// ID of the Stripe account this fee was taken from. diff --git a/generated/async-stripe-shared/src/application_fee_refund.rs b/generated/async-stripe-shared/src/application_fee_refund.rs index 29862e781..231f27772 100644 --- a/generated/async-stripe-shared/src/application_fee_refund.rs +++ b/generated/async-stripe-shared/src/application_fee_refund.rs @@ -6,6 +6,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ApplicationFeeRefund { /// Amount, in cents (or local equivalent). diff --git a/generated/async-stripe-shared/src/balance_transaction.rs b/generated/async-stripe-shared/src/balance_transaction.rs index 24917afe1..a02002c3f 100644 --- a/generated/async-stripe-shared/src/balance_transaction.rs +++ b/generated/async-stripe-shared/src/balance_transaction.rs @@ -5,6 +5,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct BalanceTransaction { /// Gross amount of this transaction (in cents (or local equivalent)). @@ -44,7 +45,7 @@ pub struct BalanceTransaction { /// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. /// Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). /// To classify transactions for accounting purposes, consider `reporting_category` instead. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: BalanceTransactionType, } #[doc(hidden)] diff --git a/generated/async-stripe-shared/src/bank_account.rs b/generated/async-stripe-shared/src/bank_account.rs index 41bcd9a3b..2e78d11a5 100644 --- a/generated/async-stripe-shared/src/bank_account.rs +++ b/generated/async-stripe-shared/src/bank_account.rs @@ -7,6 +7,7 @@ /// /// Related guide: [Bank debits and transfers](/payments/bank-debits-transfers) #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct BankAccount { /// The ID of the account that the bank account is associated with. diff --git a/generated/async-stripe-shared/src/capability.rs b/generated/async-stripe-shared/src/capability.rs index 7d36c61ec..8c46fab0f 100644 --- a/generated/async-stripe-shared/src/capability.rs +++ b/generated/async-stripe-shared/src/capability.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Capability { /// The account for which the capability enables functionality. diff --git a/generated/async-stripe-shared/src/card.rs b/generated/async-stripe-shared/src/card.rs index 763add6f9..22b0e2748 100644 --- a/generated/async-stripe-shared/src/card.rs +++ b/generated/async-stripe-shared/src/card.rs @@ -6,6 +6,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Card { /// The account this card belongs to. diff --git a/generated/async-stripe-shared/src/cash_balance.rs b/generated/async-stripe-shared/src/cash_balance.rs index 870bd9684..1045d2617 100644 --- a/generated/async-stripe-shared/src/cash_balance.rs +++ b/generated/async-stripe-shared/src/cash_balance.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct CashBalance { /// A hash of all cash balances available to this customer. diff --git a/generated/async-stripe-shared/src/charge.rs b/generated/async-stripe-shared/src/charge.rs index 24ae42171..d035c278c 100644 --- a/generated/async-stripe-shared/src/charge.rs +++ b/generated/async-stripe-shared/src/charge.rs @@ -5,6 +5,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Charge { /// Amount intended to be collected by this payment. diff --git a/generated/async-stripe-shared/src/checkout_session_item.rs b/generated/async-stripe-shared/src/checkout_session_item.rs index 28217ba00..449b722ee 100644 --- a/generated/async-stripe-shared/src/checkout_session_item.rs +++ b/generated/async-stripe-shared/src/checkout_session_item.rs @@ -1,5 +1,6 @@ /// A line item. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct CheckoutSessionItem { /// Total discount amount applied. If no discounts were applied, defaults to 0. diff --git a/generated/async-stripe-shared/src/connect_collection_transfer.rs b/generated/async-stripe-shared/src/connect_collection_transfer.rs index d8788d43b..02677f16f 100644 --- a/generated/async-stripe-shared/src/connect_collection_transfer.rs +++ b/generated/async-stripe-shared/src/connect_collection_transfer.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ConnectCollectionTransfer { /// Amount transferred, in cents (or local equivalent). diff --git a/generated/async-stripe-shared/src/coupon.rs b/generated/async-stripe-shared/src/coupon.rs index c0fc77052..605c7ad40 100644 --- a/generated/async-stripe-shared/src/coupon.rs +++ b/generated/async-stripe-shared/src/coupon.rs @@ -6,6 +6,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Coupon { /// Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. diff --git a/generated/async-stripe-shared/src/credit_note.rs b/generated/async-stripe-shared/src/credit_note.rs index 0f5bcd4b0..e1a155ba4 100644 --- a/generated/async-stripe-shared/src/credit_note.rs +++ b/generated/async-stripe-shared/src/credit_note.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct CreditNote { /// The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. @@ -69,7 +70,7 @@ pub struct CreditNote { /// Type of this credit note, one of `pre_payment` or `post_payment`. /// A `pre_payment` credit note means it was issued when the invoice was open. /// A `post_payment` credit note means it was issued when the invoice was paid. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: CreditNoteType, /// The time that the credit note was voided. pub voided_at: Option, diff --git a/generated/async-stripe-shared/src/credit_note_line_item.rs b/generated/async-stripe-shared/src/credit_note_line_item.rs index 807eb8b3c..958d024a3 100644 --- a/generated/async-stripe-shared/src/credit_note_line_item.rs +++ b/generated/async-stripe-shared/src/credit_note_line_item.rs @@ -2,6 +2,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct CreditNoteLineItem { /// The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. @@ -28,7 +29,7 @@ pub struct CreditNoteLineItem { pub tax_rates: Vec, /// The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. /// When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: CreditNoteLineItemType, /// The cost of each unit of product being credited. pub unit_amount: Option, diff --git a/generated/async-stripe-shared/src/customer.rs b/generated/async-stripe-shared/src/customer.rs index 7c9498db3..eb745bb27 100644 --- a/generated/async-stripe-shared/src/customer.rs +++ b/generated/async-stripe-shared/src/customer.rs @@ -5,6 +5,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Customer { /// The customer's address. diff --git a/generated/async-stripe-shared/src/customer_balance_transaction.rs b/generated/async-stripe-shared/src/customer_balance_transaction.rs index 38b86f60f..4ae1fcf95 100644 --- a/generated/async-stripe-shared/src/customer_balance_transaction.rs +++ b/generated/async-stripe-shared/src/customer_balance_transaction.rs @@ -7,6 +7,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct CustomerBalanceTransaction { /// The amount of the transaction. @@ -38,7 +39,7 @@ pub struct CustomerBalanceTransaction { pub metadata: Option>, /// Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. /// See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: CustomerBalanceTransactionType, } #[doc(hidden)] diff --git a/generated/async-stripe-shared/src/customer_cash_balance_transaction.rs b/generated/async-stripe-shared/src/customer_cash_balance_transaction.rs index 248a45701..5e30d7de8 100644 --- a/generated/async-stripe-shared/src/customer_cash_balance_transaction.rs +++ b/generated/async-stripe-shared/src/customer_cash_balance_transaction.rs @@ -7,6 +7,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct CustomerCashBalanceTransaction { pub adjusted_for_overdraft: Option, @@ -34,7 +35,7 @@ pub transferred_to_balance: Option, diff --git a/generated/async-stripe-shared/src/deleted_account.rs b/generated/async-stripe-shared/src/deleted_account.rs index 99c389f25..ffce6146f 100644 --- a/generated/async-stripe-shared/src/deleted_account.rs +++ b/generated/async-stripe-shared/src/deleted_account.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedAccount { #[allow(dead_code)] diff --git a/generated/async-stripe-shared/src/deleted_bank_account.rs b/generated/async-stripe-shared/src/deleted_bank_account.rs index fc12b52f0..b7c135bfc 100644 --- a/generated/async-stripe-shared/src/deleted_bank_account.rs +++ b/generated/async-stripe-shared/src/deleted_bank_account.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedBankAccount { /// Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. diff --git a/generated/async-stripe-shared/src/deleted_card.rs b/generated/async-stripe-shared/src/deleted_card.rs index 2474c9f04..8f5b4f399 100644 --- a/generated/async-stripe-shared/src/deleted_card.rs +++ b/generated/async-stripe-shared/src/deleted_card.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedCard { /// Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. diff --git a/generated/async-stripe-shared/src/deleted_coupon.rs b/generated/async-stripe-shared/src/deleted_coupon.rs index 12e41af96..7b205a2cc 100644 --- a/generated/async-stripe-shared/src/deleted_coupon.rs +++ b/generated/async-stripe-shared/src/deleted_coupon.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedCoupon { #[allow(dead_code)] diff --git a/generated/async-stripe-shared/src/deleted_customer.rs b/generated/async-stripe-shared/src/deleted_customer.rs index e03c93ceb..483ac1128 100644 --- a/generated/async-stripe-shared/src/deleted_customer.rs +++ b/generated/async-stripe-shared/src/deleted_customer.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedCustomer { #[allow(dead_code)] diff --git a/generated/async-stripe-shared/src/deleted_discount.rs b/generated/async-stripe-shared/src/deleted_discount.rs index c8de0d016..a24141480 100644 --- a/generated/async-stripe-shared/src/deleted_discount.rs +++ b/generated/async-stripe-shared/src/deleted_discount.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedDiscount { /// The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. diff --git a/generated/async-stripe-shared/src/deleted_invoice.rs b/generated/async-stripe-shared/src/deleted_invoice.rs index 4aa059252..e02bef393 100644 --- a/generated/async-stripe-shared/src/deleted_invoice.rs +++ b/generated/async-stripe-shared/src/deleted_invoice.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedInvoice { #[allow(dead_code)] diff --git a/generated/async-stripe-shared/src/deleted_invoiceitem.rs b/generated/async-stripe-shared/src/deleted_invoiceitem.rs index 0bc8c3050..84e2a93e5 100644 --- a/generated/async-stripe-shared/src/deleted_invoiceitem.rs +++ b/generated/async-stripe-shared/src/deleted_invoiceitem.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedInvoiceitem { #[allow(dead_code)] diff --git a/generated/async-stripe-shared/src/deleted_person.rs b/generated/async-stripe-shared/src/deleted_person.rs index 5775355f5..d4d144300 100644 --- a/generated/async-stripe-shared/src/deleted_person.rs +++ b/generated/async-stripe-shared/src/deleted_person.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedPerson { #[allow(dead_code)] diff --git a/generated/async-stripe-shared/src/deleted_plan.rs b/generated/async-stripe-shared/src/deleted_plan.rs index f4413efcd..bd7ad3bb7 100644 --- a/generated/async-stripe-shared/src/deleted_plan.rs +++ b/generated/async-stripe-shared/src/deleted_plan.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedPlan { #[allow(dead_code)] diff --git a/generated/async-stripe-shared/src/deleted_product.rs b/generated/async-stripe-shared/src/deleted_product.rs index 5109d6f90..7ab6670a1 100644 --- a/generated/async-stripe-shared/src/deleted_product.rs +++ b/generated/async-stripe-shared/src/deleted_product.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedProduct { #[allow(dead_code)] diff --git a/generated/async-stripe-shared/src/deleted_subscription_item.rs b/generated/async-stripe-shared/src/deleted_subscription_item.rs index a6613e7fb..06f919b57 100644 --- a/generated/async-stripe-shared/src/deleted_subscription_item.rs +++ b/generated/async-stripe-shared/src/deleted_subscription_item.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedSubscriptionItem { #[allow(dead_code)] diff --git a/generated/async-stripe-shared/src/deleted_tax_id.rs b/generated/async-stripe-shared/src/deleted_tax_id.rs index ac5919de2..b0f75af23 100644 --- a/generated/async-stripe-shared/src/deleted_tax_id.rs +++ b/generated/async-stripe-shared/src/deleted_tax_id.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedTaxId { #[allow(dead_code)] diff --git a/generated/async-stripe-shared/src/deleted_test_helpers_test_clock.rs b/generated/async-stripe-shared/src/deleted_test_helpers_test_clock.rs index 3216a3708..d46ee511c 100644 --- a/generated/async-stripe-shared/src/deleted_test_helpers_test_clock.rs +++ b/generated/async-stripe-shared/src/deleted_test_helpers_test_clock.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedTestHelpersTestClock { #[allow(dead_code)] diff --git a/generated/async-stripe-shared/src/discount.rs b/generated/async-stripe-shared/src/discount.rs index 8f5c8bd3d..3def4261a 100644 --- a/generated/async-stripe-shared/src/discount.rs +++ b/generated/async-stripe-shared/src/discount.rs @@ -5,6 +5,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Discount { /// The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. diff --git a/generated/async-stripe-shared/src/dispute.rs b/generated/async-stripe-shared/src/dispute.rs index bc5eb387e..d31463d49 100644 --- a/generated/async-stripe-shared/src/dispute.rs +++ b/generated/async-stripe-shared/src/dispute.rs @@ -6,6 +6,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Dispute { /// Disputed amount. diff --git a/generated/async-stripe-shared/src/entitlements_feature.rs b/generated/async-stripe-shared/src/entitlements_feature.rs index 343062a92..05acc362b 100644 --- a/generated/async-stripe-shared/src/entitlements_feature.rs +++ b/generated/async-stripe-shared/src/entitlements_feature.rs @@ -1,6 +1,7 @@ /// A feature represents a monetizable ability or functionality in your system. /// Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct EntitlementsFeature { /// Inactive features cannot be attached to new products and will not be returned from the features list endpoint. diff --git a/generated/async-stripe-shared/src/event.rs b/generated/async-stripe-shared/src/event.rs index 780552162..33ab57888 100644 --- a/generated/async-stripe-shared/src/event.rs +++ b/generated/async-stripe-shared/src/event.rs @@ -31,6 +31,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Event { /// The connected account that originates the event. @@ -50,7 +51,7 @@ pub struct Event { /// Information on the API request that triggers the event. pub request: Option, /// Description of the event (for example, `invoice.created` or `charge.refunded`). - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: EventType, } #[doc(hidden)] diff --git a/generated/async-stripe-shared/src/file.rs b/generated/async-stripe-shared/src/file.rs index 1f949c683..79c2ac2c8 100644 --- a/generated/async-stripe-shared/src/file.rs +++ b/generated/async-stripe-shared/src/file.rs @@ -8,6 +8,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct File { /// Time at which the object was created. Measured in seconds since the Unix epoch. @@ -27,7 +28,7 @@ pub struct File { /// A suitable title for the document. pub title: Option, /// The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: Option, /// Use your live secret API key to download the file from this URL. pub url: Option, diff --git a/generated/async-stripe-shared/src/file_link.rs b/generated/async-stripe-shared/src/file_link.rs index 4fc1d8136..1e0bdf7da 100644 --- a/generated/async-stripe-shared/src/file_link.rs +++ b/generated/async-stripe-shared/src/file_link.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct FileLink { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-shared/src/funding_instructions.rs b/generated/async-stripe-shared/src/funding_instructions.rs index d13a6f06f..65ee1974d 100644 --- a/generated/async-stripe-shared/src/funding_instructions.rs +++ b/generated/async-stripe-shared/src/funding_instructions.rs @@ -4,6 +4,7 @@ /// `financial_addresses` field. /// Related guide: [Customer balance funding instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions). #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct FundingInstructions { pub bank_transfer: stripe_shared::FundingInstructionsBankTransfer, diff --git a/generated/async-stripe-shared/src/invoice.rs b/generated/async-stripe-shared/src/invoice.rs index 8ddc46d12..facaea274 100644 --- a/generated/async-stripe-shared/src/invoice.rs +++ b/generated/async-stripe-shared/src/invoice.rs @@ -33,6 +33,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Invoice { /// The country of the business associated with this invoice, most often the business creating the invoice. diff --git a/generated/async-stripe-shared/src/invoice_item.rs b/generated/async-stripe-shared/src/invoice_item.rs index d2eb96f9e..36386ed90 100644 --- a/generated/async-stripe-shared/src/invoice_item.rs +++ b/generated/async-stripe-shared/src/invoice_item.rs @@ -16,6 +16,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct InvoiceItem { /// Amount (in the `currency` specified) of the invoice item. diff --git a/generated/async-stripe-shared/src/invoice_line_item.rs b/generated/async-stripe-shared/src/invoice_line_item.rs index 58be4f051..2a22737de 100644 --- a/generated/async-stripe-shared/src/invoice_line_item.rs +++ b/generated/async-stripe-shared/src/invoice_line_item.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct InvoiceLineItem { /// The amount, in cents (or local equivalent). @@ -51,7 +52,7 @@ pub struct InvoiceLineItem { /// The tax rates which apply to the line item. pub tax_rates: Option>, /// A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: InvoiceLineItemType, /// 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, diff --git a/generated/async-stripe-shared/src/issuing_authorization.rs b/generated/async-stripe-shared/src/issuing_authorization.rs index 08d3bb74f..538747eac 100644 --- a/generated/async-stripe-shared/src/issuing_authorization.rs +++ b/generated/async-stripe-shared/src/issuing_authorization.rs @@ -7,6 +7,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct IssuingAuthorization { /// The total amount that was authorized or rejected. diff --git a/generated/async-stripe-shared/src/issuing_card.rs b/generated/async-stripe-shared/src/issuing_card.rs index dc66c880e..d54a44ee4 100644 --- a/generated/async-stripe-shared/src/issuing_card.rs +++ b/generated/async-stripe-shared/src/issuing_card.rs @@ -2,6 +2,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct IssuingCard { /// The brand of the card. @@ -54,7 +55,7 @@ pub struct IssuingCard { /// Defaults to `inactive`. pub status: stripe_shared::IssuingCardStatus, /// The type of the card. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: stripe_shared::IssuingCardType, /// Information relating to digital wallets (like Apple Pay and Google Pay). pub wallets: Option, diff --git a/generated/async-stripe-shared/src/issuing_cardholder.rs b/generated/async-stripe-shared/src/issuing_cardholder.rs index 84325f3a8..db61dd5dc 100644 --- a/generated/async-stripe-shared/src/issuing_cardholder.rs +++ b/generated/async-stripe-shared/src/issuing_cardholder.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct IssuingCardholder { pub billing: stripe_shared::IssuingCardholderAddress, @@ -40,7 +41,7 @@ pub struct IssuingCardholder { pub status: stripe_shared::IssuingCardholderStatus, /// One of `individual` or `company`. /// See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: stripe_shared::IssuingCardholderType, } #[doc(hidden)] diff --git a/generated/async-stripe-shared/src/issuing_dispute.rs b/generated/async-stripe-shared/src/issuing_dispute.rs index 71718424d..2a0a2ac89 100644 --- a/generated/async-stripe-shared/src/issuing_dispute.rs +++ b/generated/async-stripe-shared/src/issuing_dispute.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct IssuingDispute { /// Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). diff --git a/generated/async-stripe-shared/src/issuing_personalization_design.rs b/generated/async-stripe-shared/src/issuing_personalization_design.rs index 385f7151a..41a8cf3a4 100644 --- a/generated/async-stripe-shared/src/issuing_personalization_design.rs +++ b/generated/async-stripe-shared/src/issuing_personalization_design.rs @@ -1,5 +1,6 @@ /// A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct IssuingPersonalizationDesign { /// The file for the card logo to use with physical bundles that support card logos. diff --git a/generated/async-stripe-shared/src/issuing_physical_bundle.rs b/generated/async-stripe-shared/src/issuing_physical_bundle.rs index 3d7146ba0..ad7d4f039 100644 --- a/generated/async-stripe-shared/src/issuing_physical_bundle.rs +++ b/generated/async-stripe-shared/src/issuing_physical_bundle.rs @@ -1,5 +1,6 @@ /// A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct IssuingPhysicalBundle { pub features: Option, @@ -12,7 +13,7 @@ pub struct IssuingPhysicalBundle { /// Whether this physical bundle can be used to create cards. pub status: stripe_shared::IssuingPhysicalBundleStatus, /// Whether this physical bundle is a standard Stripe offering or custom-made for you. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: stripe_shared::IssuingPhysicalBundleType, } #[doc(hidden)] diff --git a/generated/async-stripe-shared/src/issuing_token.rs b/generated/async-stripe-shared/src/issuing_token.rs index f3ce614a6..102c24325 100644 --- a/generated/async-stripe-shared/src/issuing_token.rs +++ b/generated/async-stripe-shared/src/issuing_token.rs @@ -3,6 +3,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct IssuingToken { /// Card associated with this token. diff --git a/generated/async-stripe-shared/src/issuing_transaction.rs b/generated/async-stripe-shared/src/issuing_transaction.rs index 6766a52cc..4f8f0c594 100644 --- a/generated/async-stripe-shared/src/issuing_transaction.rs +++ b/generated/async-stripe-shared/src/issuing_transaction.rs @@ -6,6 +6,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct IssuingTransaction { /// The transaction amount, which will be reflected in your balance. @@ -52,7 +53,7 @@ pub struct IssuingTransaction { /// [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts. pub treasury: Option, /// The nature of the transaction. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: stripe_shared::IssuingTransactionType, /// The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. pub wallet: Option, diff --git a/generated/async-stripe-shared/src/mandate.rs b/generated/async-stripe-shared/src/mandate.rs index 2c93c2d79..42a75123c 100644 --- a/generated/async-stripe-shared/src/mandate.rs +++ b/generated/async-stripe-shared/src/mandate.rs @@ -2,6 +2,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Mandate { pub customer_acceptance: stripe_shared::CustomerAcceptance, @@ -19,7 +20,7 @@ pub struct Mandate { /// The mandate status indicates whether or not you can use it to initiate a payment. pub status: MandateStatus, /// The type of the mandate. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: MandateType, } #[doc(hidden)] diff --git a/generated/async-stripe-shared/src/payment_intent.rs b/generated/async-stripe-shared/src/payment_intent.rs index 92f242156..b9d5aa9bb 100644 --- a/generated/async-stripe-shared/src/payment_intent.rs +++ b/generated/async-stripe-shared/src/payment_intent.rs @@ -12,6 +12,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct PaymentIntent { /// Amount intended to be collected by this PaymentIntent. diff --git a/generated/async-stripe-shared/src/payment_link.rs b/generated/async-stripe-shared/src/payment_link.rs index 547f556b2..38927e8b0 100644 --- a/generated/async-stripe-shared/src/payment_link.rs +++ b/generated/async-stripe-shared/src/payment_link.rs @@ -8,6 +8,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct PaymentLink { /// Whether the payment link's `url` is active. diff --git a/generated/async-stripe-shared/src/payment_method.rs b/generated/async-stripe-shared/src/payment_method.rs index 2b90be427..90a82ed2b 100644 --- a/generated/async-stripe-shared/src/payment_method.rs +++ b/generated/async-stripe-shared/src/payment_method.rs @@ -6,6 +6,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct PaymentMethod { pub acss_debit: Option, @@ -59,7 +60,7 @@ pub struct PaymentMethod { /// The type of the PaymentMethod. /// An additional hash is included on the PaymentMethod with a name matching this value. /// It contains additional information specific to the PaymentMethod type. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: PaymentMethodType, pub us_bank_account: Option, pub wechat_pay: Option, diff --git a/generated/async-stripe-shared/src/payout.rs b/generated/async-stripe-shared/src/payout.rs index 13062f8b5..fe6ffc9e7 100644 --- a/generated/async-stripe-shared/src/payout.rs +++ b/generated/async-stripe-shared/src/payout.rs @@ -9,6 +9,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Payout { /// The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. @@ -64,7 +65,7 @@ pub struct Payout { /// Some payouts that fail might initially show as `paid`, then change to `failed`. pub status: String, /// Can be `bank_account` or `card`. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: PayoutType, } #[doc(hidden)] diff --git a/generated/async-stripe-shared/src/person.rs b/generated/async-stripe-shared/src/person.rs index 5406935e5..771ffcc7e 100644 --- a/generated/async-stripe-shared/src/person.rs +++ b/generated/async-stripe-shared/src/person.rs @@ -7,6 +7,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Person { /// The account the person is associated with. diff --git a/generated/async-stripe-shared/src/plan.rs b/generated/async-stripe-shared/src/plan.rs index 5107c692b..4c0bb7ca3 100644 --- a/generated/async-stripe-shared/src/plan.rs +++ b/generated/async-stripe-shared/src/plan.rs @@ -12,6 +12,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Plan { /// Whether the plan can be used for new purchases. diff --git a/generated/async-stripe-shared/src/platform_tax_fee.rs b/generated/async-stripe-shared/src/platform_tax_fee.rs index 848a355f2..6063e5873 100644 --- a/generated/async-stripe-shared/src/platform_tax_fee.rs +++ b/generated/async-stripe-shared/src/platform_tax_fee.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct PlatformTaxFee { /// The Connected account that incurred this charge. @@ -8,7 +9,7 @@ pub struct PlatformTaxFee { /// The payment object that caused this tax to be inflicted. pub source_transaction: String, /// The type of tax (VAT). - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: String, } #[doc(hidden)] diff --git a/generated/async-stripe-shared/src/price.rs b/generated/async-stripe-shared/src/price.rs index 18c4d9a1e..681ba2a40 100644 --- a/generated/async-stripe-shared/src/price.rs +++ b/generated/async-stripe-shared/src/price.rs @@ -9,6 +9,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Price { /// Whether the price can be used for new purchases. @@ -62,7 +63,7 @@ pub struct Price { /// Cannot be combined with `tiers`. pub transform_quantity: Option, /// One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: stripe_shared::PriceType, /// 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`. diff --git a/generated/async-stripe-shared/src/product.rs b/generated/async-stripe-shared/src/product.rs index f2499e360..c00c08997 100644 --- a/generated/async-stripe-shared/src/product.rs +++ b/generated/async-stripe-shared/src/product.rs @@ -9,6 +9,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Product { /// Whether the product is currently available for purchase. @@ -45,7 +46,7 @@ pub struct Product { pub tax_code: Option>, /// The type of the product. /// The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: stripe_shared::ProductType, /// A label that represents units of this product. /// When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. diff --git a/generated/async-stripe-shared/src/promotion_code.rs b/generated/async-stripe-shared/src/promotion_code.rs index 69bac325c..52543d6d4 100644 --- a/generated/async-stripe-shared/src/promotion_code.rs +++ b/generated/async-stripe-shared/src/promotion_code.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct PromotionCode { /// Whether the promotion code is currently active. diff --git a/generated/async-stripe-shared/src/quote.rs b/generated/async-stripe-shared/src/quote.rs index 3e4675201..29c8beaa1 100644 --- a/generated/async-stripe-shared/src/quote.rs +++ b/generated/async-stripe-shared/src/quote.rs @@ -3,6 +3,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Quote { /// Total before any discounts or taxes are applied. diff --git a/generated/async-stripe-shared/src/refund.rs b/generated/async-stripe-shared/src/refund.rs index 2e74dc457..9c65983ae 100644 --- a/generated/async-stripe-shared/src/refund.rs +++ b/generated/async-stripe-shared/src/refund.rs @@ -6,6 +6,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Refund { /// Amount, in cents (or local equivalent). diff --git a/generated/async-stripe-shared/src/reserve_transaction.rs b/generated/async-stripe-shared/src/reserve_transaction.rs index f3b6e4a36..9c8582fbe 100644 --- a/generated/async-stripe-shared/src/reserve_transaction.rs +++ b/generated/async-stripe-shared/src/reserve_transaction.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ReserveTransaction { pub amount: i64, diff --git a/generated/async-stripe-shared/src/review.rs b/generated/async-stripe-shared/src/review.rs index e7a3bd680..82b94b7a5 100644 --- a/generated/async-stripe-shared/src/review.rs +++ b/generated/async-stripe-shared/src/review.rs @@ -5,6 +5,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Review { /// The ZIP or postal code of the card used, if applicable. diff --git a/generated/async-stripe-shared/src/setup_attempt.rs b/generated/async-stripe-shared/src/setup_attempt.rs index cb77ced81..c22692679 100644 --- a/generated/async-stripe-shared/src/setup_attempt.rs +++ b/generated/async-stripe-shared/src/setup_attempt.rs @@ -5,6 +5,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct SetupAttempt { /// The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. diff --git a/generated/async-stripe-shared/src/setup_intent.rs b/generated/async-stripe-shared/src/setup_intent.rs index 177f3b341..d9faff2fc 100644 --- a/generated/async-stripe-shared/src/setup_intent.rs +++ b/generated/async-stripe-shared/src/setup_intent.rs @@ -22,6 +22,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct SetupIntent { /// ID of the Connect application that created the SetupIntent. diff --git a/generated/async-stripe-shared/src/shipping_rate.rs b/generated/async-stripe-shared/src/shipping_rate.rs index 440396ca3..ad3a895f9 100644 --- a/generated/async-stripe-shared/src/shipping_rate.rs +++ b/generated/async-stripe-shared/src/shipping_rate.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct ShippingRate { /// Whether the shipping rate can be used for new purchases. Defaults to `true`. @@ -31,7 +32,7 @@ pub struct ShippingRate { /// The Shipping tax code is `txcd_92010001`. pub tax_code: Option>, /// The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: stripe_shared::ShippingRateType, } #[doc(hidden)] diff --git a/generated/async-stripe-shared/src/source.rs b/generated/async-stripe-shared/src/source.rs index f066738f1..d30d704b0 100644 --- a/generated/async-stripe-shared/src/source.rs +++ b/generated/async-stripe-shared/src/source.rs @@ -11,6 +11,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Source { pub ach_credit_transfer: Option, @@ -72,7 +73,7 @@ pub struct Source { /// The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. /// An additional hash is included on the source with a name matching this value. /// It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: SourceType, /// Either `reusable` or `single_use`. /// Whether this source should be reusable or not. diff --git a/generated/async-stripe-shared/src/source_transaction.rs b/generated/async-stripe-shared/src/source_transaction.rs index a357c02de..9fbafe8be 100644 --- a/generated/async-stripe-shared/src/source_transaction.rs +++ b/generated/async-stripe-shared/src/source_transaction.rs @@ -3,6 +3,7 @@ /// multiple transactions. As such, sources can have multiple associated /// transactions. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct SourceTransaction { pub ach_credit_transfer: Option, @@ -26,7 +27,7 @@ pub struct SourceTransaction { /// The status of the transaction, one of `succeeded`, `pending`, or `failed`. pub status: String, /// The type of source this transaction is attached to. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: SourceTransactionType, } #[doc(hidden)] diff --git a/generated/async-stripe-shared/src/subscription.rs b/generated/async-stripe-shared/src/subscription.rs index 7eceb42dd..57d7df990 100644 --- a/generated/async-stripe-shared/src/subscription.rs +++ b/generated/async-stripe-shared/src/subscription.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Subscription { /// ID of the Connect Application that created the subscription. diff --git a/generated/async-stripe-shared/src/subscription_item.rs b/generated/async-stripe-shared/src/subscription_item.rs index 1e57379e5..cacf540d1 100644 --- a/generated/async-stripe-shared/src/subscription_item.rs +++ b/generated/async-stripe-shared/src/subscription_item.rs @@ -3,6 +3,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct SubscriptionItem { /// Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period. diff --git a/generated/async-stripe-shared/src/subscription_schedule.rs b/generated/async-stripe-shared/src/subscription_schedule.rs index c76609e08..646c6ee14 100644 --- a/generated/async-stripe-shared/src/subscription_schedule.rs +++ b/generated/async-stripe-shared/src/subscription_schedule.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct SubscriptionSchedule { /// ID of the Connect Application that created the schedule. diff --git a/generated/async-stripe-shared/src/tax_code.rs b/generated/async-stripe-shared/src/tax_code.rs index b52ffdc4f..a4d71901f 100644 --- a/generated/async-stripe-shared/src/tax_code.rs +++ b/generated/async-stripe-shared/src/tax_code.rs @@ -2,6 +2,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TaxCode { /// A detailed description of which types of products the tax code represents. diff --git a/generated/async-stripe-shared/src/tax_deducted_at_source.rs b/generated/async-stripe-shared/src/tax_deducted_at_source.rs index 6ba94d3e0..5506a6134 100644 --- a/generated/async-stripe-shared/src/tax_deducted_at_source.rs +++ b/generated/async-stripe-shared/src/tax_deducted_at_source.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TaxDeductedAtSource { /// Unique identifier for the object. diff --git a/generated/async-stripe-shared/src/tax_id.rs b/generated/async-stripe-shared/src/tax_id.rs index dff946c1f..0ba1bc33f 100644 --- a/generated/async-stripe-shared/src/tax_id.rs +++ b/generated/async-stripe-shared/src/tax_id.rs @@ -5,6 +5,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TaxId { /// Two-letter ISO code representing the country of the tax ID. @@ -21,7 +22,7 @@ pub struct TaxId { pub owner: Option, /// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `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`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `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`. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: TaxIdType, /// Value of the tax ID. pub value: String, diff --git a/generated/async-stripe-shared/src/tax_rate.rs b/generated/async-stripe-shared/src/tax_rate.rs index d53ef0696..6e99f4398 100644 --- a/generated/async-stripe-shared/src/tax_rate.rs +++ b/generated/async-stripe-shared/src/tax_rate.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TaxRate { /// Defaults to `true`. diff --git a/generated/async-stripe-shared/src/test_helpers_test_clock.rs b/generated/async-stripe-shared/src/test_helpers_test_clock.rs index b9f438e57..78ca73343 100644 --- a/generated/async-stripe-shared/src/test_helpers_test_clock.rs +++ b/generated/async-stripe-shared/src/test_helpers_test_clock.rs @@ -4,6 +4,7 @@ /// After the clock advances,. /// you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TestHelpersTestClock { /// Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/generated/async-stripe-shared/src/topup.rs b/generated/async-stripe-shared/src/topup.rs index a7f1bb1f3..74606a3ee 100644 --- a/generated/async-stripe-shared/src/topup.rs +++ b/generated/async-stripe-shared/src/topup.rs @@ -6,6 +6,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Topup { /// Amount transferred. diff --git a/generated/async-stripe-shared/src/transfer.rs b/generated/async-stripe-shared/src/transfer.rs index e67a240f2..0dd20af85 100644 --- a/generated/async-stripe-shared/src/transfer.rs +++ b/generated/async-stripe-shared/src/transfer.rs @@ -12,6 +12,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct Transfer { /// Amount in cents (or local equivalent) to be transferred. diff --git a/generated/async-stripe-shared/src/transfer_reversal.rs b/generated/async-stripe-shared/src/transfer_reversal.rs index 8fe054f9e..c650b3044 100644 --- a/generated/async-stripe-shared/src/transfer_reversal.rs +++ b/generated/async-stripe-shared/src/transfer_reversal.rs @@ -14,6 +14,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TransferReversal { /// Amount, in cents (or local equivalent). diff --git a/generated/async-stripe-shared/src/usage_record_summary.rs b/generated/async-stripe-shared/src/usage_record_summary.rs index 50ba33530..0ba77e9ae 100644 --- a/generated/async-stripe-shared/src/usage_record_summary.rs +++ b/generated/async-stripe-shared/src/usage_record_summary.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct UsageRecordSummary { /// Unique identifier for the object. diff --git a/generated/async-stripe-terminal/Cargo.toml b/generated/async-stripe-terminal/Cargo.toml index f7be5f2c3..cfeaf72e6 100644 --- a/generated/async-stripe-terminal/Cargo.toml +++ b/generated/async-stripe-terminal/Cargo.toml @@ -28,7 +28,9 @@ async-stripe-shared = {path = "../../generated/async-stripe-shared"} [features] serialize = ["async-stripe-types/serialize","async-stripe-shared/serialize"] +serialize_extra = ["async-stripe-types/serialize_extra","async-stripe-shared/serialize_extra"] deserialize = ["async-stripe-types/deserialize","async-stripe-shared/deserialize", "dep:serde_json"] +deserialize_extra = ["async-stripe-types/deserialize_extra","async-stripe-shared/deserialize_extra", "dep:serde_json"] terminal_configuration = [] terminal_connection_token = [] terminal_location = [] diff --git a/generated/async-stripe-terminal/src/deleted_terminal_configuration.rs b/generated/async-stripe-terminal/src/deleted_terminal_configuration.rs index 29b8745ff..2407590fe 100644 --- a/generated/async-stripe-terminal/src/deleted_terminal_configuration.rs +++ b/generated/async-stripe-terminal/src/deleted_terminal_configuration.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedTerminalConfiguration { #[allow(dead_code)] diff --git a/generated/async-stripe-terminal/src/deleted_terminal_location.rs b/generated/async-stripe-terminal/src/deleted_terminal_location.rs index 0e0c61dca..7f53f4742 100644 --- a/generated/async-stripe-terminal/src/deleted_terminal_location.rs +++ b/generated/async-stripe-terminal/src/deleted_terminal_location.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedTerminalLocation { #[allow(dead_code)] diff --git a/generated/async-stripe-terminal/src/deleted_terminal_reader.rs b/generated/async-stripe-terminal/src/deleted_terminal_reader.rs index 494f3a098..c3178509d 100644 --- a/generated/async-stripe-terminal/src/deleted_terminal_reader.rs +++ b/generated/async-stripe-terminal/src/deleted_terminal_reader.rs @@ -1,4 +1,5 @@ #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct DeletedTerminalReader { #[allow(dead_code)] diff --git a/generated/async-stripe-terminal/src/terminal_configuration/requests.rs b/generated/async-stripe-terminal/src/terminal_configuration/requests.rs index c019bba61..6b290ecce 100644 --- a/generated/async-stripe-terminal/src/terminal_configuration/requests.rs +++ b/generated/async-stripe-terminal/src/terminal_configuration/requests.rs @@ -4,6 +4,7 @@ use stripe_client_core::{ /// Deletes a `Configuration` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteTerminalConfiguration<'a> { configuration: &'a stripe_terminal::TerminalConfigurationId, } @@ -43,6 +44,7 @@ impl StripeRequest for DeleteTerminalConfiguration<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTerminalConfigurationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -68,6 +70,7 @@ impl<'a> ListTerminalConfigurationBuilder<'a> { } /// Returns a list of `Configuration` objects. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTerminalConfiguration<'a> { inner: ListTerminalConfigurationBuilder<'a>, } @@ -145,6 +148,7 @@ impl StripeRequest for ListTerminalConfiguration<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTerminalConfigurationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -156,6 +160,7 @@ impl<'a> RetrieveTerminalConfigurationBuilder<'a> { } /// Retrieves a `Configuration` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTerminalConfiguration<'a> { inner: RetrieveTerminalConfigurationBuilder<'a>, configuration: &'a stripe_terminal::TerminalConfigurationId, @@ -281,6 +286,7 @@ const _: () = { }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTerminalConfigurationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] bbpos_wisepos_e: Option>, @@ -309,6 +315,7 @@ impl<'a> CreateTerminalConfigurationBuilder<'a> { } /// An object containing device type specific settings for BBPOS WisePOS E readers #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTerminalConfigurationBbposWiseposE<'a> { /// A File ID representing an image you would like displayed on the reader. #[serde(skip_serializing_if = "Option::is_none")] @@ -326,6 +333,7 @@ impl<'a> Default for CreateTerminalConfigurationBbposWiseposE<'a> { } /// An object containing device type specific settings for Verifone P400 readers #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTerminalConfigurationVerifoneP400<'a> { /// A File ID representing an image you would like displayed on the reader. #[serde(skip_serializing_if = "Option::is_none")] @@ -343,6 +351,7 @@ impl<'a> Default for CreateTerminalConfigurationVerifoneP400<'a> { } /// Creates a new `Configuration` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTerminalConfiguration<'a> { inner: CreateTerminalConfigurationBuilder<'a>, } @@ -419,6 +428,7 @@ impl StripeRequest for CreateTerminalConfiguration<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateTerminalConfigurationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] bbpos_wisepos_e: Option>, @@ -447,6 +457,7 @@ impl<'a> UpdateTerminalConfigurationBuilder<'a> { } /// An object containing device type specific settings for BBPOS WisePOS E readers #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTerminalConfigurationBbposWiseposE<'a> { /// A File ID representing an image you would like displayed on the reader. #[serde(skip_serializing_if = "Option::is_none")] @@ -464,6 +475,7 @@ impl<'a> Default for UpdateTerminalConfigurationBbposWiseposE<'a> { } /// An object containing device type specific settings for Verifone P400 readers #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTerminalConfigurationVerifoneP400<'a> { /// A File ID representing an image you would like displayed on the reader. #[serde(skip_serializing_if = "Option::is_none")] @@ -481,6 +493,7 @@ impl<'a> Default for UpdateTerminalConfigurationVerifoneP400<'a> { } /// Updates a new `Configuration` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTerminalConfiguration<'a> { inner: UpdateTerminalConfigurationBuilder<'a>, configuration: &'a stripe_terminal::TerminalConfigurationId, @@ -637,6 +650,7 @@ const _: () = { }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct Offline { /// Determines whether to allow transactions to be collected while reader is offline. /// Defaults to false. @@ -648,6 +662,7 @@ impl Offline { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CurrencySpecificConfig<'a> { /// Fixed amounts displayed when collecting a tip #[serde(skip_serializing_if = "Option::is_none")] @@ -670,6 +685,7 @@ impl<'a> Default for CurrencySpecificConfig<'a> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct Tipping<'a> { /// Tipping configuration for AUD #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/async-stripe-terminal/src/terminal_configuration/types.rs b/generated/async-stripe-terminal/src/terminal_configuration/types.rs index 8d31e863f..5d2308a10 100644 --- a/generated/async-stripe-terminal/src/terminal_configuration/types.rs +++ b/generated/async-stripe-terminal/src/terminal_configuration/types.rs @@ -2,6 +2,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TerminalConfiguration { pub bbpos_wisepos_e: diff --git a/generated/async-stripe-terminal/src/terminal_connection_token/requests.rs b/generated/async-stripe-terminal/src/terminal_connection_token/requests.rs index 0c59d3669..ed37910ba 100644 --- a/generated/async-stripe-terminal/src/terminal_connection_token/requests.rs +++ b/generated/async-stripe-terminal/src/terminal_connection_token/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTerminalConnectionTokenBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -17,6 +18,7 @@ impl<'a> CreateTerminalConnectionTokenBuilder<'a> { /// To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. /// On your backend, add an endpoint that creates and returns a connection token. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTerminalConnectionToken<'a> { inner: CreateTerminalConnectionTokenBuilder<'a>, } diff --git a/generated/async-stripe-terminal/src/terminal_connection_token/types.rs b/generated/async-stripe-terminal/src/terminal_connection_token/types.rs index d3c084a65..5d58c10e6 100644 --- a/generated/async-stripe-terminal/src/terminal_connection_token/types.rs +++ b/generated/async-stripe-terminal/src/terminal_connection_token/types.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TerminalConnectionToken { /// The id of the location that this connection token is scoped to. diff --git a/generated/async-stripe-terminal/src/terminal_location/requests.rs b/generated/async-stripe-terminal/src/terminal_location/requests.rs index 869020bce..428efa771 100644 --- a/generated/async-stripe-terminal/src/terminal_location/requests.rs +++ b/generated/async-stripe-terminal/src/terminal_location/requests.rs @@ -4,6 +4,7 @@ use stripe_client_core::{ /// Deletes a `Location` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteTerminalLocation<'a> { location: &'a stripe_terminal::TerminalLocationId, } @@ -40,6 +41,7 @@ impl StripeRequest for DeleteTerminalLocation<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTerminalLocationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -57,6 +59,7 @@ impl<'a> ListTerminalLocationBuilder<'a> { } /// Returns a list of `Location` objects. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTerminalLocation<'a> { inner: ListTerminalLocationBuilder<'a>, } @@ -129,6 +132,7 @@ impl StripeRequest for ListTerminalLocation<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTerminalLocationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -140,6 +144,7 @@ impl<'a> RetrieveTerminalLocationBuilder<'a> { } /// Retrieves a `Location` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTerminalLocation<'a> { inner: RetrieveTerminalLocationBuilder<'a>, location: &'a stripe_terminal::TerminalLocationId, @@ -265,6 +270,7 @@ const _: () = { }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTerminalLocationBuilder<'a> { address: CreateTerminalLocationAddress<'a>, #[serde(skip_serializing_if = "Option::is_none")] @@ -282,6 +288,7 @@ impl<'a> CreateTerminalLocationBuilder<'a> { } /// The full address of the location. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTerminalLocationAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -309,6 +316,7 @@ impl<'a> CreateTerminalLocationAddress<'a> { /// Creates a new `Location` object. /// For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTerminalLocation<'a> { inner: CreateTerminalLocationBuilder<'a>, } @@ -362,6 +370,7 @@ impl StripeRequest for CreateTerminalLocation<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateTerminalLocationBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] address: Option>, @@ -387,6 +396,7 @@ impl<'a> UpdateTerminalLocationBuilder<'a> { } /// The full address of the location. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTerminalLocationAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -420,6 +430,7 @@ impl<'a> Default for UpdateTerminalLocationAddress<'a> { /// Updates a `Location` object by setting the values of the parameters passed. /// Any parameters not provided will be left unchanged. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTerminalLocation<'a> { inner: UpdateTerminalLocationBuilder<'a>, location: &'a stripe_terminal::TerminalLocationId, diff --git a/generated/async-stripe-terminal/src/terminal_location/types.rs b/generated/async-stripe-terminal/src/terminal_location/types.rs index 6876656e4..f6d40757b 100644 --- a/generated/async-stripe-terminal/src/terminal_location/types.rs +++ b/generated/async-stripe-terminal/src/terminal_location/types.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TerminalLocation { pub address: stripe_shared::Address, diff --git a/generated/async-stripe-terminal/src/terminal_reader/requests.rs b/generated/async-stripe-terminal/src/terminal_reader/requests.rs index 44a5bd0d5..4deee583e 100644 --- a/generated/async-stripe-terminal/src/terminal_reader/requests.rs +++ b/generated/async-stripe-terminal/src/terminal_reader/requests.rs @@ -4,6 +4,7 @@ use stripe_client_core::{ /// Deletes a `Reader` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct DeleteTerminalReader<'a> { reader: &'a stripe_terminal::TerminalReaderId, } @@ -40,6 +41,7 @@ impl StripeRequest for DeleteTerminalReader<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTerminalReaderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] device_type: Option, @@ -74,6 +76,7 @@ impl<'a> ListTerminalReaderBuilder<'a> { } /// Returns a list of `Reader` objects. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTerminalReader<'a> { inner: ListTerminalReaderBuilder<'a>, } @@ -166,6 +169,7 @@ impl StripeRequest for ListTerminalReader<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTerminalReaderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -177,6 +181,7 @@ impl<'a> RetrieveTerminalReaderBuilder<'a> { } /// Retrieves a `Reader` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTerminalReader<'a> { inner: RetrieveTerminalReaderBuilder<'a>, reader: &'a stripe_terminal::TerminalReaderId, @@ -302,6 +307,7 @@ const _: () = { }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTerminalReaderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -320,6 +326,7 @@ impl<'a> CreateTerminalReaderBuilder<'a> { } /// Creates a new `Reader` object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTerminalReader<'a> { inner: CreateTerminalReaderBuilder<'a>, } @@ -379,6 +386,7 @@ impl StripeRequest for CreateTerminalReader<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateTerminalReaderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -395,6 +403,7 @@ impl<'a> UpdateTerminalReaderBuilder<'a> { /// Updates a `Reader` object by setting the values of the parameters passed. /// Any parameters not provided will be left unchanged. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTerminalReader<'a> { inner: UpdateTerminalReaderBuilder<'a>, reader: &'a stripe_terminal::TerminalReaderId, @@ -533,6 +542,7 @@ const _: () = { }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CancelActionTerminalReaderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -544,6 +554,7 @@ impl<'a> CancelActionTerminalReaderBuilder<'a> { } /// Cancels the current reader action. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CancelActionTerminalReader<'a> { inner: CancelActionTerminalReaderBuilder<'a>, reader: &'a stripe_terminal::TerminalReaderId, @@ -587,6 +598,7 @@ impl StripeRequest for CancelActionTerminalReader<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ProcessPaymentIntentTerminalReaderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -601,6 +613,7 @@ impl<'a> ProcessPaymentIntentTerminalReaderBuilder<'a> { } /// Configuration overrides #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ProcessPaymentIntentTerminalReaderProcessConfig { /// Enables cancel button on transaction screens. #[serde(skip_serializing_if = "Option::is_none")] @@ -624,6 +637,7 @@ impl Default for ProcessPaymentIntentTerminalReaderProcessConfig { } /// Tipping configuration for this transaction. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ProcessPaymentIntentTerminalReaderProcessConfigTipping { /// Amount used to calculate tip suggestions on tipping selection screen for this transaction. /// Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). @@ -642,6 +656,7 @@ impl Default for ProcessPaymentIntentTerminalReaderProcessConfigTipping { } /// Initiates a payment flow on a Reader. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ProcessPaymentIntentTerminalReader<'a> { inner: ProcessPaymentIntentTerminalReaderBuilder<'a>, reader: &'a stripe_terminal::TerminalReaderId, @@ -696,6 +711,7 @@ impl StripeRequest for ProcessPaymentIntentTerminalReader<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ProcessSetupIntentTerminalReaderBuilder<'a> { customer_consent_collected: bool, #[serde(skip_serializing_if = "Option::is_none")] @@ -711,6 +727,7 @@ impl<'a> ProcessSetupIntentTerminalReaderBuilder<'a> { } /// Configuration overrides #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ProcessSetupIntentTerminalReaderProcessConfig { /// Enables cancel button on transaction screens. #[serde(skip_serializing_if = "Option::is_none")] @@ -728,6 +745,7 @@ impl Default for ProcessSetupIntentTerminalReaderProcessConfig { } /// Initiates a setup intent flow on a Reader. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ProcessSetupIntentTerminalReader<'a> { inner: ProcessSetupIntentTerminalReaderBuilder<'a>, reader: &'a stripe_terminal::TerminalReaderId, @@ -792,6 +810,7 @@ impl StripeRequest for ProcessSetupIntentTerminalReader<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RefundPaymentTerminalReaderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount: Option, @@ -826,6 +845,7 @@ impl<'a> RefundPaymentTerminalReaderBuilder<'a> { } /// Configuration overrides #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RefundPaymentTerminalReaderRefundPaymentConfig { /// Enables cancel button on transaction screens. #[serde(skip_serializing_if = "Option::is_none")] @@ -843,6 +863,7 @@ impl Default for RefundPaymentTerminalReaderRefundPaymentConfig { } /// Initiates a refund on a Reader #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RefundPaymentTerminalReader<'a> { inner: RefundPaymentTerminalReaderBuilder<'a>, reader: &'a stripe_terminal::TerminalReaderId, @@ -935,6 +956,7 @@ impl StripeRequest for RefundPaymentTerminalReader<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct SetReaderDisplayTerminalReaderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] cart: Option>, @@ -950,6 +972,7 @@ impl<'a> SetReaderDisplayTerminalReaderBuilder<'a> { } /// Cart #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SetReaderDisplayTerminalReaderCart<'a> { /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. /// Must be a [supported currency](https://stripe.com/docs/currencies). @@ -973,6 +996,7 @@ impl<'a> SetReaderDisplayTerminalReaderCart<'a> { } /// Array of line items that were purchased. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SetReaderDisplayTerminalReaderCartLineItems<'a> { /// The price of the item in cents. pub amount: i64, @@ -1041,6 +1065,7 @@ impl<'de> serde::Deserialize<'de> for SetReaderDisplayTerminalReaderType { } /// Sets reader display to show cart details. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SetReaderDisplayTerminalReader<'a> { inner: SetReaderDisplayTerminalReaderBuilder<'a>, reader: &'a stripe_terminal::TerminalReaderId, @@ -1095,6 +1120,7 @@ impl StripeRequest for SetReaderDisplayTerminalReader<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct PresentPaymentMethodTerminalReaderBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] amount_tip: Option, @@ -1121,6 +1147,7 @@ impl<'a> PresentPaymentMethodTerminalReaderBuilder<'a> { } /// Simulated data for the card_present payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PresentPaymentMethodTerminalReaderCardPresent<'a> { /// The card number, as a string without any separators. #[serde(skip_serializing_if = "Option::is_none")] @@ -1138,6 +1165,7 @@ impl<'a> Default for PresentPaymentMethodTerminalReaderCardPresent<'a> { } /// Simulated data for the interac_present payment method. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PresentPaymentMethodTerminalReaderInteracPresent<'a> { /// Card Number #[serde(skip_serializing_if = "Option::is_none")] @@ -1212,6 +1240,7 @@ impl<'de> serde::Deserialize<'de> for PresentPaymentMethodTerminalReaderType { /// Presents a payment method on a simulated reader. /// Can be used to simulate accepting a payment, saving a card or refunding a transaction. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PresentPaymentMethodTerminalReader<'a> { inner: PresentPaymentMethodTerminalReaderBuilder<'a>, reader: &'a str, diff --git a/generated/async-stripe-terminal/src/terminal_reader/types.rs b/generated/async-stripe-terminal/src/terminal_reader/types.rs index 824fecc19..8db68ec7c 100644 --- a/generated/async-stripe-terminal/src/terminal_reader/types.rs +++ b/generated/async-stripe-terminal/src/terminal_reader/types.rs @@ -4,6 +4,7 @@ /// /// For more details see <>. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TerminalReader { /// The most recent action performed by the reader. diff --git a/generated/async-stripe-treasury/Cargo.toml b/generated/async-stripe-treasury/Cargo.toml index f5ff7ee82..866469ebb 100644 --- a/generated/async-stripe-treasury/Cargo.toml +++ b/generated/async-stripe-treasury/Cargo.toml @@ -28,7 +28,9 @@ async-stripe-shared = {path = "../../generated/async-stripe-shared"} [features] serialize = ["async-stripe-types/serialize","async-stripe-shared/serialize"] +serialize_extra = ["async-stripe-types/serialize_extra","async-stripe-shared/serialize_extra"] deserialize = ["async-stripe-types/deserialize","async-stripe-shared/deserialize", "dep:serde_json"] +deserialize_extra = ["async-stripe-types/deserialize_extra","async-stripe-shared/deserialize_extra", "dep:serde_json"] treasury_credit_reversal = [] treasury_debit_reversal = [] treasury_financial_account = [] diff --git a/generated/async-stripe-treasury/src/treasury_credit_reversal/requests.rs b/generated/async-stripe-treasury/src/treasury_credit_reversal/requests.rs index 0b2b7a9ef..2a0c1ae08 100644 --- a/generated/async-stripe-treasury/src/treasury_credit_reversal/requests.rs +++ b/generated/async-stripe-treasury/src/treasury_credit_reversal/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTreasuryCreditReversalBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -33,6 +34,7 @@ impl<'a> ListTreasuryCreditReversalBuilder<'a> { } /// Returns a list of CreditReversals. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTreasuryCreditReversal<'a> { inner: ListTreasuryCreditReversalBuilder<'a>, } @@ -111,6 +113,7 @@ impl StripeRequest for ListTreasuryCreditReversal<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTreasuryCreditReversalBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -122,6 +125,7 @@ impl<'a> RetrieveTreasuryCreditReversalBuilder<'a> { } /// Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTreasuryCreditReversal<'a> { inner: RetrieveTreasuryCreditReversalBuilder<'a>, credit_reversal: &'a stripe_treasury::TreasuryCreditReversalId, @@ -168,6 +172,7 @@ impl StripeRequest for RetrieveTreasuryCreditReversal<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTreasuryCreditReversalBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -182,6 +187,7 @@ impl<'a> CreateTreasuryCreditReversalBuilder<'a> { } /// Reverses a ReceivedCredit and creates a CreditReversal object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryCreditReversal<'a> { inner: CreateTreasuryCreditReversalBuilder<'a>, } diff --git a/generated/async-stripe-treasury/src/treasury_credit_reversal/types.rs b/generated/async-stripe-treasury/src/treasury_credit_reversal/types.rs index a445aed25..6bdce2838 100644 --- a/generated/async-stripe-treasury/src/treasury_credit_reversal/types.rs +++ b/generated/async-stripe-treasury/src/treasury_credit_reversal/types.rs @@ -1,6 +1,7 @@ /// You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. /// Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TreasuryCreditReversal { /// Amount (in cents) transferred. diff --git a/generated/async-stripe-treasury/src/treasury_debit_reversal/requests.rs b/generated/async-stripe-treasury/src/treasury_debit_reversal/requests.rs index 191258104..c510f4de4 100644 --- a/generated/async-stripe-treasury/src/treasury_debit_reversal/requests.rs +++ b/generated/async-stripe-treasury/src/treasury_debit_reversal/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTreasuryDebitReversalBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -151,6 +152,7 @@ impl<'de> serde::Deserialize<'de> for ListTreasuryDebitReversalStatus { } /// Returns a list of DebitReversals. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTreasuryDebitReversal<'a> { inner: ListTreasuryDebitReversalBuilder<'a>, } @@ -233,6 +235,7 @@ impl StripeRequest for ListTreasuryDebitReversal<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTreasuryDebitReversalBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -244,6 +247,7 @@ impl<'a> RetrieveTreasuryDebitReversalBuilder<'a> { } /// Retrieves a DebitReversal object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTreasuryDebitReversal<'a> { inner: RetrieveTreasuryDebitReversalBuilder<'a>, debit_reversal: &'a stripe_treasury::TreasuryDebitReversalId, @@ -290,6 +294,7 @@ impl StripeRequest for RetrieveTreasuryDebitReversal<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTreasuryDebitReversalBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -304,6 +309,7 @@ impl<'a> CreateTreasuryDebitReversalBuilder<'a> { } /// Reverses a ReceivedDebit and creates a DebitReversal object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryDebitReversal<'a> { inner: CreateTreasuryDebitReversalBuilder<'a>, } diff --git a/generated/async-stripe-treasury/src/treasury_debit_reversal/types.rs b/generated/async-stripe-treasury/src/treasury_debit_reversal/types.rs index 4ba5fee3b..2c8cb8e8e 100644 --- a/generated/async-stripe-treasury/src/treasury_debit_reversal/types.rs +++ b/generated/async-stripe-treasury/src/treasury_debit_reversal/types.rs @@ -1,6 +1,7 @@ /// You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. /// Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TreasuryDebitReversal { /// Amount (in cents) transferred. diff --git a/generated/async-stripe-treasury/src/treasury_financial_account/requests.rs b/generated/async-stripe-treasury/src/treasury_financial_account/requests.rs index 1893f54f9..750ed3633 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_account/requests.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_account/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTreasuryFinancialAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -22,6 +23,7 @@ impl<'a> ListTreasuryFinancialAccountBuilder<'a> { } /// Returns a list of FinancialAccounts. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTreasuryFinancialAccount<'a> { inner: ListTreasuryFinancialAccountBuilder<'a>, } @@ -95,6 +97,7 @@ impl StripeRequest for ListTreasuryFinancialAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTreasuryFinancialAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -106,6 +109,7 @@ impl<'a> RetrieveTreasuryFinancialAccountBuilder<'a> { } /// Retrieves the details of a FinancialAccount. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTreasuryFinancialAccount<'a> { inner: RetrieveTreasuryFinancialAccountBuilder<'a>, financial_account: &'a stripe_treasury::TreasuryFinancialAccountId, @@ -152,6 +156,7 @@ impl StripeRequest for RetrieveTreasuryFinancialAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveFeaturesTreasuryFinancialAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -163,6 +168,7 @@ impl<'a> RetrieveFeaturesTreasuryFinancialAccountBuilder<'a> { } /// Retrieves Features information associated with the FinancialAccount. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveFeaturesTreasuryFinancialAccount<'a> { inner: RetrieveFeaturesTreasuryFinancialAccountBuilder<'a>, financial_account: &'a stripe_treasury::TreasuryFinancialAccountId, @@ -209,6 +215,7 @@ impl StripeRequest for RetrieveFeaturesTreasuryFinancialAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTreasuryFinancialAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -234,6 +241,7 @@ impl<'a> CreateTreasuryFinancialAccountBuilder<'a> { /// Encodes whether a FinancialAccount has access to a particular feature. /// Stripe or the platform can control features via the requested field. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccountFeatures { /// Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. #[serde(skip_serializing_if = "Option::is_none")] @@ -278,6 +286,7 @@ impl Default for CreateTreasuryFinancialAccountFeatures { } /// Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccountFeaturesCardIssuing { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -290,6 +299,7 @@ impl CreateTreasuryFinancialAccountFeaturesCardIssuing { /// Represents whether this FinancialAccount is eligible for deposit insurance. /// Various factors determine the insurance amount. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccountFeaturesDepositInsurance { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -301,6 +311,7 @@ impl CreateTreasuryFinancialAccountFeaturesDepositInsurance { } /// Contains Features that add FinancialAddresses to the FinancialAccount. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccountFeaturesFinancialAddresses { /// Adds an ABA FinancialAddress to the FinancialAccount. #[serde(skip_serializing_if = "Option::is_none")] @@ -318,6 +329,7 @@ impl Default for CreateTreasuryFinancialAccountFeaturesFinancialAddresses { } /// Adds an ABA FinancialAddress to the FinancialAccount. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccountFeaturesFinancialAddressesAba { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -329,6 +341,7 @@ impl CreateTreasuryFinancialAccountFeaturesFinancialAddressesAba { } /// Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccountFeaturesInboundTransfers { /// Enables ACH Debits via the InboundTransfers API. #[serde(skip_serializing_if = "Option::is_none")] @@ -346,6 +359,7 @@ impl Default for CreateTreasuryFinancialAccountFeaturesInboundTransfers { } /// Enables ACH Debits via the InboundTransfers API. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccountFeaturesInboundTransfersAch { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -357,6 +371,7 @@ impl CreateTreasuryFinancialAccountFeaturesInboundTransfersAch { } /// Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccountFeaturesIntraStripeFlows { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -368,6 +383,7 @@ impl CreateTreasuryFinancialAccountFeaturesIntraStripeFlows { } /// Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccountFeaturesOutboundPayments { /// Enables ACH transfers via the OutboundPayments API. #[serde(skip_serializing_if = "Option::is_none")] @@ -389,6 +405,7 @@ impl Default for CreateTreasuryFinancialAccountFeaturesOutboundPayments { } /// Enables ACH transfers via the OutboundPayments API. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccountFeaturesOutboundPaymentsAch { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -400,6 +417,7 @@ impl CreateTreasuryFinancialAccountFeaturesOutboundPaymentsAch { } /// Enables US domestic wire transfers via the OutboundPayments API. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccountFeaturesOutboundPaymentsUsDomesticWire { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -411,6 +429,7 @@ impl CreateTreasuryFinancialAccountFeaturesOutboundPaymentsUsDomesticWire { } /// Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccountFeaturesOutboundTransfers { /// Enables ACH transfers via the OutboundTransfers API. #[serde(skip_serializing_if = "Option::is_none")] @@ -432,6 +451,7 @@ impl Default for CreateTreasuryFinancialAccountFeaturesOutboundTransfers { } /// Enables ACH transfers via the OutboundTransfers API. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccountFeaturesOutboundTransfersAch { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -443,6 +463,7 @@ impl CreateTreasuryFinancialAccountFeaturesOutboundTransfersAch { } /// Enables US domestic wire transfers via the OutboundTransfers API. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccountFeaturesOutboundTransfersUsDomesticWire { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -454,6 +475,7 @@ impl CreateTreasuryFinancialAccountFeaturesOutboundTransfersUsDomesticWire { } /// The set of functionalities that the platform can restrict on the FinancialAccount. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccountPlatformRestrictions { /// Restricts all inbound money movement. #[serde(skip_serializing_if = "Option::is_none")] @@ -594,6 +616,7 @@ impl<'de> serde::Deserialize<'de> } /// Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryFinancialAccount<'a> { inner: CreateTreasuryFinancialAccountBuilder<'a>, } @@ -656,6 +679,7 @@ impl StripeRequest for CreateTreasuryFinancialAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateTreasuryFinancialAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -674,6 +698,7 @@ impl<'a> UpdateTreasuryFinancialAccountBuilder<'a> { /// Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. /// Stripe or the platform may control features via the requested field. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccountFeatures { /// Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. #[serde(skip_serializing_if = "Option::is_none")] @@ -718,6 +743,7 @@ impl Default for UpdateTreasuryFinancialAccountFeatures { } /// Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccountFeaturesCardIssuing { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -730,6 +756,7 @@ impl UpdateTreasuryFinancialAccountFeaturesCardIssuing { /// Represents whether this FinancialAccount is eligible for deposit insurance. /// Various factors determine the insurance amount. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccountFeaturesDepositInsurance { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -741,6 +768,7 @@ impl UpdateTreasuryFinancialAccountFeaturesDepositInsurance { } /// Contains Features that add FinancialAddresses to the FinancialAccount. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccountFeaturesFinancialAddresses { /// Adds an ABA FinancialAddress to the FinancialAccount. #[serde(skip_serializing_if = "Option::is_none")] @@ -758,6 +786,7 @@ impl Default for UpdateTreasuryFinancialAccountFeaturesFinancialAddresses { } /// Adds an ABA FinancialAddress to the FinancialAccount. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccountFeaturesFinancialAddressesAba { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -769,6 +798,7 @@ impl UpdateTreasuryFinancialAccountFeaturesFinancialAddressesAba { } /// Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccountFeaturesInboundTransfers { /// Enables ACH Debits via the InboundTransfers API. #[serde(skip_serializing_if = "Option::is_none")] @@ -786,6 +816,7 @@ impl Default for UpdateTreasuryFinancialAccountFeaturesInboundTransfers { } /// Enables ACH Debits via the InboundTransfers API. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccountFeaturesInboundTransfersAch { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -797,6 +828,7 @@ impl UpdateTreasuryFinancialAccountFeaturesInboundTransfersAch { } /// Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccountFeaturesIntraStripeFlows { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -808,6 +840,7 @@ impl UpdateTreasuryFinancialAccountFeaturesIntraStripeFlows { } /// Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccountFeaturesOutboundPayments { /// Enables ACH transfers via the OutboundPayments API. #[serde(skip_serializing_if = "Option::is_none")] @@ -829,6 +862,7 @@ impl Default for UpdateTreasuryFinancialAccountFeaturesOutboundPayments { } /// Enables ACH transfers via the OutboundPayments API. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccountFeaturesOutboundPaymentsAch { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -840,6 +874,7 @@ impl UpdateTreasuryFinancialAccountFeaturesOutboundPaymentsAch { } /// Enables US domestic wire transfers via the OutboundPayments API. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccountFeaturesOutboundPaymentsUsDomesticWire { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -851,6 +886,7 @@ impl UpdateTreasuryFinancialAccountFeaturesOutboundPaymentsUsDomesticWire { } /// Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccountFeaturesOutboundTransfers { /// Enables ACH transfers via the OutboundTransfers API. #[serde(skip_serializing_if = "Option::is_none")] @@ -872,6 +908,7 @@ impl Default for UpdateTreasuryFinancialAccountFeaturesOutboundTransfers { } /// Enables ACH transfers via the OutboundTransfers API. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccountFeaturesOutboundTransfersAch { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -883,6 +920,7 @@ impl UpdateTreasuryFinancialAccountFeaturesOutboundTransfersAch { } /// Enables US domestic wire transfers via the OutboundTransfers API. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccountFeaturesOutboundTransfersUsDomesticWire { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -894,6 +932,7 @@ impl UpdateTreasuryFinancialAccountFeaturesOutboundTransfersUsDomesticWire { } /// The set of functionalities that the platform can restrict on the FinancialAccount. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccountPlatformRestrictions { /// Restricts all inbound money movement. #[serde(skip_serializing_if = "Option::is_none")] @@ -1034,6 +1073,7 @@ impl<'de> serde::Deserialize<'de> } /// Updates the details of a FinancialAccount. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateTreasuryFinancialAccount<'a> { inner: UpdateTreasuryFinancialAccountBuilder<'a>, financial_account: &'a stripe_treasury::TreasuryFinancialAccountId, @@ -1102,6 +1142,7 @@ impl StripeRequest for UpdateTreasuryFinancialAccount<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct UpdateFeaturesTreasuryFinancialAccountBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] card_issuing: Option, @@ -1136,6 +1177,7 @@ impl<'a> UpdateFeaturesTreasuryFinancialAccountBuilder<'a> { } /// Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateFeaturesTreasuryFinancialAccountCardIssuing { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -1148,6 +1190,7 @@ impl UpdateFeaturesTreasuryFinancialAccountCardIssuing { /// Represents whether this FinancialAccount is eligible for deposit insurance. /// Various factors determine the insurance amount. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateFeaturesTreasuryFinancialAccountDepositInsurance { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -1159,6 +1202,7 @@ impl UpdateFeaturesTreasuryFinancialAccountDepositInsurance { } /// Contains Features that add FinancialAddresses to the FinancialAccount. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateFeaturesTreasuryFinancialAccountFinancialAddresses { /// Adds an ABA FinancialAddress to the FinancialAccount. #[serde(skip_serializing_if = "Option::is_none")] @@ -1176,6 +1220,7 @@ impl Default for UpdateFeaturesTreasuryFinancialAccountFinancialAddresses { } /// Adds an ABA FinancialAddress to the FinancialAccount. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateFeaturesTreasuryFinancialAccountFinancialAddressesAba { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -1187,6 +1232,7 @@ impl UpdateFeaturesTreasuryFinancialAccountFinancialAddressesAba { } /// Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateFeaturesTreasuryFinancialAccountInboundTransfers { /// Enables ACH Debits via the InboundTransfers API. #[serde(skip_serializing_if = "Option::is_none")] @@ -1204,6 +1250,7 @@ impl Default for UpdateFeaturesTreasuryFinancialAccountInboundTransfers { } /// Enables ACH Debits via the InboundTransfers API. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateFeaturesTreasuryFinancialAccountInboundTransfersAch { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -1215,6 +1262,7 @@ impl UpdateFeaturesTreasuryFinancialAccountInboundTransfersAch { } /// Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateFeaturesTreasuryFinancialAccountIntraStripeFlows { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -1226,6 +1274,7 @@ impl UpdateFeaturesTreasuryFinancialAccountIntraStripeFlows { } /// Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateFeaturesTreasuryFinancialAccountOutboundPayments { /// Enables ACH transfers via the OutboundPayments API. #[serde(skip_serializing_if = "Option::is_none")] @@ -1247,6 +1296,7 @@ impl Default for UpdateFeaturesTreasuryFinancialAccountOutboundPayments { } /// Enables ACH transfers via the OutboundPayments API. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateFeaturesTreasuryFinancialAccountOutboundPaymentsAch { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -1258,6 +1308,7 @@ impl UpdateFeaturesTreasuryFinancialAccountOutboundPaymentsAch { } /// Enables US domestic wire transfers via the OutboundPayments API. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateFeaturesTreasuryFinancialAccountOutboundPaymentsUsDomesticWire { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -1269,6 +1320,7 @@ impl UpdateFeaturesTreasuryFinancialAccountOutboundPaymentsUsDomesticWire { } /// Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateFeaturesTreasuryFinancialAccountOutboundTransfers { /// Enables ACH transfers via the OutboundTransfers API. #[serde(skip_serializing_if = "Option::is_none")] @@ -1290,6 +1342,7 @@ impl Default for UpdateFeaturesTreasuryFinancialAccountOutboundTransfers { } /// Enables ACH transfers via the OutboundTransfers API. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateFeaturesTreasuryFinancialAccountOutboundTransfersAch { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -1301,6 +1354,7 @@ impl UpdateFeaturesTreasuryFinancialAccountOutboundTransfersAch { } /// Enables US domestic wire transfers via the OutboundTransfers API. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateFeaturesTreasuryFinancialAccountOutboundTransfersUsDomesticWire { /// Whether the FinancialAccount should have the Feature. pub requested: bool, @@ -1312,6 +1366,7 @@ impl UpdateFeaturesTreasuryFinancialAccountOutboundTransfersUsDomesticWire { } /// Updates the Features associated with a FinancialAccount. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct UpdateFeaturesTreasuryFinancialAccount<'a> { inner: UpdateFeaturesTreasuryFinancialAccountBuilder<'a>, financial_account: &'a stripe_treasury::TreasuryFinancialAccountId, diff --git a/generated/async-stripe-treasury/src/treasury_financial_account/types.rs b/generated/async-stripe-treasury/src/treasury_financial_account/types.rs index 823962df2..18e28bddc 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_account/types.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_account/types.rs @@ -1,6 +1,7 @@ /// Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. /// FinancialAccounts serve as the source and destination of Treasury’s money movement APIs. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TreasuryFinancialAccount { /// The array of paths to active Features in the Features hash. diff --git a/generated/async-stripe-treasury/src/treasury_financial_account_features.rs b/generated/async-stripe-treasury/src/treasury_financial_account_features.rs index 7fa3bff18..7d7487a05 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_account_features.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_account_features.rs @@ -1,6 +1,7 @@ /// Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. /// Stripe or the platform can control Features via the requested field. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TreasuryFinancialAccountFeatures { pub card_issuing: Option, diff --git a/generated/async-stripe-treasury/src/treasury_inbound_transfer/requests.rs b/generated/async-stripe-treasury/src/treasury_inbound_transfer/requests.rs index 7824ede22..1ac94c373 100644 --- a/generated/async-stripe-treasury/src/treasury_inbound_transfer/requests.rs +++ b/generated/async-stripe-treasury/src/treasury_inbound_transfer/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTreasuryInboundTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -30,6 +31,7 @@ impl<'a> ListTreasuryInboundTransferBuilder<'a> { } /// Returns a list of InboundTransfers sent from the specified FinancialAccount. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTreasuryInboundTransfer<'a> { inner: ListTreasuryInboundTransferBuilder<'a>, } @@ -103,6 +105,7 @@ impl StripeRequest for ListTreasuryInboundTransfer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTreasuryInboundTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -114,6 +117,7 @@ impl<'a> RetrieveTreasuryInboundTransferBuilder<'a> { } /// Retrieves the details of an existing InboundTransfer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTreasuryInboundTransfer<'a> { inner: RetrieveTreasuryInboundTransferBuilder<'a>, id: &'a stripe_treasury::TreasuryInboundTransferId, @@ -157,6 +161,7 @@ impl StripeRequest for RetrieveTreasuryInboundTransfer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct FailTreasuryInboundTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -170,6 +175,7 @@ impl<'a> FailTreasuryInboundTransferBuilder<'a> { } /// Details about a failed InboundTransfer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct FailTreasuryInboundTransferFailureDetails { /// Reason for the failure. #[serde(skip_serializing_if = "Option::is_none")] @@ -279,6 +285,7 @@ impl<'de> serde::Deserialize<'de> for FailTreasuryInboundTransferFailureDetailsC /// Transitions a test mode created InboundTransfer to the `failed` status. /// The InboundTransfer must already be in the `processing` state. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct FailTreasuryInboundTransfer<'a> { inner: FailTreasuryInboundTransferBuilder<'a>, id: &'a str, @@ -333,6 +340,7 @@ impl StripeRequest for FailTreasuryInboundTransfer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ReturnInboundTransferTreasuryInboundTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -345,6 +353,7 @@ impl<'a> ReturnInboundTransferTreasuryInboundTransferBuilder<'a> { /// Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. /// The InboundTransfer must already be in the `succeeded` state. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ReturnInboundTransferTreasuryInboundTransfer<'a> { inner: ReturnInboundTransferTreasuryInboundTransferBuilder<'a>, id: &'a str, @@ -391,6 +400,7 @@ impl StripeRequest for ReturnInboundTransferTreasuryInboundTransfer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct SucceedTreasuryInboundTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -403,6 +413,7 @@ impl<'a> SucceedTreasuryInboundTransferBuilder<'a> { /// Transitions a test mode created InboundTransfer to the `succeeded` status. /// The InboundTransfer must already be in the `processing` state. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct SucceedTreasuryInboundTransfer<'a> { inner: SucceedTreasuryInboundTransferBuilder<'a>, id: &'a str, @@ -449,6 +460,7 @@ impl StripeRequest for SucceedTreasuryInboundTransfer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTreasuryInboundTransferBuilder<'a> { amount: i64, currency: stripe_types::Currency, @@ -484,6 +496,7 @@ impl<'a> CreateTreasuryInboundTransferBuilder<'a> { } /// Creates an InboundTransfer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryInboundTransfer<'a> { inner: CreateTreasuryInboundTransferBuilder<'a>, } @@ -554,6 +567,7 @@ impl StripeRequest for CreateTreasuryInboundTransfer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CancelTreasuryInboundTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -565,6 +579,7 @@ impl<'a> CancelTreasuryInboundTransferBuilder<'a> { } /// Cancels an InboundTransfer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CancelTreasuryInboundTransfer<'a> { inner: CancelTreasuryInboundTransferBuilder<'a>, inbound_transfer: &'a stripe_treasury::TreasuryInboundTransferId, diff --git a/generated/async-stripe-treasury/src/treasury_inbound_transfer/types.rs b/generated/async-stripe-treasury/src/treasury_inbound_transfer/types.rs index 937da35ab..335c37760 100644 --- a/generated/async-stripe-treasury/src/treasury_inbound_transfer/types.rs +++ b/generated/async-stripe-treasury/src/treasury_inbound_transfer/types.rs @@ -1,6 +1,7 @@ /// Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. /// The funds will be transferred via an ACH debit. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TreasuryInboundTransfer { /// Amount (in cents) transferred. diff --git a/generated/async-stripe-treasury/src/treasury_outbound_payment/requests.rs b/generated/async-stripe-treasury/src/treasury_outbound_payment/requests.rs index d20acc895..c165c76a9 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_payment/requests.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_payment/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTreasuryOutboundPaymentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -36,6 +37,7 @@ impl<'a> ListTreasuryOutboundPaymentBuilder<'a> { } /// Returns a list of OutboundPayments sent from the specified FinancialAccount. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTreasuryOutboundPayment<'a> { inner: ListTreasuryOutboundPaymentBuilder<'a>, } @@ -119,6 +121,7 @@ impl StripeRequest for ListTreasuryOutboundPayment<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTreasuryOutboundPaymentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -130,6 +133,7 @@ impl<'a> RetrieveTreasuryOutboundPaymentBuilder<'a> { } /// Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTreasuryOutboundPayment<'a> { inner: RetrieveTreasuryOutboundPaymentBuilder<'a>, id: &'a stripe_treasury::TreasuryOutboundPaymentId, @@ -173,6 +177,7 @@ impl StripeRequest for RetrieveTreasuryOutboundPayment<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct FailTreasuryOutboundPaymentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -185,6 +190,7 @@ impl<'a> FailTreasuryOutboundPaymentBuilder<'a> { /// Transitions a test mode created OutboundPayment to the `failed` status. /// The OutboundPayment must already be in the `processing` state. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct FailTreasuryOutboundPayment<'a> { inner: FailTreasuryOutboundPaymentBuilder<'a>, id: &'a str, @@ -231,6 +237,7 @@ impl StripeRequest for FailTreasuryOutboundPayment<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct PostTreasuryOutboundPaymentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -243,6 +250,7 @@ impl<'a> PostTreasuryOutboundPaymentBuilder<'a> { /// Transitions a test mode created OutboundPayment to the `posted` status. /// The OutboundPayment must already be in the `processing` state. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PostTreasuryOutboundPayment<'a> { inner: PostTreasuryOutboundPaymentBuilder<'a>, id: &'a str, @@ -289,6 +297,7 @@ impl StripeRequest for PostTreasuryOutboundPayment<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ReturnOutboundPaymentTreasuryOutboundPaymentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -302,6 +311,7 @@ impl<'a> ReturnOutboundPaymentTreasuryOutboundPaymentBuilder<'a> { } /// Optional hash to set the the return code. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ReturnOutboundPaymentTreasuryOutboundPaymentReturnedDetails { /// The return code to be set on the OutboundPayment object. #[serde(skip_serializing_if = "Option::is_none")] @@ -404,6 +414,7 @@ impl<'de> serde::Deserialize<'de> /// Transitions a test mode created OutboundPayment to the `returned` status. /// The OutboundPayment must already be in the `processing` state. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ReturnOutboundPaymentTreasuryOutboundPayment<'a> { inner: ReturnOutboundPaymentTreasuryOutboundPaymentBuilder<'a>, id: &'a str, @@ -458,6 +469,7 @@ impl StripeRequest for ReturnOutboundPaymentTreasuryOutboundPayment<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTreasuryOutboundPaymentBuilder<'a> { amount: i64, currency: stripe_types::Currency, @@ -504,6 +516,7 @@ impl<'a> CreateTreasuryOutboundPaymentBuilder<'a> { /// Hash used to generate the PaymentMethod to be used for this OutboundPayment. /// Exclusive with `destination_payment_method`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryOutboundPaymentDestinationPaymentMethodData<'a> { /// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. #[serde(skip_serializing_if = "Option::is_none")] @@ -541,6 +554,7 @@ impl<'a> CreateTreasuryOutboundPaymentDestinationPaymentMethodData<'a> { } /// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryOutboundPaymentDestinationPaymentMethodDataBillingDetails<'a> { /// Billing address. #[serde(skip_serializing_if = "Option::is_none")] @@ -568,6 +582,7 @@ impl<'a> Default for CreateTreasuryOutboundPaymentDestinationPaymentMethodDataBi } /// Billing address. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryOutboundPaymentDestinationPaymentMethodDataBillingDetailsAddress<'a> { /// City, district, suburb, town, or village. #[serde(skip_serializing_if = "Option::is_none")] @@ -664,6 +679,7 @@ impl<'de> serde::Deserialize<'de> } /// Required hash if type is set to `us_bank_account`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryOutboundPaymentDestinationPaymentMethodDataUsBankAccount<'a> { /// Account holder type: individual or company. #[serde(skip_serializing_if = "Option::is_none")] @@ -830,6 +846,7 @@ impl<'de> serde::Deserialize<'de> } /// Payment method-specific configuration for this OutboundPayment. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryOutboundPaymentDestinationPaymentMethodOptions { /// Optional fields for `us_bank_account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -848,6 +865,7 @@ impl Default for CreateTreasuryOutboundPaymentDestinationPaymentMethodOptions { } /// Optional fields for `us_bank_account`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryOutboundPaymentDestinationPaymentMethodOptionsUsBankAccount { /// Specifies the network rails to be used. /// If not set, will default to the PaymentMethod's preferred network. @@ -934,6 +952,7 @@ impl<'de> serde::Deserialize<'de> } /// End user details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryOutboundPaymentEndUserDetails<'a> { /// IP address of the user initiating the OutboundPayment. /// Must be supplied if `present` is set to `true`. @@ -950,6 +969,7 @@ impl<'a> CreateTreasuryOutboundPaymentEndUserDetails<'a> { } /// Creates an OutboundPayment. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryOutboundPayment<'a> { inner: CreateTreasuryOutboundPaymentBuilder<'a>, } @@ -1051,6 +1071,7 @@ impl StripeRequest for CreateTreasuryOutboundPayment<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CancelTreasuryOutboundPaymentBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -1062,6 +1083,7 @@ impl<'a> CancelTreasuryOutboundPaymentBuilder<'a> { } /// Cancel an OutboundPayment. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CancelTreasuryOutboundPayment<'a> { inner: CancelTreasuryOutboundPaymentBuilder<'a>, id: &'a stripe_treasury::TreasuryOutboundPaymentId, diff --git a/generated/async-stripe-treasury/src/treasury_outbound_payment/types.rs b/generated/async-stripe-treasury/src/treasury_outbound_payment/types.rs index ad46c07e9..aff69d672 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_payment/types.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_payment/types.rs @@ -4,6 +4,7 @@ /// Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. /// These methods can only be called on test mode objects. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TreasuryOutboundPayment { /// Amount (in cents) transferred. diff --git a/generated/async-stripe-treasury/src/treasury_outbound_transfer/requests.rs b/generated/async-stripe-treasury/src/treasury_outbound_transfer/requests.rs index d59ff197e..ab8096325 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_transfer/requests.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_transfer/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTreasuryOutboundTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -30,6 +31,7 @@ impl<'a> ListTreasuryOutboundTransferBuilder<'a> { } /// Returns a list of OutboundTransfers sent from the specified FinancialAccount. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTreasuryOutboundTransfer<'a> { inner: ListTreasuryOutboundTransferBuilder<'a>, } @@ -103,6 +105,7 @@ impl StripeRequest for ListTreasuryOutboundTransfer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTreasuryOutboundTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -114,6 +117,7 @@ impl<'a> RetrieveTreasuryOutboundTransferBuilder<'a> { } /// Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTreasuryOutboundTransfer<'a> { inner: RetrieveTreasuryOutboundTransferBuilder<'a>, outbound_transfer: &'a stripe_treasury::TreasuryOutboundTransferId, @@ -160,6 +164,7 @@ impl StripeRequest for RetrieveTreasuryOutboundTransfer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct FailTreasuryOutboundTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -172,6 +177,7 @@ impl<'a> FailTreasuryOutboundTransferBuilder<'a> { /// Transitions a test mode created OutboundTransfer to the `failed` status. /// The OutboundTransfer must already be in the `processing` state. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct FailTreasuryOutboundTransfer<'a> { inner: FailTreasuryOutboundTransferBuilder<'a>, outbound_transfer: &'a str, @@ -218,6 +224,7 @@ impl StripeRequest for FailTreasuryOutboundTransfer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct PostTreasuryOutboundTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -230,6 +237,7 @@ impl<'a> PostTreasuryOutboundTransferBuilder<'a> { /// Transitions a test mode created OutboundTransfer to the `posted` status. /// The OutboundTransfer must already be in the `processing` state. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct PostTreasuryOutboundTransfer<'a> { inner: PostTreasuryOutboundTransferBuilder<'a>, outbound_transfer: &'a str, @@ -276,6 +284,7 @@ impl StripeRequest for PostTreasuryOutboundTransfer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ReturnOutboundTransferTreasuryOutboundTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -289,6 +298,7 @@ impl<'a> ReturnOutboundTransferTreasuryOutboundTransferBuilder<'a> { } /// Details about a returned OutboundTransfer. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ReturnOutboundTransferTreasuryOutboundTransferReturnedDetails { /// Reason for the return. #[serde(skip_serializing_if = "Option::is_none")] @@ -387,6 +397,7 @@ impl<'de> serde::Deserialize<'de> /// Transitions a test mode created OutboundTransfer to the `returned` status. /// The OutboundTransfer must already be in the `processing` state. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ReturnOutboundTransferTreasuryOutboundTransfer<'a> { inner: ReturnOutboundTransferTreasuryOutboundTransferBuilder<'a>, outbound_transfer: &'a str, @@ -444,6 +455,7 @@ impl StripeRequest for ReturnOutboundTransferTreasuryOutboundTransfer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTreasuryOutboundTransferBuilder<'a> { amount: i64, currency: stripe_types::Currency, @@ -479,6 +491,7 @@ impl<'a> CreateTreasuryOutboundTransferBuilder<'a> { } /// Hash describing payment method configuration details. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryOutboundTransferDestinationPaymentMethodOptions { /// Optional fields for `us_bank_account`. #[serde(skip_serializing_if = "Option::is_none")] @@ -497,6 +510,7 @@ impl Default for CreateTreasuryOutboundTransferDestinationPaymentMethodOptions { } /// Optional fields for `us_bank_account`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryOutboundTransferDestinationPaymentMethodOptionsUsBankAccount { /// Specifies the network rails to be used. /// If not set, will default to the PaymentMethod's preferred network. @@ -583,6 +597,7 @@ impl<'de> serde::Deserialize<'de> } /// Creates an OutboundTransfer. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryOutboundTransfer<'a> { inner: CreateTreasuryOutboundTransferBuilder<'a>, } @@ -658,6 +673,7 @@ impl StripeRequest for CreateTreasuryOutboundTransfer<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CancelTreasuryOutboundTransferBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -669,6 +685,7 @@ impl<'a> CancelTreasuryOutboundTransferBuilder<'a> { } /// An OutboundTransfer can be canceled if the funds have not yet been paid out. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CancelTreasuryOutboundTransfer<'a> { inner: CancelTreasuryOutboundTransferBuilder<'a>, outbound_transfer: &'a stripe_treasury::TreasuryOutboundTransferId, diff --git a/generated/async-stripe-treasury/src/treasury_outbound_transfer/types.rs b/generated/async-stripe-treasury/src/treasury_outbound_transfer/types.rs index 1efdf888a..33556008a 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_transfer/types.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_transfer/types.rs @@ -5,6 +5,7 @@ /// Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. /// These methods can only be called on test mode objects. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TreasuryOutboundTransfer { /// Amount (in cents) transferred. diff --git a/generated/async-stripe-treasury/src/treasury_received_credit/requests.rs b/generated/async-stripe-treasury/src/treasury_received_credit/requests.rs index 72fc67885..d14bc7492 100644 --- a/generated/async-stripe-treasury/src/treasury_received_credit/requests.rs +++ b/generated/async-stripe-treasury/src/treasury_received_credit/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTreasuryReceivedCreditBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -33,6 +34,7 @@ impl<'a> ListTreasuryReceivedCreditBuilder<'a> { } /// Only return ReceivedCredits described by the flow. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTreasuryReceivedCreditLinkedFlows { /// The source flow type. pub source_flow_type: ListTreasuryReceivedCreditLinkedFlowsSourceFlowType, @@ -108,6 +110,7 @@ impl<'de> serde::Deserialize<'de> for ListTreasuryReceivedCreditLinkedFlowsSourc } /// Returns a list of ReceivedCredits. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTreasuryReceivedCredit<'a> { inner: ListTreasuryReceivedCreditBuilder<'a>, } @@ -186,6 +189,7 @@ impl StripeRequest for ListTreasuryReceivedCredit<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTreasuryReceivedCreditBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -197,6 +201,7 @@ impl<'a> RetrieveTreasuryReceivedCreditBuilder<'a> { } /// Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTreasuryReceivedCredit<'a> { inner: RetrieveTreasuryReceivedCreditBuilder<'a>, id: &'a stripe_treasury::TreasuryReceivedCreditId, @@ -240,6 +245,7 @@ impl StripeRequest for RetrieveTreasuryReceivedCredit<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTreasuryReceivedCreditBuilder<'a> { amount: i64, currency: stripe_types::Currency, @@ -273,6 +279,7 @@ impl<'a> CreateTreasuryReceivedCreditBuilder<'a> { } /// Initiating payment method details for the object. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryReceivedCreditInitiatingPaymentMethodDetails<'a> { /// The source type. #[serde(rename = "type")] @@ -346,6 +353,7 @@ impl<'de> serde::Deserialize<'de> } /// Optional fields for `us_bank_account`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryReceivedCreditInitiatingPaymentMethodDetailsUsBankAccount<'a> { /// The bank account holder's name. #[serde(skip_serializing_if = "Option::is_none")] @@ -428,6 +436,7 @@ impl<'de> serde::Deserialize<'de> for CreateTreasuryReceivedCreditNetwork { /// Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. /// In live mode, you can’t directly create ReceivedCredits initiated by third parties. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryReceivedCredit<'a> { inner: CreateTreasuryReceivedCreditBuilder<'a>, } diff --git a/generated/async-stripe-treasury/src/treasury_received_credit/types.rs b/generated/async-stripe-treasury/src/treasury_received_credit/types.rs index 58c67dcc3..9dfa13f4a 100644 --- a/generated/async-stripe-treasury/src/treasury_received_credit/types.rs +++ b/generated/async-stripe-treasury/src/treasury_received_credit/types.rs @@ -1,6 +1,7 @@ /// ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). /// These money movements are not initiated from the FinancialAccount. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TreasuryReceivedCredit { /// Amount (in cents) transferred. diff --git a/generated/async-stripe-treasury/src/treasury_received_debit/requests.rs b/generated/async-stripe-treasury/src/treasury_received_debit/requests.rs index b7b902084..052e82aa5 100644 --- a/generated/async-stripe-treasury/src/treasury_received_debit/requests.rs +++ b/generated/async-stripe-treasury/src/treasury_received_debit/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTreasuryReceivedDebitBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] ending_before: Option<&'a str>, @@ -30,6 +31,7 @@ impl<'a> ListTreasuryReceivedDebitBuilder<'a> { } /// Returns a list of ReceivedDebits. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTreasuryReceivedDebit<'a> { inner: ListTreasuryReceivedDebitBuilder<'a>, } @@ -102,6 +104,7 @@ impl StripeRequest for ListTreasuryReceivedDebit<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTreasuryReceivedDebitBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -113,6 +116,7 @@ impl<'a> RetrieveTreasuryReceivedDebitBuilder<'a> { } /// Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTreasuryReceivedDebit<'a> { inner: RetrieveTreasuryReceivedDebitBuilder<'a>, id: &'a stripe_treasury::TreasuryReceivedDebitId, @@ -156,6 +160,7 @@ impl StripeRequest for RetrieveTreasuryReceivedDebit<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct CreateTreasuryReceivedDebitBuilder<'a> { amount: i64, currency: stripe_types::Currency, @@ -189,6 +194,7 @@ impl<'a> CreateTreasuryReceivedDebitBuilder<'a> { } /// Initiating payment method details for the object. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryReceivedDebitInitiatingPaymentMethodDetails<'a> { /// The source type. #[serde(rename = "type")] @@ -262,6 +268,7 @@ impl<'de> serde::Deserialize<'de> } /// Optional fields for `us_bank_account`. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryReceivedDebitInitiatingPaymentMethodDetailsUsBankAccount<'a> { /// The bank account holder's name. #[serde(skip_serializing_if = "Option::is_none")] @@ -341,6 +348,7 @@ impl<'de> serde::Deserialize<'de> for CreateTreasuryReceivedDebitNetwork { /// Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. /// In live mode, you can’t directly create ReceivedDebits initiated by third parties. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct CreateTreasuryReceivedDebit<'a> { inner: CreateTreasuryReceivedDebitBuilder<'a>, } diff --git a/generated/async-stripe-treasury/src/treasury_received_debit/types.rs b/generated/async-stripe-treasury/src/treasury_received_debit/types.rs index 493974c1b..4f9223e02 100644 --- a/generated/async-stripe-treasury/src/treasury_received_debit/types.rs +++ b/generated/async-stripe-treasury/src/treasury_received_debit/types.rs @@ -1,6 +1,7 @@ /// ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). /// These are not initiated from the FinancialAccount. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TreasuryReceivedDebit { /// Amount (in cents) transferred. diff --git a/generated/async-stripe-treasury/src/treasury_transaction/requests.rs b/generated/async-stripe-treasury/src/treasury_transaction/requests.rs index 445f286e1..f5ed739a7 100644 --- a/generated/async-stripe-treasury/src/treasury_transaction/requests.rs +++ b/generated/async-stripe-treasury/src/treasury_transaction/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTreasuryTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -97,6 +98,7 @@ impl<'de> serde::Deserialize<'de> for ListTreasuryTransactionOrderBy { /// A filter for the `status_transitions.posted_at` timestamp. /// When using this filter, `status=posted` and `order_by=posted_at` must also be specified. #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTreasuryTransactionStatusTransitions { /// Returns Transactions with `posted_at` within the specified range. #[serde(skip_serializing_if = "Option::is_none")] @@ -114,6 +116,7 @@ impl Default for ListTreasuryTransactionStatusTransitions { } /// Retrieves a list of Transaction objects. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTreasuryTransaction<'a> { inner: ListTreasuryTransactionBuilder<'a>, } @@ -206,6 +209,7 @@ impl StripeRequest for ListTreasuryTransaction<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTreasuryTransactionBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -217,6 +221,7 @@ impl<'a> RetrieveTreasuryTransactionBuilder<'a> { } /// Retrieves the details of an existing Transaction. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTreasuryTransaction<'a> { inner: RetrieveTreasuryTransactionBuilder<'a>, id: &'a stripe_treasury::TreasuryTransactionId, diff --git a/generated/async-stripe-treasury/src/treasury_transaction/types.rs b/generated/async-stripe-treasury/src/treasury_transaction/types.rs index f455f7a16..2c1c08b75 100644 --- a/generated/async-stripe-treasury/src/treasury_transaction/types.rs +++ b/generated/async-stripe-treasury/src/treasury_transaction/types.rs @@ -1,5 +1,6 @@ /// Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TreasuryTransaction { /// Amount (in cents) transferred. diff --git a/generated/async-stripe-treasury/src/treasury_transaction_entry/requests.rs b/generated/async-stripe-treasury/src/treasury_transaction_entry/requests.rs index c168153b7..f6237bde4 100644 --- a/generated/async-stripe-treasury/src/treasury_transaction_entry/requests.rs +++ b/generated/async-stripe-treasury/src/treasury_transaction_entry/requests.rs @@ -3,6 +3,7 @@ use stripe_client_core::{ }; #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct ListTreasuryTransactionEntryBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] created: Option, @@ -96,6 +97,7 @@ impl<'de> serde::Deserialize<'de> for ListTreasuryTransactionEntryOrderBy { } /// Retrieves a list of TransactionEntry objects. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct ListTreasuryTransactionEntry<'a> { inner: ListTreasuryTransactionEntryBuilder<'a>, } @@ -184,6 +186,7 @@ impl StripeRequest for ListTreasuryTransactionEntry<'_> { } } #[derive(Copy, Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] struct RetrieveTreasuryTransactionEntryBuilder<'a> { #[serde(skip_serializing_if = "Option::is_none")] expand: Option<&'a [&'a str]>, @@ -195,6 +198,7 @@ impl<'a> RetrieveTreasuryTransactionEntryBuilder<'a> { } /// Retrieves a TransactionEntry object. #[derive(Clone, Debug, serde::Serialize)] +#[cfg_attr(feature = "deserialize_extra", derive(serde::Deserialize))] pub struct RetrieveTreasuryTransactionEntry<'a> { inner: RetrieveTreasuryTransactionEntryBuilder<'a>, id: &'a stripe_treasury::TreasuryTransactionEntryId, diff --git a/generated/async-stripe-treasury/src/treasury_transaction_entry/types.rs b/generated/async-stripe-treasury/src/treasury_transaction_entry/types.rs index 1d91a0027..eed892fba 100644 --- a/generated/async-stripe-treasury/src/treasury_transaction_entry/types.rs +++ b/generated/async-stripe-treasury/src/treasury_transaction_entry/types.rs @@ -1,5 +1,6 @@ /// TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). #[derive(Clone, Debug)] +#[cfg_attr(feature = "serialize_extra", derive(serde::Serialize))] #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] pub struct TreasuryTransactionEntry { pub balance_impact: stripe_treasury::TreasuryTransactionsResourceBalanceImpact, @@ -25,7 +26,7 @@ pub struct TreasuryTransactionEntry { /// The Transaction associated with this object. pub transaction: stripe_types::Expandable, /// The specific money movement that generated the TransactionEntry. - #[cfg_attr(feature = "deserialize", serde(rename = "type"))] + #[cfg_attr(any(feature = "deserialize", feature = "serialize_extra"), serde(rename = "type"))] pub type_: TreasuryTransactionEntryType, } #[doc(hidden)] diff --git a/openapi/src/templates/cargo_toml.rs b/openapi/src/templates/cargo_toml.rs index 835392211..eb58428a5 100644 --- a/openapi/src/templates/cargo_toml.rs +++ b/openapi/src/templates/cargo_toml.rs @@ -29,7 +29,9 @@ pub fn gen_crate_toml(krate: Crate, crate_deps: Vec, crate_features: Vec< }; let ser_features = get_serialization_feature(&crate_deps, "serialize"); + let ser_extra_features = get_serialization_feature(&crate_deps, "serialize_extra"); let deser_features = get_serialization_feature(&crate_deps, "deserialize"); + let deser_extra_features = get_serialization_feature(&crate_deps, "deserialize_extra"); let features = if krate == Crate::SHARED { "".into() } else { gen_feature_section(crate_features) }; @@ -67,7 +69,9 @@ pub fn gen_crate_toml(krate: Crate, crate_deps: Vec, crate_features: Vec< [features] serialize = [{ser_features}] + serialize_extra = [{ser_extra_features}] deserialize = [{deser_features}, "dep:serde_json"] + deserialize_extra = [{deser_extra_features}, "dep:serde_json"] {features} "# } diff --git a/openapi/src/templates/utils.rs b/openapi/src/templates/utils.rs index a9d6b0d68..363165703 100644 --- a/openapi/src/templates/utils.rs +++ b/openapi/src/templates/utils.rs @@ -13,42 +13,36 @@ lazy_static! { #[derive(Debug, Copy, Clone, Default)] pub struct SerdeDeriveState { - serialize: Option, - deserialize: Option, + serialize: ShouldDerive, + deserialize: ShouldDerive, } impl SerdeDeriveState { pub fn serialize(&mut self, kind: ShouldDerive) -> &mut Self { - self.serialize = Some(kind); + self.serialize = kind; self } pub fn deserialize(&mut self, kind: ShouldDerive) -> &mut Self { - self.deserialize = Some(kind); + self.deserialize = kind; self } pub fn write_derives(&self, out: &mut String) { - if let Some(derive) = self.serialize { - write_derive(derive, SerOrDeser::Ser, out); - } - if let Some(derive) = self.deserialize { - write_derive(derive, SerOrDeser::Deser, out); - } + write_derive(self.serialize, SerOrDeser::Ser, out); + write_derive(self.deserialize, SerOrDeser::Deser, out); } pub fn maybe_write_tag(&self, out: &mut String, tag: impl Display) { let feature_gate = match self.usage() { - SerdeUsage::Never => { - return; - } SerdeUsage::Always => { let _ = writeln!(out, r#"#[serde({tag})]"#); return; } - SerdeUsage::SerGated => SerFeatureGate::Ser, - SerdeUsage::DeserGated => SerFeatureGate::Deser, - SerdeUsage::EitherGated => SerFeatureGate::Either, + SerdeUsage::SerGatedDeserExtra => SerFeatureGate::SerGatedDeserExtra, + SerdeUsage::DeserGatedSerExtra => SerFeatureGate::DeserGatedSerExtra, + SerdeUsage::EitherExtra => SerFeatureGate::EitherExtra, + SerdeUsage::EitherGated => SerFeatureGate::EitherGated, }; let _ = writeln!(out, r#"#[cfg_attr({feature_gate}, serde({tag}))]"#); } @@ -59,20 +53,12 @@ impl SerdeDeriveState { fn usage(&self) -> SerdeUsage { match (self.serialize, self.deserialize) { - (None, None) => SerdeUsage::Never, - (Some(state), None) => match state { - ShouldDerive::Always => SerdeUsage::Always, - ShouldDerive::Gated => SerdeUsage::SerGated, - }, - (None, Some(state)) => match state { - ShouldDerive::Always => SerdeUsage::Always, - ShouldDerive::Gated => SerdeUsage::DeserGated, - }, - (Some(state_ser), Some(state_deser)) => match (state_ser, state_deser) { - (ShouldDerive::Always, _) => SerdeUsage::Always, - (_, ShouldDerive::Always) => SerdeUsage::Always, - (ShouldDerive::Gated, ShouldDerive::Gated) => SerdeUsage::EitherGated, - }, + (ShouldDerive::Always, _) => SerdeUsage::Always, + (_, ShouldDerive::Always) => SerdeUsage::Always, + (ShouldDerive::Gated, ShouldDerive::Extra) => SerdeUsage::SerGatedDeserExtra, + (ShouldDerive::Extra, ShouldDerive::Gated) => SerdeUsage::DeserGatedSerExtra, + (ShouldDerive::Extra, ShouldDerive::Extra) => SerdeUsage::EitherExtra, + (ShouldDerive::Gated, ShouldDerive::Gated) => SerdeUsage::EitherGated, } } } @@ -82,43 +68,53 @@ fn write_derive(derive: ShouldDerive, ser: SerOrDeser, out: &mut String) { ShouldDerive::Always => { let _ = writeln!(out, "#[derive(serde::{ser})]"); } - ShouldDerive::Gated => { + derive => { let _ = writeln!( out, r#"#[cfg_attr(feature = "{}", derive(serde::{ser}))]"#, - ser.feature_gate() + ser.feature_gate(derive) ); } } } enum SerdeUsage { - SerGated, - DeserGated, + SerGatedDeserExtra, + DeserGatedSerExtra, + EitherExtra, EitherGated, Always, - Never, } -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Default)] pub enum ShouldDerive { Always, Gated, + #[default] + Extra, } #[derive(Debug, Copy, Clone)] enum SerFeatureGate { - Ser, - Deser, - Either, + SerGatedDeserExtra, + DeserGatedSerExtra, + EitherExtra, + EitherGated, } impl Display for SerFeatureGate { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { f.write_str(match self { - SerFeatureGate::Ser => r#"feature = "serialize""#, - SerFeatureGate::Deser => r#"feature = "deserialize""#, - SerFeatureGate::Either => r#"any(feature = "deserialize", feature = "serialize")"#, + SerFeatureGate::SerGatedDeserExtra => { + r#"any(feature = "deserialize_extra", feature = "serialize")"# + } + SerFeatureGate::DeserGatedSerExtra => { + r#"any(feature = "deserialize", feature = "serialize_extra")"# + } + SerFeatureGate::EitherExtra => { + r#"any(feature = "deserialize_extra", feature = "serialize_extra")"# + } + SerFeatureGate::EitherGated => r#"any(feature = "deserialize", feature = "serialize")"#, }) } } @@ -129,9 +125,11 @@ enum SerOrDeser { } impl SerOrDeser { - fn feature_gate(&self) -> &'static str { + fn feature_gate(&self, derive: ShouldDerive) -> &'static str { match self { + Self::Ser if derive == ShouldDerive::Extra => "serialize_extra", Self::Ser => "serialize", + Self::Deser if derive == ShouldDerive::Extra => "deserialize_extra", Self::Deser => "deserialize", } }