From d7759d6574292663b781c80ac9f53c5404b55990 Mon Sep 17 00:00:00 2001 From: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com> Date: Sun, 1 Sep 2024 18:44:58 -0400 Subject: [PATCH 1/2] Avoid ? --- .../src/billing_meter/types.rs | 89 ++- .../src/billing_meter_event/types.rs | 46 +- .../billing_meter_event_adjustment/types.rs | 34 +- .../src/billing_meter_event_summary/types.rs | 46 +- ...ing_meter_resource_aggregation_settings.rs | 14 +- ...e_billing_meter_event_adjustment_cancel.rs | 14 +- ...source_billing_meter_status_transitions.rs | 14 +- ...ling_meter_resource_billing_meter_value.rs | 14 +- ...eter_resource_customer_mapping_settings.rs | 21 +- .../src/billing_portal_configuration/types.rs | 87 ++- .../src/billing_portal_session/types.rs | 73 ++- .../src/portal_business_profile.rs | 30 +- .../src/portal_customer_update.rs | 21 +- .../src/portal_features.rs | 47 +- ...ws_after_completion_hosted_confirmation.rs | 14 +- .../portal_flows_after_completion_redirect.rs | 14 +- .../src/portal_flows_coupon_offer.rs | 14 +- .../src/portal_flows_flow.rs | 47 +- .../src/portal_flows_flow_after_completion.rs | 26 +- .../portal_flows_flow_subscription_cancel.rs | 21 +- .../portal_flows_flow_subscription_update.rs | 14 +- ..._flows_flow_subscription_update_confirm.rs | 24 +- .../src/portal_flows_retention.rs | 16 +- ...ws_subscription_update_confirm_discount.rs | 21 +- ..._flows_subscription_update_confirm_item.rs | 24 +- .../src/portal_invoice_list.rs | 14 +- .../src/portal_login_page.rs | 16 +- .../src/portal_payment_method_update.rs | 14 +- .../src/portal_subscription_cancel.rs | 31 +- ...portal_subscription_cancellation_reason.rs | 16 +- .../src/portal_subscription_update.rs | 38 +- .../src/portal_subscription_update_product.rs | 16 +- .../src/usage_record/types.rs | 41 +- .../checkout_acss_debit_mandate_options.rs | 47 +- ...ckout_acss_debit_payment_method_options.rs | 40 +- .../checkout_affirm_payment_method_options.rs | 16 +- ...fterpay_clearpay_payment_method_options.rs | 16 +- .../checkout_alipay_payment_method_options.rs | 16 +- ...ckout_amazon_pay_payment_method_options.rs | 16 +- ...ut_au_becs_debit_payment_method_options.rs | 16 +- ...ckout_bacs_debit_payment_method_options.rs | 16 +- ...ckout_bancontact_payment_method_options.rs | 16 +- .../checkout_boleto_payment_method_options.rs | 25 +- .../src/checkout_card_installments_options.rs | 14 +- .../checkout_card_payment_method_options.rs | 45 +- ...checkout_cashapp_payment_method_options.rs | 16 +- ...ce_bank_transfer_payment_method_options.rs | 24 +- ...customer_balance_payment_method_options.rs | 26 +- .../checkout_eps_payment_method_options.rs | 16 +- .../checkout_fpx_payment_method_options.rs | 16 +- ...checkout_giropay_payment_method_options.rs | 16 +- ...heckout_grab_pay_payment_method_options.rs | 16 +- .../checkout_ideal_payment_method_options.rs | 16 +- .../checkout_klarna_payment_method_options.rs | 16 +- ...checkout_konbini_payment_method_options.rs | 25 +- .../checkout_link_payment_method_options.rs | 16 +- ...eckout_mobilepay_payment_method_options.rs | 16 +- .../checkout_oxxo_payment_method_options.rs | 25 +- .../checkout_p24_payment_method_options.rs | 16 +- .../checkout_paynow_payment_method_options.rs | 16 +- .../checkout_paypal_payment_method_options.rs | 38 +- .../checkout_pix_payment_method_options.rs | 14 +- ...kout_revolut_pay_payment_method_options.rs | 16 +- ...ckout_sepa_debit_payment_method_options.rs | 16 +- .../src/checkout_session/types.rs | 347 ++++++++---- ...checkout_session_payment_method_options.rs | 199 ++++--- .../checkout_sofort_payment_method_options.rs | 16 +- .../checkout_swish_payment_method_options.rs | 14 +- ..._us_bank_account_payment_method_options.rs | 30 +- ...pages_checkout_session_after_expiration.rs | 14 +- ...ckout_session_after_expiration_recovery.rs | 27 +- ...nt_pages_checkout_session_automatic_tax.rs | 24 +- .../payment_pages_checkout_session_consent.rs | 21 +- ...ges_checkout_session_consent_collection.rs | 24 +- ...es_checkout_session_currency_conversion.rs | 27 +- ...nt_pages_checkout_session_custom_fields.rs | 51 +- ...checkout_session_custom_fields_dropdown.rs | 16 +- ...es_checkout_session_custom_fields_label.rs | 16 +- ..._checkout_session_custom_fields_numeric.rs | 24 +- ...s_checkout_session_custom_fields_option.rs | 16 +- ...ges_checkout_session_custom_fields_text.rs | 24 +- ...ment_pages_checkout_session_custom_text.rs | 36 +- ...s_checkout_session_custom_text_position.rs | 14 +- ...pages_checkout_session_customer_details.rs | 46 +- ...pages_checkout_session_invoice_creation.rs | 17 +- ...pages_checkout_session_invoice_settings.rs | 55 +- ..._session_payment_method_reuse_agreement.rs | 14 +- ...heckout_session_phone_number_collection.rs | 14 +- ...ut_session_saved_payment_method_options.rs | 23 +- ...out_session_shipping_address_collection.rs | 14 +- ...nt_pages_checkout_session_shipping_cost.rs | 41 +- ..._pages_checkout_session_shipping_option.rs | 21 +- .../payment_pages_checkout_session_tax_id.rs | 16 +- ...ages_checkout_session_tax_id_collection.rs | 14 +- ...nt_pages_checkout_session_total_details.rs | 27 +- ...ession_total_details_resource_breakdown.rs | 16 +- .../src/account_link/types.rs | 24 +- .../src/account_session/types.rs | 41 +- .../src/apps_secret/types.rs | 56 +- .../connect_embedded_account_config_claim.rs | 16 +- ...connect_embedded_account_features_claim.rs | 14 +- ...edded_account_session_create_components.rs | 73 ++- .../src/connect_embedded_base_config_claim.rs | 16 +- .../src/connect_embedded_base_features.rs | 10 +- .../connect_embedded_payments_config_claim.rs | 16 +- .../src/connect_embedded_payments_features.rs | 41 +- .../connect_embedded_payouts_config_claim.rs | 16 +- .../src/connect_embedded_payouts_features.rs | 26 +- .../src/country_spec/types.rs | 57 +- ...country_spec_verification_field_details.rs | 17 +- .../src/country_spec_verification_fields.rs | 17 +- .../src/login_link/types.rs | 16 +- .../src/secret_service_resource_scope.rs | 16 +- .../async-stripe-core/src/balance/types.rs | 49 +- .../async-stripe-core/src/balance_amount.rs | 24 +- .../src/balance_amount_by_source_type.rs | 20 +- .../src/balance_amount_net.rs | 24 +- .../async-stripe-core/src/balance_detail.rs | 14 +- .../src/customer_session/types.rs | 46 +- .../customer_session_resource_components.rs | 17 +- ...resource_components_resource_buy_button.rs | 14 +- ...ource_components_resource_pricing_table.rs | 14 +- .../async-stripe-core/src/token/types.rs | 56 +- .../src/deleted_radar_value_list.rs | 16 +- .../src/deleted_radar_value_list_item.rs | 16 +- .../src/radar_early_fraud_warning/types.rs | 55 +- .../src/radar_value_list/types.rs | 67 ++- .../src/radar_value_list_item/types.rs | 46 +- .../src/apple_pay_domain/types.rs | 27 +- ...bank_connections_resource_accountholder.rs | 24 +- .../src/bank_connections_resource_balance.rs | 30 +- ...ource_balance_api_resource_cash_balance.rs | 14 +- ...rce_balance_api_resource_credit_balance.rs | 14 +- ...nk_connections_resource_balance_refresh.rs | 24 +- ...s_resource_link_account_session_filters.rs | 14 +- ..._connections_resource_ownership_refresh.rs | 24 +- ...onnections_resource_transaction_refresh.rs | 30 +- ...transaction_resource_status_transitions.rs | 16 +- .../src/climate_order/types.rs | 141 +++-- .../src/climate_product/types.rs | 61 ++- .../src/climate_removals_beneficiary.rs | 14 +- .../src/climate_removals_location.rs | 34 +- .../src/climate_removals_order_deliveries.rs | 41 +- .../src/climate_removals_products_price.rs | 24 +- .../src/climate_supplier/types.rs | 46 +- .../src/deleted_apple_pay_domain.rs | 16 +- .../src/deleted_webhook_endpoint.rs | 16 +- .../entitlements_active_entitlement/types.rs | 27 +- ...entitlements_active_entitlement_summary.rs | 24 +- .../src/ephemeral_key/types.rs | 30 +- .../src/exchange_rate/types.rs | 16 +- .../financial_connections_account/types.rs | 123 +++-- .../financial_connections_account_owner.rs | 51 +- ...financial_connections_account_ownership.rs | 24 +- .../financial_connections_session/types.rs | 67 ++- .../types.rs | 83 ++- ...rting_finance_report_run_run_parameters.rs | 63 ++- .../src/forwarded_request_context.rs | 23 +- .../src/forwarded_request_details.rs | 24 +- .../src/forwarded_request_header.rs | 16 +- .../src/forwarded_response_details.rs | 24 +- .../src/forwarding_request/types.rs | 67 ++- ...lato_data_document_report_date_of_birth.rs | 18 +- ...to_data_document_report_expiration_date.rs | 18 +- ...gelato_data_document_report_issued_date.rs | 18 +- .../src/gelato_data_id_number_report_date.rs | 18 +- .../src/gelato_data_verified_outputs_date.rs | 18 +- .../src/gelato_document_report.rs | 85 ++- .../src/gelato_document_report_error.rs | 16 +- .../src/gelato_email_report.rs | 24 +- .../src/gelato_email_report_error.rs | 16 +- .../src/gelato_id_number_report.rs | 51 +- .../src/gelato_id_number_report_error.rs | 16 +- .../src/gelato_phone_report.rs | 24 +- .../src/gelato_phone_report_error.rs | 16 +- .../src/gelato_provided_details.rs | 16 +- .../src/gelato_report_document_options.rs | 39 +- .../src/gelato_report_id_number_options.rs | 10 +- .../src/gelato_selfie_report.rs | 27 +- .../src/gelato_selfie_report_error.rs | 16 +- .../src/gelato_session_document_options.rs | 39 +- .../src/gelato_session_email_options.rs | 16 +- .../src/gelato_session_id_number_options.rs | 10 +- .../src/gelato_session_last_error.rs | 16 +- .../src/gelato_session_phone_options.rs | 16 +- .../src/gelato_verification_report_options.rs | 16 +- .../gelato_verification_session_options.rs | 27 +- .../src/gelato_verified_outputs.rs | 61 ++- .../src/identity_verification_report/types.rs | 95 ++-- .../identity_verification_session/types.rs | 111 ++-- .../src/reporting_report_run/types.rs | 67 ++- .../src/reporting_report_type/types.rs | 65 ++- .../src/scheduled_query_run/types.rs | 73 ++- .../src/sigma_scheduled_query_run_error.rs | 14 +- .../src/tax_calculation/types.rs | 101 ++-- .../src/tax_calculation_line_item.rs | 73 ++- ..._registrations_resource_country_options.rs | 307 +++++++---- ...ce_country_options_ca_province_standard.rs | 14 +- ...rations_resource_country_options_canada.rs | 21 +- ...ations_resource_country_options_default.rs | 14 +- ...ns_resource_country_options_eu_standard.rs | 14 +- ...rations_resource_country_options_europe.rs | 16 +- ...ons_resource_country_options_simplified.rs | 14 +- ..._resource_country_options_united_states.rs | 32 +- ..._country_options_us_local_amusement_tax.rs | 14 +- ...urce_country_options_us_local_lease_tax.rs | 14 +- .../tax_product_resource_customer_details.rs | 43 +- ...source_customer_details_resource_tax_id.rs | 16 +- .../src/tax_product_resource_jurisdiction.rs | 27 +- ...roduct_resource_line_item_tax_breakdown.rs | 49 +- ...uct_resource_line_item_tax_rate_details.rs | 26 +- .../tax_product_resource_postal_address.rs | 46 +- .../tax_product_resource_ship_from_details.rs | 14 +- .../src/tax_product_resource_tax_breakdown.rs | 43 +- ..._resource_tax_calculation_shipping_cost.rs | 49 +- .../tax_product_resource_tax_rate_details.rs | 32 +- ..._product_resource_tax_settings_defaults.rs | 17 +- ...oduct_resource_tax_settings_head_office.rs | 14 +- ...ct_resource_tax_settings_status_details.rs | 16 +- ...settings_status_details_resource_active.rs | 10 +- ...ettings_status_details_resource_pending.rs | 14 +- ...transaction_line_item_resource_reversal.rs | 16 +- ...ource_tax_transaction_resource_reversal.rs | 16 +- ..._resource_tax_transaction_shipping_cost.rs | 49 +- .../src/tax_registration/types.rs | 61 ++- .../src/tax_settings/types.rs | 41 +- .../src/tax_transaction/types.rs | 97 +++- .../src/tax_transaction_line_item.rs | 85 ++- .../src/verification_session_redaction.rs | 14 +- .../src/webhook_endpoint/types.rs | 79 ++- .../src/confirmation_token/types.rs | 87 ++- ...nfirmation_tokens_resource_mandate_data.rs | 16 +- ...ndate_data_resource_customer_acceptance.rs | 16 +- ...rce_customer_acceptance_resource_online.rs | 21 +- ..._tokens_resource_payment_method_preview.rs | 247 ++++++--- .../confirmation_tokens_resource_shipping.rs | 24 +- ...thod_config_resource_display_preference.rs | 24 +- ...nfig_resource_payment_method_properties.rs | 23 +- .../src/payment_method_configuration/types.rs | 283 ++++++---- .../src/payment_method_domain/types.rs | 67 ++- ...d_domain_resource_payment_method_status.rs | 17 +- ..._resource_payment_method_status_details.rs | 14 +- .../src/source_mandate_notification.rs | 79 ++- ...ce_mandate_notification_acss_debit_data.rs | 16 +- ...ce_mandate_notification_bacs_debit_data.rs | 14 +- ...ce_mandate_notification_sepa_debit_data.rs | 26 +- .../src/deleted_product_feature.rs | 16 +- .../src/product_feature/types.rs | 26 +- generated/async-stripe-shared/src/account.rs | 141 +++-- .../src/account_annual_revenue.rs | 24 +- .../account_bacs_debit_payments_settings.rs | 23 +- .../src/account_branding_settings.rs | 30 +- .../src/account_business_profile.rs | 81 ++- .../src/account_capabilities.rs | 269 +++++---- .../account_capability_future_requirements.rs | 63 ++- .../src/account_capability_requirements.rs | 63 ++- .../src/account_card_issuing_settings.rs | 14 +- .../src/account_card_payments_settings.rs | 37 +- .../src/account_dashboard_settings.rs | 21 +- .../src/account_decline_charge_on.rs | 17 +- .../src/account_future_requirements.rs | 63 ++- .../src/account_invoices_settings.rs | 14 +- .../src/account_monthly_estimated_revenue.rs | 16 +- .../src/account_payments_settings.rs | 45 +- .../src/account_payout_settings.rs | 28 +- .../src/account_requirements.rs | 63 ++- .../src/account_requirements_alternative.rs | 23 +- .../src/account_requirements_error.rs | 24 +- .../account_sepa_debit_payments_settings.rs | 14 +- .../src/account_settings.rs | 77 ++- .../src/account_terms_of_service.rs | 24 +- .../src/account_tos_acceptance.rs | 27 +- .../src/account_treasury_settings.rs | 14 +- .../account_unification_account_controller.rs | 49 +- ...unt_unification_account_controller_fees.rs | 14 +- ...t_unification_account_controller_losses.rs | 14 +- ...ion_account_controller_stripe_dashboard.rs | 14 +- generated/async-stripe-shared/src/address.rs | 46 +- .../async-stripe-shared/src/api_errors.rs | 93 +++- .../async-stripe-shared/src/application.rs | 16 +- .../src/application_fee.rs | 93 +++- .../src/application_fee_refund.rs | 53 +- .../async-stripe-shared/src/automatic_tax.rs | 24 +- .../src/balance_transaction.rs | 99 ++-- .../async-stripe-shared/src/bank_account.rs | 129 +++-- .../src/billing_details.rs | 27 +- .../src/cancellation_details.rs | 24 +- .../async-stripe-shared/src/capability.rs | 57 +- generated/async-stripe-shared/src/card.rs | 205 ++++--- .../card_issuing_account_terms_of_service.rs | 24 +- .../card_mandate_payment_method_details.rs | 10 +- .../async-stripe-shared/src/cash_balance.rs | 27 +- generated/async-stripe-shared/src/charge.rs | 301 ++++++---- .../src/charge_fraud_details.rs | 21 +- .../async-stripe-shared/src/charge_outcome.rs | 55 +- .../src/charge_transfer_data.rs | 16 +- .../src/checkout_session_item.rs | 79 ++- .../src/connect_account_reference.rs | 16 +- .../src/connect_collection_transfer.rs | 34 +- generated/async-stripe-shared/src/coupon.rs | 111 ++-- .../src/coupon_applies_to.rs | 14 +- .../src/coupon_currency_option.rs | 14 +- .../async-stripe-shared/src/credit_note.rs | 191 ++++--- .../src/credit_note_line_item.rs | 107 ++-- .../src/credit_note_tax_amount.rs | 41 +- .../src/currency_option.rs | 47 +- .../src/custom_unit_amount.rs | 20 +- generated/async-stripe-shared/src/customer.rs | 175 ++++-- .../src/customer_acceptance.rs | 27 +- ...tomer_balance_customer_balance_settings.rs | 23 +- ...saction_resource_adjusted_for_overdraft.rs | 25 +- ...resource_applied_to_payment_transaction.rs | 14 +- ...transaction_resource_funded_transaction.rs | 14 +- ...nded_transaction_resource_bank_transfer.rs | 42 +- ...bank_transfer_resource_eu_bank_transfer.rs | 27 +- ...bank_transfer_resource_gb_bank_transfer.rs | 27 +- ...bank_transfer_resource_jp_bank_transfer.rs | 27 +- ...bank_transfer_resource_us_bank_transfer.rs | 22 +- ...ource_refunded_from_payment_transaction.rs | 17 +- ...saction_resource_transferred_to_balance.rs | 16 +- ...urce_unapplied_from_payment_transaction.rs | 17 +- .../src/customer_balance_transaction.rs | 85 ++- .../src/customer_cash_balance_transaction.rs | 99 ++-- .../async-stripe-shared/src/customer_tax.rs | 24 +- .../src/customer_tax_location.rs | 24 +- .../src/deleted_account.rs | 16 +- .../src/deleted_bank_account.rs | 24 +- .../async-stripe-shared/src/deleted_card.rs | 24 +- .../async-stripe-shared/src/deleted_coupon.rs | 16 +- .../src/deleted_customer.rs | 16 +- .../src/deleted_discount.rs | 79 ++- .../src/deleted_invoice.rs | 16 +- .../src/deleted_invoiceitem.rs | 16 +- .../async-stripe-shared/src/deleted_person.rs | 16 +- .../async-stripe-shared/src/deleted_plan.rs | 16 +- .../src/deleted_product.rs | 16 +- .../src/deleted_subscription_item.rs | 16 +- .../async-stripe-shared/src/deleted_tax_id.rs | 16 +- .../src/deleted_test_helpers_test_clock.rs | 16 +- .../src/destination_details_unimplemented.rs | 10 +- generated/async-stripe-shared/src/discount.rs | 79 ++- .../src/discounts_resource_discount_amount.rs | 16 +- .../discounts_resource_stackable_discount.rs | 24 +- generated/async-stripe-shared/src/dispute.rs | 115 ++-- .../src/dispute_evidence.rs | 191 ++++--- .../src/dispute_evidence_details.rs | 27 +- .../src/dispute_payment_method_details.rs | 16 +- .../dispute_payment_method_details_card.rs | 23 +- .../async-stripe-shared/src/email_sent.rs | 21 +- .../src/entitlements_feature.rs | 46 +- generated/async-stripe-shared/src/error.rs | 14 +- generated/async-stripe-shared/src/event.rs | 67 ++- .../src/external_account_requirements.rs | 32 +- generated/async-stripe-shared/src/fee.rs | 34 +- generated/async-stripe-shared/src/file.rs | 73 ++- .../async-stripe-shared/src/file_link.rs | 56 +- .../src/funding_instructions.rs | 27 +- .../src/funding_instructions_bank_transfer.rs | 26 +- ...g_instructions_bank_transfer_aba_record.rs | 24 +- ...uctions_bank_transfer_financial_address.rs | 58 +- ..._instructions_bank_transfer_iban_record.rs | 32 +- ...ructions_bank_transfer_sort_code_record.rs | 28 +- ..._instructions_bank_transfer_spei_record.rs | 24 +- ...instructions_bank_transfer_swift_record.rs | 24 +- ...nstructions_bank_transfer_zengin_record.rs | 57 +- .../async-stripe-shared/src/internal_card.rs | 34 +- generated/async-stripe-shared/src/invoice.rs | 513 ++++++++++++------ .../src/invoice_installments_card.rs | 14 +- .../async-stripe-shared/src/invoice_item.rs | 147 +++-- .../src/invoice_item_threshold_reason.rs | 21 +- .../src/invoice_line_item.rs | 159 ++++-- .../src/invoice_line_item_period.rs | 16 +- .../src/invoice_mandate_options_card.rs | 24 +- ...voice_payment_method_options_acss_debit.rs | 23 +- ...thod_options_acss_debit_mandate_options.rs | 14 +- ...voice_payment_method_options_bancontact.rs | 16 +- .../invoice_payment_method_options_card.rs | 21 +- ...payment_method_options_customer_balance.rs | 21 +- ..._options_customer_balance_bank_transfer.rs | 17 +- ..._balance_bank_transfer_eu_bank_transfer.rs | 14 +- .../invoice_payment_method_options_konbini.rs | 10 +- ...voice_payment_method_options_sepa_debit.rs | 10 +- ..._payment_method_options_us_bank_account.rs | 23 +- ..._us_bank_account_linked_account_options.rs | 21 +- .../src/invoice_rendering_pdf.rs | 14 +- .../src/invoice_setting_custom_field.rs | 16 +- ...oice_setting_customer_rendering_options.rs | 16 +- .../src/invoice_setting_customer_setting.rs | 36 +- .../src/invoice_setting_quote_setting.rs | 17 +- .../src/invoice_setting_rendering_options.rs | 16 +- ...ing_subscription_schedule_phase_setting.rs | 24 +- ...e_setting_subscription_schedule_setting.rs | 24 +- .../src/invoice_tax_amount.rs | 41 +- .../src/invoice_threshold_reason.rs | 21 +- .../src/invoice_transfer_data.rs | 16 +- .../src/invoices_payment_method_options.rs | 55 +- .../src/invoices_payment_settings.rs | 28 +- .../src/invoices_resource_from_invoice.rs | 16 +- .../invoices_resource_invoice_rendering.rs | 19 +- .../src/invoices_resource_invoice_tax_id.rs | 16 +- ...ices_resource_line_items_credited_items.rs | 23 +- ...s_resource_line_items_proration_details.rs | 14 +- .../src/invoices_resource_shipping_cost.rs | 41 +- .../invoices_resource_status_transitions.rs | 27 +- .../src/issuing_authorization.rs | 161 ++++-- .../issuing_authorization_amount_details.rs | 17 +- ..._authorization_authentication_exemption.rs | 16 +- .../issuing_authorization_merchant_data.rs | 73 ++- .../src/issuing_authorization_network_data.rs | 31 +- .../issuing_authorization_pending_request.rs | 57 +- .../src/issuing_authorization_request.rs | 89 ++- .../issuing_authorization_three_d_secure.rs | 14 +- .../src/issuing_authorization_treasury.rs | 26 +- ...issuing_authorization_verification_data.rs | 57 +- .../async-stripe-shared/src/issuing_card.rs | 155 ++++-- .../src/issuing_card_apple_pay.rs | 17 +- .../issuing_card_authorization_controls.rs | 53 +- .../src/issuing_card_google_pay.rs | 17 +- .../src/issuing_card_shipping.rs | 85 ++- .../src/issuing_card_shipping_customs.rs | 14 +- .../src/issuing_card_spending_limit.rs | 24 +- .../src/issuing_card_wallets.rs | 24 +- .../src/issuing_cardholder.rs | 103 ++-- .../src/issuing_cardholder_address.rs | 14 +- ...suing_cardholder_authorization_controls.rs | 53 +- .../src/issuing_cardholder_card_issuing.rs | 14 +- .../src/issuing_cardholder_company.rs | 14 +- .../src/issuing_cardholder_id_document.rs | 16 +- .../src/issuing_cardholder_individual.rs | 41 +- .../src/issuing_cardholder_individual_dob.rs | 18 +- .../src/issuing_cardholder_requirements.rs | 21 +- .../src/issuing_cardholder_spending_limit.rs | 24 +- ...ssuing_cardholder_user_terms_acceptance.rs | 24 +- .../src/issuing_cardholder_verification.rs | 14 +- .../src/issuing_dispute.rs | 81 ++- .../src/issuing_dispute_canceled_evidence.rs | 77 ++- .../src/issuing_dispute_duplicate_evidence.rs | 51 +- .../src/issuing_dispute_evidence.rs | 61 ++- .../issuing_dispute_fraudulent_evidence.rs | 21 +- ...e_merchandise_not_as_described_evidence.rs | 51 +- .../issuing_dispute_not_received_evidence.rs | 45 +- .../src/issuing_dispute_other_evidence.rs | 39 +- ...spute_service_not_as_described_evidence.rs | 45 +- .../src/issuing_dispute_treasury.rs | 21 +- .../src/issuing_network_token_address.rs | 17 +- .../src/issuing_network_token_device.rs | 48 +- .../src/issuing_network_token_mastercard.rs | 43 +- .../src/issuing_network_token_network_data.rs | 34 +- .../src/issuing_network_token_visa.rs | 41 +- .../issuing_network_token_wallet_provider.rs | 83 +-- .../src/issuing_personalization_design.rs | 85 ++- ...ing_personalization_design_carrier_text.rs | 30 +- ...uing_personalization_design_preferences.rs | 23 +- ...ersonalization_design_rejection_reasons.rs | 21 +- .../src/issuing_physical_bundle.rs | 38 +- .../src/issuing_physical_bundle_features.rs | 24 +- .../async-stripe-shared/src/issuing_token.rs | 83 ++- .../src/issuing_transaction.rs | 141 +++-- .../src/issuing_transaction_amount_details.rs | 17 +- .../src/issuing_transaction_flight_data.rs | 41 +- .../issuing_transaction_flight_data_leg.rs | 51 +- .../src/issuing_transaction_fuel_data.rs | 30 +- .../src/issuing_transaction_lodging_data.rs | 16 +- .../src/issuing_transaction_network_data.rs | 28 +- .../issuing_transaction_purchase_details.rs | 34 +- .../src/issuing_transaction_receipt_data.rs | 27 +- .../src/issuing_transaction_treasury.rs | 21 +- .../src/legal_entity_company.rs | 127 +++-- .../src/legal_entity_company_verification.rs | 14 +- ...al_entity_company_verification_document.rs | 30 +- .../src/legal_entity_dob.rs | 18 +- .../src/legal_entity_japan_address.rs | 51 +- .../src/legal_entity_person_verification.rs | 43 +- ...gal_entity_person_verification_document.rs | 30 +- .../src/legal_entity_ubo_declaration.rs | 24 +- generated/async-stripe-shared/src/level3.rs | 55 +- .../src/level3_line_items.rs | 51 +- .../src/line_items_discount_amount.rs | 16 +- .../src/line_items_tax_amount.rs | 27 +- .../linked_account_options_us_bank_account.rs | 24 +- generated/async-stripe-shared/src/mandate.rs | 75 ++- .../src/mandate_acss_debit.rs | 39 +- .../src/mandate_amazon_pay.rs | 10 +- .../src/mandate_au_becs_debit.rs | 14 +- .../src/mandate_bacs_debit.rs | 30 +- .../src/mandate_cashapp.rs | 10 +- .../async-stripe-shared/src/mandate_link.rs | 10 +- .../src/mandate_multi_use.rs | 10 +- .../src/mandate_payment_method_details.rs | 85 ++- .../async-stripe-shared/src/mandate_paypal.rs | 23 +- .../src/mandate_revolut_pay.rs | 10 +- .../src/mandate_sepa_debit.rs | 16 +- .../src/mandate_single_use.rs | 16 +- .../src/mandate_us_bank_account.rs | 14 +- generated/async-stripe-shared/src/networks.rs | 17 +- .../src/notification_event_data.rs | 23 +- .../src/notification_event_request.rs | 17 +- .../src/offline_acceptance.rs | 10 +- .../src/online_acceptance.rs | 21 +- .../src/package_dimensions.rs | 27 +- .../src/payment_flows_amount_details.rs | 14 +- ...yment_flows_amount_details_resource_tip.rs | 14 +- ...utomatic_payment_methods_payment_intent.rs | 17 +- ..._automatic_payment_methods_setup_intent.rs | 17 +- ...nt_flows_private_payment_methods_alipay.rs | 10 +- ..._private_payment_methods_alipay_details.rs | 24 +- ...ed_authorization_extended_authorization.rs | 17 +- ...authorization_incremental_authorization.rs | 17 +- ...rprise_features_overcapture_overcapture.rs | 22 +- ..._card_details_api_resource_multicapture.rs | 14 +- ...lows_private_payment_methods_klarna_dob.rs | 18 +- .../async-stripe-shared/src/payment_intent.rs | 261 +++++---- .../src/payment_intent_card_processing.rs | 14 +- .../src/payment_intent_next_action.rs | 135 +++-- ...tent_next_action_alipay_handle_redirect.rs | 30 +- .../src/payment_intent_next_action_boleto.rs | 32 +- ...ent_next_action_card_await_notification.rs | 21 +- ...happ_handle_redirect_or_display_qr_code.rs | 26 +- ...ment_intent_next_action_cashapp_qr_code.rs | 24 +- ...tion_display_bank_transfer_instructions.rs | 51 +- ...intent_next_action_display_oxxo_details.rs | 26 +- .../src/payment_intent_next_action_konbini.rs | 26 +- ...t_intent_next_action_konbini_familymart.rs | 23 +- ...yment_intent_next_action_konbini_lawson.rs | 23 +- ...ent_intent_next_action_konbini_ministop.rs | 23 +- ...nt_intent_next_action_konbini_seicomart.rs | 23 +- ...yment_intent_next_action_konbini_stores.rs | 30 +- ...tent_next_action_paynow_display_qr_code.rs | 36 +- ..._intent_next_action_pix_display_qr_code.rs | 43 +- ...t_next_action_promptpay_display_qr_code.rs | 36 +- ...ment_intent_next_action_redirect_to_url.rs | 16 +- ...wish_handle_redirect_or_display_qr_code.rs | 26 +- ...ayment_intent_next_action_swish_qr_code.rs | 24 +- ...t_next_action_verify_with_microdeposits.rs | 24 +- ..._next_action_wechat_pay_display_qr_code.rs | 43 +- ...tion_wechat_pay_redirect_to_android_app.rs | 51 +- ...t_action_wechat_pay_redirect_to_ios_app.rs | 14 +- .../payment_intent_payment_method_options.rs | 235 +++++--- ...ntent_payment_method_options_acss_debit.rs | 28 +- ...nt_payment_method_options_au_becs_debit.rs | 16 +- ...ment_intent_payment_method_options_blik.rs | 16 +- ...ment_intent_payment_method_options_card.rs | 97 ++-- ...yment_intent_payment_method_options_eps.rs | 16 +- ...ment_intent_payment_method_options_link.rs | 26 +- ...thod_options_mandate_options_acss_debit.rs | 41 +- ...thod_options_mandate_options_sepa_debit.rs | 10 +- ...intent_payment_method_options_mobilepay.rs | 23 +- ...ntent_payment_method_options_sepa_debit.rs | 23 +- ...ent_intent_payment_method_options_swish.rs | 23 +- ..._payment_method_options_us_bank_account.rs | 47 +- .../src/payment_intent_processing.rs | 16 +- ...intent_processing_customer_notification.rs | 23 +- .../async-stripe-shared/src/payment_link.rs | 211 ++++--- ...payment_links_resource_after_completion.rs | 26 +- .../payment_links_resource_automatic_tax.rs | 16 +- ...yment_links_resource_completed_sessions.rs | 16 +- ...e_completion_behavior_confirmation_page.rs | 14 +- ...s_resource_completion_behavior_redirect.rs | 14 +- ...yment_links_resource_consent_collection.rs | 24 +- .../payment_links_resource_custom_fields.rs | 51 +- ...t_links_resource_custom_fields_dropdown.rs | 14 +- ..._resource_custom_fields_dropdown_option.rs | 16 +- ...ment_links_resource_custom_fields_label.rs | 16 +- ...nt_links_resource_custom_fields_numeric.rs | 21 +- ...yment_links_resource_custom_fields_text.rs | 21 +- .../src/payment_links_resource_custom_text.rs | 36 +- ...ent_links_resource_custom_text_position.rs | 14 +- ...payment_links_resource_invoice_creation.rs | 17 +- ...payment_links_resource_invoice_settings.rs | 55 +- ...ment_links_resource_payment_intent_data.rs | 59 +- ...resource_payment_method_reuse_agreement.rs | 14 +- ..._links_resource_phone_number_collection.rs | 14 +- .../payment_links_resource_restrictions.rs | 16 +- ...ks_resource_shipping_address_collection.rs | 14 +- .../payment_links_resource_shipping_option.rs | 21 +- ...ayment_links_resource_subscription_data.rs | 43 +- ...urce_subscription_data_invoice_settings.rs | 14 +- ...ayment_links_resource_tax_id_collection.rs | 14 +- .../payment_links_resource_transfer_data.rs | 16 +- .../async-stripe-shared/src/payment_method.rs | 283 ++++++---- .../src/payment_method_acss_debit.rs | 43 +- .../src/payment_method_affirm.rs | 10 +- .../src/payment_method_afterpay_clearpay.rs | 10 +- .../src/payment_method_amazon_pay.rs | 10 +- .../src/payment_method_au_becs_debit.rs | 24 +- .../src/payment_method_bacs_debit.rs | 24 +- .../src/payment_method_bancontact.rs | 10 +- .../src/payment_method_blik.rs | 10 +- .../src/payment_method_boleto.rs | 14 +- .../src/payment_method_card.rs | 105 ++-- .../src/payment_method_card_checks.rs | 28 +- .../src/payment_method_card_present.rs | 91 +++- .../payment_method_card_present_networks.rs | 17 +- .../src/payment_method_card_wallet.rs | 67 ++- ...ethod_card_wallet_amex_express_checkout.rs | 10 +- .../payment_method_card_wallet_apple_pay.rs | 10 +- .../payment_method_card_wallet_google_pay.rs | 10 +- .../src/payment_method_card_wallet_link.rs | 10 +- .../payment_method_card_wallet_masterpass.rs | 30 +- .../payment_method_card_wallet_samsung_pay.rs | 10 +- ...ayment_method_card_wallet_visa_checkout.rs | 30 +- .../src/payment_method_cashapp.rs | 17 +- ...iz_payment_method_configuration_details.rs | 16 +- .../src/payment_method_customer_balance.rs | 10 +- .../src/payment_method_details.rs | 281 ++++++---- ...ment_method_details_ach_credit_transfer.rs | 30 +- .../src/payment_method_details_ach_debit.rs | 51 +- .../src/payment_method_details_acss_debit.rs | 51 +- .../src/payment_method_details_affirm.rs | 10 +- ...ayment_method_details_afterpay_clearpay.rs | 17 +- .../src/payment_method_details_amazon_pay.rs | 10 +- .../payment_method_details_au_becs_debit.rs | 30 +- .../src/payment_method_details_bacs_debit.rs | 30 +- .../src/payment_method_details_bancontact.rs | 65 ++- .../src/payment_method_details_blik.rs | 10 +- .../src/payment_method_details_boleto.rs | 14 +- .../src/payment_method_details_card.rs | 157 ++++-- .../src/payment_method_details_card_checks.rs | 28 +- ...ayment_method_details_card_installments.rs | 14 +- ...t_method_details_card_installments_plan.rs | 20 +- ...yment_method_details_card_network_token.rs | 14 +- .../payment_method_details_card_present.rs | 139 +++-- ...ent_method_details_card_present_offline.rs | 14 +- ...ent_method_details_card_present_receipt.rs | 71 ++- .../src/payment_method_details_card_wallet.rs | 67 ++- ...tails_card_wallet_amex_express_checkout.rs | 10 +- ...nt_method_details_card_wallet_apple_pay.rs | 10 +- ...t_method_details_card_wallet_google_pay.rs | 10 +- ...payment_method_details_card_wallet_link.rs | 10 +- ...t_method_details_card_wallet_masterpass.rs | 30 +- ..._method_details_card_wallet_samsung_pay.rs | 10 +- ...ethod_details_card_wallet_visa_checkout.rs | 30 +- .../src/payment_method_details_cashapp.rs | 17 +- ...payment_method_details_customer_balance.rs | 10 +- .../src/payment_method_details_eps.rs | 16 +- .../src/payment_method_details_fpx.rs | 26 +- .../src/payment_method_details_giropay.rs | 30 +- .../src/payment_method_details_grabpay.rs | 14 +- .../src/payment_method_details_ideal.rs | 51 +- .../payment_method_details_interac_present.rs | 115 ++-- ..._method_details_interac_present_receipt.rs | 71 ++- .../src/payment_method_details_klarna.rs | 21 +- .../src/payment_method_details_konbini.rs | 14 +- .../payment_method_details_konbini_store.rs | 14 +- .../src/payment_method_details_link.rs | 14 +- .../src/payment_method_details_mobilepay.rs | 14 +- .../src/payment_method_details_multibanco.rs | 17 +- .../src/payment_method_details_oxxo.rs | 14 +- .../src/payment_method_details_p24.rs | 24 +- .../src/payment_method_details_paynow.rs | 14 +- .../src/payment_method_details_paypal.rs | 41 +- .../src/payment_method_details_pix.rs | 16 +- .../src/payment_method_details_promptpay.rs | 14 +- .../src/payment_method_details_revolut_pay.rs | 10 +- ...ent_method_details_sepa_credit_transfer.rs | 24 +- .../src/payment_method_details_sepa_debit.rs | 46 +- .../src/payment_method_details_sofort.rs | 71 ++- .../payment_method_details_stripe_account.rs | 10 +- .../src/payment_method_details_swish.rs | 28 +- .../payment_method_details_us_bank_account.rs | 63 ++- .../src/payment_method_details_wechat.rs | 10 +- .../src/payment_method_details_wechat_pay.rs | 21 +- .../src/payment_method_details_zip.rs | 10 +- .../src/payment_method_eps.rs | 14 +- .../src/payment_method_fpx.rs | 19 +- .../src/payment_method_giropay.rs | 10 +- .../src/payment_method_grabpay.rs | 10 +- .../src/payment_method_ideal.rs | 16 +- .../src/payment_method_interac_present.rs | 97 +++- .../src/payment_method_klarna.rs | 14 +- .../src/payment_method_konbini.rs | 10 +- .../src/payment_method_link.rs | 21 +- .../src/payment_method_mobilepay.rs | 10 +- .../src/payment_method_options_affirm.rs | 26 +- ...ayment_method_options_afterpay_clearpay.rs | 26 +- .../src/payment_method_options_alipay.rs | 16 +- .../src/payment_method_options_amazon_pay.rs | 23 +- .../src/payment_method_options_bacs_debit.rs | 16 +- .../src/payment_method_options_bancontact.rs | 25 +- .../src/payment_method_options_boleto.rs | 25 +- ...ayment_method_options_card_installments.rs | 24 +- ...ent_method_options_card_mandate_options.rs | 67 ++- .../payment_method_options_card_present.rs | 27 +- .../src/payment_method_options_cashapp.rs | 23 +- ...payment_method_options_customer_balance.rs | 26 +- ..._options_customer_balance_bank_transfer.rs | 24 +- ...ptions_customer_balance_eu_bank_account.rs | 14 +- .../src/payment_method_options_fpx.rs | 16 +- .../src/payment_method_options_giropay.rs | 16 +- .../src/payment_method_options_grabpay.rs | 16 +- .../src/payment_method_options_ideal.rs | 16 +- .../payment_method_options_interac_present.rs | 10 +- .../src/payment_method_options_klarna.rs | 26 +- .../src/payment_method_options_konbini.rs | 51 +- .../src/payment_method_options_oxxo.rs | 25 +- .../src/payment_method_options_p24.rs | 16 +- .../src/payment_method_options_paynow.rs | 16 +- .../src/payment_method_options_paypal.rs | 38 +- .../src/payment_method_options_pix.rs | 26 +- .../src/payment_method_options_promptpay.rs | 16 +- .../src/payment_method_options_revolut_pay.rs | 23 +- .../src/payment_method_options_sofort.rs | 25 +- ...options_us_bank_account_mandate_options.rs | 14 +- .../src/payment_method_options_wechat_pay.rs | 26 +- .../src/payment_method_options_zip.rs | 16 +- .../src/payment_method_oxxo.rs | 10 +- .../src/payment_method_p24.rs | 14 +- .../src/payment_method_paynow.rs | 10 +- .../src/payment_method_paypal.rs | 21 +- .../src/payment_method_pix.rs | 10 +- .../src/payment_method_promptpay.rs | 10 +- .../src/payment_method_revolut_pay.rs | 10 +- .../src/payment_method_sepa_debit.rs | 46 +- .../src/payment_method_sofort.rs | 14 +- .../src/payment_method_swish.rs | 10 +- .../src/payment_method_us_bank_account.rs | 69 ++- .../payment_method_us_bank_account_blocked.rs | 16 +- ...t_method_us_bank_account_status_details.rs | 14 +- .../src/payment_method_wechat_pay.rs | 10 +- .../src/payment_method_zip.rs | 10 +- generated/async-stripe-shared/src/payout.rs | 149 +++-- .../src/paypal_seller_protection.rs | 23 +- generated/async-stripe-shared/src/period.rs | 16 +- generated/async-stripe-shared/src/person.rs | 203 ++++--- .../src/person_additional_tos_acceptance.rs | 24 +- .../src/person_additional_tos_acceptances.rs | 14 +- .../src/person_future_requirements.rs | 51 +- .../src/person_relationship.rs | 55 +- .../src/person_requirements.rs | 51 +- generated/async-stripe-shared/src/plan.rs | 133 +++-- .../async-stripe-shared/src/plan_tier.rs | 47 +- .../src/platform_tax_fee.rs | 32 +- generated/async-stripe-shared/src/price.rs | 139 +++-- .../async-stripe-shared/src/price_tier.rs | 47 +- generated/async-stripe-shared/src/product.rs | 127 +++-- .../src/product_marketing_feature.rs | 14 +- .../async-stripe-shared/src/promotion_code.rs | 85 ++- .../src/promotion_code_currency_option.rs | 14 +- .../promotion_codes_resource_restrictions.rs | 37 +- generated/async-stripe-shared/src/quote.rs | 219 +++++--- .../src/quotes_resource_automatic_tax.rs | 24 +- .../src/quotes_resource_computed.rs | 17 +- .../src/quotes_resource_from_quote.rs | 16 +- .../src/quotes_resource_recurring.rs | 43 +- .../src/quotes_resource_status_transitions.rs | 24 +- ...rce_subscription_data_subscription_data.rs | 30 +- .../src/quotes_resource_total_details.rs | 27 +- ...source_total_details_resource_breakdown.rs | 16 +- .../src/quotes_resource_transfer_data.rs | 24 +- .../src/quotes_resource_upfront.rs | 30 +- .../src/radar_radar_options.rs | 14 +- .../src/radar_review_resource_location.rs | 34 +- .../src/radar_review_resource_session.rs | 30 +- .../async-stripe-shared/src/recurring.rs | 49 +- generated/async-stripe-shared/src/refund.rs | 133 +++-- .../src/refund_destination_details.rs | 193 ++++--- .../src/refund_destination_details_card.rs | 30 +- .../src/refund_destination_details_generic.rs | 21 +- .../src/refund_next_action.rs | 21 +- .../src/refund_next_action_display_details.rs | 17 +- .../src/reserve_transaction.rs | 27 +- generated/async-stripe-shared/src/review.rs | 93 +++- generated/async-stripe-shared/src/rule.rs | 24 +- .../src/schedules_phase_automatic_tax.rs | 16 +- .../src/sepa_debit_generated_from.rs | 21 +- .../async-stripe-shared/src/setup_attempt.rs | 97 +++- .../setup_attempt_payment_method_details.rs | 121 +++-- ...tempt_payment_method_details_acss_debit.rs | 10 +- ...tempt_payment_method_details_amazon_pay.rs | 10 +- ...pt_payment_method_details_au_becs_debit.rs | 10 +- ...tempt_payment_method_details_bacs_debit.rs | 10 +- ...tempt_payment_method_details_bancontact.rs | 65 ++- ...p_attempt_payment_method_details_boleto.rs | 10 +- ...tup_attempt_payment_method_details_card.rs | 97 +++- ...empt_payment_method_details_card_checks.rs | 28 +- ...mpt_payment_method_details_card_present.rs | 17 +- ...empt_payment_method_details_card_wallet.rs | 24 +- ..._attempt_payment_method_details_cashapp.rs | 10 +- ...up_attempt_payment_method_details_ideal.rs | 51 +- ...p_attempt_payment_method_details_klarna.rs | 10 +- ...tup_attempt_payment_method_details_link.rs | 10 +- ...p_attempt_payment_method_details_paypal.rs | 10 +- ...empt_payment_method_details_revolut_pay.rs | 10 +- ...tempt_payment_method_details_sepa_debit.rs | 10 +- ...p_attempt_payment_method_details_sofort.rs | 65 ++- ..._payment_method_details_us_bank_account.rs | 10 +- .../async-stripe-shared/src/setup_intent.rs | 165 ++++-- .../src/setup_intent_next_action.rs | 46 +- ...etup_intent_next_action_redirect_to_url.rs | 16 +- ...t_next_action_verify_with_microdeposits.rs | 24 +- .../setup_intent_payment_method_options.rs | 61 ++- ...ntent_payment_method_options_acss_debit.rs | 26 +- ...ntent_payment_method_options_amazon_pay.rs | 10 +- ...etup_intent_payment_method_options_card.rs | 24 +- ...ent_method_options_card_mandate_options.rs | 73 ++- ...ent_payment_method_options_card_present.rs | 10 +- ...etup_intent_payment_method_options_link.rs | 14 +- ...thod_options_mandate_options_acss_debit.rs | 47 +- ...thod_options_mandate_options_sepa_debit.rs | 10 +- ...up_intent_payment_method_options_paypal.rs | 16 +- ...ntent_payment_method_options_sepa_debit.rs | 14 +- ..._payment_method_options_us_bank_account.rs | 26 +- generated/async-stripe-shared/src/shipping.rs | 34 +- .../async-stripe-shared/src/shipping_rate.rs | 79 ++- .../src/shipping_rate_currency_option.rs | 16 +- .../src/shipping_rate_delivery_estimate.rs | 16 +- .../shipping_rate_delivery_estimate_bound.rs | 16 +- .../src/shipping_rate_fixed_amount.rs | 24 +- generated/async-stripe-shared/src/source.rs | 241 +++++--- .../src/source_code_verification_flow.rs | 23 +- .../async-stripe-shared/src/source_order.rs | 34 +- .../src/source_order_item.rs | 46 +- .../async-stripe-shared/src/source_owner.rs | 61 ++- .../src/source_receiver_flow.rs | 49 +- .../src/source_redirect_flow.rs | 30 +- .../src/source_transaction.rs | 99 ++-- ...ce_transaction_ach_credit_transfer_data.rs | 30 +- ...ce_transaction_chf_credit_transfer_data.rs | 45 +- ...ce_transaction_gbp_credit_transfer_data.rs | 55 +- .../source_transaction_paper_check_data.rs | 21 +- ...e_transaction_sepa_credit_transfer_data.rs | 24 +- .../src/source_type_ach_credit_transfer.rs | 61 ++- .../src/source_type_ach_debit.rs | 46 +- .../src/source_type_acss_debit.rs | 77 ++- .../src/source_type_alipay.rs | 26 +- .../src/source_type_au_becs_debit.rs | 24 +- .../src/source_type_bancontact.rs | 53 +- .../src/source_type_card.rs | 119 ++-- .../src/source_type_card_present.rs | 173 ++++-- .../src/source_type_eps.rs | 23 +- .../src/source_type_giropay.rs | 32 +- .../src/source_type_ideal.rs | 32 +- .../src/source_type_klarna.rs | 181 +++--- .../src/source_type_multibanco.rs | 86 +-- .../src/source_type_p24.rs | 14 +- .../src/source_type_sepa_credit_transfer.rs | 92 ++-- .../src/source_type_sepa_debit.rs | 55 +- .../src/source_type_sofort.rs | 59 +- .../src/source_type_three_d_secure.rs | 137 +++-- .../src/source_type_wechat.rs | 26 +- .../async-stripe-shared/src/subscription.rs | 291 ++++++---- .../src/subscription_automatic_tax.rs | 16 +- .../src/subscription_billing_thresholds.rs | 21 +- .../src/subscription_details_data.rs | 14 +- .../src/subscription_item.rs | 75 ++- .../subscription_item_billing_thresholds.rs | 14 +- ...ubscription_payment_method_options_card.rs | 24 +- ...scription_pending_invoice_item_interval.rs | 17 +- .../src/subscription_schedule.rs | 115 ++-- .../subscription_schedule_add_invoice_item.rs | 27 +- ...ubscription_schedule_configuration_item.rs | 57 +- .../subscription_schedule_current_phase.rs | 16 +- ...bscription_schedule_phase_configuration.rs | 145 +++-- ...ion_schedules_resource_default_settings.rs | 77 ++- ...resource_default_settings_automatic_tax.rs | 16 +- .../src/subscription_transfer_data.rs | 21 +- ...ns_resource_billing_cycle_anchor_config.rs | 30 +- ...subscriptions_resource_pause_collection.rs | 16 +- ...iptions_resource_payment_method_options.rs | 55 +- ...subscriptions_resource_payment_settings.rs | 33 +- .../subscriptions_resource_pending_update.rs | 47 +- ...scriptions_trials_resource_end_behavior.rs | 14 +- ...riptions_trials_resource_trial_settings.rs | 14 +- generated/async-stripe-shared/src/tax_code.rs | 24 +- .../src/tax_deducted_at_source.rs | 36 +- .../async-stripe-shared/src/tax_i_ds_owner.rs | 27 +- generated/async-stripe-shared/src/tax_id.rs | 67 ++- .../src/tax_id_verification.rs | 24 +- generated/async-stripe-shared/src/tax_rate.rs | 107 ++-- .../src/test_helpers_test_clock.rs | 51 +- .../src/three_d_secure_details.rs | 51 +- .../src/three_d_secure_details_charge.rs | 65 ++- .../src/three_d_secure_usage.rs | 14 +- .../src/token_card_networks.rs | 14 +- generated/async-stripe-shared/src/topup.rs | 107 ++-- generated/async-stripe-shared/src/transfer.rs | 115 ++-- .../async-stripe-shared/src/transfer_data.rs | 16 +- .../src/transfer_reversal.rs | 69 ++- .../src/transfer_schedule.rs | 30 +- .../src/transform_quantity.rs | 16 +- .../src/transform_usage.rs | 16 +- .../src/us_bank_account_networks.rs | 17 +- .../src/usage_record_summary.rs | 46 +- .../src/deleted_terminal_configuration.rs | 16 +- .../src/deleted_terminal_location.rs | 16 +- .../src/deleted_terminal_reader.rs | 16 +- .../src/terminal_configuration/types.rs | 63 ++- ...ation_resource_currency_specific_config.rs | 26 +- ...on_resource_device_type_specific_config.rs | 14 +- ...n_configuration_resource_offline_config.rs | 14 +- ...guration_configuration_resource_tipping.rs | 86 +-- .../src/terminal_connection_token/types.rs | 16 +- .../src/terminal_location/types.rs | 49 +- .../src/terminal_reader/types.rs | 79 ++- .../terminal_reader_reader_resource_cart.rs | 27 +- ...rminal_reader_reader_resource_line_item.rs | 24 +- ...l_reader_reader_resource_process_config.rs | 24 +- ..._resource_process_payment_intent_action.rs | 21 +- ...er_reader_resource_process_setup_config.rs | 14 +- ...er_resource_process_setup_intent_action.rs | 24 +- ...al_reader_reader_resource_reader_action.rs | 65 ++- ...r_reader_resource_refund_payment_action.rs | 67 ++- ...r_reader_resource_refund_payment_config.rs | 14 +- ...ader_resource_set_reader_display_action.rs | 16 +- ...l_reader_reader_resource_tipping_config.rs | 14 +- .../src/inbound_transfers.rs | 24 +- ..._payment_method_details_us_bank_account.rs | 63 ++- ...utbound_payments_payment_method_details.rs | 36 +- ...ayment_method_details_financial_account.rs | 16 +- ..._payment_method_details_us_bank_account.rs | 63 ++- ...tbound_transfers_payment_method_details.rs | 24 +- ..._payment_method_details_us_bank_account.rs | 63 ++- ...ayment_method_details_financial_account.rs | 16 +- .../src/treasury_credit_reversal/types.rs | 93 +++- .../src/treasury_debit_reversal/types.rs | 99 ++-- .../src/treasury_financial_account/types.rs | 109 ++-- .../treasury_financial_account_features.rs | 61 ++- ..._financial_accounts_resource_aba_record.rs | 47 +- ...l_accounts_resource_aba_toggle_settings.rs | 24 +- ...l_accounts_resource_ach_toggle_settings.rs | 24 +- ...ury_financial_accounts_resource_balance.rs | 24 +- ...accounts_resource_closed_status_details.rs | 14 +- ...ial_accounts_resource_financial_address.rs | 26 +- ...s_resource_financial_addresses_features.rs | 14 +- ...ial_accounts_resource_inbound_transfers.rs | 14 +- ...ial_accounts_resource_outbound_payments.rs | 21 +- ...al_accounts_resource_outbound_transfers.rs | 21 +- ...accounts_resource_platform_restrictions.rs | 21 +- ...ancial_accounts_resource_status_details.rs | 14 +- ...ncial_accounts_resource_toggle_settings.rs | 24 +- ...resource_toggles_setting_status_details.rs | 24 +- .../src/treasury_inbound_transfer/types.rs | 131 +++-- ...ound_transfers_resource_failure_details.rs | 14 +- ..._inbound_transfer_resource_linked_flows.rs | 14 +- ...nd_transfer_resource_status_transitions.rs | 24 +- .../src/treasury_outbound_payment/types.rs | 139 +++-- ...bound_payment_resource_end_user_details.rs | 16 +- ...und_payment_resource_status_transitions.rs | 27 +- ...bound_payments_resource_returned_status.rs | 16 +- .../src/treasury_outbound_transfer/types.rs | 127 +++-- ...und_transfers_resource_returned_details.rs | 16 +- ...d_transfers_resource_status_transitions.rs | 27 +- .../src/treasury_received_credit/types.rs | 103 ++-- ..._received_credits_resource_linked_flows.rs | 53 +- ...eived_credits_resource_reversal_details.rs | 17 +- ...d_credits_resource_source_flows_details.rs | 30 +- ...ved_credits_resource_status_transitions.rs | 14 +- .../src/treasury_received_debit/types.rs | 103 ++-- ...ts_resource_debit_reversal_linked_flows.rs | 14 +- ...y_received_debits_resource_linked_flows.rs | 45 +- ...ceived_debits_resource_reversal_details.rs | 17 +- ...ived_debits_resource_status_transitions.rs | 14 +- ...reasury_shared_resource_billing_details.rs | 24 +- ...tails_initiating_payment_method_details.rs | 42 +- ..._payment_method_details_us_bank_account.rs | 24 +- .../src/treasury_transaction/types.rs | 99 ++-- .../src/treasury_transaction_entry/types.rs | 85 ++- ...transaction_resource_status_transitions.rs | 16 +- ...ry_transactions_resource_balance_impact.rs | 24 +- ...sury_transactions_resource_flow_details.rs | 67 ++- openapi/src/templates/miniserde.rs | 27 +- 961 files changed, 25646 insertions(+), 11888 deletions(-) diff --git a/generated/async-stripe-billing/src/billing_meter/types.rs b/generated/async-stripe-billing/src/billing_meter/types.rs index f927a774d..e35b3e895 100644 --- a/generated/async-stripe-billing/src/billing_meter/types.rs +++ b/generated/async-stripe-billing/src/billing_meter/types.rs @@ -42,7 +42,12 @@ pub struct BillingMeterBuilder { value_settings: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -111,19 +116,49 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(created), + Some(customer_mapping), + Some(default_aggregation), + Some(display_name), + Some(event_name), + Some(event_time_window), + Some(id), + Some(livemode), + Some(status), + Some(status_transitions), + Some(updated), + Some(value_settings), + ) = ( + self.created, + self.customer_mapping.take(), + self.default_aggregation, + self.display_name.take(), + self.event_name.take(), + self.event_time_window, + self.id.take(), + self.livemode, + self.status, + self.status_transitions, + self.updated, + self.value_settings.take(), + ) + else { + return None; + }; Some(Self::Out { - created: self.created?, - customer_mapping: self.customer_mapping.take()?, - default_aggregation: self.default_aggregation?, - display_name: self.display_name.take()?, - event_name: self.event_name.take()?, - event_time_window: self.event_time_window?, - id: self.id.take()?, - livemode: self.livemode?, - status: self.status?, - status_transitions: self.status_transitions?, - updated: self.updated?, - value_settings: self.value_settings.take()?, + created, + customer_mapping, + default_aggregation, + display_name, + event_name, + event_time_window, + id, + livemode, + status, + status_transitions, + updated, + value_settings, }) } } @@ -151,22 +186,18 @@ const _: () = { let mut b = BillingMeterBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "customer_mapping" => b.customer_mapping = Some(FromValueOpt::from_value(v)?), - "default_aggregation" => { - b.default_aggregation = Some(FromValueOpt::from_value(v)?) - } - "display_name" => b.display_name = Some(FromValueOpt::from_value(v)?), - "event_name" => b.event_name = Some(FromValueOpt::from_value(v)?), - "event_time_window" => b.event_time_window = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_transitions" => { - b.status_transitions = Some(FromValueOpt::from_value(v)?) - } - "updated" => b.updated = Some(FromValueOpt::from_value(v)?), - "value_settings" => b.value_settings = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "customer_mapping" => b.customer_mapping = FromValueOpt::from_value(v), + "default_aggregation" => b.default_aggregation = FromValueOpt::from_value(v), + "display_name" => b.display_name = FromValueOpt::from_value(v), + "event_name" => b.event_name = FromValueOpt::from_value(v), + "event_time_window" => b.event_time_window = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "status_transitions" => b.status_transitions = FromValueOpt::from_value(v), + "updated" => b.updated = FromValueOpt::from_value(v), + "value_settings" => b.value_settings = FromValueOpt::from_value(v), _ => {} } 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..a0f9ae116 100644 --- a/generated/async-stripe-billing/src/billing_meter_event/types.rs +++ b/generated/async-stripe-billing/src/billing_meter_event/types.rs @@ -29,7 +29,12 @@ pub struct BillingMeterEventBuilder { timestamp: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -86,14 +91,25 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - created: self.created?, - event_name: self.event_name.take()?, - identifier: self.identifier.take()?, - livemode: self.livemode?, - payload: self.payload.take()?, - timestamp: self.timestamp?, - }) + let ( + Some(created), + Some(event_name), + Some(identifier), + Some(livemode), + Some(payload), + Some(timestamp), + ) = ( + self.created, + self.event_name.take(), + self.identifier.take(), + self.livemode, + self.payload.take(), + self.timestamp, + ) + else { + return None; + }; + Some(Self::Out { created, event_name, identifier, livemode, payload, timestamp }) } } @@ -120,12 +136,12 @@ const _: () = { let mut b = BillingMeterEventBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "event_name" => b.event_name = Some(FromValueOpt::from_value(v)?), - "identifier" => b.identifier = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "payload" => b.payload = Some(FromValueOpt::from_value(v)?), - "timestamp" => b.timestamp = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "event_name" => b.event_name = FromValueOpt::from_value(v), + "identifier" => b.identifier = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "payload" => b.payload = FromValueOpt::from_value(v), + "timestamp" => b.timestamp = FromValueOpt::from_value(v), _ => {} } 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..a05e6d578 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 @@ -25,7 +25,12 @@ pub struct BillingMeterEventAdjustmentBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -80,13 +85,16 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - cancel: self.cancel.take()?, - event_name: self.event_name.take()?, - livemode: self.livemode?, - status: self.status?, - type_: self.type_?, - }) + let (Some(cancel), Some(event_name), Some(livemode), Some(status), Some(type_)) = ( + self.cancel.take(), + self.event_name.take(), + self.livemode, + self.status, + self.type_, + ) else { + return None; + }; + Some(Self::Out { cancel, event_name, livemode, status, type_ }) } } @@ -113,11 +121,11 @@ const _: () = { let mut b = BillingMeterEventAdjustmentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "cancel" => b.cancel = Some(FromValueOpt::from_value(v)?), - "event_name" => b.event_name = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "cancel" => b.cancel = FromValueOpt::from_value(v), + "event_name" => b.event_name = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } 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..ff49a6c23 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 @@ -28,7 +28,12 @@ pub struct BillingMeterEventSummaryBuilder { start_time: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -85,14 +90,25 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - aggregated_value: self.aggregated_value?, - end_time: self.end_time?, - id: self.id.take()?, - livemode: self.livemode?, - meter: self.meter.take()?, - start_time: self.start_time?, - }) + let ( + Some(aggregated_value), + Some(end_time), + Some(id), + Some(livemode), + Some(meter), + Some(start_time), + ) = ( + self.aggregated_value, + self.end_time, + self.id.take(), + self.livemode, + self.meter.take(), + self.start_time, + ) + else { + return None; + }; + Some(Self::Out { aggregated_value, end_time, id, livemode, meter, start_time }) } } @@ -119,12 +135,12 @@ const _: () = { let mut b = BillingMeterEventSummaryBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "aggregated_value" => b.aggregated_value = Some(FromValueOpt::from_value(v)?), - "end_time" => b.end_time = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "meter" => b.meter = Some(FromValueOpt::from_value(v)?), - "start_time" => b.start_time = Some(FromValueOpt::from_value(v)?), + "aggregated_value" => b.aggregated_value = FromValueOpt::from_value(v), + "end_time" => b.end_time = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "meter" => b.meter = FromValueOpt::from_value(v), + "start_time" => b.start_time = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/billing_meter_resource_aggregation_settings.rs b/generated/async-stripe-billing/src/billing_meter_resource_aggregation_settings.rs index 991da3c24..d3e85b1a0 100644 --- a/generated/async-stripe-billing/src/billing_meter_resource_aggregation_settings.rs +++ b/generated/async-stripe-billing/src/billing_meter_resource_aggregation_settings.rs @@ -10,7 +10,12 @@ pub struct BillingMeterResourceAggregationSettingsBuilder { formula: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { formula: self.formula? }) + let (Some(formula),) = (self.formula,) else { + return None; + }; + Some(Self::Out { formula }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = BillingMeterResourceAggregationSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "formula" => b.formula = Some(FromValueOpt::from_value(v)?), + "formula" => b.formula = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_event_adjustment_cancel.rs b/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_event_adjustment_cancel.rs index e73eaaf85..cf7513851 100644 --- a/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_event_adjustment_cancel.rs +++ b/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_event_adjustment_cancel.rs @@ -10,7 +10,12 @@ pub struct BillingMeterResourceBillingMeterEventAdjustmentCancelBuilder { identifier: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { identifier: self.identifier.take()? }) + let (Some(identifier),) = (self.identifier.take(),) else { + return None; + }; + Some(Self::Out { identifier }) } } @@ -84,7 +92,7 @@ const _: () = { BillingMeterResourceBillingMeterEventAdjustmentCancelBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "identifier" => b.identifier = Some(FromValueOpt::from_value(v)?), + "identifier" => b.identifier = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_status_transitions.rs b/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_status_transitions.rs index ee6a8cac9..259411c85 100644 --- a/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_status_transitions.rs +++ b/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_status_transitions.rs @@ -10,7 +10,12 @@ pub struct BillingMeterResourceBillingMeterStatusTransitionsBuilder { deactivated_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deactivated_at: self.deactivated_at? }) + let (Some(deactivated_at),) = (self.deactivated_at,) else { + return None; + }; + Some(Self::Out { deactivated_at }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = BillingMeterResourceBillingMeterStatusTransitionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deactivated_at" => b.deactivated_at = Some(FromValueOpt::from_value(v)?), + "deactivated_at" => b.deactivated_at = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_value.rs b/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_value.rs index d026b2d40..8fd4b41cf 100644 --- a/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_value.rs +++ b/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_value.rs @@ -10,7 +10,12 @@ pub struct BillingMeterResourceBillingMeterValueBuilder { event_payload_key: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { event_payload_key: self.event_payload_key.take()? }) + let (Some(event_payload_key),) = (self.event_payload_key.take(),) else { + return None; + }; + Some(Self::Out { event_payload_key }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = BillingMeterResourceBillingMeterValueBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "event_payload_key" => b.event_payload_key = Some(FromValueOpt::from_value(v)?), + "event_payload_key" => b.event_payload_key = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/billing_meter_resource_customer_mapping_settings.rs b/generated/async-stripe-billing/src/billing_meter_resource_customer_mapping_settings.rs index b65616da2..4a27c2218 100644 --- a/generated/async-stripe-billing/src/billing_meter_resource_customer_mapping_settings.rs +++ b/generated/async-stripe-billing/src/billing_meter_resource_customer_mapping_settings.rs @@ -14,7 +14,12 @@ pub struct BillingMeterResourceCustomerMappingSettingsBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,10 +65,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - event_payload_key: self.event_payload_key.take()?, - type_: self.type_?, - }) + let (Some(event_payload_key), Some(type_)) = + (self.event_payload_key.take(), self.type_) + else { + return None; + }; + Some(Self::Out { event_payload_key, type_ }) } } @@ -90,8 +97,8 @@ const _: () = { let mut b = BillingMeterResourceCustomerMappingSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "event_payload_key" => b.event_payload_key = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "event_payload_key" => b.event_payload_key = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } 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..4a7819839 100644 --- a/generated/async-stripe-billing/src/billing_portal_configuration/types.rs +++ b/generated/async-stripe-billing/src/billing_portal_configuration/types.rs @@ -43,7 +43,12 @@ pub struct BillingPortalConfigurationBuilder { updated: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -112,19 +117,49 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(active), + Some(application), + Some(business_profile), + Some(created), + Some(default_return_url), + Some(features), + Some(id), + Some(is_default), + Some(livemode), + Some(login_page), + Some(metadata), + Some(updated), + ) = ( + self.active, + self.application.take(), + self.business_profile.take(), + self.created, + self.default_return_url.take(), + self.features.take(), + self.id.take(), + self.is_default, + self.livemode, + self.login_page.take(), + self.metadata.take(), + self.updated, + ) + else { + return None; + }; Some(Self::Out { - active: self.active?, - application: self.application.take()?, - business_profile: self.business_profile.take()?, - created: self.created?, - default_return_url: self.default_return_url.take()?, - features: self.features.take()?, - id: self.id.take()?, - is_default: self.is_default?, - livemode: self.livemode?, - login_page: self.login_page.take()?, - metadata: self.metadata.take()?, - updated: self.updated?, + active, + application, + business_profile, + created, + default_return_url, + features, + id, + is_default, + livemode, + login_page, + metadata, + updated, }) } } @@ -152,20 +187,18 @@ const _: () = { let mut b = BillingPortalConfigurationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "active" => b.active = Some(FromValueOpt::from_value(v)?), - "application" => b.application = Some(FromValueOpt::from_value(v)?), - "business_profile" => b.business_profile = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "default_return_url" => { - b.default_return_url = Some(FromValueOpt::from_value(v)?) - } - "features" => b.features = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "is_default" => b.is_default = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "login_page" => b.login_page = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "updated" => b.updated = Some(FromValueOpt::from_value(v)?), + "active" => b.active = FromValueOpt::from_value(v), + "application" => b.application = FromValueOpt::from_value(v), + "business_profile" => b.business_profile = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "default_return_url" => b.default_return_url = FromValueOpt::from_value(v), + "features" => b.features = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "is_default" => b.is_default = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "login_page" => b.login_page = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "updated" => b.updated = FromValueOpt::from_value(v), _ => {} } 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..7b23c3bb0 100644 --- a/generated/async-stripe-billing/src/billing_portal_session/types.rs +++ b/generated/async-stripe-billing/src/billing_portal_session/types.rs @@ -55,7 +55,12 @@ pub struct BillingPortalSessionBuilder { url: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -120,17 +125,43 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(configuration), + Some(created), + Some(customer), + Some(flow), + Some(id), + Some(livemode), + Some(locale), + Some(on_behalf_of), + Some(return_url), + Some(url), + ) = ( + self.configuration.take(), + self.created, + self.customer.take(), + self.flow.take(), + self.id.take(), + self.livemode, + self.locale, + self.on_behalf_of.take(), + self.return_url.take(), + self.url.take(), + ) + else { + return None; + }; Some(Self::Out { - configuration: self.configuration.take()?, - created: self.created?, - customer: self.customer.take()?, - flow: self.flow.take()?, - id: self.id.take()?, - livemode: self.livemode?, - locale: self.locale?, - on_behalf_of: self.on_behalf_of.take()?, - return_url: self.return_url.take()?, - url: self.url.take()?, + configuration, + created, + customer, + flow, + id, + livemode, + locale, + on_behalf_of, + return_url, + url, }) } } @@ -158,16 +189,16 @@ const _: () = { let mut b = BillingPortalSessionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "configuration" => b.configuration = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "flow" => b.flow = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "locale" => b.locale = Some(FromValueOpt::from_value(v)?), - "on_behalf_of" => b.on_behalf_of = Some(FromValueOpt::from_value(v)?), - "return_url" => b.return_url = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "configuration" => b.configuration = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "flow" => b.flow = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "locale" => b.locale = FromValueOpt::from_value(v), + "on_behalf_of" => b.on_behalf_of = FromValueOpt::from_value(v), + "return_url" => b.return_url = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_business_profile.rs b/generated/async-stripe-billing/src/portal_business_profile.rs index 6ccdf2308..6348365ad 100644 --- a/generated/async-stripe-billing/src/portal_business_profile.rs +++ b/generated/async-stripe-billing/src/portal_business_profile.rs @@ -16,7 +16,12 @@ pub struct PortalBusinessProfileBuilder { terms_of_service_url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,14 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - headline: self.headline.take()?, - privacy_policy_url: self.privacy_policy_url.take()?, - terms_of_service_url: self.terms_of_service_url.take()?, - }) + let (Some(headline), Some(privacy_policy_url), Some(terms_of_service_url)) = ( + self.headline.take(), + self.privacy_policy_url.take(), + self.terms_of_service_url.take(), + ) else { + return None; + }; + Some(Self::Out { headline, privacy_policy_url, terms_of_service_url }) } } @@ -98,13 +106,9 @@ const _: () = { let mut b = PortalBusinessProfileBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "headline" => b.headline = Some(FromValueOpt::from_value(v)?), - "privacy_policy_url" => { - b.privacy_policy_url = Some(FromValueOpt::from_value(v)?) - } - "terms_of_service_url" => { - b.terms_of_service_url = Some(FromValueOpt::from_value(v)?) - } + "headline" => b.headline = FromValueOpt::from_value(v), + "privacy_policy_url" => b.privacy_policy_url = FromValueOpt::from_value(v), + "terms_of_service_url" => b.terms_of_service_url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_customer_update.rs b/generated/async-stripe-billing/src/portal_customer_update.rs index db6f2683b..7ae53e7e2 100644 --- a/generated/async-stripe-billing/src/portal_customer_update.rs +++ b/generated/async-stripe-billing/src/portal_customer_update.rs @@ -13,7 +13,12 @@ pub struct PortalCustomerUpdateBuilder { enabled: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - allowed_updates: self.allowed_updates.take()?, - enabled: self.enabled?, - }) + let (Some(allowed_updates), Some(enabled)) = + (self.allowed_updates.take(), self.enabled) + else { + return None; + }; + Some(Self::Out { allowed_updates, enabled }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = PortalCustomerUpdateBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "allowed_updates" => b.allowed_updates = Some(FromValueOpt::from_value(v)?), - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), + "allowed_updates" => b.allowed_updates = FromValueOpt::from_value(v), + "enabled" => b.enabled = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_features.rs b/generated/async-stripe-billing/src/portal_features.rs index 4bda95464..67f645eb8 100644 --- a/generated/async-stripe-billing/src/portal_features.rs +++ b/generated/async-stripe-billing/src/portal_features.rs @@ -17,7 +17,12 @@ pub struct PortalFeaturesBuilder { subscription_update: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(customer_update), + Some(invoice_history), + Some(payment_method_update), + Some(subscription_cancel), + Some(subscription_update), + ) = ( + self.customer_update.take(), + self.invoice_history, + self.payment_method_update, + self.subscription_cancel.take(), + self.subscription_update.take(), + ) + else { + return None; + }; Some(Self::Out { - customer_update: self.customer_update.take()?, - invoice_history: self.invoice_history?, - payment_method_update: self.payment_method_update?, - subscription_cancel: self.subscription_cancel.take()?, - subscription_update: self.subscription_update.take()?, + customer_update, + invoice_history, + payment_method_update, + subscription_cancel, + subscription_update, }) } } @@ -105,17 +126,13 @@ const _: () = { let mut b = PortalFeaturesBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "customer_update" => b.customer_update = Some(FromValueOpt::from_value(v)?), - "invoice_history" => b.invoice_history = Some(FromValueOpt::from_value(v)?), + "customer_update" => b.customer_update = FromValueOpt::from_value(v), + "invoice_history" => b.invoice_history = FromValueOpt::from_value(v), "payment_method_update" => { - b.payment_method_update = Some(FromValueOpt::from_value(v)?) - } - "subscription_cancel" => { - b.subscription_cancel = Some(FromValueOpt::from_value(v)?) - } - "subscription_update" => { - b.subscription_update = Some(FromValueOpt::from_value(v)?) + b.payment_method_update = FromValueOpt::from_value(v) } + "subscription_cancel" => b.subscription_cancel = FromValueOpt::from_value(v), + "subscription_update" => b.subscription_update = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_flows_after_completion_hosted_confirmation.rs b/generated/async-stripe-billing/src/portal_flows_after_completion_hosted_confirmation.rs index 03a814243..8ab4425e4 100644 --- a/generated/async-stripe-billing/src/portal_flows_after_completion_hosted_confirmation.rs +++ b/generated/async-stripe-billing/src/portal_flows_after_completion_hosted_confirmation.rs @@ -10,7 +10,12 @@ pub struct PortalFlowsAfterCompletionHostedConfirmationBuilder { custom_message: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { custom_message: self.custom_message.take()? }) + let (Some(custom_message),) = (self.custom_message.take(),) else { + return None; + }; + Some(Self::Out { custom_message }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PortalFlowsAfterCompletionHostedConfirmationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "custom_message" => b.custom_message = Some(FromValueOpt::from_value(v)?), + "custom_message" => b.custom_message = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_flows_after_completion_redirect.rs b/generated/async-stripe-billing/src/portal_flows_after_completion_redirect.rs index d21bfb66d..f4f9fc18a 100644 --- a/generated/async-stripe-billing/src/portal_flows_after_completion_redirect.rs +++ b/generated/async-stripe-billing/src/portal_flows_after_completion_redirect.rs @@ -10,7 +10,12 @@ pub struct PortalFlowsAfterCompletionRedirectBuilder { return_url: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { return_url: self.return_url.take()? }) + let (Some(return_url),) = (self.return_url.take(),) else { + return None; + }; + Some(Self::Out { return_url }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PortalFlowsAfterCompletionRedirectBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "return_url" => b.return_url = Some(FromValueOpt::from_value(v)?), + "return_url" => b.return_url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_flows_coupon_offer.rs b/generated/async-stripe-billing/src/portal_flows_coupon_offer.rs index 7d7275b8e..16187d7f8 100644 --- a/generated/async-stripe-billing/src/portal_flows_coupon_offer.rs +++ b/generated/async-stripe-billing/src/portal_flows_coupon_offer.rs @@ -10,7 +10,12 @@ pub struct PortalFlowsCouponOfferBuilder { coupon: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { coupon: self.coupon.take()? }) + let (Some(coupon),) = (self.coupon.take(),) else { + return None; + }; + Some(Self::Out { coupon }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PortalFlowsCouponOfferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "coupon" => b.coupon = Some(FromValueOpt::from_value(v)?), + "coupon" => b.coupon = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_flows_flow.rs b/generated/async-stripe-billing/src/portal_flows_flow.rs index de637ac3c..508b5b677 100644 --- a/generated/async-stripe-billing/src/portal_flows_flow.rs +++ b/generated/async-stripe-billing/src/portal_flows_flow.rs @@ -24,7 +24,12 @@ pub struct PortalFlowsFlowBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -81,12 +86,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(after_completion), + Some(subscription_cancel), + Some(subscription_update), + Some(subscription_update_confirm), + Some(type_), + ) = ( + self.after_completion.take(), + self.subscription_cancel.take(), + self.subscription_update.take(), + self.subscription_update_confirm.take(), + self.type_, + ) + else { + return None; + }; Some(Self::Out { - after_completion: self.after_completion.take()?, - subscription_cancel: self.subscription_cancel.take()?, - subscription_update: self.subscription_update.take()?, - subscription_update_confirm: self.subscription_update_confirm.take()?, - type_: self.type_?, + after_completion, + subscription_cancel, + subscription_update, + subscription_update_confirm, + type_, }) } } @@ -114,17 +135,13 @@ const _: () = { let mut b = PortalFlowsFlowBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "after_completion" => b.after_completion = Some(FromValueOpt::from_value(v)?), - "subscription_cancel" => { - b.subscription_cancel = Some(FromValueOpt::from_value(v)?) - } - "subscription_update" => { - b.subscription_update = Some(FromValueOpt::from_value(v)?) - } + "after_completion" => b.after_completion = FromValueOpt::from_value(v), + "subscription_cancel" => b.subscription_cancel = FromValueOpt::from_value(v), + "subscription_update" => b.subscription_update = FromValueOpt::from_value(v), "subscription_update_confirm" => { - b.subscription_update_confirm = Some(FromValueOpt::from_value(v)?) + b.subscription_update_confirm = FromValueOpt::from_value(v) } - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_flows_flow_after_completion.rs b/generated/async-stripe-billing/src/portal_flows_flow_after_completion.rs index 47d6aa40c..db3735cdb 100644 --- a/generated/async-stripe-billing/src/portal_flows_flow_after_completion.rs +++ b/generated/async-stripe-billing/src/portal_flows_flow_after_completion.rs @@ -18,7 +18,12 @@ pub struct PortalFlowsFlowAfterCompletionBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - hosted_confirmation: self.hosted_confirmation.take()?, - redirect: self.redirect.take()?, - type_: self.type_?, - }) + let (Some(hosted_confirmation), Some(redirect), Some(type_)) = + (self.hosted_confirmation.take(), self.redirect.take(), self.type_) + else { + return None; + }; + Some(Self::Out { hosted_confirmation, redirect, type_ }) } } @@ -100,11 +106,9 @@ const _: () = { let mut b = PortalFlowsFlowAfterCompletionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "hosted_confirmation" => { - b.hosted_confirmation = Some(FromValueOpt::from_value(v)?) - } - "redirect" => b.redirect = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "hosted_confirmation" => b.hosted_confirmation = FromValueOpt::from_value(v), + "redirect" => b.redirect = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_flows_flow_subscription_cancel.rs b/generated/async-stripe-billing/src/portal_flows_flow_subscription_cancel.rs index cd68931c2..faff70715 100644 --- a/generated/async-stripe-billing/src/portal_flows_flow_subscription_cancel.rs +++ b/generated/async-stripe-billing/src/portal_flows_flow_subscription_cancel.rs @@ -13,7 +13,12 @@ pub struct PortalFlowsFlowSubscriptionCancelBuilder { subscription: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - retention: self.retention.take()?, - subscription: self.subscription.take()?, - }) + let (Some(retention), Some(subscription)) = + (self.retention.take(), self.subscription.take()) + else { + return None; + }; + Some(Self::Out { retention, subscription }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = PortalFlowsFlowSubscriptionCancelBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "retention" => b.retention = Some(FromValueOpt::from_value(v)?), - "subscription" => b.subscription = Some(FromValueOpt::from_value(v)?), + "retention" => b.retention = FromValueOpt::from_value(v), + "subscription" => b.subscription = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_flows_flow_subscription_update.rs b/generated/async-stripe-billing/src/portal_flows_flow_subscription_update.rs index 3daa0cbba..9ddfbc553 100644 --- a/generated/async-stripe-billing/src/portal_flows_flow_subscription_update.rs +++ b/generated/async-stripe-billing/src/portal_flows_flow_subscription_update.rs @@ -10,7 +10,12 @@ pub struct PortalFlowsFlowSubscriptionUpdateBuilder { subscription: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { subscription: self.subscription.take()? }) + let (Some(subscription),) = (self.subscription.take(),) else { + return None; + }; + Some(Self::Out { subscription }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PortalFlowsFlowSubscriptionUpdateBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "subscription" => b.subscription = Some(FromValueOpt::from_value(v)?), + "subscription" => b.subscription = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_flows_flow_subscription_update_confirm.rs b/generated/async-stripe-billing/src/portal_flows_flow_subscription_update_confirm.rs index 0bf8d7203..1ffbff8a1 100644 --- a/generated/async-stripe-billing/src/portal_flows_flow_subscription_update_confirm.rs +++ b/generated/async-stripe-billing/src/portal_flows_flow_subscription_update_confirm.rs @@ -18,7 +18,12 @@ pub struct PortalFlowsFlowSubscriptionUpdateConfirmBuilder { subscription: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - discounts: self.discounts.take()?, - items: self.items.take()?, - subscription: self.subscription.take()?, - }) + let (Some(discounts), Some(items), Some(subscription)) = + (self.discounts.take(), self.items.take(), self.subscription.take()) + else { + return None; + }; + Some(Self::Out { discounts, items, subscription }) } } @@ -100,9 +106,9 @@ const _: () = { let mut b = PortalFlowsFlowSubscriptionUpdateConfirmBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "discounts" => b.discounts = Some(FromValueOpt::from_value(v)?), - "items" => b.items = Some(FromValueOpt::from_value(v)?), - "subscription" => b.subscription = Some(FromValueOpt::from_value(v)?), + "discounts" => b.discounts = FromValueOpt::from_value(v), + "items" => b.items = FromValueOpt::from_value(v), + "subscription" => b.subscription = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_flows_retention.rs b/generated/async-stripe-billing/src/portal_flows_retention.rs index 596a1c930..1fe8d14cb 100644 --- a/generated/async-stripe-billing/src/portal_flows_retention.rs +++ b/generated/async-stripe-billing/src/portal_flows_retention.rs @@ -14,7 +14,12 @@ pub struct PortalFlowsRetentionBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { coupon_offer: self.coupon_offer.take()?, type_: self.type_? }) + let (Some(coupon_offer), Some(type_)) = (self.coupon_offer.take(), self.type_) else { + return None; + }; + Some(Self::Out { coupon_offer, type_ }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = PortalFlowsRetentionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "coupon_offer" => b.coupon_offer = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "coupon_offer" => b.coupon_offer = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_discount.rs b/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_discount.rs index 5dbdc0e2b..47916787a 100644 --- a/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_discount.rs +++ b/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_discount.rs @@ -13,7 +13,12 @@ pub struct PortalFlowsSubscriptionUpdateConfirmDiscountBuilder { promotion_code: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - coupon: self.coupon.take()?, - promotion_code: self.promotion_code.take()?, - }) + let (Some(coupon), Some(promotion_code)) = + (self.coupon.take(), self.promotion_code.take()) + else { + return None; + }; + Some(Self::Out { coupon, promotion_code }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = PortalFlowsSubscriptionUpdateConfirmDiscountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "coupon" => b.coupon = Some(FromValueOpt::from_value(v)?), - "promotion_code" => b.promotion_code = Some(FromValueOpt::from_value(v)?), + "coupon" => b.coupon = FromValueOpt::from_value(v), + "promotion_code" => b.promotion_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_item.rs b/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_item.rs index 981dc88bb..2f11b4907 100644 --- a/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_item.rs +++ b/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_item.rs @@ -17,7 +17,12 @@ pub struct PortalFlowsSubscriptionUpdateConfirmItemBuilder { quantity: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - id: self.id.take()?, - price: self.price.take()?, - quantity: self.quantity?, - }) + let (Some(id), Some(price), Some(quantity)) = + (self.id.take(), self.price.take(), self.quantity) + else { + return None; + }; + Some(Self::Out { id, price, quantity }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = PortalFlowsSubscriptionUpdateConfirmItemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "price" => b.price = Some(FromValueOpt::from_value(v)?), - "quantity" => b.quantity = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "price" => b.price = FromValueOpt::from_value(v), + "quantity" => b.quantity = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_invoice_list.rs b/generated/async-stripe-billing/src/portal_invoice_list.rs index 471f00fe7..d2f67d2d0 100644 --- a/generated/async-stripe-billing/src/portal_invoice_list.rs +++ b/generated/async-stripe-billing/src/portal_invoice_list.rs @@ -10,7 +10,12 @@ pub struct PortalInvoiceListBuilder { enabled: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled? }) + let (Some(enabled),) = (self.enabled,) else { + return None; + }; + Some(Self::Out { enabled }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PortalInvoiceListBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_login_page.rs b/generated/async-stripe-billing/src/portal_login_page.rs index 8eee616d3..6cb48c9ba 100644 --- a/generated/async-stripe-billing/src/portal_login_page.rs +++ b/generated/async-stripe-billing/src/portal_login_page.rs @@ -16,7 +16,12 @@ pub struct PortalLoginPageBuilder { url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,7 +67,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled?, url: self.url.take()? }) + let (Some(enabled), Some(url)) = (self.enabled, self.url.take()) else { + return None; + }; + Some(Self::Out { enabled, url }) } } @@ -89,8 +97,8 @@ const _: () = { let mut b = PortalLoginPageBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_payment_method_update.rs b/generated/async-stripe-billing/src/portal_payment_method_update.rs index e832b0eea..b8af92007 100644 --- a/generated/async-stripe-billing/src/portal_payment_method_update.rs +++ b/generated/async-stripe-billing/src/portal_payment_method_update.rs @@ -10,7 +10,12 @@ pub struct PortalPaymentMethodUpdateBuilder { enabled: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled? }) + let (Some(enabled),) = (self.enabled,) else { + return None; + }; + Some(Self::Out { enabled }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PortalPaymentMethodUpdateBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_subscription_cancel.rs b/generated/async-stripe-billing/src/portal_subscription_cancel.rs index e87cc568d..8b71fbff0 100644 --- a/generated/async-stripe-billing/src/portal_subscription_cancel.rs +++ b/generated/async-stripe-billing/src/portal_subscription_cancel.rs @@ -19,7 +19,12 @@ pub struct PortalSubscriptionCancelBuilder { proration_behavior: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - cancellation_reason: self.cancellation_reason.take()?, - enabled: self.enabled?, - mode: self.mode?, - proration_behavior: self.proration_behavior?, - }) + let (Some(cancellation_reason), Some(enabled), Some(mode), Some(proration_behavior)) = + (self.cancellation_reason.take(), self.enabled, self.mode, self.proration_behavior) + else { + return None; + }; + Some(Self::Out { cancellation_reason, enabled, mode, proration_behavior }) } } @@ -104,14 +109,10 @@ const _: () = { let mut b = PortalSubscriptionCancelBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "cancellation_reason" => { - b.cancellation_reason = Some(FromValueOpt::from_value(v)?) - } - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "mode" => b.mode = Some(FromValueOpt::from_value(v)?), - "proration_behavior" => { - b.proration_behavior = Some(FromValueOpt::from_value(v)?) - } + "cancellation_reason" => b.cancellation_reason = FromValueOpt::from_value(v), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "mode" => b.mode = FromValueOpt::from_value(v), + "proration_behavior" => b.proration_behavior = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_subscription_cancellation_reason.rs b/generated/async-stripe-billing/src/portal_subscription_cancellation_reason.rs index 40153abe0..91cab1cb4 100644 --- a/generated/async-stripe-billing/src/portal_subscription_cancellation_reason.rs +++ b/generated/async-stripe-billing/src/portal_subscription_cancellation_reason.rs @@ -13,7 +13,12 @@ pub struct PortalSubscriptionCancellationReasonBuilder { options: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled?, options: self.options.take()? }) + let (Some(enabled), Some(options)) = (self.enabled, self.options.take()) else { + return None; + }; + Some(Self::Out { enabled, options }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = PortalSubscriptionCancellationReasonBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "options" => b.options = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "options" => b.options = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_subscription_update.rs b/generated/async-stripe-billing/src/portal_subscription_update.rs index b1bc70782..7d509ad2b 100644 --- a/generated/async-stripe-billing/src/portal_subscription_update.rs +++ b/generated/async-stripe-billing/src/portal_subscription_update.rs @@ -22,7 +22,12 @@ pub struct PortalSubscriptionUpdateBuilder { proration_behavior: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -75,12 +80,21 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - default_allowed_updates: self.default_allowed_updates.take()?, - enabled: self.enabled?, - products: self.products.take()?, - proration_behavior: self.proration_behavior?, - }) + let ( + Some(default_allowed_updates), + Some(enabled), + Some(products), + Some(proration_behavior), + ) = ( + self.default_allowed_updates.take(), + self.enabled, + self.products.take(), + self.proration_behavior, + ) + else { + return None; + }; + Some(Self::Out { default_allowed_updates, enabled, products, proration_behavior }) } } @@ -108,13 +122,11 @@ const _: () = { for (k, v) in obj { match k.as_str() { "default_allowed_updates" => { - b.default_allowed_updates = Some(FromValueOpt::from_value(v)?) - } - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "products" => b.products = Some(FromValueOpt::from_value(v)?), - "proration_behavior" => { - b.proration_behavior = Some(FromValueOpt::from_value(v)?) + b.default_allowed_updates = FromValueOpt::from_value(v) } + "enabled" => b.enabled = FromValueOpt::from_value(v), + "products" => b.products = FromValueOpt::from_value(v), + "proration_behavior" => b.proration_behavior = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/portal_subscription_update_product.rs b/generated/async-stripe-billing/src/portal_subscription_update_product.rs index ae994ae46..2b43dbd97 100644 --- a/generated/async-stripe-billing/src/portal_subscription_update_product.rs +++ b/generated/async-stripe-billing/src/portal_subscription_update_product.rs @@ -13,7 +13,12 @@ pub struct PortalSubscriptionUpdateProductBuilder { product: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { prices: self.prices.take()?, product: self.product.take()? }) + let (Some(prices), Some(product)) = (self.prices.take(), self.product.take()) else { + return None; + }; + Some(Self::Out { prices, product }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = PortalSubscriptionUpdateProductBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "prices" => b.prices = Some(FromValueOpt::from_value(v)?), - "product" => b.product = Some(FromValueOpt::from_value(v)?), + "prices" => b.prices = FromValueOpt::from_value(v), + "product" => b.product = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-billing/src/usage_record/types.rs b/generated/async-stripe-billing/src/usage_record/types.rs index dd9136ec9..62bcf5e30 100644 --- a/generated/async-stripe-billing/src/usage_record/types.rs +++ b/generated/async-stripe-billing/src/usage_record/types.rs @@ -30,7 +30,12 @@ pub struct UsageRecordBuilder { timestamp: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -85,13 +90,23 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - id: self.id.take()?, - livemode: self.livemode?, - quantity: self.quantity?, - subscription_item: self.subscription_item.take()?, - timestamp: self.timestamp?, - }) + let ( + Some(id), + Some(livemode), + Some(quantity), + Some(subscription_item), + Some(timestamp), + ) = ( + self.id.take(), + self.livemode, + self.quantity, + self.subscription_item.take(), + self.timestamp, + ) + else { + return None; + }; + Some(Self::Out { id, livemode, quantity, subscription_item, timestamp }) } } @@ -118,11 +133,11 @@ const _: () = { let mut b = UsageRecordBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "quantity" => b.quantity = Some(FromValueOpt::from_value(v)?), - "subscription_item" => b.subscription_item = Some(FromValueOpt::from_value(v)?), - "timestamp" => b.timestamp = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "quantity" => b.quantity = FromValueOpt::from_value(v), + "subscription_item" => b.subscription_item = FromValueOpt::from_value(v), + "timestamp" => b.timestamp = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_acss_debit_mandate_options.rs b/generated/async-stripe-checkout/src/checkout_acss_debit_mandate_options.rs index 09a9de6f1..b53e044ca 100644 --- a/generated/async-stripe-checkout/src/checkout_acss_debit_mandate_options.rs +++ b/generated/async-stripe-checkout/src/checkout_acss_debit_mandate_options.rs @@ -24,7 +24,12 @@ pub struct CheckoutAcssDebitMandateOptionsBuilder { transaction_type: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -79,12 +84,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(custom_mandate_url), + Some(default_for), + Some(interval_description), + Some(payment_schedule), + Some(transaction_type), + ) = ( + self.custom_mandate_url.take(), + self.default_for.take(), + self.interval_description.take(), + self.payment_schedule, + self.transaction_type, + ) + else { + return None; + }; Some(Self::Out { - custom_mandate_url: self.custom_mandate_url.take()?, - default_for: self.default_for.take()?, - interval_description: self.interval_description.take()?, - payment_schedule: self.payment_schedule?, - transaction_type: self.transaction_type?, + custom_mandate_url, + default_for, + interval_description, + payment_schedule, + transaction_type, }) } } @@ -112,15 +133,11 @@ const _: () = { let mut b = CheckoutAcssDebitMandateOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "custom_mandate_url" => { - b.custom_mandate_url = Some(FromValueOpt::from_value(v)?) - } - "default_for" => b.default_for = Some(FromValueOpt::from_value(v)?), - "interval_description" => { - b.interval_description = Some(FromValueOpt::from_value(v)?) - } - "payment_schedule" => b.payment_schedule = Some(FromValueOpt::from_value(v)?), - "transaction_type" => b.transaction_type = Some(FromValueOpt::from_value(v)?), + "custom_mandate_url" => b.custom_mandate_url = FromValueOpt::from_value(v), + "default_for" => b.default_for = FromValueOpt::from_value(v), + "interval_description" => b.interval_description = FromValueOpt::from_value(v), + "payment_schedule" => b.payment_schedule = FromValueOpt::from_value(v), + "transaction_type" => b.transaction_type = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_acss_debit_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_acss_debit_payment_method_options.rs index ca980eec0..f60b435e4 100644 --- a/generated/async-stripe-checkout/src/checkout_acss_debit_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_acss_debit_payment_method_options.rs @@ -23,7 +23,12 @@ pub struct CheckoutAcssDebitPaymentMethodOptionsBuilder { verification_method: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -76,12 +81,21 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - currency: self.currency?, - mandate_options: self.mandate_options.take()?, - setup_future_usage: self.setup_future_usage?, - verification_method: self.verification_method?, - }) + let ( + Some(currency), + Some(mandate_options), + Some(setup_future_usage), + Some(verification_method), + ) = ( + self.currency, + self.mandate_options.take(), + self.setup_future_usage, + self.verification_method, + ) + else { + return None; + }; + Some(Self::Out { currency, mandate_options, setup_future_usage, verification_method }) } } @@ -108,14 +122,10 @@ const _: () = { let mut b = CheckoutAcssDebitPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "mandate_options" => b.mandate_options = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } - "verification_method" => { - b.verification_method = Some(FromValueOpt::from_value(v)?) - } + "currency" => b.currency = FromValueOpt::from_value(v), + "mandate_options" => b.mandate_options = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), + "verification_method" => b.verification_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_affirm_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_affirm_payment_method_options.rs index 39f712db1..2ece4ef57 100644 --- a/generated/async-stripe-checkout/src/checkout_affirm_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_affirm_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutAffirmPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutAffirmPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_afterpay_clearpay_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_afterpay_clearpay_payment_method_options.rs index 2fbfeae3f..7ff25037b 100644 --- a/generated/async-stripe-checkout/src/checkout_afterpay_clearpay_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_afterpay_clearpay_payment_method_options.rs @@ -16,7 +16,12 @@ pub struct CheckoutAfterpayClearpayPaymentMethodOptionsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -61,7 +66,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -88,9 +96,7 @@ const _: () = { let mut b = CheckoutAfterpayClearpayPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_alipay_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_alipay_payment_method_options.rs index affb29726..935303423 100644 --- a/generated/async-stripe-checkout/src/checkout_alipay_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_alipay_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutAlipayPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutAlipayPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_amazon_pay_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_amazon_pay_payment_method_options.rs index 56911af47..461a3019a 100644 --- a/generated/async-stripe-checkout/src/checkout_amazon_pay_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_amazon_pay_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutAmazonPayPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutAmazonPayPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_au_becs_debit_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_au_becs_debit_payment_method_options.rs index 2bd9bbae9..f316c6443 100644 --- a/generated/async-stripe-checkout/src/checkout_au_becs_debit_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_au_becs_debit_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutAuBecsDebitPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutAuBecsDebitPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_bacs_debit_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_bacs_debit_payment_method_options.rs index f687de2a2..47b100dc5 100644 --- a/generated/async-stripe-checkout/src/checkout_bacs_debit_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_bacs_debit_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutBacsDebitPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutBacsDebitPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_bancontact_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_bancontact_payment_method_options.rs index 7f1583b27..2215131b8 100644 --- a/generated/async-stripe-checkout/src/checkout_bancontact_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_bancontact_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutBancontactPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutBancontactPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_boleto_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_boleto_payment_method_options.rs index 0b5fe47f2..249d63f4c 100644 --- a/generated/async-stripe-checkout/src/checkout_boleto_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_boleto_payment_method_options.rs @@ -19,7 +19,12 @@ pub struct CheckoutBoletoPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,10 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - expires_after_days: self.expires_after_days?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(expires_after_days), Some(setup_future_usage)) = + (self.expires_after_days, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { expires_after_days, setup_future_usage }) } } @@ -98,12 +105,8 @@ const _: () = { let mut b = CheckoutBoletoPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "expires_after_days" => { - b.expires_after_days = Some(FromValueOpt::from_value(v)?) - } - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "expires_after_days" => b.expires_after_days = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_card_installments_options.rs b/generated/async-stripe-checkout/src/checkout_card_installments_options.rs index 3cd59ecc3..8c1a6caf4 100644 --- a/generated/async-stripe-checkout/src/checkout_card_installments_options.rs +++ b/generated/async-stripe-checkout/src/checkout_card_installments_options.rs @@ -10,7 +10,12 @@ pub struct CheckoutCardInstallmentsOptionsBuilder { enabled: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled? }) + let (Some(enabled),) = (self.enabled,) else { + return None; + }; + Some(Self::Out { enabled }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = CheckoutCardInstallmentsOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_card_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_card_payment_method_options.rs index 048676799..69cdc4ca1 100644 --- a/generated/async-stripe-checkout/src/checkout_card_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_card_payment_method_options.rs @@ -35,7 +35,12 @@ pub struct CheckoutCardPaymentMethodOptionsBuilder { statement_descriptor_suffix_kanji: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -94,12 +99,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(installments), + Some(request_three_d_secure), + Some(setup_future_usage), + Some(statement_descriptor_suffix_kana), + Some(statement_descriptor_suffix_kanji), + ) = ( + self.installments, + self.request_three_d_secure, + self.setup_future_usage, + self.statement_descriptor_suffix_kana.take(), + self.statement_descriptor_suffix_kanji.take(), + ) + else { + return None; + }; Some(Self::Out { - installments: self.installments?, - request_three_d_secure: self.request_three_d_secure?, - setup_future_usage: self.setup_future_usage?, - statement_descriptor_suffix_kana: self.statement_descriptor_suffix_kana.take()?, - statement_descriptor_suffix_kanji: self.statement_descriptor_suffix_kanji.take()?, + installments, + request_three_d_secure, + setup_future_usage, + statement_descriptor_suffix_kana, + statement_descriptor_suffix_kanji, }) } } @@ -127,18 +148,16 @@ const _: () = { let mut b = CheckoutCardPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "installments" => b.installments = Some(FromValueOpt::from_value(v)?), + "installments" => b.installments = FromValueOpt::from_value(v), "request_three_d_secure" => { - b.request_three_d_secure = Some(FromValueOpt::from_value(v)?) - } - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) + b.request_three_d_secure = FromValueOpt::from_value(v) } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), "statement_descriptor_suffix_kana" => { - b.statement_descriptor_suffix_kana = Some(FromValueOpt::from_value(v)?) + b.statement_descriptor_suffix_kana = FromValueOpt::from_value(v) } "statement_descriptor_suffix_kanji" => { - b.statement_descriptor_suffix_kanji = Some(FromValueOpt::from_value(v)?) + b.statement_descriptor_suffix_kanji = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-checkout/src/checkout_cashapp_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_cashapp_payment_method_options.rs index 3431bfe7f..fd1f3b98f 100644 --- a/generated/async-stripe-checkout/src/checkout_cashapp_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_cashapp_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutCashappPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutCashappPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_customer_balance_bank_transfer_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_customer_balance_bank_transfer_payment_method_options.rs index 9cbf75a93..2ca236205 100644 --- a/generated/async-stripe-checkout/src/checkout_customer_balance_bank_transfer_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_customer_balance_bank_transfer_payment_method_options.rs @@ -23,7 +23,12 @@ pub struct CheckoutCustomerBalanceBankTransferPaymentMethodOptionsBuilder { type_: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -75,11 +80,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - eu_bank_transfer: self.eu_bank_transfer?, - requested_address_types: self.requested_address_types.take()?, - type_: self.type_?, - }) + let (Some(eu_bank_transfer), Some(requested_address_types), Some(type_)) = + (self.eu_bank_transfer, self.requested_address_types.take(), self.type_) + else { + return None; + }; + Some(Self::Out { eu_bank_transfer, requested_address_types, type_ }) } } @@ -107,11 +113,11 @@ const _: () = { CheckoutCustomerBalanceBankTransferPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "eu_bank_transfer" => b.eu_bank_transfer = Some(FromValueOpt::from_value(v)?), + "eu_bank_transfer" => b.eu_bank_transfer = FromValueOpt::from_value(v), "requested_address_types" => { - b.requested_address_types = Some(FromValueOpt::from_value(v)?) + b.requested_address_types = FromValueOpt::from_value(v) } - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_customer_balance_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_customer_balance_payment_method_options.rs index 2b1608860..a09d98033 100644 --- a/generated/async-stripe-checkout/src/checkout_customer_balance_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_customer_balance_payment_method_options.rs @@ -23,7 +23,12 @@ pub struct CheckoutCustomerBalancePaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -74,11 +79,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank_transfer: self.bank_transfer.take()?, - funding_type: self.funding_type?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(bank_transfer), Some(funding_type), Some(setup_future_usage)) = + (self.bank_transfer.take(), self.funding_type, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { bank_transfer, funding_type, setup_future_usage }) } } @@ -105,11 +111,9 @@ const _: () = { let mut b = CheckoutCustomerBalancePaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_transfer" => b.bank_transfer = Some(FromValueOpt::from_value(v)?), - "funding_type" => b.funding_type = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "bank_transfer" => b.bank_transfer = FromValueOpt::from_value(v), + "funding_type" => b.funding_type = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_eps_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_eps_payment_method_options.rs index 2e5adb013..37eddd0d1 100644 --- a/generated/async-stripe-checkout/src/checkout_eps_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_eps_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutEpsPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutEpsPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_fpx_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_fpx_payment_method_options.rs index 7d04c2e4b..933a37c87 100644 --- a/generated/async-stripe-checkout/src/checkout_fpx_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_fpx_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutFpxPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutFpxPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_giropay_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_giropay_payment_method_options.rs index b036bf65c..667fc6ce4 100644 --- a/generated/async-stripe-checkout/src/checkout_giropay_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_giropay_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutGiropayPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutGiropayPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_grab_pay_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_grab_pay_payment_method_options.rs index f1f0b38d9..5b6aec161 100644 --- a/generated/async-stripe-checkout/src/checkout_grab_pay_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_grab_pay_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutGrabPayPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutGrabPayPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_ideal_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_ideal_payment_method_options.rs index 4ed0a88d9..7d4396d84 100644 --- a/generated/async-stripe-checkout/src/checkout_ideal_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_ideal_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutIdealPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutIdealPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_klarna_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_klarna_payment_method_options.rs index 7763a54e6..848c4cd81 100644 --- a/generated/async-stripe-checkout/src/checkout_klarna_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_klarna_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutKlarnaPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutKlarnaPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_konbini_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_konbini_payment_method_options.rs index 3bdb31d82..15d1efd5c 100644 --- a/generated/async-stripe-checkout/src/checkout_konbini_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_konbini_payment_method_options.rs @@ -19,7 +19,12 @@ pub struct CheckoutKonbiniPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,10 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - expires_after_days: self.expires_after_days?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(expires_after_days), Some(setup_future_usage)) = + (self.expires_after_days, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { expires_after_days, setup_future_usage }) } } @@ -98,12 +105,8 @@ const _: () = { let mut b = CheckoutKonbiniPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "expires_after_days" => { - b.expires_after_days = Some(FromValueOpt::from_value(v)?) - } - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "expires_after_days" => b.expires_after_days = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_link_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_link_payment_method_options.rs index ee059a512..b0caab968 100644 --- a/generated/async-stripe-checkout/src/checkout_link_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_link_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutLinkPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutLinkPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_mobilepay_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_mobilepay_payment_method_options.rs index bc7ac98f3..09e687efd 100644 --- a/generated/async-stripe-checkout/src/checkout_mobilepay_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_mobilepay_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutMobilepayPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutMobilepayPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_oxxo_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_oxxo_payment_method_options.rs index c5f7c6f28..586ba145f 100644 --- a/generated/async-stripe-checkout/src/checkout_oxxo_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_oxxo_payment_method_options.rs @@ -19,7 +19,12 @@ pub struct CheckoutOxxoPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,10 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - expires_after_days: self.expires_after_days?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(expires_after_days), Some(setup_future_usage)) = + (self.expires_after_days, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { expires_after_days, setup_future_usage }) } } @@ -98,12 +105,8 @@ const _: () = { let mut b = CheckoutOxxoPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "expires_after_days" => { - b.expires_after_days = Some(FromValueOpt::from_value(v)?) - } - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "expires_after_days" => b.expires_after_days = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_p24_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_p24_payment_method_options.rs index 4fc525e43..f8a46f84c 100644 --- a/generated/async-stripe-checkout/src/checkout_p24_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_p24_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutP24PaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutP24PaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_paynow_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_paynow_payment_method_options.rs index 9c29aaa14..d9fc1ab75 100644 --- a/generated/async-stripe-checkout/src/checkout_paynow_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_paynow_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutPaynowPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutPaynowPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_paypal_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_paypal_payment_method_options.rs index 1d77d806a..ea4aa1151 100644 --- a/generated/async-stripe-checkout/src/checkout_paypal_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_paypal_payment_method_options.rs @@ -25,7 +25,12 @@ pub struct CheckoutPaypalPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -78,12 +83,21 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - capture_method: self.capture_method?, - preferred_locale: self.preferred_locale.take()?, - reference: self.reference.take()?, - setup_future_usage: self.setup_future_usage?, - }) + let ( + Some(capture_method), + Some(preferred_locale), + Some(reference), + Some(setup_future_usage), + ) = ( + self.capture_method, + self.preferred_locale.take(), + self.reference.take(), + self.setup_future_usage, + ) + else { + return None; + }; + Some(Self::Out { capture_method, preferred_locale, reference, setup_future_usage }) } } @@ -110,12 +124,10 @@ const _: () = { let mut b = CheckoutPaypalPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "capture_method" => b.capture_method = Some(FromValueOpt::from_value(v)?), - "preferred_locale" => b.preferred_locale = Some(FromValueOpt::from_value(v)?), - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "capture_method" => b.capture_method = FromValueOpt::from_value(v), + "preferred_locale" => b.preferred_locale = FromValueOpt::from_value(v), + "reference" => b.reference = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_pix_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_pix_payment_method_options.rs index 42794fe1e..b87e2a155 100644 --- a/generated/async-stripe-checkout/src/checkout_pix_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_pix_payment_method_options.rs @@ -10,7 +10,12 @@ pub struct CheckoutPixPaymentMethodOptionsBuilder { expires_after_seconds: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { expires_after_seconds: self.expires_after_seconds? }) + let (Some(expires_after_seconds),) = (self.expires_after_seconds,) else { + return None; + }; + Some(Self::Out { expires_after_seconds }) } } @@ -83,7 +91,7 @@ const _: () = { for (k, v) in obj { match k.as_str() { "expires_after_seconds" => { - b.expires_after_seconds = Some(FromValueOpt::from_value(v)?) + b.expires_after_seconds = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-checkout/src/checkout_revolut_pay_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_revolut_pay_payment_method_options.rs index 33e09a2b1..78823b6dd 100644 --- a/generated/async-stripe-checkout/src/checkout_revolut_pay_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_revolut_pay_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutRevolutPayPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutRevolutPayPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_sepa_debit_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_sepa_debit_payment_method_options.rs index 82e0b6717..6b993c39b 100644 --- a/generated/async-stripe-checkout/src/checkout_sepa_debit_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_sepa_debit_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutSepaDebitPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutSepaDebitPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_session/types.rs b/generated/async-stripe-checkout/src/checkout_session/types.rs index 2c56434ac..e9e043635 100644 --- a/generated/async-stripe-checkout/src/checkout_session/types.rs +++ b/generated/async-stripe-checkout/src/checkout_session/types.rs @@ -220,7 +220,12 @@ pub struct CheckoutSessionBuilder { url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -383,63 +388,175 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(after_expiration), + Some(allow_promotion_codes), + Some(amount_subtotal), + Some(amount_total), + Some(automatic_tax), + Some(billing_address_collection), + Some(cancel_url), + Some(client_reference_id), + Some(client_secret), + Some(consent), + Some(consent_collection), + Some(created), + Some(currency), + Some(currency_conversion), + Some(custom_fields), + Some(custom_text), + Some(customer), + Some(customer_creation), + Some(customer_details), + Some(customer_email), + Some(expires_at), + Some(id), + Some(invoice), + Some(invoice_creation), + Some(line_items), + Some(livemode), + Some(locale), + Some(metadata), + Some(mode), + Some(payment_intent), + Some(payment_link), + Some(payment_method_collection), + Some(payment_method_configuration_details), + Some(payment_method_options), + Some(payment_method_types), + Some(payment_status), + Some(phone_number_collection), + Some(recovered_from), + Some(redirect_on_completion), + Some(return_url), + Some(saved_payment_method_options), + Some(setup_intent), + Some(shipping_address_collection), + Some(shipping_cost), + Some(shipping_details), + Some(shipping_options), + Some(status), + Some(submit_type), + Some(subscription), + Some(success_url), + Some(tax_id_collection), + Some(total_details), + Some(ui_mode), + Some(url), + ) = ( + self.after_expiration.take(), + self.allow_promotion_codes, + self.amount_subtotal, + self.amount_total, + self.automatic_tax.take(), + self.billing_address_collection, + self.cancel_url.take(), + self.client_reference_id.take(), + self.client_secret.take(), + self.consent, + self.consent_collection, + self.created, + self.currency, + self.currency_conversion.take(), + self.custom_fields.take(), + self.custom_text.take(), + self.customer.take(), + self.customer_creation, + self.customer_details.take(), + self.customer_email.take(), + self.expires_at, + self.id.take(), + self.invoice.take(), + self.invoice_creation.take(), + self.line_items.take(), + self.livemode, + self.locale, + self.metadata.take(), + self.mode, + self.payment_intent.take(), + self.payment_link.take(), + self.payment_method_collection, + self.payment_method_configuration_details.take(), + self.payment_method_options.take(), + self.payment_method_types.take(), + self.payment_status, + self.phone_number_collection, + self.recovered_from.take(), + self.redirect_on_completion, + self.return_url.take(), + self.saved_payment_method_options.take(), + self.setup_intent.take(), + self.shipping_address_collection.take(), + self.shipping_cost.take(), + self.shipping_details.take(), + self.shipping_options.take(), + self.status, + self.submit_type, + self.subscription.take(), + self.success_url.take(), + self.tax_id_collection, + self.total_details.take(), + self.ui_mode, + self.url.take(), + ) + else { + return None; + }; Some(Self::Out { - after_expiration: self.after_expiration.take()?, - allow_promotion_codes: self.allow_promotion_codes?, - amount_subtotal: self.amount_subtotal?, - amount_total: self.amount_total?, - automatic_tax: self.automatic_tax.take()?, - billing_address_collection: self.billing_address_collection?, - cancel_url: self.cancel_url.take()?, - client_reference_id: self.client_reference_id.take()?, - client_secret: self.client_secret.take()?, - consent: self.consent?, - consent_collection: self.consent_collection?, - created: self.created?, - currency: self.currency?, - currency_conversion: self.currency_conversion.take()?, - custom_fields: self.custom_fields.take()?, - custom_text: self.custom_text.take()?, - customer: self.customer.take()?, - customer_creation: self.customer_creation?, - customer_details: self.customer_details.take()?, - customer_email: self.customer_email.take()?, - expires_at: self.expires_at?, - id: self.id.take()?, - invoice: self.invoice.take()?, - invoice_creation: self.invoice_creation.take()?, - line_items: self.line_items.take()?, - livemode: self.livemode?, - locale: self.locale?, - metadata: self.metadata.take()?, - mode: self.mode?, - payment_intent: self.payment_intent.take()?, - payment_link: self.payment_link.take()?, - payment_method_collection: self.payment_method_collection?, - payment_method_configuration_details: self - .payment_method_configuration_details - .take()?, - payment_method_options: self.payment_method_options.take()?, - payment_method_types: self.payment_method_types.take()?, - payment_status: self.payment_status?, - phone_number_collection: self.phone_number_collection?, - recovered_from: self.recovered_from.take()?, - redirect_on_completion: self.redirect_on_completion?, - return_url: self.return_url.take()?, - saved_payment_method_options: self.saved_payment_method_options.take()?, - setup_intent: self.setup_intent.take()?, - shipping_address_collection: self.shipping_address_collection.take()?, - shipping_cost: self.shipping_cost.take()?, - shipping_details: self.shipping_details.take()?, - shipping_options: self.shipping_options.take()?, - status: self.status?, - submit_type: self.submit_type?, - subscription: self.subscription.take()?, - success_url: self.success_url.take()?, - tax_id_collection: self.tax_id_collection?, - total_details: self.total_details.take()?, - ui_mode: self.ui_mode?, - url: self.url.take()?, + after_expiration, + allow_promotion_codes, + amount_subtotal, + amount_total, + automatic_tax, + billing_address_collection, + cancel_url, + client_reference_id, + client_secret, + consent, + consent_collection, + created, + currency, + currency_conversion, + custom_fields, + custom_text, + customer, + customer_creation, + customer_details, + customer_email, + expires_at, + id, + invoice, + invoice_creation, + line_items, + livemode, + locale, + metadata, + mode, + payment_intent, + payment_link, + payment_method_collection, + payment_method_configuration_details, + payment_method_options, + payment_method_types, + payment_status, + phone_number_collection, + recovered_from, + redirect_on_completion, + return_url, + saved_payment_method_options, + setup_intent, + shipping_address_collection, + shipping_cost, + shipping_details, + shipping_options, + status, + submit_type, + subscription, + success_url, + tax_id_collection, + total_details, + ui_mode, + url, }) } } @@ -467,86 +584,78 @@ const _: () = { let mut b = CheckoutSessionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "after_expiration" => b.after_expiration = Some(FromValueOpt::from_value(v)?), + "after_expiration" => b.after_expiration = FromValueOpt::from_value(v), "allow_promotion_codes" => { - b.allow_promotion_codes = Some(FromValueOpt::from_value(v)?) + b.allow_promotion_codes = FromValueOpt::from_value(v) } - "amount_subtotal" => b.amount_subtotal = Some(FromValueOpt::from_value(v)?), - "amount_total" => b.amount_total = Some(FromValueOpt::from_value(v)?), - "automatic_tax" => b.automatic_tax = Some(FromValueOpt::from_value(v)?), + "amount_subtotal" => b.amount_subtotal = FromValueOpt::from_value(v), + "amount_total" => b.amount_total = FromValueOpt::from_value(v), + "automatic_tax" => b.automatic_tax = FromValueOpt::from_value(v), "billing_address_collection" => { - b.billing_address_collection = Some(FromValueOpt::from_value(v)?) - } - "cancel_url" => b.cancel_url = Some(FromValueOpt::from_value(v)?), - "client_reference_id" => { - b.client_reference_id = Some(FromValueOpt::from_value(v)?) + b.billing_address_collection = FromValueOpt::from_value(v) } - "client_secret" => b.client_secret = Some(FromValueOpt::from_value(v)?), - "consent" => b.consent = Some(FromValueOpt::from_value(v)?), - "consent_collection" => { - b.consent_collection = Some(FromValueOpt::from_value(v)?) - } - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "currency_conversion" => { - b.currency_conversion = Some(FromValueOpt::from_value(v)?) - } - "custom_fields" => b.custom_fields = Some(FromValueOpt::from_value(v)?), - "custom_text" => b.custom_text = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "customer_creation" => b.customer_creation = Some(FromValueOpt::from_value(v)?), - "customer_details" => b.customer_details = Some(FromValueOpt::from_value(v)?), - "customer_email" => b.customer_email = Some(FromValueOpt::from_value(v)?), - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "invoice" => b.invoice = Some(FromValueOpt::from_value(v)?), - "invoice_creation" => b.invoice_creation = Some(FromValueOpt::from_value(v)?), - "line_items" => b.line_items = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "locale" => b.locale = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "mode" => b.mode = Some(FromValueOpt::from_value(v)?), - "payment_intent" => b.payment_intent = Some(FromValueOpt::from_value(v)?), - "payment_link" => b.payment_link = Some(FromValueOpt::from_value(v)?), + "cancel_url" => b.cancel_url = FromValueOpt::from_value(v), + "client_reference_id" => b.client_reference_id = FromValueOpt::from_value(v), + "client_secret" => b.client_secret = FromValueOpt::from_value(v), + "consent" => b.consent = FromValueOpt::from_value(v), + "consent_collection" => b.consent_collection = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "currency_conversion" => b.currency_conversion = FromValueOpt::from_value(v), + "custom_fields" => b.custom_fields = FromValueOpt::from_value(v), + "custom_text" => b.custom_text = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "customer_creation" => b.customer_creation = FromValueOpt::from_value(v), + "customer_details" => b.customer_details = FromValueOpt::from_value(v), + "customer_email" => b.customer_email = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "invoice" => b.invoice = FromValueOpt::from_value(v), + "invoice_creation" => b.invoice_creation = FromValueOpt::from_value(v), + "line_items" => b.line_items = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "locale" => b.locale = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "mode" => b.mode = FromValueOpt::from_value(v), + "payment_intent" => b.payment_intent = FromValueOpt::from_value(v), + "payment_link" => b.payment_link = FromValueOpt::from_value(v), "payment_method_collection" => { - b.payment_method_collection = Some(FromValueOpt::from_value(v)?) + b.payment_method_collection = FromValueOpt::from_value(v) } "payment_method_configuration_details" => { - b.payment_method_configuration_details = Some(FromValueOpt::from_value(v)?) + b.payment_method_configuration_details = FromValueOpt::from_value(v) } "payment_method_options" => { - b.payment_method_options = Some(FromValueOpt::from_value(v)?) - } - "payment_method_types" => { - b.payment_method_types = Some(FromValueOpt::from_value(v)?) + b.payment_method_options = FromValueOpt::from_value(v) } - "payment_status" => b.payment_status = Some(FromValueOpt::from_value(v)?), + "payment_method_types" => b.payment_method_types = FromValueOpt::from_value(v), + "payment_status" => b.payment_status = FromValueOpt::from_value(v), "phone_number_collection" => { - b.phone_number_collection = Some(FromValueOpt::from_value(v)?) + b.phone_number_collection = FromValueOpt::from_value(v) } - "recovered_from" => b.recovered_from = Some(FromValueOpt::from_value(v)?), + "recovered_from" => b.recovered_from = FromValueOpt::from_value(v), "redirect_on_completion" => { - b.redirect_on_completion = Some(FromValueOpt::from_value(v)?) + b.redirect_on_completion = FromValueOpt::from_value(v) } - "return_url" => b.return_url = Some(FromValueOpt::from_value(v)?), + "return_url" => b.return_url = FromValueOpt::from_value(v), "saved_payment_method_options" => { - b.saved_payment_method_options = Some(FromValueOpt::from_value(v)?) + b.saved_payment_method_options = FromValueOpt::from_value(v) } - "setup_intent" => b.setup_intent = Some(FromValueOpt::from_value(v)?), + "setup_intent" => b.setup_intent = FromValueOpt::from_value(v), "shipping_address_collection" => { - b.shipping_address_collection = Some(FromValueOpt::from_value(v)?) + b.shipping_address_collection = FromValueOpt::from_value(v) } - "shipping_cost" => b.shipping_cost = Some(FromValueOpt::from_value(v)?), - "shipping_details" => b.shipping_details = Some(FromValueOpt::from_value(v)?), - "shipping_options" => b.shipping_options = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "submit_type" => b.submit_type = Some(FromValueOpt::from_value(v)?), - "subscription" => b.subscription = Some(FromValueOpt::from_value(v)?), - "success_url" => b.success_url = Some(FromValueOpt::from_value(v)?), - "tax_id_collection" => b.tax_id_collection = Some(FromValueOpt::from_value(v)?), - "total_details" => b.total_details = Some(FromValueOpt::from_value(v)?), - "ui_mode" => b.ui_mode = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "shipping_cost" => b.shipping_cost = FromValueOpt::from_value(v), + "shipping_details" => b.shipping_details = FromValueOpt::from_value(v), + "shipping_options" => b.shipping_options = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "submit_type" => b.submit_type = FromValueOpt::from_value(v), + "subscription" => b.subscription = FromValueOpt::from_value(v), + "success_url" => b.success_url = FromValueOpt::from_value(v), + "tax_id_collection" => b.tax_id_collection = FromValueOpt::from_value(v), + "total_details" => b.total_details = FromValueOpt::from_value(v), + "ui_mode" => b.ui_mode = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_session_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_session_payment_method_options.rs index 3c5807396..c8590e898 100644 --- a/generated/async-stripe-checkout/src/checkout_session_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_session_payment_method_options.rs @@ -70,7 +70,12 @@ pub struct CheckoutSessionPaymentMethodOptionsBuilder { us_bank_account: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -177,38 +182,106 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(acss_debit), + Some(affirm), + Some(afterpay_clearpay), + Some(alipay), + Some(amazon_pay), + Some(au_becs_debit), + Some(bacs_debit), + Some(bancontact), + Some(boleto), + Some(card), + Some(cashapp), + Some(customer_balance), + Some(eps), + Some(fpx), + Some(giropay), + Some(grabpay), + Some(ideal), + Some(klarna), + Some(konbini), + Some(link), + Some(mobilepay), + Some(oxxo), + Some(p24), + Some(paynow), + Some(paypal), + Some(pix), + Some(revolut_pay), + Some(sepa_debit), + Some(sofort), + Some(swish), + Some(us_bank_account), + ) = ( + self.acss_debit.take(), + self.affirm, + self.afterpay_clearpay, + self.alipay, + self.amazon_pay, + self.au_becs_debit, + self.bacs_debit, + self.bancontact, + self.boleto, + self.card.take(), + self.cashapp, + self.customer_balance.take(), + self.eps, + self.fpx, + self.giropay, + self.grabpay, + self.ideal, + self.klarna, + self.konbini, + self.link, + self.mobilepay, + self.oxxo, + self.p24, + self.paynow, + self.paypal.take(), + self.pix, + self.revolut_pay, + self.sepa_debit, + self.sofort, + self.swish.take(), + self.us_bank_account.take(), + ) + else { + return None; + }; Some(Self::Out { - acss_debit: self.acss_debit.take()?, - affirm: self.affirm?, - afterpay_clearpay: self.afterpay_clearpay?, - alipay: self.alipay?, - amazon_pay: self.amazon_pay?, - au_becs_debit: self.au_becs_debit?, - bacs_debit: self.bacs_debit?, - bancontact: self.bancontact?, - boleto: self.boleto?, - card: self.card.take()?, - cashapp: self.cashapp?, - customer_balance: self.customer_balance.take()?, - eps: self.eps?, - fpx: self.fpx?, - giropay: self.giropay?, - grabpay: self.grabpay?, - ideal: self.ideal?, - klarna: self.klarna?, - konbini: self.konbini?, - link: self.link?, - mobilepay: self.mobilepay?, - oxxo: self.oxxo?, - p24: self.p24?, - paynow: self.paynow?, - paypal: self.paypal.take()?, - pix: self.pix?, - revolut_pay: self.revolut_pay?, - sepa_debit: self.sepa_debit?, - sofort: self.sofort?, - swish: self.swish.take()?, - us_bank_account: self.us_bank_account.take()?, + acss_debit, + affirm, + afterpay_clearpay, + alipay, + amazon_pay, + au_becs_debit, + bacs_debit, + bancontact, + boleto, + card, + cashapp, + customer_balance, + eps, + fpx, + giropay, + grabpay, + ideal, + klarna, + konbini, + link, + mobilepay, + oxxo, + p24, + paynow, + paypal, + pix, + revolut_pay, + sepa_debit, + sofort, + swish, + us_bank_account, }) } } @@ -236,37 +309,37 @@ const _: () = { let mut b = CheckoutSessionPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "acss_debit" => b.acss_debit = Some(FromValueOpt::from_value(v)?), - "affirm" => b.affirm = Some(FromValueOpt::from_value(v)?), - "afterpay_clearpay" => b.afterpay_clearpay = Some(FromValueOpt::from_value(v)?), - "alipay" => b.alipay = Some(FromValueOpt::from_value(v)?), - "amazon_pay" => b.amazon_pay = Some(FromValueOpt::from_value(v)?), - "au_becs_debit" => b.au_becs_debit = Some(FromValueOpt::from_value(v)?), - "bacs_debit" => b.bacs_debit = Some(FromValueOpt::from_value(v)?), - "bancontact" => b.bancontact = Some(FromValueOpt::from_value(v)?), - "boleto" => b.boleto = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "cashapp" => b.cashapp = Some(FromValueOpt::from_value(v)?), - "customer_balance" => b.customer_balance = Some(FromValueOpt::from_value(v)?), - "eps" => b.eps = Some(FromValueOpt::from_value(v)?), - "fpx" => b.fpx = Some(FromValueOpt::from_value(v)?), - "giropay" => b.giropay = Some(FromValueOpt::from_value(v)?), - "grabpay" => b.grabpay = Some(FromValueOpt::from_value(v)?), - "ideal" => b.ideal = Some(FromValueOpt::from_value(v)?), - "klarna" => b.klarna = Some(FromValueOpt::from_value(v)?), - "konbini" => b.konbini = Some(FromValueOpt::from_value(v)?), - "link" => b.link = Some(FromValueOpt::from_value(v)?), - "mobilepay" => b.mobilepay = Some(FromValueOpt::from_value(v)?), - "oxxo" => b.oxxo = Some(FromValueOpt::from_value(v)?), - "p24" => b.p24 = Some(FromValueOpt::from_value(v)?), - "paynow" => b.paynow = Some(FromValueOpt::from_value(v)?), - "paypal" => b.paypal = Some(FromValueOpt::from_value(v)?), - "pix" => b.pix = Some(FromValueOpt::from_value(v)?), - "revolut_pay" => b.revolut_pay = Some(FromValueOpt::from_value(v)?), - "sepa_debit" => b.sepa_debit = Some(FromValueOpt::from_value(v)?), - "sofort" => b.sofort = Some(FromValueOpt::from_value(v)?), - "swish" => b.swish = Some(FromValueOpt::from_value(v)?), - "us_bank_account" => b.us_bank_account = Some(FromValueOpt::from_value(v)?), + "acss_debit" => b.acss_debit = FromValueOpt::from_value(v), + "affirm" => b.affirm = FromValueOpt::from_value(v), + "afterpay_clearpay" => b.afterpay_clearpay = FromValueOpt::from_value(v), + "alipay" => b.alipay = FromValueOpt::from_value(v), + "amazon_pay" => b.amazon_pay = FromValueOpt::from_value(v), + "au_becs_debit" => b.au_becs_debit = FromValueOpt::from_value(v), + "bacs_debit" => b.bacs_debit = FromValueOpt::from_value(v), + "bancontact" => b.bancontact = FromValueOpt::from_value(v), + "boleto" => b.boleto = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "cashapp" => b.cashapp = FromValueOpt::from_value(v), + "customer_balance" => b.customer_balance = FromValueOpt::from_value(v), + "eps" => b.eps = FromValueOpt::from_value(v), + "fpx" => b.fpx = FromValueOpt::from_value(v), + "giropay" => b.giropay = FromValueOpt::from_value(v), + "grabpay" => b.grabpay = FromValueOpt::from_value(v), + "ideal" => b.ideal = FromValueOpt::from_value(v), + "klarna" => b.klarna = FromValueOpt::from_value(v), + "konbini" => b.konbini = FromValueOpt::from_value(v), + "link" => b.link = FromValueOpt::from_value(v), + "mobilepay" => b.mobilepay = FromValueOpt::from_value(v), + "oxxo" => b.oxxo = FromValueOpt::from_value(v), + "p24" => b.p24 = FromValueOpt::from_value(v), + "paynow" => b.paynow = FromValueOpt::from_value(v), + "paypal" => b.paypal = FromValueOpt::from_value(v), + "pix" => b.pix = FromValueOpt::from_value(v), + "revolut_pay" => b.revolut_pay = FromValueOpt::from_value(v), + "sepa_debit" => b.sepa_debit = FromValueOpt::from_value(v), + "sofort" => b.sofort = FromValueOpt::from_value(v), + "swish" => b.swish = FromValueOpt::from_value(v), + "us_bank_account" => b.us_bank_account = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_sofort_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_sofort_payment_method_options.rs index f589bf715..4db778b7f 100644 --- a/generated/async-stripe-checkout/src/checkout_sofort_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_sofort_payment_method_options.rs @@ -15,7 +15,12 @@ pub struct CheckoutSofortPaymentMethodOptionsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CheckoutSofortPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_swish_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_swish_payment_method_options.rs index f1e8943e3..1fbb511ba 100644 --- a/generated/async-stripe-checkout/src/checkout_swish_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_swish_payment_method_options.rs @@ -11,7 +11,12 @@ pub struct CheckoutSwishPaymentMethodOptionsBuilder { reference: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { reference: self.reference.take()? }) + let (Some(reference),) = (self.reference.take(),) else { + return None; + }; + Some(Self::Out { reference }) } } @@ -83,7 +91,7 @@ const _: () = { let mut b = CheckoutSwishPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), + "reference" => b.reference = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/checkout_us_bank_account_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_us_bank_account_payment_method_options.rs index 3943d1ab1..535f96435 100644 --- a/generated/async-stripe-checkout/src/checkout_us_bank_account_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_us_bank_account_payment_method_options.rs @@ -21,7 +21,12 @@ pub struct CheckoutUsBankAccountPaymentMethodOptionsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,11 +77,14 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - financial_connections: self.financial_connections.take()?, - setup_future_usage: self.setup_future_usage?, - verification_method: self.verification_method?, - }) + let (Some(financial_connections), Some(setup_future_usage), Some(verification_method)) = ( + self.financial_connections.take(), + self.setup_future_usage, + self.verification_method, + ) else { + return None; + }; + Some(Self::Out { financial_connections, setup_future_usage, verification_method }) } } @@ -104,14 +112,10 @@ const _: () = { for (k, v) in obj { match k.as_str() { "financial_connections" => { - b.financial_connections = Some(FromValueOpt::from_value(v)?) - } - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } - "verification_method" => { - b.verification_method = Some(FromValueOpt::from_value(v)?) + b.financial_connections = FromValueOpt::from_value(v) } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), + "verification_method" => b.verification_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration.rs index 4c68f84cd..eda7e6eeb 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration.rs @@ -10,7 +10,12 @@ pub struct PaymentPagesCheckoutSessionAfterExpirationBuilder { recovery: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { recovery: self.recovery.take()? }) + let (Some(recovery),) = (self.recovery.take(),) else { + return None; + }; + Some(Self::Out { recovery }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionAfterExpirationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "recovery" => b.recovery = Some(FromValueOpt::from_value(v)?), + "recovery" => b.recovery = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration_recovery.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration_recovery.rs index f97ef29eb..0e7f058d4 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration_recovery.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration_recovery.rs @@ -21,7 +21,12 @@ pub struct PaymentPagesCheckoutSessionAfterExpirationRecoveryBuilder { url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -74,12 +79,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - allow_promotion_codes: self.allow_promotion_codes?, - enabled: self.enabled?, - expires_at: self.expires_at?, - url: self.url.take()?, - }) + let (Some(allow_promotion_codes), Some(enabled), Some(expires_at), Some(url)) = + (self.allow_promotion_codes, self.enabled, self.expires_at, self.url.take()) + else { + return None; + }; + Some(Self::Out { allow_promotion_codes, enabled, expires_at, url }) } } @@ -107,11 +112,11 @@ const _: () = { for (k, v) in obj { match k.as_str() { "allow_promotion_codes" => { - b.allow_promotion_codes = Some(FromValueOpt::from_value(v)?) + b.allow_promotion_codes = FromValueOpt::from_value(v) } - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_automatic_tax.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_automatic_tax.rs index 3c0d828e3..6b1336170 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_automatic_tax.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_automatic_tax.rs @@ -18,7 +18,12 @@ pub struct PaymentPagesCheckoutSessionAutomaticTaxBuilder { status: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - enabled: self.enabled?, - liability: self.liability.take()?, - status: self.status?, - }) + let (Some(enabled), Some(liability), Some(status)) = + (self.enabled, self.liability.take(), self.status) + else { + return None; + }; + Some(Self::Out { enabled, liability, status }) } } @@ -100,9 +106,9 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionAutomaticTaxBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "liability" => b.liability = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "liability" => b.liability = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent.rs index 66705ee6e..c239293b2 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent.rs @@ -14,7 +14,12 @@ pub struct PaymentPagesCheckoutSessionConsentBuilder { terms_of_service: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,10 +65,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - promotions: self.promotions?, - terms_of_service: self.terms_of_service?, - }) + let (Some(promotions), Some(terms_of_service)) = + (self.promotions, self.terms_of_service) + else { + return None; + }; + Some(Self::Out { promotions, terms_of_service }) } } @@ -90,8 +97,8 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionConsentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "promotions" => b.promotions = Some(FromValueOpt::from_value(v)?), - "terms_of_service" => b.terms_of_service = Some(FromValueOpt::from_value(v)?), + "promotions" => b.promotions = FromValueOpt::from_value(v), + "terms_of_service" => b.terms_of_service = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent_collection.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent_collection.rs index ffed34f2a..53b157171 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent_collection.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent_collection.rs @@ -21,7 +21,12 @@ pub struct PaymentPagesCheckoutSessionConsentCollectionBuilder { terms_of_service: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -74,11 +79,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - payment_method_reuse_agreement: self.payment_method_reuse_agreement?, - promotions: self.promotions?, - terms_of_service: self.terms_of_service?, - }) + let (Some(payment_method_reuse_agreement), Some(promotions), Some(terms_of_service)) = + (self.payment_method_reuse_agreement, self.promotions, self.terms_of_service) + else { + return None; + }; + Some(Self::Out { payment_method_reuse_agreement, promotions, terms_of_service }) } } @@ -106,10 +112,10 @@ const _: () = { for (k, v) in obj { match k.as_str() { "payment_method_reuse_agreement" => { - b.payment_method_reuse_agreement = Some(FromValueOpt::from_value(v)?) + b.payment_method_reuse_agreement = FromValueOpt::from_value(v) } - "promotions" => b.promotions = Some(FromValueOpt::from_value(v)?), - "terms_of_service" => b.terms_of_service = Some(FromValueOpt::from_value(v)?), + "promotions" => b.promotions = FromValueOpt::from_value(v), + "terms_of_service" => b.terms_of_service = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_currency_conversion.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_currency_conversion.rs index 316ca31db..02b95e995 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_currency_conversion.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_currency_conversion.rs @@ -19,7 +19,12 @@ pub struct PaymentPagesCheckoutSessionCurrencyConversionBuilder { source_currency: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount_subtotal: self.amount_subtotal?, - amount_total: self.amount_total?, - fx_rate: self.fx_rate.take()?, - source_currency: self.source_currency?, - }) + let (Some(amount_subtotal), Some(amount_total), Some(fx_rate), Some(source_currency)) = + (self.amount_subtotal, self.amount_total, self.fx_rate.take(), self.source_currency) + else { + return None; + }; + Some(Self::Out { amount_subtotal, amount_total, fx_rate, source_currency }) } } @@ -104,10 +109,10 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionCurrencyConversionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_subtotal" => b.amount_subtotal = Some(FromValueOpt::from_value(v)?), - "amount_total" => b.amount_total = Some(FromValueOpt::from_value(v)?), - "fx_rate" => b.fx_rate = Some(FromValueOpt::from_value(v)?), - "source_currency" => b.source_currency = Some(FromValueOpt::from_value(v)?), + "amount_subtotal" => b.amount_subtotal = FromValueOpt::from_value(v), + "amount_total" => b.amount_total = FromValueOpt::from_value(v), + "fx_rate" => b.fx_rate = FromValueOpt::from_value(v), + "source_currency" => b.source_currency = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields.rs index 9289222f5..003fbed14 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields.rs @@ -27,7 +27,12 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -86,15 +91,27 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - dropdown: self.dropdown.take()?, - key: self.key.take()?, - label: self.label.take()?, - numeric: self.numeric.take()?, - optional: self.optional?, - text: self.text.take()?, - type_: self.type_?, - }) + let ( + Some(dropdown), + Some(key), + Some(label), + Some(numeric), + Some(optional), + Some(text), + Some(type_), + ) = ( + self.dropdown.take(), + self.key.take(), + self.label.take(), + self.numeric.take(), + self.optional, + self.text.take(), + self.type_, + ) + else { + return None; + }; + Some(Self::Out { dropdown, key, label, numeric, optional, text, type_ }) } } @@ -121,13 +138,13 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionCustomFieldsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "dropdown" => b.dropdown = Some(FromValueOpt::from_value(v)?), - "key" => b.key = Some(FromValueOpt::from_value(v)?), - "label" => b.label = Some(FromValueOpt::from_value(v)?), - "numeric" => b.numeric = Some(FromValueOpt::from_value(v)?), - "optional" => b.optional = Some(FromValueOpt::from_value(v)?), - "text" => b.text = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "dropdown" => b.dropdown = FromValueOpt::from_value(v), + "key" => b.key = FromValueOpt::from_value(v), + "label" => b.label = FromValueOpt::from_value(v), + "numeric" => b.numeric = FromValueOpt::from_value(v), + "optional" => b.optional = FromValueOpt::from_value(v), + "text" => b.text = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_dropdown.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_dropdown.rs index 2ab3a7564..a500f17b0 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_dropdown.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_dropdown.rs @@ -13,7 +13,12 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsDropdownBuilder { value: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { options: self.options.take()?, value: self.value.take()? }) + let (Some(options), Some(value)) = (self.options.take(), self.value.take()) else { + return None; + }; + Some(Self::Out { options, value }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionCustomFieldsDropdownBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "options" => b.options = Some(FromValueOpt::from_value(v)?), - "value" => b.value = Some(FromValueOpt::from_value(v)?), + "options" => b.options = FromValueOpt::from_value(v), + "value" => b.value = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_label.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_label.rs index 33be72cf6..f4589bd93 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_label.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_label.rs @@ -14,7 +14,12 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsLabelBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { custom: self.custom.take()?, type_: self.type_? }) + let (Some(custom), Some(type_)) = (self.custom.take(), self.type_) else { + return None; + }; + Some(Self::Out { custom, type_ }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionCustomFieldsLabelBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "custom" => b.custom = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "custom" => b.custom = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_numeric.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_numeric.rs index afea986bb..bc1b73354 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_numeric.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_numeric.rs @@ -16,7 +16,12 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsNumericBuilder { value: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - maximum_length: self.maximum_length?, - minimum_length: self.minimum_length?, - value: self.value.take()?, - }) + let (Some(maximum_length), Some(minimum_length), Some(value)) = + (self.maximum_length, self.minimum_length, self.value.take()) + else { + return None; + }; + Some(Self::Out { maximum_length, minimum_length, value }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionCustomFieldsNumericBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "maximum_length" => b.maximum_length = Some(FromValueOpt::from_value(v)?), - "minimum_length" => b.minimum_length = Some(FromValueOpt::from_value(v)?), - "value" => b.value = Some(FromValueOpt::from_value(v)?), + "maximum_length" => b.maximum_length = FromValueOpt::from_value(v), + "minimum_length" => b.minimum_length = FromValueOpt::from_value(v), + "value" => b.value = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_option.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_option.rs index 8348abf04..aced03735 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_option.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_option.rs @@ -14,7 +14,12 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsOptionBuilder { value: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { label: self.label.take()?, value: self.value.take()? }) + let (Some(label), Some(value)) = (self.label.take(), self.value.take()) else { + return None; + }; + Some(Self::Out { label, value }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionCustomFieldsOptionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "label" => b.label = Some(FromValueOpt::from_value(v)?), - "value" => b.value = Some(FromValueOpt::from_value(v)?), + "label" => b.label = FromValueOpt::from_value(v), + "value" => b.value = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_text.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_text.rs index 8ee7b26f2..81fce4281 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_text.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_text.rs @@ -16,7 +16,12 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsTextBuilder { value: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - maximum_length: self.maximum_length?, - minimum_length: self.minimum_length?, - value: self.value.take()?, - }) + let (Some(maximum_length), Some(minimum_length), Some(value)) = + (self.maximum_length, self.minimum_length, self.value.take()) + else { + return None; + }; + Some(Self::Out { maximum_length, minimum_length, value }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionCustomFieldsTextBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "maximum_length" => b.maximum_length = Some(FromValueOpt::from_value(v)?), - "minimum_length" => b.minimum_length = Some(FromValueOpt::from_value(v)?), - "value" => b.value = Some(FromValueOpt::from_value(v)?), + "maximum_length" => b.maximum_length = FromValueOpt::from_value(v), + "minimum_length" => b.minimum_length = FromValueOpt::from_value(v), + "value" => b.value = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text.rs index 3e89d40ce..541df0b64 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text.rs @@ -22,7 +22,12 @@ pub struct PaymentPagesCheckoutSessionCustomTextBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,12 +82,21 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - after_submit: self.after_submit.take()?, - shipping_address: self.shipping_address.take()?, - submit: self.submit.take()?, - terms_of_service_acceptance: self.terms_of_service_acceptance.take()?, - }) + let ( + Some(after_submit), + Some(shipping_address), + Some(submit), + Some(terms_of_service_acceptance), + ) = ( + self.after_submit.take(), + self.shipping_address.take(), + self.submit.take(), + self.terms_of_service_acceptance.take(), + ) + else { + return None; + }; + Some(Self::Out { after_submit, shipping_address, submit, terms_of_service_acceptance }) } } @@ -109,11 +123,11 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionCustomTextBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "after_submit" => b.after_submit = Some(FromValueOpt::from_value(v)?), - "shipping_address" => b.shipping_address = Some(FromValueOpt::from_value(v)?), - "submit" => b.submit = Some(FromValueOpt::from_value(v)?), + "after_submit" => b.after_submit = FromValueOpt::from_value(v), + "shipping_address" => b.shipping_address = FromValueOpt::from_value(v), + "submit" => b.submit = FromValueOpt::from_value(v), "terms_of_service_acceptance" => { - b.terms_of_service_acceptance = Some(FromValueOpt::from_value(v)?) + b.terms_of_service_acceptance = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text_position.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text_position.rs index e0e7ea9c2..2e7253272 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text_position.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text_position.rs @@ -10,7 +10,12 @@ pub struct PaymentPagesCheckoutSessionCustomTextPositionBuilder { message: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { message: self.message.take()? }) + let (Some(message),) = (self.message.take(),) else { + return None; + }; + Some(Self::Out { message }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionCustomTextPositionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "message" => b.message = Some(FromValueOpt::from_value(v)?), + "message" => b.message = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_customer_details.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_customer_details.rs index b131dac02..d5280b7b9 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_customer_details.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_customer_details.rs @@ -28,7 +28,12 @@ pub struct PaymentPagesCheckoutSessionCustomerDetailsBuilder { tax_ids: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -85,14 +90,25 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - address: self.address.take()?, - email: self.email.take()?, - name: self.name.take()?, - phone: self.phone.take()?, - tax_exempt: self.tax_exempt?, - tax_ids: self.tax_ids.take()?, - }) + let ( + Some(address), + Some(email), + Some(name), + Some(phone), + Some(tax_exempt), + Some(tax_ids), + ) = ( + self.address.take(), + self.email.take(), + self.name.take(), + self.phone.take(), + self.tax_exempt, + self.tax_ids.take(), + ) + else { + return None; + }; + Some(Self::Out { address, email, name, phone, tax_exempt, tax_ids }) } } @@ -119,12 +135,12 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionCustomerDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "phone" => b.phone = Some(FromValueOpt::from_value(v)?), - "tax_exempt" => b.tax_exempt = Some(FromValueOpt::from_value(v)?), - "tax_ids" => b.tax_ids = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "phone" => b.phone = FromValueOpt::from_value(v), + "tax_exempt" => b.tax_exempt = FromValueOpt::from_value(v), + "tax_ids" => b.tax_ids = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_creation.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_creation.rs index 38ff9e3b3..c5bb35659 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_creation.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_creation.rs @@ -12,7 +12,12 @@ pub struct PaymentPagesCheckoutSessionInvoiceCreationBuilder { invoice_data: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled?, invoice_data: self.invoice_data.take()? }) + let (Some(enabled), Some(invoice_data)) = (self.enabled, self.invoice_data.take()) + else { + return None; + }; + Some(Self::Out { enabled, invoice_data }) } } @@ -85,8 +94,8 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionInvoiceCreationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "invoice_data" => b.invoice_data = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "invoice_data" => b.invoice_data = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_settings.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_settings.rs index 80af6fe53..3403be5e6 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_settings.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_settings.rs @@ -30,7 +30,12 @@ pub struct PaymentPagesCheckoutSessionInvoiceSettingsBuilder { rendering_options: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -89,14 +94,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_tax_ids), + Some(custom_fields), + Some(description), + Some(footer), + Some(issuer), + Some(metadata), + Some(rendering_options), + ) = ( + self.account_tax_ids.take(), + self.custom_fields.take(), + self.description.take(), + self.footer.take(), + self.issuer.take(), + self.metadata.take(), + self.rendering_options.take(), + ) + else { + return None; + }; Some(Self::Out { - account_tax_ids: self.account_tax_ids.take()?, - custom_fields: self.custom_fields.take()?, - description: self.description.take()?, - footer: self.footer.take()?, - issuer: self.issuer.take()?, - metadata: self.metadata.take()?, - rendering_options: self.rendering_options.take()?, + account_tax_ids, + custom_fields, + description, + footer, + issuer, + metadata, + rendering_options, }) } } @@ -124,13 +149,13 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionInvoiceSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_tax_ids" => b.account_tax_ids = Some(FromValueOpt::from_value(v)?), - "custom_fields" => b.custom_fields = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "footer" => b.footer = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "rendering_options" => b.rendering_options = Some(FromValueOpt::from_value(v)?), + "account_tax_ids" => b.account_tax_ids = FromValueOpt::from_value(v), + "custom_fields" => b.custom_fields = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "footer" => b.footer = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "rendering_options" => b.rendering_options = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_payment_method_reuse_agreement.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_payment_method_reuse_agreement.rs index 4ee7f2959..cedebdf25 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_payment_method_reuse_agreement.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_payment_method_reuse_agreement.rs @@ -13,7 +13,12 @@ pub struct PaymentPagesCheckoutSessionPaymentMethodReuseAgreementBuilder { position: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { position: self.position? }) + let (Some(position),) = (self.position,) else { + return None; + }; + Some(Self::Out { position }) } } @@ -87,7 +95,7 @@ const _: () = { PaymentPagesCheckoutSessionPaymentMethodReuseAgreementBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "position" => b.position = Some(FromValueOpt::from_value(v)?), + "position" => b.position = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_phone_number_collection.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_phone_number_collection.rs index f2e40df46..0f5546c0a 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_phone_number_collection.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_phone_number_collection.rs @@ -10,7 +10,12 @@ pub struct PaymentPagesCheckoutSessionPhoneNumberCollectionBuilder { enabled: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled? }) + let (Some(enabled),) = (self.enabled,) else { + return None; + }; + Some(Self::Out { enabled }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionPhoneNumberCollectionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_saved_payment_method_options.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_saved_payment_method_options.rs index 267bb2323..38db2987a 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_saved_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_saved_payment_method_options.rs @@ -19,7 +19,12 @@ pub struct PaymentPagesCheckoutSessionSavedPaymentMethodOptionsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,10 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - allow_redisplay_filters: self.allow_redisplay_filters.take()?, - payment_method_save: self.payment_method_save?, - }) + let (Some(allow_redisplay_filters), Some(payment_method_save)) = + (self.allow_redisplay_filters.take(), self.payment_method_save) + else { + return None; + }; + Some(Self::Out { allow_redisplay_filters, payment_method_save }) } } @@ -101,11 +108,9 @@ const _: () = { for (k, v) in obj { match k.as_str() { "allow_redisplay_filters" => { - b.allow_redisplay_filters = Some(FromValueOpt::from_value(v)?) - } - "payment_method_save" => { - b.payment_method_save = Some(FromValueOpt::from_value(v)?) + b.allow_redisplay_filters = FromValueOpt::from_value(v) } + "payment_method_save" => b.payment_method_save = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_address_collection.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_address_collection.rs index 4fb2e3f84..bd4e735d3 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_address_collection.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_address_collection.rs @@ -14,7 +14,12 @@ pub struct PaymentPagesCheckoutSessionShippingAddressCollectionBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { allowed_countries: self.allowed_countries.take()? }) + let (Some(allowed_countries),) = (self.allowed_countries.take(),) else { + return None; + }; + Some(Self::Out { allowed_countries }) } } @@ -88,7 +96,7 @@ const _: () = { PaymentPagesCheckoutSessionShippingAddressCollectionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "allowed_countries" => b.allowed_countries = Some(FromValueOpt::from_value(v)?), + "allowed_countries" => b.allowed_countries = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_cost.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_cost.rs index 37254fa3e..77574d99d 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_cost.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_cost.rs @@ -22,7 +22,12 @@ pub struct PaymentPagesCheckoutSessionShippingCostBuilder { taxes: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,13 +82,23 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount_subtotal: self.amount_subtotal?, - amount_tax: self.amount_tax?, - amount_total: self.amount_total?, - shipping_rate: self.shipping_rate.take()?, - taxes: self.taxes.take()?, - }) + let ( + Some(amount_subtotal), + Some(amount_tax), + Some(amount_total), + Some(shipping_rate), + Some(taxes), + ) = ( + self.amount_subtotal, + self.amount_tax, + self.amount_total, + self.shipping_rate.take(), + self.taxes.take(), + ) + else { + return None; + }; + Some(Self::Out { amount_subtotal, amount_tax, amount_total, shipping_rate, taxes }) } } @@ -110,11 +125,11 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionShippingCostBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_subtotal" => b.amount_subtotal = Some(FromValueOpt::from_value(v)?), - "amount_tax" => b.amount_tax = Some(FromValueOpt::from_value(v)?), - "amount_total" => b.amount_total = Some(FromValueOpt::from_value(v)?), - "shipping_rate" => b.shipping_rate = Some(FromValueOpt::from_value(v)?), - "taxes" => b.taxes = Some(FromValueOpt::from_value(v)?), + "amount_subtotal" => b.amount_subtotal = FromValueOpt::from_value(v), + "amount_tax" => b.amount_tax = FromValueOpt::from_value(v), + "amount_total" => b.amount_total = FromValueOpt::from_value(v), + "shipping_rate" => b.shipping_rate = FromValueOpt::from_value(v), + "taxes" => b.taxes = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_option.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_option.rs index 1eab5368f..545ca48f7 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_option.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_option.rs @@ -13,7 +13,12 @@ pub struct PaymentPagesCheckoutSessionShippingOptionBuilder { shipping_rate: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - shipping_amount: self.shipping_amount?, - shipping_rate: self.shipping_rate.take()?, - }) + let (Some(shipping_amount), Some(shipping_rate)) = + (self.shipping_amount, self.shipping_rate.take()) + else { + return None; + }; + Some(Self::Out { shipping_amount, shipping_rate }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionShippingOptionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "shipping_amount" => b.shipping_amount = Some(FromValueOpt::from_value(v)?), - "shipping_rate" => b.shipping_rate = Some(FromValueOpt::from_value(v)?), + "shipping_amount" => b.shipping_amount = FromValueOpt::from_value(v), + "shipping_rate" => b.shipping_rate = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id.rs index 61d0d4242..005348749 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id.rs @@ -14,7 +14,12 @@ pub struct PaymentPagesCheckoutSessionTaxIdBuilder { value: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { type_: self.type_?, value: self.value.take()? }) + let (Some(type_), Some(value)) = (self.type_, self.value.take()) else { + return None; + }; + Some(Self::Out { type_, value }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionTaxIdBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "value" => b.value = Some(FromValueOpt::from_value(v)?), + "type" => b.type_ = FromValueOpt::from_value(v), + "value" => b.value = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id_collection.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id_collection.rs index 9fe52b1f9..fd8b1019e 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id_collection.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id_collection.rs @@ -10,7 +10,12 @@ pub struct PaymentPagesCheckoutSessionTaxIdCollectionBuilder { enabled: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled? }) + let (Some(enabled),) = (self.enabled,) else { + return None; + }; + Some(Self::Out { enabled }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionTaxIdCollectionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details.rs index 730c11a85..788ce7754 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details.rs @@ -20,7 +20,12 @@ pub struct PaymentPagesCheckoutSessionTotalDetailsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,12 +78,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount_discount: self.amount_discount?, - amount_shipping: self.amount_shipping?, - amount_tax: self.amount_tax?, - breakdown: self.breakdown.take()?, - }) + let (Some(amount_discount), Some(amount_shipping), Some(amount_tax), Some(breakdown)) = + (self.amount_discount, self.amount_shipping, self.amount_tax, self.breakdown.take()) + else { + return None; + }; + Some(Self::Out { amount_discount, amount_shipping, amount_tax, breakdown }) } } @@ -105,10 +110,10 @@ const _: () = { let mut b = PaymentPagesCheckoutSessionTotalDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_discount" => b.amount_discount = Some(FromValueOpt::from_value(v)?), - "amount_shipping" => b.amount_shipping = Some(FromValueOpt::from_value(v)?), - "amount_tax" => b.amount_tax = Some(FromValueOpt::from_value(v)?), - "breakdown" => b.breakdown = Some(FromValueOpt::from_value(v)?), + "amount_discount" => b.amount_discount = FromValueOpt::from_value(v), + "amount_shipping" => b.amount_shipping = FromValueOpt::from_value(v), + "amount_tax" => b.amount_tax = FromValueOpt::from_value(v), + "breakdown" => b.breakdown = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details_resource_breakdown.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details_resource_breakdown.rs index e92f8b84d..ff4611c5c 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details_resource_breakdown.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details_resource_breakdown.rs @@ -13,7 +13,12 @@ pub struct PaymentPagesCheckoutSessionTotalDetailsResourceBreakdownBuilder { taxes: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { discounts: self.discounts.take()?, taxes: self.taxes.take()? }) + let (Some(discounts), Some(taxes)) = (self.discounts.take(), self.taxes.take()) else { + return None; + }; + Some(Self::Out { discounts, taxes }) } } @@ -88,8 +96,8 @@ const _: () = { PaymentPagesCheckoutSessionTotalDetailsResourceBreakdownBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "discounts" => b.discounts = Some(FromValueOpt::from_value(v)?), - "taxes" => b.taxes = Some(FromValueOpt::from_value(v)?), + "discounts" => b.discounts = FromValueOpt::from_value(v), + "taxes" => b.taxes = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-connect/src/account_link/types.rs b/generated/async-stripe-connect/src/account_link/types.rs index 459afd29b..b34dc6562 100644 --- a/generated/async-stripe-connect/src/account_link/types.rs +++ b/generated/async-stripe-connect/src/account_link/types.rs @@ -21,7 +21,12 @@ pub struct AccountLinkBuilder { url: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,11 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - created: self.created?, - expires_at: self.expires_at?, - url: self.url.take()?, - }) + let (Some(created), Some(expires_at), Some(url)) = + (self.created, self.expires_at, self.url.take()) + else { + return None; + }; + Some(Self::Out { created, expires_at, url }) } } @@ -103,9 +109,9 @@ const _: () = { let mut b = AccountLinkBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-connect/src/account_session/types.rs b/generated/async-stripe-connect/src/account_session/types.rs index 3106dea8a..38e1dec67 100644 --- a/generated/async-stripe-connect/src/account_session/types.rs +++ b/generated/async-stripe-connect/src/account_session/types.rs @@ -36,7 +36,12 @@ pub struct AccountSessionBuilder { livemode: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -91,13 +96,23 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - account: self.account.take()?, - client_secret: self.client_secret.take()?, - components: self.components?, - expires_at: self.expires_at?, - livemode: self.livemode?, - }) + let ( + Some(account), + Some(client_secret), + Some(components), + Some(expires_at), + Some(livemode), + ) = ( + self.account.take(), + self.client_secret.take(), + self.components, + self.expires_at, + self.livemode, + ) + else { + return None; + }; + Some(Self::Out { account, client_secret, components, expires_at, livemode }) } } @@ -124,11 +139,11 @@ const _: () = { let mut b = AccountSessionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account" => b.account = Some(FromValueOpt::from_value(v)?), - "client_secret" => b.client_secret = Some(FromValueOpt::from_value(v)?), - "components" => b.components = Some(FromValueOpt::from_value(v)?), - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), + "account" => b.account = FromValueOpt::from_value(v), + "client_secret" => b.client_secret = FromValueOpt::from_value(v), + "components" => b.components = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-connect/src/apps_secret/types.rs b/generated/async-stripe-connect/src/apps_secret/types.rs index 157434491..546a5e08a 100644 --- a/generated/async-stripe-connect/src/apps_secret/types.rs +++ b/generated/async-stripe-connect/src/apps_secret/types.rs @@ -42,7 +42,12 @@ pub struct AppsSecretBuilder { scope: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -103,16 +108,29 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - created: self.created?, - deleted: self.deleted?, - expires_at: self.expires_at?, - id: self.id.take()?, - livemode: self.livemode?, - name: self.name.take()?, - payload: self.payload.take()?, - scope: self.scope.take()?, - }) + let ( + Some(created), + Some(deleted), + Some(expires_at), + Some(id), + Some(livemode), + Some(name), + Some(payload), + Some(scope), + ) = ( + self.created, + self.deleted, + self.expires_at, + self.id.take(), + self.livemode, + self.name.take(), + self.payload.take(), + self.scope.take(), + ) + else { + return None; + }; + Some(Self::Out { created, deleted, expires_at, id, livemode, name, payload, scope }) } } @@ -139,14 +157,14 @@ const _: () = { let mut b = AppsSecretBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "payload" => b.payload = Some(FromValueOpt::from_value(v)?), - "scope" => b.scope = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "payload" => b.payload = FromValueOpt::from_value(v), + "scope" => b.scope = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-connect/src/connect_embedded_account_config_claim.rs b/generated/async-stripe-connect/src/connect_embedded_account_config_claim.rs index 76dadc5aa..8bc747524 100644 --- a/generated/async-stripe-connect/src/connect_embedded_account_config_claim.rs +++ b/generated/async-stripe-connect/src/connect_embedded_account_config_claim.rs @@ -12,7 +12,12 @@ pub struct ConnectEmbeddedAccountConfigClaimBuilder { features: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled?, features: self.features? }) + let (Some(enabled), Some(features)) = (self.enabled, self.features) else { + return None; + }; + Some(Self::Out { enabled, features }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = ConnectEmbeddedAccountConfigClaimBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "features" => b.features = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "features" => b.features = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-connect/src/connect_embedded_account_features_claim.rs b/generated/async-stripe-connect/src/connect_embedded_account_features_claim.rs index 410841ea9..d64eb6b79 100644 --- a/generated/async-stripe-connect/src/connect_embedded_account_features_claim.rs +++ b/generated/async-stripe-connect/src/connect_embedded_account_features_claim.rs @@ -12,7 +12,12 @@ pub struct ConnectEmbeddedAccountFeaturesClaimBuilder { external_account_collection: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { external_account_collection: self.external_account_collection? }) + let (Some(external_account_collection),) = (self.external_account_collection,) else { + return None; + }; + Some(Self::Out { external_account_collection }) } } @@ -87,7 +95,7 @@ const _: () = { for (k, v) in obj { match k.as_str() { "external_account_collection" => { - b.external_account_collection = Some(FromValueOpt::from_value(v)?) + b.external_account_collection = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-connect/src/connect_embedded_account_session_create_components.rs b/generated/async-stripe-connect/src/connect_embedded_account_session_create_components.rs index b13c8f8e8..3150daebf 100644 --- a/generated/async-stripe-connect/src/connect_embedded_account_session_create_components.rs +++ b/generated/async-stripe-connect/src/connect_embedded_account_session_create_components.rs @@ -25,7 +25,12 @@ pub struct ConnectEmbeddedAccountSessionCreateComponentsBuilder { payouts_list: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -88,16 +93,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_management), + Some(account_onboarding), + Some(balances), + Some(documents), + Some(notification_banner), + Some(payment_details), + Some(payments), + Some(payouts), + Some(payouts_list), + ) = ( + self.account_management, + self.account_onboarding, + self.balances, + self.documents, + self.notification_banner, + self.payment_details, + self.payments, + self.payouts, + self.payouts_list, + ) + else { + return None; + }; Some(Self::Out { - account_management: self.account_management?, - account_onboarding: self.account_onboarding?, - balances: self.balances?, - documents: self.documents?, - notification_banner: self.notification_banner?, - payment_details: self.payment_details?, - payments: self.payments?, - payouts: self.payouts?, - payouts_list: self.payouts_list?, + account_management, + account_onboarding, + balances, + documents, + notification_banner, + payment_details, + payments, + payouts, + payouts_list, }) } } @@ -125,21 +154,15 @@ const _: () = { let mut b = ConnectEmbeddedAccountSessionCreateComponentsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_management" => { - b.account_management = Some(FromValueOpt::from_value(v)?) - } - "account_onboarding" => { - b.account_onboarding = Some(FromValueOpt::from_value(v)?) - } - "balances" => b.balances = Some(FromValueOpt::from_value(v)?), - "documents" => b.documents = Some(FromValueOpt::from_value(v)?), - "notification_banner" => { - b.notification_banner = Some(FromValueOpt::from_value(v)?) - } - "payment_details" => b.payment_details = Some(FromValueOpt::from_value(v)?), - "payments" => b.payments = Some(FromValueOpt::from_value(v)?), - "payouts" => b.payouts = Some(FromValueOpt::from_value(v)?), - "payouts_list" => b.payouts_list = Some(FromValueOpt::from_value(v)?), + "account_management" => b.account_management = FromValueOpt::from_value(v), + "account_onboarding" => b.account_onboarding = FromValueOpt::from_value(v), + "balances" => b.balances = FromValueOpt::from_value(v), + "documents" => b.documents = FromValueOpt::from_value(v), + "notification_banner" => b.notification_banner = FromValueOpt::from_value(v), + "payment_details" => b.payment_details = FromValueOpt::from_value(v), + "payments" => b.payments = FromValueOpt::from_value(v), + "payouts" => b.payouts = FromValueOpt::from_value(v), + "payouts_list" => b.payouts_list = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-connect/src/connect_embedded_base_config_claim.rs b/generated/async-stripe-connect/src/connect_embedded_base_config_claim.rs index 90aedda47..194fc692b 100644 --- a/generated/async-stripe-connect/src/connect_embedded_base_config_claim.rs +++ b/generated/async-stripe-connect/src/connect_embedded_base_config_claim.rs @@ -12,7 +12,12 @@ pub struct ConnectEmbeddedBaseConfigClaimBuilder { features: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled?, features: self.features? }) + let (Some(enabled), Some(features)) = (self.enabled, self.features) else { + return None; + }; + Some(Self::Out { enabled, features }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = ConnectEmbeddedBaseConfigClaimBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "features" => b.features = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "features" => b.features = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-connect/src/connect_embedded_base_features.rs b/generated/async-stripe-connect/src/connect_embedded_base_features.rs index c38ae4bb6..513011c0c 100644 --- a/generated/async-stripe-connect/src/connect_embedded_base_features.rs +++ b/generated/async-stripe-connect/src/connect_embedded_base_features.rs @@ -5,7 +5,12 @@ pub struct ConnectEmbeddedBaseFeatures {} #[doc(hidden)] pub struct ConnectEmbeddedBaseFeaturesBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-connect/src/connect_embedded_payments_config_claim.rs b/generated/async-stripe-connect/src/connect_embedded_payments_config_claim.rs index e255111c7..9ac787fac 100644 --- a/generated/async-stripe-connect/src/connect_embedded_payments_config_claim.rs +++ b/generated/async-stripe-connect/src/connect_embedded_payments_config_claim.rs @@ -12,7 +12,12 @@ pub struct ConnectEmbeddedPaymentsConfigClaimBuilder { features: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled?, features: self.features? }) + let (Some(enabled), Some(features)) = (self.enabled, self.features) else { + return None; + }; + Some(Self::Out { enabled, features }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = ConnectEmbeddedPaymentsConfigClaimBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "features" => b.features = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "features" => b.features = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-connect/src/connect_embedded_payments_features.rs b/generated/async-stripe-connect/src/connect_embedded_payments_features.rs index da130f87e..e262f690e 100644 --- a/generated/async-stripe-connect/src/connect_embedded_payments_features.rs +++ b/generated/async-stripe-connect/src/connect_embedded_payments_features.rs @@ -21,7 +21,12 @@ pub struct ConnectEmbeddedPaymentsFeaturesBuilder { refund_management: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -76,12 +81,25 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(capture_payments), + Some(destination_on_behalf_of_charge_management), + Some(dispute_management), + Some(refund_management), + ) = ( + self.capture_payments, + self.destination_on_behalf_of_charge_management, + self.dispute_management, + self.refund_management, + ) + else { + return None; + }; Some(Self::Out { - capture_payments: self.capture_payments?, - destination_on_behalf_of_charge_management: self - .destination_on_behalf_of_charge_management?, - dispute_management: self.dispute_management?, - refund_management: self.refund_management?, + capture_payments, + destination_on_behalf_of_charge_management, + dispute_management, + refund_management, }) } } @@ -109,15 +127,12 @@ const _: () = { let mut b = ConnectEmbeddedPaymentsFeaturesBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "capture_payments" => b.capture_payments = Some(FromValueOpt::from_value(v)?), + "capture_payments" => b.capture_payments = FromValueOpt::from_value(v), "destination_on_behalf_of_charge_management" => { - b.destination_on_behalf_of_charge_management = - Some(FromValueOpt::from_value(v)?) - } - "dispute_management" => { - b.dispute_management = Some(FromValueOpt::from_value(v)?) + b.destination_on_behalf_of_charge_management = FromValueOpt::from_value(v) } - "refund_management" => b.refund_management = Some(FromValueOpt::from_value(v)?), + "dispute_management" => b.dispute_management = FromValueOpt::from_value(v), + "refund_management" => b.refund_management = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-connect/src/connect_embedded_payouts_config_claim.rs b/generated/async-stripe-connect/src/connect_embedded_payouts_config_claim.rs index 73463f80e..b732b9c6e 100644 --- a/generated/async-stripe-connect/src/connect_embedded_payouts_config_claim.rs +++ b/generated/async-stripe-connect/src/connect_embedded_payouts_config_claim.rs @@ -12,7 +12,12 @@ pub struct ConnectEmbeddedPayoutsConfigClaimBuilder { features: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled?, features: self.features? }) + let (Some(enabled), Some(features)) = (self.enabled, self.features) else { + return None; + }; + Some(Self::Out { enabled, features }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = ConnectEmbeddedPayoutsConfigClaimBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "features" => b.features = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "features" => b.features = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-connect/src/connect_embedded_payouts_features.rs b/generated/async-stripe-connect/src/connect_embedded_payouts_features.rs index ac1f803fd..f27c3b5e0 100644 --- a/generated/async-stripe-connect/src/connect_embedded_payouts_features.rs +++ b/generated/async-stripe-connect/src/connect_embedded_payouts_features.rs @@ -19,7 +19,12 @@ pub struct ConnectEmbeddedPayoutsFeaturesBuilder { standard_payouts: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,11 +75,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - edit_payout_schedule: self.edit_payout_schedule?, - instant_payouts: self.instant_payouts?, - standard_payouts: self.standard_payouts?, - }) + let (Some(edit_payout_schedule), Some(instant_payouts), Some(standard_payouts)) = + (self.edit_payout_schedule, self.instant_payouts, self.standard_payouts) + else { + return None; + }; + Some(Self::Out { edit_payout_schedule, instant_payouts, standard_payouts }) } } @@ -101,11 +107,9 @@ const _: () = { let mut b = ConnectEmbeddedPayoutsFeaturesBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "edit_payout_schedule" => { - b.edit_payout_schedule = Some(FromValueOpt::from_value(v)?) - } - "instant_payouts" => b.instant_payouts = Some(FromValueOpt::from_value(v)?), - "standard_payouts" => b.standard_payouts = Some(FromValueOpt::from_value(v)?), + "edit_payout_schedule" => b.edit_payout_schedule = FromValueOpt::from_value(v), + "instant_payouts" => b.instant_payouts = FromValueOpt::from_value(v), + "standard_payouts" => b.standard_payouts = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-connect/src/country_spec/types.rs b/generated/async-stripe-connect/src/country_spec/types.rs index d9d2d1d24..6ebddcf5f 100644 --- a/generated/async-stripe-connect/src/country_spec/types.rs +++ b/generated/async-stripe-connect/src/country_spec/types.rs @@ -36,7 +36,12 @@ pub struct CountrySpecBuilder { verification_fields: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -103,14 +108,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(default_currency), + Some(id), + Some(supported_bank_account_currencies), + Some(supported_payment_currencies), + Some(supported_payment_methods), + Some(supported_transfer_countries), + Some(verification_fields), + ) = ( + self.default_currency, + self.id.take(), + self.supported_bank_account_currencies.take(), + self.supported_payment_currencies.take(), + self.supported_payment_methods.take(), + self.supported_transfer_countries.take(), + self.verification_fields.take(), + ) + else { + return None; + }; Some(Self::Out { - default_currency: self.default_currency?, - id: self.id.take()?, - supported_bank_account_currencies: self.supported_bank_account_currencies.take()?, - supported_payment_currencies: self.supported_payment_currencies.take()?, - supported_payment_methods: self.supported_payment_methods.take()?, - supported_transfer_countries: self.supported_transfer_countries.take()?, - verification_fields: self.verification_fields.take()?, + default_currency, + id, + supported_bank_account_currencies, + supported_payment_currencies, + supported_payment_methods, + supported_transfer_countries, + verification_fields, }) } } @@ -138,23 +163,21 @@ const _: () = { let mut b = CountrySpecBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "default_currency" => b.default_currency = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "default_currency" => b.default_currency = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), "supported_bank_account_currencies" => { - b.supported_bank_account_currencies = Some(FromValueOpt::from_value(v)?) + b.supported_bank_account_currencies = FromValueOpt::from_value(v) } "supported_payment_currencies" => { - b.supported_payment_currencies = Some(FromValueOpt::from_value(v)?) + b.supported_payment_currencies = FromValueOpt::from_value(v) } "supported_payment_methods" => { - b.supported_payment_methods = Some(FromValueOpt::from_value(v)?) + b.supported_payment_methods = FromValueOpt::from_value(v) } "supported_transfer_countries" => { - b.supported_transfer_countries = Some(FromValueOpt::from_value(v)?) - } - "verification_fields" => { - b.verification_fields = Some(FromValueOpt::from_value(v)?) + b.supported_transfer_countries = FromValueOpt::from_value(v) } + "verification_fields" => b.verification_fields = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-connect/src/country_spec_verification_field_details.rs b/generated/async-stripe-connect/src/country_spec_verification_field_details.rs index eefab2f2e..0450fd3a2 100644 --- a/generated/async-stripe-connect/src/country_spec_verification_field_details.rs +++ b/generated/async-stripe-connect/src/country_spec_verification_field_details.rs @@ -13,7 +13,12 @@ pub struct CountrySpecVerificationFieldDetailsBuilder { minimum: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { additional: self.additional.take()?, minimum: self.minimum.take()? }) + let (Some(additional), Some(minimum)) = (self.additional.take(), self.minimum.take()) + else { + return None; + }; + Some(Self::Out { additional, minimum }) } } @@ -86,8 +95,8 @@ const _: () = { let mut b = CountrySpecVerificationFieldDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "additional" => b.additional = Some(FromValueOpt::from_value(v)?), - "minimum" => b.minimum = Some(FromValueOpt::from_value(v)?), + "additional" => b.additional = FromValueOpt::from_value(v), + "minimum" => b.minimum = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-connect/src/country_spec_verification_fields.rs b/generated/async-stripe-connect/src/country_spec_verification_fields.rs index 0fc9daef7..6004fa8c1 100644 --- a/generated/async-stripe-connect/src/country_spec_verification_fields.rs +++ b/generated/async-stripe-connect/src/country_spec_verification_fields.rs @@ -11,7 +11,12 @@ pub struct CountrySpecVerificationFieldsBuilder { individual: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -57,7 +62,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { company: self.company.take()?, individual: self.individual.take()? }) + let (Some(company), Some(individual)) = (self.company.take(), self.individual.take()) + else { + return None; + }; + Some(Self::Out { company, individual }) } } @@ -84,8 +93,8 @@ const _: () = { let mut b = CountrySpecVerificationFieldsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "company" => b.company = Some(FromValueOpt::from_value(v)?), - "individual" => b.individual = Some(FromValueOpt::from_value(v)?), + "company" => b.company = FromValueOpt::from_value(v), + "individual" => b.individual = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-connect/src/login_link/types.rs b/generated/async-stripe-connect/src/login_link/types.rs index fb8c73052..d3ac1a17f 100644 --- a/generated/async-stripe-connect/src/login_link/types.rs +++ b/generated/async-stripe-connect/src/login_link/types.rs @@ -16,7 +16,12 @@ pub struct LoginLinkBuilder { url: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { created: self.created?, url: self.url.take()? }) + let (Some(created), Some(url)) = (self.created, self.url.take()) else { + return None; + }; + Some(Self::Out { created, url }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = LoginLinkBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-connect/src/secret_service_resource_scope.rs b/generated/async-stripe-connect/src/secret_service_resource_scope.rs index 1aeed4f8a..bfecc7586 100644 --- a/generated/async-stripe-connect/src/secret_service_resource_scope.rs +++ b/generated/async-stripe-connect/src/secret_service_resource_scope.rs @@ -14,7 +14,12 @@ pub struct SecretServiceResourceScopeBuilder { user: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { type_: self.type_?, user: self.user.take()? }) + let (Some(type_), Some(user)) = (self.type_, self.user.take()) else { + return None; + }; + Some(Self::Out { type_, user }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = SecretServiceResourceScopeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "user" => b.user = Some(FromValueOpt::from_value(v)?), + "type" => b.type_ = FromValueOpt::from_value(v), + "user" => b.user = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-core/src/balance/types.rs b/generated/async-stripe-core/src/balance/types.rs index b41be1a1c..9ff30a079 100644 --- a/generated/async-stripe-core/src/balance/types.rs +++ b/generated/async-stripe-core/src/balance/types.rs @@ -39,7 +39,12 @@ pub struct BalanceBuilder { pending: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -93,13 +98,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(available), + Some(connect_reserved), + Some(instant_available), + Some(issuing), + Some(livemode), + Some(pending), + ) = ( + self.available.take(), + self.connect_reserved.take(), + self.instant_available.take(), + self.issuing.take(), + self.livemode, + self.pending.take(), + ) + else { + return None; + }; Some(Self::Out { - available: self.available.take()?, - connect_reserved: self.connect_reserved.take()?, - instant_available: self.instant_available.take()?, - issuing: self.issuing.take()?, - livemode: self.livemode?, - pending: self.pending.take()?, + available, + connect_reserved, + instant_available, + issuing, + livemode, + pending, }) } } @@ -127,12 +150,12 @@ const _: () = { let mut b = BalanceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "available" => b.available = Some(FromValueOpt::from_value(v)?), - "connect_reserved" => b.connect_reserved = Some(FromValueOpt::from_value(v)?), - "instant_available" => b.instant_available = Some(FromValueOpt::from_value(v)?), - "issuing" => b.issuing = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "pending" => b.pending = Some(FromValueOpt::from_value(v)?), + "available" => b.available = FromValueOpt::from_value(v), + "connect_reserved" => b.connect_reserved = FromValueOpt::from_value(v), + "instant_available" => b.instant_available = FromValueOpt::from_value(v), + "issuing" => b.issuing = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "pending" => b.pending = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-core/src/balance_amount.rs b/generated/async-stripe-core/src/balance_amount.rs index fb6f09f13..996a1de64 100644 --- a/generated/async-stripe-core/src/balance_amount.rs +++ b/generated/async-stripe-core/src/balance_amount.rs @@ -16,7 +16,12 @@ pub struct BalanceAmountBuilder { source_types: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - currency: self.currency?, - source_types: self.source_types?, - }) + let (Some(amount), Some(currency), Some(source_types)) = + (self.amount, self.currency, self.source_types) + else { + return None; + }; + Some(Self::Out { amount, currency, source_types }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = BalanceAmountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "source_types" => b.source_types = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "source_types" => b.source_types = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-core/src/balance_amount_by_source_type.rs b/generated/async-stripe-core/src/balance_amount_by_source_type.rs index c7c49fa74..a4fad7a88 100644 --- a/generated/async-stripe-core/src/balance_amount_by_source_type.rs +++ b/generated/async-stripe-core/src/balance_amount_by_source_type.rs @@ -16,7 +16,12 @@ pub struct BalanceAmountBySourceTypeBuilder { fpx: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,7 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { bank_account: self.bank_account?, card: self.card?, fpx: self.fpx? }) + let (Some(bank_account), Some(card), Some(fpx)) = + (self.bank_account, self.card, self.fpx) + else { + return None; + }; + Some(Self::Out { bank_account, card, fpx }) } } @@ -94,9 +104,9 @@ const _: () = { let mut b = BalanceAmountBySourceTypeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_account" => b.bank_account = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "fpx" => b.fpx = Some(FromValueOpt::from_value(v)?), + "bank_account" => b.bank_account = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "fpx" => b.fpx = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-core/src/balance_amount_net.rs b/generated/async-stripe-core/src/balance_amount_net.rs index 03f2370f1..f200208c8 100644 --- a/generated/async-stripe-core/src/balance_amount_net.rs +++ b/generated/async-stripe-core/src/balance_amount_net.rs @@ -16,7 +16,12 @@ pub struct BalanceAmountNetBuilder { source_types: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - currency: self.currency?, - source_types: self.source_types?, - }) + let (Some(amount), Some(currency), Some(source_types)) = + (self.amount, self.currency, self.source_types) + else { + return None; + }; + Some(Self::Out { amount, currency, source_types }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = BalanceAmountNetBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "source_types" => b.source_types = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "source_types" => b.source_types = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-core/src/balance_detail.rs b/generated/async-stripe-core/src/balance_detail.rs index 0b9a75616..b29999a30 100644 --- a/generated/async-stripe-core/src/balance_detail.rs +++ b/generated/async-stripe-core/src/balance_detail.rs @@ -10,7 +10,12 @@ pub struct BalanceDetailBuilder { available: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { available: self.available.take()? }) + let (Some(available),) = (self.available.take(),) else { + return None; + }; + Some(Self::Out { available }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = BalanceDetailBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "available" => b.available = Some(FromValueOpt::from_value(v)?), + "available" => b.available = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-core/src/customer_session/types.rs b/generated/async-stripe-core/src/customer_session/types.rs index 16b448dc7..2c6a9a8fb 100644 --- a/generated/async-stripe-core/src/customer_session/types.rs +++ b/generated/async-stripe-core/src/customer_session/types.rs @@ -30,7 +30,12 @@ pub struct CustomerSessionBuilder { livemode: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -87,14 +92,25 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - client_secret: self.client_secret.take()?, - components: self.components?, - created: self.created?, - customer: self.customer.take()?, - expires_at: self.expires_at?, - livemode: self.livemode?, - }) + let ( + Some(client_secret), + Some(components), + Some(created), + Some(customer), + Some(expires_at), + Some(livemode), + ) = ( + self.client_secret.take(), + self.components, + self.created, + self.customer.take(), + self.expires_at, + self.livemode, + ) + else { + return None; + }; + Some(Self::Out { client_secret, components, created, customer, expires_at, livemode }) } } @@ -121,12 +137,12 @@ const _: () = { let mut b = CustomerSessionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "client_secret" => b.client_secret = Some(FromValueOpt::from_value(v)?), - "components" => b.components = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), + "client_secret" => b.client_secret = FromValueOpt::from_value(v), + "components" => b.components = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-core/src/customer_session_resource_components.rs b/generated/async-stripe-core/src/customer_session_resource_components.rs index 6e28172cd..9b84e5386 100644 --- a/generated/async-stripe-core/src/customer_session_resource_components.rs +++ b/generated/async-stripe-core/src/customer_session_resource_components.rs @@ -12,7 +12,12 @@ pub struct CustomerSessionResourceComponentsBuilder { pricing_table: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { buy_button: self.buy_button?, pricing_table: self.pricing_table? }) + let (Some(buy_button), Some(pricing_table)) = (self.buy_button, self.pricing_table) + else { + return None; + }; + Some(Self::Out { buy_button, pricing_table }) } } @@ -85,8 +94,8 @@ const _: () = { let mut b = CustomerSessionResourceComponentsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "buy_button" => b.buy_button = Some(FromValueOpt::from_value(v)?), - "pricing_table" => b.pricing_table = Some(FromValueOpt::from_value(v)?), + "buy_button" => b.buy_button = FromValueOpt::from_value(v), + "pricing_table" => b.pricing_table = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-core/src/customer_session_resource_components_resource_buy_button.rs b/generated/async-stripe-core/src/customer_session_resource_components_resource_buy_button.rs index ea0e00ce7..febf82495 100644 --- a/generated/async-stripe-core/src/customer_session_resource_components_resource_buy_button.rs +++ b/generated/async-stripe-core/src/customer_session_resource_components_resource_buy_button.rs @@ -11,7 +11,12 @@ pub struct CustomerSessionResourceComponentsResourceBuyButtonBuilder { enabled: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled? }) + let (Some(enabled),) = (self.enabled,) else { + return None; + }; + Some(Self::Out { enabled }) } } @@ -83,7 +91,7 @@ const _: () = { let mut b = CustomerSessionResourceComponentsResourceBuyButtonBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-core/src/customer_session_resource_components_resource_pricing_table.rs b/generated/async-stripe-core/src/customer_session_resource_components_resource_pricing_table.rs index 45a9c3660..907136118 100644 --- a/generated/async-stripe-core/src/customer_session_resource_components_resource_pricing_table.rs +++ b/generated/async-stripe-core/src/customer_session_resource_components_resource_pricing_table.rs @@ -11,7 +11,12 @@ pub struct CustomerSessionResourceComponentsResourcePricingTableBuilder { enabled: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -57,7 +62,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled? }) + let (Some(enabled),) = (self.enabled,) else { + return None; + }; + Some(Self::Out { enabled }) } } @@ -85,7 +93,7 @@ const _: () = { CustomerSessionResourceComponentsResourcePricingTableBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-core/src/token/types.rs b/generated/async-stripe-core/src/token/types.rs index 2d9bedc72..06b6b8c7a 100644 --- a/generated/async-stripe-core/src/token/types.rs +++ b/generated/async-stripe-core/src/token/types.rs @@ -51,7 +51,12 @@ pub struct TokenBuilder { used: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -109,16 +114,29 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank_account: self.bank_account.take()?, - card: self.card.take()?, - client_ip: self.client_ip.take()?, - created: self.created?, - id: self.id.take()?, - livemode: self.livemode?, - type_: self.type_.take()?, - used: self.used?, - }) + let ( + Some(bank_account), + Some(card), + Some(client_ip), + Some(created), + Some(id), + Some(livemode), + Some(type_), + Some(used), + ) = ( + self.bank_account.take(), + self.card.take(), + self.client_ip.take(), + self.created, + self.id.take(), + self.livemode, + self.type_.take(), + self.used, + ) + else { + return None; + }; + Some(Self::Out { bank_account, card, client_ip, created, id, livemode, type_, used }) } } @@ -145,14 +163,14 @@ const _: () = { let mut b = TokenBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_account" => b.bank_account = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "client_ip" => b.client_ip = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "used" => b.used = Some(FromValueOpt::from_value(v)?), + "bank_account" => b.bank_account = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "client_ip" => b.client_ip = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "used" => b.used = FromValueOpt::from_value(v), _ => {} } 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..35e6a047f 100644 --- a/generated/async-stripe-fraud/src/deleted_radar_value_list.rs +++ b/generated/async-stripe-fraud/src/deleted_radar_value_list.rs @@ -12,7 +12,12 @@ pub struct DeletedRadarValueListBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedRadarValueListBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } 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..d8be7431b 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 @@ -12,7 +12,12 @@ pub struct DeletedRadarValueListItemBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedRadarValueListItemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } 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..aadabef81 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 @@ -33,7 +33,12 @@ pub struct RadarEarlyFraudWarningBuilder { payment_intent: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -92,14 +97,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(actionable), + Some(charge), + Some(created), + Some(fraud_type), + Some(id), + Some(livemode), + Some(payment_intent), + ) = ( + self.actionable, + self.charge.take(), + self.created, + self.fraud_type.take(), + self.id.take(), + self.livemode, + self.payment_intent.take(), + ) + else { + return None; + }; Some(Self::Out { - actionable: self.actionable?, - charge: self.charge.take()?, - created: self.created?, - fraud_type: self.fraud_type.take()?, - id: self.id.take()?, - livemode: self.livemode?, - payment_intent: self.payment_intent.take()?, + actionable, + charge, + created, + fraud_type, + id, + livemode, + payment_intent, }) } } @@ -127,13 +152,13 @@ const _: () = { let mut b = RadarEarlyFraudWarningBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "actionable" => b.actionable = Some(FromValueOpt::from_value(v)?), - "charge" => b.charge = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "fraud_type" => b.fraud_type = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "payment_intent" => b.payment_intent = Some(FromValueOpt::from_value(v)?), + "actionable" => b.actionable = FromValueOpt::from_value(v), + "charge" => b.charge = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "fraud_type" => b.fraud_type = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "payment_intent" => b.payment_intent = FromValueOpt::from_value(v), _ => {} } 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..efdf65d05 100644 --- a/generated/async-stripe-fraud/src/radar_value_list/types.rs +++ b/generated/async-stripe-fraud/src/radar_value_list/types.rs @@ -40,7 +40,12 @@ pub struct RadarValueListBuilder { name: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -103,16 +108,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(alias), + Some(created), + Some(created_by), + Some(id), + Some(item_type), + Some(list_items), + Some(livemode), + Some(metadata), + Some(name), + ) = ( + self.alias.take(), + self.created, + self.created_by.take(), + self.id.take(), + self.item_type, + self.list_items.take(), + self.livemode, + self.metadata.take(), + self.name.take(), + ) + else { + return None; + }; Some(Self::Out { - alias: self.alias.take()?, - created: self.created?, - created_by: self.created_by.take()?, - id: self.id.take()?, - item_type: self.item_type?, - list_items: self.list_items.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - name: self.name.take()?, + alias, + created, + created_by, + id, + item_type, + list_items, + livemode, + metadata, + name, }) } } @@ -140,15 +169,15 @@ const _: () = { let mut b = RadarValueListBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "alias" => b.alias = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "created_by" => b.created_by = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "item_type" => b.item_type = Some(FromValueOpt::from_value(v)?), - "list_items" => b.list_items = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), + "alias" => b.alias = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "created_by" => b.created_by = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "item_type" => b.item_type = FromValueOpt::from_value(v), + "list_items" => b.list_items = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), _ => {} } 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..ddae963a0 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 @@ -29,7 +29,12 @@ pub struct RadarValueListItemBuilder { value_list: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -86,14 +91,25 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - created: self.created?, - created_by: self.created_by.take()?, - id: self.id.take()?, - livemode: self.livemode?, - value: self.value.take()?, - value_list: self.value_list.take()?, - }) + let ( + Some(created), + Some(created_by), + Some(id), + Some(livemode), + Some(value), + Some(value_list), + ) = ( + self.created, + self.created_by.take(), + self.id.take(), + self.livemode, + self.value.take(), + self.value_list.take(), + ) + else { + return None; + }; + Some(Self::Out { created, created_by, id, livemode, value, value_list }) } } @@ -120,12 +136,12 @@ const _: () = { let mut b = RadarValueListItemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "created_by" => b.created_by = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "value" => b.value = Some(FromValueOpt::from_value(v)?), - "value_list" => b.value_list = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "created_by" => b.created_by = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "value" => b.value = FromValueOpt::from_value(v), + "value_list" => b.value_list = FromValueOpt::from_value(v), _ => {} } 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..ba4ab216f 100644 --- a/generated/async-stripe-misc/src/apple_pay_domain/types.rs +++ b/generated/async-stripe-misc/src/apple_pay_domain/types.rs @@ -17,7 +17,12 @@ pub struct ApplePayDomainBuilder { livemode: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,12 +75,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - created: self.created?, - domain_name: self.domain_name.take()?, - id: self.id.take()?, - livemode: self.livemode?, - }) + let (Some(created), Some(domain_name), Some(id), Some(livemode)) = + (self.created, self.domain_name.take(), self.id.take(), self.livemode) + else { + return None; + }; + Some(Self::Out { created, domain_name, id, livemode }) } } @@ -102,10 +107,10 @@ const _: () = { let mut b = ApplePayDomainBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "domain_name" => b.domain_name = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "domain_name" => b.domain_name = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/bank_connections_resource_accountholder.rs b/generated/async-stripe-misc/src/bank_connections_resource_accountholder.rs index 0893a655b..710b2a5ba 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_accountholder.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_accountholder.rs @@ -19,7 +19,12 @@ pub struct BankConnectionsResourceAccountholderBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,11 +75,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - account: self.account.take()?, - customer: self.customer.take()?, - type_: self.type_?, - }) + let (Some(account), Some(customer), Some(type_)) = + (self.account.take(), self.customer.take(), self.type_) + else { + return None; + }; + Some(Self::Out { account, customer, type_ }) } } @@ -101,9 +107,9 @@ const _: () = { let mut b = BankConnectionsResourceAccountholderBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account" => b.account = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "account" => b.account = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/bank_connections_resource_balance.rs b/generated/async-stripe-misc/src/bank_connections_resource_balance.rs index 2670c1624..29d280539 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_balance.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_balance.rs @@ -29,7 +29,12 @@ pub struct BankConnectionsResourceBalanceBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -84,13 +89,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - as_of: self.as_of?, - cash: self.cash.take()?, - credit: self.credit.take()?, - current: self.current.take()?, - type_: self.type_?, - }) + let (Some(as_of), Some(cash), Some(credit), Some(current), Some(type_)) = + (self.as_of, self.cash.take(), self.credit.take(), self.current.take(), self.type_) + else { + return None; + }; + Some(Self::Out { as_of, cash, credit, current, type_ }) } } @@ -117,11 +121,11 @@ const _: () = { let mut b = BankConnectionsResourceBalanceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "as_of" => b.as_of = Some(FromValueOpt::from_value(v)?), - "cash" => b.cash = Some(FromValueOpt::from_value(v)?), - "credit" => b.credit = Some(FromValueOpt::from_value(v)?), - "current" => b.current = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "as_of" => b.as_of = FromValueOpt::from_value(v), + "cash" => b.cash = FromValueOpt::from_value(v), + "credit" => b.credit = FromValueOpt::from_value(v), + "current" => b.current = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_cash_balance.rs b/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_cash_balance.rs index b19731f0e..ab4c1fe00 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_cash_balance.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_cash_balance.rs @@ -16,7 +16,12 @@ pub struct BankConnectionsResourceBalanceApiResourceCashBalanceBuilder { available: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,7 +67,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { available: self.available.take()? }) + let (Some(available),) = (self.available.take(),) else { + return None; + }; + Some(Self::Out { available }) } } @@ -90,7 +98,7 @@ const _: () = { BankConnectionsResourceBalanceApiResourceCashBalanceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "available" => b.available = Some(FromValueOpt::from_value(v)?), + "available" => b.available = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_credit_balance.rs b/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_credit_balance.rs index 0feb59464..776ece284 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_credit_balance.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_credit_balance.rs @@ -16,7 +16,12 @@ pub struct BankConnectionsResourceBalanceApiResourceCreditBalanceBuilder { used: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,7 +67,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { used: self.used.take()? }) + let (Some(used),) = (self.used.take(),) else { + return None; + }; + Some(Self::Out { used }) } } @@ -90,7 +98,7 @@ const _: () = { BankConnectionsResourceBalanceApiResourceCreditBalanceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "used" => b.used = Some(FromValueOpt::from_value(v)?), + "used" => b.used = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/bank_connections_resource_balance_refresh.rs b/generated/async-stripe-misc/src/bank_connections_resource_balance_refresh.rs index 8cae2df98..14fbc564a 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_balance_refresh.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_balance_refresh.rs @@ -18,7 +18,12 @@ pub struct BankConnectionsResourceBalanceRefreshBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -71,11 +76,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - last_attempted_at: self.last_attempted_at?, - next_refresh_available_at: self.next_refresh_available_at?, - status: self.status?, - }) + let (Some(last_attempted_at), Some(next_refresh_available_at), Some(status)) = + (self.last_attempted_at, self.next_refresh_available_at, self.status) + else { + return None; + }; + Some(Self::Out { last_attempted_at, next_refresh_available_at, status }) } } @@ -102,11 +108,11 @@ const _: () = { let mut b = BankConnectionsResourceBalanceRefreshBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "last_attempted_at" => b.last_attempted_at = Some(FromValueOpt::from_value(v)?), + "last_attempted_at" => b.last_attempted_at = FromValueOpt::from_value(v), "next_refresh_available_at" => { - b.next_refresh_available_at = Some(FromValueOpt::from_value(v)?) + b.next_refresh_available_at = FromValueOpt::from_value(v) } - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/bank_connections_resource_link_account_session_filters.rs b/generated/async-stripe-misc/src/bank_connections_resource_link_account_session_filters.rs index dd600898f..53b82f16b 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_link_account_session_filters.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_link_account_session_filters.rs @@ -10,7 +10,12 @@ pub struct BankConnectionsResourceLinkAccountSessionFiltersBuilder { countries: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { countries: self.countries.take()? }) + let (Some(countries),) = (self.countries.take(),) else { + return None; + }; + Some(Self::Out { countries }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = BankConnectionsResourceLinkAccountSessionFiltersBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "countries" => b.countries = Some(FromValueOpt::from_value(v)?), + "countries" => b.countries = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/bank_connections_resource_ownership_refresh.rs b/generated/async-stripe-misc/src/bank_connections_resource_ownership_refresh.rs index 9f4cfebd0..6853e291c 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_ownership_refresh.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_ownership_refresh.rs @@ -18,7 +18,12 @@ pub struct BankConnectionsResourceOwnershipRefreshBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -71,11 +76,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - last_attempted_at: self.last_attempted_at?, - next_refresh_available_at: self.next_refresh_available_at?, - status: self.status?, - }) + let (Some(last_attempted_at), Some(next_refresh_available_at), Some(status)) = + (self.last_attempted_at, self.next_refresh_available_at, self.status) + else { + return None; + }; + Some(Self::Out { last_attempted_at, next_refresh_available_at, status }) } } @@ -102,11 +108,11 @@ const _: () = { let mut b = BankConnectionsResourceOwnershipRefreshBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "last_attempted_at" => b.last_attempted_at = Some(FromValueOpt::from_value(v)?), + "last_attempted_at" => b.last_attempted_at = FromValueOpt::from_value(v), "next_refresh_available_at" => { - b.next_refresh_available_at = Some(FromValueOpt::from_value(v)?) + b.next_refresh_available_at = FromValueOpt::from_value(v) } - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/bank_connections_resource_transaction_refresh.rs b/generated/async-stripe-misc/src/bank_connections_resource_transaction_refresh.rs index f3de08f54..9e94ffac4 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_transaction_refresh.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_transaction_refresh.rs @@ -21,7 +21,12 @@ pub struct BankConnectionsResourceTransactionRefreshBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -76,12 +81,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - id: self.id.take()?, - last_attempted_at: self.last_attempted_at?, - next_refresh_available_at: self.next_refresh_available_at?, - status: self.status?, - }) + let (Some(id), Some(last_attempted_at), Some(next_refresh_available_at), Some(status)) = ( + self.id.take(), + self.last_attempted_at, + self.next_refresh_available_at, + self.status, + ) else { + return None; + }; + Some(Self::Out { id, last_attempted_at, next_refresh_available_at, status }) } } @@ -108,12 +116,12 @@ const _: () = { let mut b = BankConnectionsResourceTransactionRefreshBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "last_attempted_at" => b.last_attempted_at = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "last_attempted_at" => b.last_attempted_at = FromValueOpt::from_value(v), "next_refresh_available_at" => { - b.next_refresh_available_at = Some(FromValueOpt::from_value(v)?) + b.next_refresh_available_at = FromValueOpt::from_value(v) } - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/bank_connections_resource_transaction_resource_status_transitions.rs b/generated/async-stripe-misc/src/bank_connections_resource_transaction_resource_status_transitions.rs index e8103831f..f53bbb14a 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_transaction_resource_status_transitions.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_transaction_resource_status_transitions.rs @@ -13,7 +13,12 @@ pub struct BankConnectionsResourceTransactionResourceStatusTransitionsBuilder { void_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { posted_at: self.posted_at?, void_at: self.void_at? }) + let (Some(posted_at), Some(void_at)) = (self.posted_at, self.void_at) else { + return None; + }; + Some(Self::Out { posted_at, void_at }) } } @@ -87,8 +95,8 @@ const _: () = { BankConnectionsResourceTransactionResourceStatusTransitionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "posted_at" => b.posted_at = Some(FromValueOpt::from_value(v)?), - "void_at" => b.void_at = Some(FromValueOpt::from_value(v)?), + "posted_at" => b.posted_at = FromValueOpt::from_value(v), + "void_at" => b.void_at = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/climate_order/types.rs b/generated/async-stripe-misc/src/climate_order/types.rs index a3ac996e6..c68b6f985 100644 --- a/generated/async-stripe-misc/src/climate_order/types.rs +++ b/generated/async-stripe-misc/src/climate_order/types.rs @@ -74,7 +74,12 @@ pub struct ClimateOrderBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -161,28 +166,76 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount_fees), + Some(amount_subtotal), + Some(amount_total), + Some(beneficiary), + Some(canceled_at), + Some(cancellation_reason), + Some(certificate), + Some(confirmed_at), + Some(created), + Some(currency), + Some(delayed_at), + Some(delivered_at), + Some(delivery_details), + Some(expected_delivery_year), + Some(id), + Some(livemode), + Some(metadata), + Some(metric_tons), + Some(product), + Some(product_substituted_at), + Some(status), + ) = ( + self.amount_fees, + self.amount_subtotal, + self.amount_total, + self.beneficiary.take(), + self.canceled_at, + self.cancellation_reason, + self.certificate.take(), + self.confirmed_at, + self.created, + self.currency, + self.delayed_at, + self.delivered_at, + self.delivery_details.take(), + self.expected_delivery_year, + self.id.take(), + self.livemode, + self.metadata.take(), + self.metric_tons.take(), + self.product.take(), + self.product_substituted_at, + self.status, + ) + else { + return None; + }; Some(Self::Out { - amount_fees: self.amount_fees?, - amount_subtotal: self.amount_subtotal?, - amount_total: self.amount_total?, - beneficiary: self.beneficiary.take()?, - canceled_at: self.canceled_at?, - cancellation_reason: self.cancellation_reason?, - certificate: self.certificate.take()?, - confirmed_at: self.confirmed_at?, - created: self.created?, - currency: self.currency?, - delayed_at: self.delayed_at?, - delivered_at: self.delivered_at?, - delivery_details: self.delivery_details.take()?, - expected_delivery_year: self.expected_delivery_year?, - id: self.id.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - metric_tons: self.metric_tons.take()?, - product: self.product.take()?, - product_substituted_at: self.product_substituted_at?, - status: self.status?, + amount_fees, + amount_subtotal, + amount_total, + beneficiary, + canceled_at, + cancellation_reason, + certificate, + confirmed_at, + created, + currency, + delayed_at, + delivered_at, + delivery_details, + expected_delivery_year, + id, + livemode, + metadata, + metric_tons, + product, + product_substituted_at, + status, }) } } @@ -210,33 +263,31 @@ const _: () = { let mut b = ClimateOrderBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_fees" => b.amount_fees = Some(FromValueOpt::from_value(v)?), - "amount_subtotal" => b.amount_subtotal = Some(FromValueOpt::from_value(v)?), - "amount_total" => b.amount_total = Some(FromValueOpt::from_value(v)?), - "beneficiary" => b.beneficiary = Some(FromValueOpt::from_value(v)?), - "canceled_at" => b.canceled_at = Some(FromValueOpt::from_value(v)?), - "cancellation_reason" => { - b.cancellation_reason = Some(FromValueOpt::from_value(v)?) - } - "certificate" => b.certificate = Some(FromValueOpt::from_value(v)?), - "confirmed_at" => b.confirmed_at = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "delayed_at" => b.delayed_at = Some(FromValueOpt::from_value(v)?), - "delivered_at" => b.delivered_at = Some(FromValueOpt::from_value(v)?), - "delivery_details" => b.delivery_details = Some(FromValueOpt::from_value(v)?), + "amount_fees" => b.amount_fees = FromValueOpt::from_value(v), + "amount_subtotal" => b.amount_subtotal = FromValueOpt::from_value(v), + "amount_total" => b.amount_total = FromValueOpt::from_value(v), + "beneficiary" => b.beneficiary = FromValueOpt::from_value(v), + "canceled_at" => b.canceled_at = FromValueOpt::from_value(v), + "cancellation_reason" => b.cancellation_reason = FromValueOpt::from_value(v), + "certificate" => b.certificate = FromValueOpt::from_value(v), + "confirmed_at" => b.confirmed_at = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "delayed_at" => b.delayed_at = FromValueOpt::from_value(v), + "delivered_at" => b.delivered_at = FromValueOpt::from_value(v), + "delivery_details" => b.delivery_details = FromValueOpt::from_value(v), "expected_delivery_year" => { - b.expected_delivery_year = Some(FromValueOpt::from_value(v)?) + b.expected_delivery_year = FromValueOpt::from_value(v) } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "metric_tons" => b.metric_tons = Some(FromValueOpt::from_value(v)?), - "product" => b.product = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "metric_tons" => b.metric_tons = FromValueOpt::from_value(v), + "product" => b.product = FromValueOpt::from_value(v), "product_substituted_at" => { - b.product_substituted_at = Some(FromValueOpt::from_value(v)?) + b.product_substituted_at = FromValueOpt::from_value(v) } - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/climate_product/types.rs b/generated/async-stripe-misc/src/climate_product/types.rs index c55190958..3c4578cb3 100644 --- a/generated/async-stripe-misc/src/climate_product/types.rs +++ b/generated/async-stripe-misc/src/climate_product/types.rs @@ -37,7 +37,12 @@ pub struct ClimateProductBuilder { suppliers: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -100,15 +105,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(created), + Some(current_prices_per_metric_ton), + Some(delivery_year), + Some(id), + Some(livemode), + Some(metric_tons_available), + Some(name), + Some(suppliers), + ) = ( + self.created, + self.current_prices_per_metric_ton.take(), + self.delivery_year, + self.id.take(), + self.livemode, + self.metric_tons_available.take(), + self.name.take(), + self.suppliers.take(), + ) + else { + return None; + }; Some(Self::Out { - created: self.created?, - current_prices_per_metric_ton: self.current_prices_per_metric_ton.take()?, - delivery_year: self.delivery_year?, - id: self.id.take()?, - livemode: self.livemode?, - metric_tons_available: self.metric_tons_available.take()?, - name: self.name.take()?, - suppliers: self.suppliers.take()?, + created, + current_prices_per_metric_ton, + delivery_year, + id, + livemode, + metric_tons_available, + name, + suppliers, }) } } @@ -136,18 +163,18 @@ const _: () = { let mut b = ClimateProductBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), "current_prices_per_metric_ton" => { - b.current_prices_per_metric_ton = Some(FromValueOpt::from_value(v)?) + b.current_prices_per_metric_ton = FromValueOpt::from_value(v) } - "delivery_year" => b.delivery_year = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), + "delivery_year" => b.delivery_year = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), "metric_tons_available" => { - b.metric_tons_available = Some(FromValueOpt::from_value(v)?) + b.metric_tons_available = FromValueOpt::from_value(v) } - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "suppliers" => b.suppliers = Some(FromValueOpt::from_value(v)?), + "name" => b.name = FromValueOpt::from_value(v), + "suppliers" => b.suppliers = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/climate_removals_beneficiary.rs b/generated/async-stripe-misc/src/climate_removals_beneficiary.rs index 76ac3b476..23cea8488 100644 --- a/generated/async-stripe-misc/src/climate_removals_beneficiary.rs +++ b/generated/async-stripe-misc/src/climate_removals_beneficiary.rs @@ -10,7 +10,12 @@ pub struct ClimateRemovalsBeneficiaryBuilder { public_name: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { public_name: self.public_name.take()? }) + let (Some(public_name),) = (self.public_name.take(),) else { + return None; + }; + Some(Self::Out { public_name }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = ClimateRemovalsBeneficiaryBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "public_name" => b.public_name = Some(FromValueOpt::from_value(v)?), + "public_name" => b.public_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/climate_removals_location.rs b/generated/async-stripe-misc/src/climate_removals_location.rs index bb4c9146e..0241c631c 100644 --- a/generated/async-stripe-misc/src/climate_removals_location.rs +++ b/generated/async-stripe-misc/src/climate_removals_location.rs @@ -22,7 +22,12 @@ pub struct ClimateRemovalsLocationBuilder { region: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,13 +82,16 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - city: self.city.take()?, - country: self.country.take()?, - latitude: self.latitude?, - longitude: self.longitude?, - region: self.region.take()?, - }) + let (Some(city), Some(country), Some(latitude), Some(longitude), Some(region)) = ( + self.city.take(), + self.country.take(), + self.latitude, + self.longitude, + self.region.take(), + ) else { + return None; + }; + Some(Self::Out { city, country, latitude, longitude, region }) } } @@ -110,11 +118,11 @@ const _: () = { let mut b = ClimateRemovalsLocationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "city" => b.city = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "latitude" => b.latitude = Some(FromValueOpt::from_value(v)?), - "longitude" => b.longitude = Some(FromValueOpt::from_value(v)?), - "region" => b.region = Some(FromValueOpt::from_value(v)?), + "city" => b.city = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "latitude" => b.latitude = FromValueOpt::from_value(v), + "longitude" => b.longitude = FromValueOpt::from_value(v), + "region" => b.region = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/climate_removals_order_deliveries.rs b/generated/async-stripe-misc/src/climate_removals_order_deliveries.rs index 06485ea85..a68f019bb 100644 --- a/generated/async-stripe-misc/src/climate_removals_order_deliveries.rs +++ b/generated/async-stripe-misc/src/climate_removals_order_deliveries.rs @@ -22,7 +22,12 @@ pub struct ClimateRemovalsOrderDeliveriesBuilder { supplier: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,13 +82,23 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - delivered_at: self.delivered_at?, - location: self.location.take()?, - metric_tons: self.metric_tons.take()?, - registry_url: self.registry_url.take()?, - supplier: self.supplier.take()?, - }) + let ( + Some(delivered_at), + Some(location), + Some(metric_tons), + Some(registry_url), + Some(supplier), + ) = ( + self.delivered_at, + self.location.take(), + self.metric_tons.take(), + self.registry_url.take(), + self.supplier.take(), + ) + else { + return None; + }; + Some(Self::Out { delivered_at, location, metric_tons, registry_url, supplier }) } } @@ -110,11 +125,11 @@ const _: () = { let mut b = ClimateRemovalsOrderDeliveriesBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "delivered_at" => b.delivered_at = Some(FromValueOpt::from_value(v)?), - "location" => b.location = Some(FromValueOpt::from_value(v)?), - "metric_tons" => b.metric_tons = Some(FromValueOpt::from_value(v)?), - "registry_url" => b.registry_url = Some(FromValueOpt::from_value(v)?), - "supplier" => b.supplier = Some(FromValueOpt::from_value(v)?), + "delivered_at" => b.delivered_at = FromValueOpt::from_value(v), + "location" => b.location = FromValueOpt::from_value(v), + "metric_tons" => b.metric_tons = FromValueOpt::from_value(v), + "registry_url" => b.registry_url = FromValueOpt::from_value(v), + "supplier" => b.supplier = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/climate_removals_products_price.rs b/generated/async-stripe-misc/src/climate_removals_products_price.rs index 24208db67..0ae981dbe 100644 --- a/generated/async-stripe-misc/src/climate_removals_products_price.rs +++ b/generated/async-stripe-misc/src/climate_removals_products_price.rs @@ -16,7 +16,12 @@ pub struct ClimateRemovalsProductsPriceBuilder { amount_total: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount_fees: self.amount_fees?, - amount_subtotal: self.amount_subtotal?, - amount_total: self.amount_total?, - }) + let (Some(amount_fees), Some(amount_subtotal), Some(amount_total)) = + (self.amount_fees, self.amount_subtotal, self.amount_total) + else { + return None; + }; + Some(Self::Out { amount_fees, amount_subtotal, amount_total }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = ClimateRemovalsProductsPriceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_fees" => b.amount_fees = Some(FromValueOpt::from_value(v)?), - "amount_subtotal" => b.amount_subtotal = Some(FromValueOpt::from_value(v)?), - "amount_total" => b.amount_total = Some(FromValueOpt::from_value(v)?), + "amount_fees" => b.amount_fees = FromValueOpt::from_value(v), + "amount_subtotal" => b.amount_subtotal = FromValueOpt::from_value(v), + "amount_total" => b.amount_total = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/climate_supplier/types.rs b/generated/async-stripe-misc/src/climate_supplier/types.rs index 24d61823d..4ff6aac82 100644 --- a/generated/async-stripe-misc/src/climate_supplier/types.rs +++ b/generated/async-stripe-misc/src/climate_supplier/types.rs @@ -25,7 +25,12 @@ pub struct ClimateSupplierBuilder { removal_pathway: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -82,14 +87,25 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - id: self.id.take()?, - info_url: self.info_url.take()?, - livemode: self.livemode?, - locations: self.locations.take()?, - name: self.name.take()?, - removal_pathway: self.removal_pathway?, - }) + let ( + Some(id), + Some(info_url), + Some(livemode), + Some(locations), + Some(name), + Some(removal_pathway), + ) = ( + self.id.take(), + self.info_url.take(), + self.livemode, + self.locations.take(), + self.name.take(), + self.removal_pathway, + ) + else { + return None; + }; + Some(Self::Out { id, info_url, livemode, locations, name, removal_pathway }) } } @@ -116,12 +132,12 @@ const _: () = { let mut b = ClimateSupplierBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "info_url" => b.info_url = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "locations" => b.locations = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "removal_pathway" => b.removal_pathway = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "info_url" => b.info_url = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "locations" => b.locations = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "removal_pathway" => b.removal_pathway = FromValueOpt::from_value(v), _ => {} } 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..1ec301162 100644 --- a/generated/async-stripe-misc/src/deleted_apple_pay_domain.rs +++ b/generated/async-stripe-misc/src/deleted_apple_pay_domain.rs @@ -12,7 +12,12 @@ pub struct DeletedApplePayDomainBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedApplePayDomainBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/deleted_webhook_endpoint.rs b/generated/async-stripe-misc/src/deleted_webhook_endpoint.rs index 92e5f4a68..2f550bc58 100644 --- a/generated/async-stripe-misc/src/deleted_webhook_endpoint.rs +++ b/generated/async-stripe-misc/src/deleted_webhook_endpoint.rs @@ -12,7 +12,12 @@ pub struct DeletedWebhookEndpointBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedWebhookEndpointBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } 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..137191c39 100644 --- a/generated/async-stripe-misc/src/entitlements_active_entitlement/types.rs +++ b/generated/async-stripe-misc/src/entitlements_active_entitlement/types.rs @@ -19,7 +19,12 @@ pub struct EntitlementsActiveEntitlementBuilder { lookup_key: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - feature: self.feature.take()?, - id: self.id.take()?, - livemode: self.livemode?, - lookup_key: self.lookup_key.take()?, - }) + let (Some(feature), Some(id), Some(livemode), Some(lookup_key)) = + (self.feature.take(), self.id.take(), self.livemode, self.lookup_key.take()) + else { + return None; + }; + Some(Self::Out { feature, id, livemode, lookup_key }) } } @@ -104,10 +109,10 @@ const _: () = { let mut b = EntitlementsActiveEntitlementBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "feature" => b.feature = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "lookup_key" => b.lookup_key = Some(FromValueOpt::from_value(v)?), + "feature" => b.feature = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "lookup_key" => b.lookup_key = FromValueOpt::from_value(v), _ => {} } 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..bbaa4da09 100644 --- a/generated/async-stripe-misc/src/entitlements_active_entitlement_summary.rs +++ b/generated/async-stripe-misc/src/entitlements_active_entitlement_summary.rs @@ -16,7 +16,12 @@ pub struct EntitlementsActiveEntitlementSummaryBuilder { livemode: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - customer: self.customer.take()?, - entitlements: self.entitlements.take()?, - livemode: self.livemode?, - }) + let (Some(customer), Some(entitlements), Some(livemode)) = + (self.customer.take(), self.entitlements.take(), self.livemode) + else { + return None; + }; + Some(Self::Out { customer, entitlements, livemode }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = EntitlementsActiveEntitlementSummaryBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "entitlements" => b.entitlements = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), + "customer" => b.customer = FromValueOpt::from_value(v), + "entitlements" => b.entitlements = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/ephemeral_key/types.rs b/generated/async-stripe-misc/src/ephemeral_key/types.rs index 8fe897a5b..2b5e9d870 100644 --- a/generated/async-stripe-misc/src/ephemeral_key/types.rs +++ b/generated/async-stripe-misc/src/ephemeral_key/types.rs @@ -21,7 +21,12 @@ pub struct EphemeralKeyBuilder { secret: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -76,13 +81,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - created: self.created?, - expires: self.expires?, - id: self.id.take()?, - livemode: self.livemode?, - secret: self.secret.take()?, - }) + let (Some(created), Some(expires), Some(id), Some(livemode), Some(secret)) = + (self.created, self.expires, self.id.take(), self.livemode, self.secret.take()) + else { + return None; + }; + Some(Self::Out { created, expires, id, livemode, secret }) } } @@ -109,11 +113,11 @@ const _: () = { let mut b = EphemeralKeyBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "expires" => b.expires = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "secret" => b.secret = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "expires" => b.expires = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "secret" => b.secret = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/exchange_rate/types.rs b/generated/async-stripe-misc/src/exchange_rate/types.rs index a7e4797c2..4995f7669 100644 --- a/generated/async-stripe-misc/src/exchange_rate/types.rs +++ b/generated/async-stripe-misc/src/exchange_rate/types.rs @@ -41,7 +41,12 @@ pub struct ExchangeRateBuilder { rates: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -87,7 +92,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { id: self.id.take()?, rates: self.rates.take()? }) + let (Some(id), Some(rates)) = (self.id.take(), self.rates.take()) else { + return None; + }; + Some(Self::Out { id, rates }) } } @@ -114,8 +122,8 @@ const _: () = { let mut b = ExchangeRateBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "rates" => b.rates = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "rates" => b.rates = FromValueOpt::from_value(v), _ => {} } 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..1f2f2624f 100644 --- a/generated/async-stripe-misc/src/financial_connections_account/types.rs +++ b/generated/async-stripe-misc/src/financial_connections_account/types.rs @@ -79,7 +79,12 @@ pub struct FinancialConnectionsAccountBuilder { transaction_refresh: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -162,25 +167,67 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_holder), + Some(balance), + Some(balance_refresh), + Some(category), + Some(created), + Some(display_name), + Some(id), + Some(institution_name), + Some(last4), + Some(livemode), + Some(ownership), + Some(ownership_refresh), + Some(permissions), + Some(status), + Some(subcategory), + Some(subscriptions), + Some(supported_payment_method_types), + Some(transaction_refresh), + ) = ( + self.account_holder.take(), + self.balance.take(), + self.balance_refresh, + self.category, + self.created, + self.display_name.take(), + self.id.take(), + self.institution_name.take(), + self.last4.take(), + self.livemode, + self.ownership.take(), + self.ownership_refresh, + self.permissions.take(), + self.status, + self.subcategory, + self.subscriptions.take(), + self.supported_payment_method_types.take(), + self.transaction_refresh.take(), + ) + else { + return None; + }; Some(Self::Out { - account_holder: self.account_holder.take()?, - balance: self.balance.take()?, - balance_refresh: self.balance_refresh?, - category: self.category?, - created: self.created?, - display_name: self.display_name.take()?, - id: self.id.take()?, - institution_name: self.institution_name.take()?, - last4: self.last4.take()?, - livemode: self.livemode?, - ownership: self.ownership.take()?, - ownership_refresh: self.ownership_refresh?, - permissions: self.permissions.take()?, - status: self.status?, - subcategory: self.subcategory?, - subscriptions: self.subscriptions.take()?, - supported_payment_method_types: self.supported_payment_method_types.take()?, - transaction_refresh: self.transaction_refresh.take()?, + account_holder, + balance, + balance_refresh, + category, + created, + display_name, + id, + institution_name, + last4, + livemode, + ownership, + ownership_refresh, + permissions, + status, + subcategory, + subscriptions, + supported_payment_method_types, + transaction_refresh, }) } } @@ -208,28 +255,26 @@ const _: () = { let mut b = FinancialConnectionsAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_holder" => b.account_holder = Some(FromValueOpt::from_value(v)?), - "balance" => b.balance = Some(FromValueOpt::from_value(v)?), - "balance_refresh" => b.balance_refresh = Some(FromValueOpt::from_value(v)?), - "category" => b.category = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "display_name" => b.display_name = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "institution_name" => b.institution_name = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "ownership" => b.ownership = Some(FromValueOpt::from_value(v)?), - "ownership_refresh" => b.ownership_refresh = Some(FromValueOpt::from_value(v)?), - "permissions" => b.permissions = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "subcategory" => b.subcategory = Some(FromValueOpt::from_value(v)?), - "subscriptions" => b.subscriptions = Some(FromValueOpt::from_value(v)?), + "account_holder" => b.account_holder = FromValueOpt::from_value(v), + "balance" => b.balance = FromValueOpt::from_value(v), + "balance_refresh" => b.balance_refresh = FromValueOpt::from_value(v), + "category" => b.category = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "display_name" => b.display_name = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "institution_name" => b.institution_name = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "ownership" => b.ownership = FromValueOpt::from_value(v), + "ownership_refresh" => b.ownership_refresh = FromValueOpt::from_value(v), + "permissions" => b.permissions = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "subcategory" => b.subcategory = FromValueOpt::from_value(v), + "subscriptions" => b.subscriptions = FromValueOpt::from_value(v), "supported_payment_method_types" => { - b.supported_payment_method_types = Some(FromValueOpt::from_value(v)?) - } - "transaction_refresh" => { - b.transaction_refresh = Some(FromValueOpt::from_value(v)?) + b.supported_payment_method_types = FromValueOpt::from_value(v) } + "transaction_refresh" => b.transaction_refresh = FromValueOpt::from_value(v), _ => {} } 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..db78aaf1d 100644 --- a/generated/async-stripe-misc/src/financial_connections_account_owner.rs +++ b/generated/async-stripe-misc/src/financial_connections_account_owner.rs @@ -28,7 +28,12 @@ pub struct FinancialConnectionsAccountOwnerBuilder { refreshed_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -87,15 +92,27 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - email: self.email.take()?, - id: self.id.take()?, - name: self.name.take()?, - ownership: self.ownership.take()?, - phone: self.phone.take()?, - raw_address: self.raw_address.take()?, - refreshed_at: self.refreshed_at?, - }) + let ( + Some(email), + Some(id), + Some(name), + Some(ownership), + Some(phone), + Some(raw_address), + Some(refreshed_at), + ) = ( + self.email.take(), + self.id.take(), + self.name.take(), + self.ownership.take(), + self.phone.take(), + self.raw_address.take(), + self.refreshed_at, + ) + else { + return None; + }; + Some(Self::Out { email, id, name, ownership, phone, raw_address, refreshed_at }) } } @@ -122,13 +139,13 @@ const _: () = { let mut b = FinancialConnectionsAccountOwnerBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "ownership" => b.ownership = Some(FromValueOpt::from_value(v)?), - "phone" => b.phone = Some(FromValueOpt::from_value(v)?), - "raw_address" => b.raw_address = Some(FromValueOpt::from_value(v)?), - "refreshed_at" => b.refreshed_at = Some(FromValueOpt::from_value(v)?), + "email" => b.email = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "ownership" => b.ownership = FromValueOpt::from_value(v), + "phone" => b.phone = FromValueOpt::from_value(v), + "raw_address" => b.raw_address = FromValueOpt::from_value(v), + "refreshed_at" => b.refreshed_at = FromValueOpt::from_value(v), _ => {} } 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..01bd5ed66 100644 --- a/generated/async-stripe-misc/src/financial_connections_account_ownership.rs +++ b/generated/async-stripe-misc/src/financial_connections_account_ownership.rs @@ -16,7 +16,12 @@ pub struct FinancialConnectionsAccountOwnershipBuilder { owners: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - created: self.created?, - id: self.id.take()?, - owners: self.owners.take()?, - }) + let (Some(created), Some(id), Some(owners)) = + (self.created, self.id.take(), self.owners.take()) + else { + return None; + }; + Some(Self::Out { created, id, owners }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = FinancialConnectionsAccountOwnershipBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "owners" => b.owners = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "owners" => b.owners = FromValueOpt::from_value(v), _ => {} } 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..b79a60dc3 100644 --- a/generated/async-stripe-misc/src/financial_connections_session/types.rs +++ b/generated/async-stripe-misc/src/financial_connections_session/types.rs @@ -36,7 +36,12 @@ pub struct FinancialConnectionsSessionBuilder { return_url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -99,16 +104,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_holder), + Some(accounts), + Some(client_secret), + Some(filters), + Some(id), + Some(livemode), + Some(permissions), + Some(prefetch), + Some(return_url), + ) = ( + self.account_holder.take(), + self.accounts.take(), + self.client_secret.take(), + self.filters.take(), + self.id.take(), + self.livemode, + self.permissions.take(), + self.prefetch.take(), + self.return_url.take(), + ) + else { + return None; + }; Some(Self::Out { - account_holder: self.account_holder.take()?, - accounts: self.accounts.take()?, - client_secret: self.client_secret.take()?, - filters: self.filters.take()?, - id: self.id.take()?, - livemode: self.livemode?, - permissions: self.permissions.take()?, - prefetch: self.prefetch.take()?, - return_url: self.return_url.take()?, + account_holder, + accounts, + client_secret, + filters, + id, + livemode, + permissions, + prefetch, + return_url, }) } } @@ -136,15 +165,15 @@ const _: () = { let mut b = FinancialConnectionsSessionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_holder" => b.account_holder = Some(FromValueOpt::from_value(v)?), - "accounts" => b.accounts = Some(FromValueOpt::from_value(v)?), - "client_secret" => b.client_secret = Some(FromValueOpt::from_value(v)?), - "filters" => b.filters = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "permissions" => b.permissions = Some(FromValueOpt::from_value(v)?), - "prefetch" => b.prefetch = Some(FromValueOpt::from_value(v)?), - "return_url" => b.return_url = Some(FromValueOpt::from_value(v)?), + "account_holder" => b.account_holder = FromValueOpt::from_value(v), + "accounts" => b.accounts = FromValueOpt::from_value(v), + "client_secret" => b.client_secret = FromValueOpt::from_value(v), + "filters" => b.filters = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "permissions" => b.permissions = FromValueOpt::from_value(v), + "prefetch" => b.prefetch = FromValueOpt::from_value(v), + "return_url" => b.return_url = FromValueOpt::from_value(v), _ => {} } 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..0948dbb91 100644 --- a/generated/async-stripe-misc/src/financial_connections_transaction/types.rs +++ b/generated/async-stripe-misc/src/financial_connections_transaction/types.rs @@ -42,7 +42,12 @@ pub struct FinancialConnectionsTransactionBuilder { updated: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -109,18 +114,46 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account), + Some(amount), + Some(currency), + Some(description), + Some(id), + Some(livemode), + Some(status), + Some(status_transitions), + Some(transacted_at), + Some(transaction_refresh), + Some(updated), + ) = ( + self.account.take(), + self.amount, + self.currency, + self.description.take(), + self.id.take(), + self.livemode, + self.status, + self.status_transitions, + self.transacted_at, + self.transaction_refresh.take(), + self.updated, + ) + else { + return None; + }; Some(Self::Out { - account: self.account.take()?, - amount: self.amount?, - currency: self.currency?, - description: self.description.take()?, - id: self.id.take()?, - livemode: self.livemode?, - status: self.status?, - status_transitions: self.status_transitions?, - transacted_at: self.transacted_at?, - transaction_refresh: self.transaction_refresh.take()?, - updated: self.updated?, + account, + amount, + currency, + description, + id, + livemode, + status, + status_transitions, + transacted_at, + transaction_refresh, + updated, }) } } @@ -148,21 +181,17 @@ const _: () = { let mut b = FinancialConnectionsTransactionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account" => b.account = Some(FromValueOpt::from_value(v)?), - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_transitions" => { - b.status_transitions = Some(FromValueOpt::from_value(v)?) - } - "transacted_at" => b.transacted_at = Some(FromValueOpt::from_value(v)?), - "transaction_refresh" => { - b.transaction_refresh = Some(FromValueOpt::from_value(v)?) - } - "updated" => b.updated = Some(FromValueOpt::from_value(v)?), + "account" => b.account = FromValueOpt::from_value(v), + "amount" => b.amount = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "status_transitions" => b.status_transitions = FromValueOpt::from_value(v), + "transacted_at" => b.transacted_at = FromValueOpt::from_value(v), + "transaction_refresh" => b.transaction_refresh = FromValueOpt::from_value(v), + "updated" => b.updated = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/financial_reporting_finance_report_run_run_parameters.rs b/generated/async-stripe-misc/src/financial_reporting_finance_report_run_run_parameters.rs index 701e91af5..0c85d456c 100644 --- a/generated/async-stripe-misc/src/financial_reporting_finance_report_run_run_parameters.rs +++ b/generated/async-stripe-misc/src/financial_reporting_finance_report_run_run_parameters.rs @@ -36,7 +36,12 @@ pub struct FinancialReportingFinanceReportRunRunParametersBuilder { timezone: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -97,15 +102,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(columns), + Some(connected_account), + Some(currency), + Some(interval_end), + Some(interval_start), + Some(payout), + Some(reporting_category), + Some(timezone), + ) = ( + self.columns.take(), + self.connected_account.take(), + self.currency, + self.interval_end, + self.interval_start, + self.payout.take(), + self.reporting_category.take(), + self.timezone.take(), + ) + else { + return None; + }; Some(Self::Out { - columns: self.columns.take()?, - connected_account: self.connected_account.take()?, - currency: self.currency?, - interval_end: self.interval_end?, - interval_start: self.interval_start?, - payout: self.payout.take()?, - reporting_category: self.reporting_category.take()?, - timezone: self.timezone.take()?, + columns, + connected_account, + currency, + interval_end, + interval_start, + payout, + reporting_category, + timezone, }) } } @@ -133,16 +160,14 @@ const _: () = { let mut b = FinancialReportingFinanceReportRunRunParametersBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "columns" => b.columns = Some(FromValueOpt::from_value(v)?), - "connected_account" => b.connected_account = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "interval_end" => b.interval_end = Some(FromValueOpt::from_value(v)?), - "interval_start" => b.interval_start = Some(FromValueOpt::from_value(v)?), - "payout" => b.payout = Some(FromValueOpt::from_value(v)?), - "reporting_category" => { - b.reporting_category = Some(FromValueOpt::from_value(v)?) - } - "timezone" => b.timezone = Some(FromValueOpt::from_value(v)?), + "columns" => b.columns = FromValueOpt::from_value(v), + "connected_account" => b.connected_account = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "interval_end" => b.interval_end = FromValueOpt::from_value(v), + "interval_start" => b.interval_start = FromValueOpt::from_value(v), + "payout" => b.payout = FromValueOpt::from_value(v), + "reporting_category" => b.reporting_category = FromValueOpt::from_value(v), + "timezone" => b.timezone = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/forwarded_request_context.rs b/generated/async-stripe-misc/src/forwarded_request_context.rs index 14b92da82..b62438fac 100644 --- a/generated/async-stripe-misc/src/forwarded_request_context.rs +++ b/generated/async-stripe-misc/src/forwarded_request_context.rs @@ -14,7 +14,12 @@ pub struct ForwardedRequestContextBuilder { destination_ip_address: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -63,10 +68,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - destination_duration: self.destination_duration?, - destination_ip_address: self.destination_ip_address.take()?, - }) + let (Some(destination_duration), Some(destination_ip_address)) = + (self.destination_duration, self.destination_ip_address.take()) + else { + return None; + }; + Some(Self::Out { destination_duration, destination_ip_address }) } } @@ -93,11 +100,9 @@ const _: () = { let mut b = ForwardedRequestContextBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "destination_duration" => { - b.destination_duration = Some(FromValueOpt::from_value(v)?) - } + "destination_duration" => b.destination_duration = FromValueOpt::from_value(v), "destination_ip_address" => { - b.destination_ip_address = Some(FromValueOpt::from_value(v)?) + b.destination_ip_address = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-misc/src/forwarded_request_details.rs b/generated/async-stripe-misc/src/forwarded_request_details.rs index 393ce965a..6875e4fce 100644 --- a/generated/async-stripe-misc/src/forwarded_request_details.rs +++ b/generated/async-stripe-misc/src/forwarded_request_details.rs @@ -18,7 +18,12 @@ pub struct ForwardedRequestDetailsBuilder { http_method: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - body: self.body.take()?, - headers: self.headers.take()?, - http_method: self.http_method?, - }) + let (Some(body), Some(headers), Some(http_method)) = + (self.body.take(), self.headers.take(), self.http_method) + else { + return None; + }; + Some(Self::Out { body, headers, http_method }) } } @@ -100,9 +106,9 @@ const _: () = { let mut b = ForwardedRequestDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "body" => b.body = Some(FromValueOpt::from_value(v)?), - "headers" => b.headers = Some(FromValueOpt::from_value(v)?), - "http_method" => b.http_method = Some(FromValueOpt::from_value(v)?), + "body" => b.body = FromValueOpt::from_value(v), + "headers" => b.headers = FromValueOpt::from_value(v), + "http_method" => b.http_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/forwarded_request_header.rs b/generated/async-stripe-misc/src/forwarded_request_header.rs index ed1742fe7..e36227184 100644 --- a/generated/async-stripe-misc/src/forwarded_request_header.rs +++ b/generated/async-stripe-misc/src/forwarded_request_header.rs @@ -14,7 +14,12 @@ pub struct ForwardedRequestHeaderBuilder { value: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { name: self.name.take()?, value: self.value.take()? }) + let (Some(name), Some(value)) = (self.name.take(), self.value.take()) else { + return None; + }; + Some(Self::Out { name, value }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = ForwardedRequestHeaderBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "value" => b.value = Some(FromValueOpt::from_value(v)?), + "name" => b.name = FromValueOpt::from_value(v), + "value" => b.value = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/forwarded_response_details.rs b/generated/async-stripe-misc/src/forwarded_response_details.rs index e1237054a..ba317d710 100644 --- a/generated/async-stripe-misc/src/forwarded_response_details.rs +++ b/generated/async-stripe-misc/src/forwarded_response_details.rs @@ -17,7 +17,12 @@ pub struct ForwardedResponseDetailsBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - body: self.body.take()?, - headers: self.headers.take()?, - status: self.status?, - }) + let (Some(body), Some(headers), Some(status)) = + (self.body.take(), self.headers.take(), self.status) + else { + return None; + }; + Some(Self::Out { body, headers, status }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = ForwardedResponseDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "body" => b.body = Some(FromValueOpt::from_value(v)?), - "headers" => b.headers = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "body" => b.body = FromValueOpt::from_value(v), + "headers" => b.headers = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/forwarding_request/types.rs b/generated/async-stripe-misc/src/forwarding_request/types.rs index 68509c155..a842aca0d 100644 --- a/generated/async-stripe-misc/src/forwarding_request/types.rs +++ b/generated/async-stripe-misc/src/forwarding_request/types.rs @@ -51,7 +51,12 @@ pub struct ForwardingRequestBuilder { url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -114,16 +119,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(created), + Some(id), + Some(livemode), + Some(payment_method), + Some(replacements), + Some(request_context), + Some(request_details), + Some(response_details), + Some(url), + ) = ( + self.created, + self.id.take(), + self.livemode, + self.payment_method.take(), + self.replacements.take(), + self.request_context.take(), + self.request_details.take(), + self.response_details.take(), + self.url.take(), + ) + else { + return None; + }; Some(Self::Out { - created: self.created?, - id: self.id.take()?, - livemode: self.livemode?, - payment_method: self.payment_method.take()?, - replacements: self.replacements.take()?, - request_context: self.request_context.take()?, - request_details: self.request_details.take()?, - response_details: self.response_details.take()?, - url: self.url.take()?, + created, + id, + livemode, + payment_method, + replacements, + request_context, + request_details, + response_details, + url, }) } } @@ -151,15 +180,15 @@ const _: () = { let mut b = ForwardingRequestBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "payment_method" => b.payment_method = Some(FromValueOpt::from_value(v)?), - "replacements" => b.replacements = Some(FromValueOpt::from_value(v)?), - "request_context" => b.request_context = Some(FromValueOpt::from_value(v)?), - "request_details" => b.request_details = Some(FromValueOpt::from_value(v)?), - "response_details" => b.response_details = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "payment_method" => b.payment_method = FromValueOpt::from_value(v), + "replacements" => b.replacements = FromValueOpt::from_value(v), + "request_context" => b.request_context = FromValueOpt::from_value(v), + "request_details" => b.request_details = FromValueOpt::from_value(v), + "response_details" => b.response_details = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_data_document_report_date_of_birth.rs b/generated/async-stripe-misc/src/gelato_data_document_report_date_of_birth.rs index 85e8eca97..b2e54d8ae 100644 --- a/generated/async-stripe-misc/src/gelato_data_document_report_date_of_birth.rs +++ b/generated/async-stripe-misc/src/gelato_data_document_report_date_of_birth.rs @@ -17,7 +17,12 @@ pub struct GelatoDataDocumentReportDateOfBirthBuilder { year: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,7 +73,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { day: self.day?, month: self.month?, year: self.year? }) + let (Some(day), Some(month), Some(year)) = (self.day, self.month, self.year) else { + return None; + }; + Some(Self::Out { day, month, year }) } } @@ -95,9 +103,9 @@ const _: () = { let mut b = GelatoDataDocumentReportDateOfBirthBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "day" => b.day = Some(FromValueOpt::from_value(v)?), - "month" => b.month = Some(FromValueOpt::from_value(v)?), - "year" => b.year = Some(FromValueOpt::from_value(v)?), + "day" => b.day = FromValueOpt::from_value(v), + "month" => b.month = FromValueOpt::from_value(v), + "year" => b.year = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_data_document_report_expiration_date.rs b/generated/async-stripe-misc/src/gelato_data_document_report_expiration_date.rs index 649bc092f..812f840ab 100644 --- a/generated/async-stripe-misc/src/gelato_data_document_report_expiration_date.rs +++ b/generated/async-stripe-misc/src/gelato_data_document_report_expiration_date.rs @@ -17,7 +17,12 @@ pub struct GelatoDataDocumentReportExpirationDateBuilder { year: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,7 +73,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { day: self.day?, month: self.month?, year: self.year? }) + let (Some(day), Some(month), Some(year)) = (self.day, self.month, self.year) else { + return None; + }; + Some(Self::Out { day, month, year }) } } @@ -95,9 +103,9 @@ const _: () = { let mut b = GelatoDataDocumentReportExpirationDateBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "day" => b.day = Some(FromValueOpt::from_value(v)?), - "month" => b.month = Some(FromValueOpt::from_value(v)?), - "year" => b.year = Some(FromValueOpt::from_value(v)?), + "day" => b.day = FromValueOpt::from_value(v), + "month" => b.month = FromValueOpt::from_value(v), + "year" => b.year = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_data_document_report_issued_date.rs b/generated/async-stripe-misc/src/gelato_data_document_report_issued_date.rs index 9fdac276a..6e0071aca 100644 --- a/generated/async-stripe-misc/src/gelato_data_document_report_issued_date.rs +++ b/generated/async-stripe-misc/src/gelato_data_document_report_issued_date.rs @@ -17,7 +17,12 @@ pub struct GelatoDataDocumentReportIssuedDateBuilder { year: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,7 +73,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { day: self.day?, month: self.month?, year: self.year? }) + let (Some(day), Some(month), Some(year)) = (self.day, self.month, self.year) else { + return None; + }; + Some(Self::Out { day, month, year }) } } @@ -95,9 +103,9 @@ const _: () = { let mut b = GelatoDataDocumentReportIssuedDateBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "day" => b.day = Some(FromValueOpt::from_value(v)?), - "month" => b.month = Some(FromValueOpt::from_value(v)?), - "year" => b.year = Some(FromValueOpt::from_value(v)?), + "day" => b.day = FromValueOpt::from_value(v), + "month" => b.month = FromValueOpt::from_value(v), + "year" => b.year = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_data_id_number_report_date.rs b/generated/async-stripe-misc/src/gelato_data_id_number_report_date.rs index ac914979b..9bb72e9a3 100644 --- a/generated/async-stripe-misc/src/gelato_data_id_number_report_date.rs +++ b/generated/async-stripe-misc/src/gelato_data_id_number_report_date.rs @@ -17,7 +17,12 @@ pub struct GelatoDataIdNumberReportDateBuilder { year: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,7 +73,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { day: self.day?, month: self.month?, year: self.year? }) + let (Some(day), Some(month), Some(year)) = (self.day, self.month, self.year) else { + return None; + }; + Some(Self::Out { day, month, year }) } } @@ -95,9 +103,9 @@ const _: () = { let mut b = GelatoDataIdNumberReportDateBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "day" => b.day = Some(FromValueOpt::from_value(v)?), - "month" => b.month = Some(FromValueOpt::from_value(v)?), - "year" => b.year = Some(FromValueOpt::from_value(v)?), + "day" => b.day = FromValueOpt::from_value(v), + "month" => b.month = FromValueOpt::from_value(v), + "year" => b.year = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_data_verified_outputs_date.rs b/generated/async-stripe-misc/src/gelato_data_verified_outputs_date.rs index 282491465..60b910222 100644 --- a/generated/async-stripe-misc/src/gelato_data_verified_outputs_date.rs +++ b/generated/async-stripe-misc/src/gelato_data_verified_outputs_date.rs @@ -17,7 +17,12 @@ pub struct GelatoDataVerifiedOutputsDateBuilder { year: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,7 +73,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { day: self.day?, month: self.month?, year: self.year? }) + let (Some(day), Some(month), Some(year)) = (self.day, self.month, self.year) else { + return None; + }; + Some(Self::Out { day, month, year }) } } @@ -95,9 +103,9 @@ const _: () = { let mut b = GelatoDataVerifiedOutputsDateBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "day" => b.day = Some(FromValueOpt::from_value(v)?), - "month" => b.month = Some(FromValueOpt::from_value(v)?), - "year" => b.year = Some(FromValueOpt::from_value(v)?), + "day" => b.day = FromValueOpt::from_value(v), + "month" => b.month = FromValueOpt::from_value(v), + "year" => b.year = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_document_report.rs b/generated/async-stripe-misc/src/gelato_document_report.rs index cbdc2db58..40dbe10e2 100644 --- a/generated/async-stripe-misc/src/gelato_document_report.rs +++ b/generated/async-stripe-misc/src/gelato_document_report.rs @@ -45,7 +45,12 @@ pub struct GelatoDocumentReportBuilder { type_: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -114,19 +119,49 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(address), + Some(dob), + Some(error), + Some(expiration_date), + Some(files), + Some(first_name), + Some(issued_date), + Some(issuing_country), + Some(last_name), + Some(number), + Some(status), + Some(type_), + ) = ( + self.address.take(), + self.dob, + self.error.take(), + self.expiration_date, + self.files.take(), + self.first_name.take(), + self.issued_date, + self.issuing_country.take(), + self.last_name.take(), + self.number.take(), + self.status, + self.type_, + ) + else { + return None; + }; Some(Self::Out { - address: self.address.take()?, - dob: self.dob?, - error: self.error.take()?, - expiration_date: self.expiration_date?, - files: self.files.take()?, - first_name: self.first_name.take()?, - issued_date: self.issued_date?, - issuing_country: self.issuing_country.take()?, - last_name: self.last_name.take()?, - number: self.number.take()?, - status: self.status?, - type_: self.type_?, + address, + dob, + error, + expiration_date, + files, + first_name, + issued_date, + issuing_country, + last_name, + number, + status, + type_, }) } } @@ -154,18 +189,18 @@ const _: () = { let mut b = GelatoDocumentReportBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), - "dob" => b.dob = Some(FromValueOpt::from_value(v)?), - "error" => b.error = Some(FromValueOpt::from_value(v)?), - "expiration_date" => b.expiration_date = Some(FromValueOpt::from_value(v)?), - "files" => b.files = Some(FromValueOpt::from_value(v)?), - "first_name" => b.first_name = Some(FromValueOpt::from_value(v)?), - "issued_date" => b.issued_date = Some(FromValueOpt::from_value(v)?), - "issuing_country" => b.issuing_country = Some(FromValueOpt::from_value(v)?), - "last_name" => b.last_name = Some(FromValueOpt::from_value(v)?), - "number" => b.number = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), + "dob" => b.dob = FromValueOpt::from_value(v), + "error" => b.error = FromValueOpt::from_value(v), + "expiration_date" => b.expiration_date = FromValueOpt::from_value(v), + "files" => b.files = FromValueOpt::from_value(v), + "first_name" => b.first_name = FromValueOpt::from_value(v), + "issued_date" => b.issued_date = FromValueOpt::from_value(v), + "issuing_country" => b.issuing_country = FromValueOpt::from_value(v), + "last_name" => b.last_name = FromValueOpt::from_value(v), + "number" => b.number = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_document_report_error.rs b/generated/async-stripe-misc/src/gelato_document_report_error.rs index ad1bbbfcc..145792c86 100644 --- a/generated/async-stripe-misc/src/gelato_document_report_error.rs +++ b/generated/async-stripe-misc/src/gelato_document_report_error.rs @@ -14,7 +14,12 @@ pub struct GelatoDocumentReportErrorBuilder { reason: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { code: self.code?, reason: self.reason.take()? }) + let (Some(code), Some(reason)) = (self.code, self.reason.take()) else { + return None; + }; + Some(Self::Out { code, reason }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = GelatoDocumentReportErrorBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "code" => b.code = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), + "code" => b.code = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_email_report.rs b/generated/async-stripe-misc/src/gelato_email_report.rs index a073fa017..0a4383371 100644 --- a/generated/async-stripe-misc/src/gelato_email_report.rs +++ b/generated/async-stripe-misc/src/gelato_email_report.rs @@ -17,7 +17,12 @@ pub struct GelatoEmailReportBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - email: self.email.take()?, - error: self.error.take()?, - status: self.status?, - }) + let (Some(email), Some(error), Some(status)) = + (self.email.take(), self.error.take(), self.status) + else { + return None; + }; + Some(Self::Out { email, error, status }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = GelatoEmailReportBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "error" => b.error = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "email" => b.email = FromValueOpt::from_value(v), + "error" => b.error = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_email_report_error.rs b/generated/async-stripe-misc/src/gelato_email_report_error.rs index 333a427b2..7eb159b09 100644 --- a/generated/async-stripe-misc/src/gelato_email_report_error.rs +++ b/generated/async-stripe-misc/src/gelato_email_report_error.rs @@ -14,7 +14,12 @@ pub struct GelatoEmailReportErrorBuilder { reason: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { code: self.code?, reason: self.reason.take()? }) + let (Some(code), Some(reason)) = (self.code, self.reason.take()) else { + return None; + }; + Some(Self::Out { code, reason }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = GelatoEmailReportErrorBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "code" => b.code = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), + "code" => b.code = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_id_number_report.rs b/generated/async-stripe-misc/src/gelato_id_number_report.rs index 1ee913669..96b100e71 100644 --- a/generated/async-stripe-misc/src/gelato_id_number_report.rs +++ b/generated/async-stripe-misc/src/gelato_id_number_report.rs @@ -29,7 +29,12 @@ pub struct GelatoIdNumberReportBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -88,15 +93,27 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - dob: self.dob?, - error: self.error.take()?, - first_name: self.first_name.take()?, - id_number: self.id_number.take()?, - id_number_type: self.id_number_type?, - last_name: self.last_name.take()?, - status: self.status?, - }) + let ( + Some(dob), + Some(error), + Some(first_name), + Some(id_number), + Some(id_number_type), + Some(last_name), + Some(status), + ) = ( + self.dob, + self.error.take(), + self.first_name.take(), + self.id_number.take(), + self.id_number_type, + self.last_name.take(), + self.status, + ) + else { + return None; + }; + Some(Self::Out { dob, error, first_name, id_number, id_number_type, last_name, status }) } } @@ -123,13 +140,13 @@ const _: () = { let mut b = GelatoIdNumberReportBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "dob" => b.dob = Some(FromValueOpt::from_value(v)?), - "error" => b.error = Some(FromValueOpt::from_value(v)?), - "first_name" => b.first_name = Some(FromValueOpt::from_value(v)?), - "id_number" => b.id_number = Some(FromValueOpt::from_value(v)?), - "id_number_type" => b.id_number_type = Some(FromValueOpt::from_value(v)?), - "last_name" => b.last_name = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "dob" => b.dob = FromValueOpt::from_value(v), + "error" => b.error = FromValueOpt::from_value(v), + "first_name" => b.first_name = FromValueOpt::from_value(v), + "id_number" => b.id_number = FromValueOpt::from_value(v), + "id_number_type" => b.id_number_type = FromValueOpt::from_value(v), + "last_name" => b.last_name = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_id_number_report_error.rs b/generated/async-stripe-misc/src/gelato_id_number_report_error.rs index a6ec661c0..91e1cddcc 100644 --- a/generated/async-stripe-misc/src/gelato_id_number_report_error.rs +++ b/generated/async-stripe-misc/src/gelato_id_number_report_error.rs @@ -14,7 +14,12 @@ pub struct GelatoIdNumberReportErrorBuilder { reason: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { code: self.code?, reason: self.reason.take()? }) + let (Some(code), Some(reason)) = (self.code, self.reason.take()) else { + return None; + }; + Some(Self::Out { code, reason }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = GelatoIdNumberReportErrorBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "code" => b.code = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), + "code" => b.code = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_phone_report.rs b/generated/async-stripe-misc/src/gelato_phone_report.rs index 025af3ad1..65ff9509e 100644 --- a/generated/async-stripe-misc/src/gelato_phone_report.rs +++ b/generated/async-stripe-misc/src/gelato_phone_report.rs @@ -17,7 +17,12 @@ pub struct GelatoPhoneReportBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - error: self.error.take()?, - phone: self.phone.take()?, - status: self.status?, - }) + let (Some(error), Some(phone), Some(status)) = + (self.error.take(), self.phone.take(), self.status) + else { + return None; + }; + Some(Self::Out { error, phone, status }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = GelatoPhoneReportBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "error" => b.error = Some(FromValueOpt::from_value(v)?), - "phone" => b.phone = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "error" => b.error = FromValueOpt::from_value(v), + "phone" => b.phone = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_phone_report_error.rs b/generated/async-stripe-misc/src/gelato_phone_report_error.rs index 75714115c..6b120a1ef 100644 --- a/generated/async-stripe-misc/src/gelato_phone_report_error.rs +++ b/generated/async-stripe-misc/src/gelato_phone_report_error.rs @@ -14,7 +14,12 @@ pub struct GelatoPhoneReportErrorBuilder { reason: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { code: self.code?, reason: self.reason.take()? }) + let (Some(code), Some(reason)) = (self.code, self.reason.take()) else { + return None; + }; + Some(Self::Out { code, reason }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = GelatoPhoneReportErrorBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "code" => b.code = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), + "code" => b.code = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_provided_details.rs b/generated/async-stripe-misc/src/gelato_provided_details.rs index ff652a1eb..6f44435a2 100644 --- a/generated/async-stripe-misc/src/gelato_provided_details.rs +++ b/generated/async-stripe-misc/src/gelato_provided_details.rs @@ -13,7 +13,12 @@ pub struct GelatoProvidedDetailsBuilder { phone: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { email: self.email.take()?, phone: self.phone.take()? }) + let (Some(email), Some(phone)) = (self.email.take(), self.phone.take()) else { + return None; + }; + Some(Self::Out { email, phone }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = GelatoProvidedDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "phone" => b.phone = Some(FromValueOpt::from_value(v)?), + "email" => b.email = FromValueOpt::from_value(v), + "phone" => b.phone = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_report_document_options.rs b/generated/async-stripe-misc/src/gelato_report_document_options.rs index 948d0e1d2..d0e257f67 100644 --- a/generated/async-stripe-misc/src/gelato_report_document_options.rs +++ b/generated/async-stripe-misc/src/gelato_report_document_options.rs @@ -21,7 +21,12 @@ pub struct GelatoReportDocumentOptionsBuilder { require_matching_selfie: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -74,11 +79,25 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(allowed_types), + Some(require_id_number), + Some(require_live_capture), + Some(require_matching_selfie), + ) = ( + self.allowed_types.take(), + self.require_id_number, + self.require_live_capture, + self.require_matching_selfie, + ) + else { + return None; + }; Some(Self::Out { - allowed_types: self.allowed_types.take()?, - require_id_number: self.require_id_number?, - require_live_capture: self.require_live_capture?, - require_matching_selfie: self.require_matching_selfie?, + allowed_types, + require_id_number, + require_live_capture, + require_matching_selfie, }) } } @@ -106,13 +125,11 @@ const _: () = { let mut b = GelatoReportDocumentOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "allowed_types" => b.allowed_types = Some(FromValueOpt::from_value(v)?), - "require_id_number" => b.require_id_number = Some(FromValueOpt::from_value(v)?), - "require_live_capture" => { - b.require_live_capture = Some(FromValueOpt::from_value(v)?) - } + "allowed_types" => b.allowed_types = FromValueOpt::from_value(v), + "require_id_number" => b.require_id_number = FromValueOpt::from_value(v), + "require_live_capture" => b.require_live_capture = FromValueOpt::from_value(v), "require_matching_selfie" => { - b.require_matching_selfie = Some(FromValueOpt::from_value(v)?) + b.require_matching_selfie = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-misc/src/gelato_report_id_number_options.rs b/generated/async-stripe-misc/src/gelato_report_id_number_options.rs index 919ed1de7..4d81d6737 100644 --- a/generated/async-stripe-misc/src/gelato_report_id_number_options.rs +++ b/generated/async-stripe-misc/src/gelato_report_id_number_options.rs @@ -5,7 +5,12 @@ pub struct GelatoReportIdNumberOptions {} #[doc(hidden)] pub struct GelatoReportIdNumberOptionsBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-misc/src/gelato_selfie_report.rs b/generated/async-stripe-misc/src/gelato_selfie_report.rs index 89d7f88f2..98fca3cf9 100644 --- a/generated/async-stripe-misc/src/gelato_selfie_report.rs +++ b/generated/async-stripe-misc/src/gelato_selfie_report.rs @@ -20,7 +20,12 @@ pub struct GelatoSelfieReportBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,12 +78,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - document: self.document.take()?, - error: self.error.take()?, - selfie: self.selfie.take()?, - status: self.status?, - }) + let (Some(document), Some(error), Some(selfie), Some(status)) = + (self.document.take(), self.error.take(), self.selfie.take(), self.status) + else { + return None; + }; + Some(Self::Out { document, error, selfie, status }) } } @@ -105,10 +110,10 @@ const _: () = { let mut b = GelatoSelfieReportBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "document" => b.document = Some(FromValueOpt::from_value(v)?), - "error" => b.error = Some(FromValueOpt::from_value(v)?), - "selfie" => b.selfie = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "document" => b.document = FromValueOpt::from_value(v), + "error" => b.error = FromValueOpt::from_value(v), + "selfie" => b.selfie = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_selfie_report_error.rs b/generated/async-stripe-misc/src/gelato_selfie_report_error.rs index 1ac0f2bcc..3b51929fc 100644 --- a/generated/async-stripe-misc/src/gelato_selfie_report_error.rs +++ b/generated/async-stripe-misc/src/gelato_selfie_report_error.rs @@ -14,7 +14,12 @@ pub struct GelatoSelfieReportErrorBuilder { reason: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { code: self.code?, reason: self.reason.take()? }) + let (Some(code), Some(reason)) = (self.code, self.reason.take()) else { + return None; + }; + Some(Self::Out { code, reason }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = GelatoSelfieReportErrorBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "code" => b.code = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), + "code" => b.code = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_session_document_options.rs b/generated/async-stripe-misc/src/gelato_session_document_options.rs index 9d25a00e9..74f5b006b 100644 --- a/generated/async-stripe-misc/src/gelato_session_document_options.rs +++ b/generated/async-stripe-misc/src/gelato_session_document_options.rs @@ -21,7 +21,12 @@ pub struct GelatoSessionDocumentOptionsBuilder { require_matching_selfie: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -74,11 +79,25 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(allowed_types), + Some(require_id_number), + Some(require_live_capture), + Some(require_matching_selfie), + ) = ( + self.allowed_types.take(), + self.require_id_number, + self.require_live_capture, + self.require_matching_selfie, + ) + else { + return None; + }; Some(Self::Out { - allowed_types: self.allowed_types.take()?, - require_id_number: self.require_id_number?, - require_live_capture: self.require_live_capture?, - require_matching_selfie: self.require_matching_selfie?, + allowed_types, + require_id_number, + require_live_capture, + require_matching_selfie, }) } } @@ -106,13 +125,11 @@ const _: () = { let mut b = GelatoSessionDocumentOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "allowed_types" => b.allowed_types = Some(FromValueOpt::from_value(v)?), - "require_id_number" => b.require_id_number = Some(FromValueOpt::from_value(v)?), - "require_live_capture" => { - b.require_live_capture = Some(FromValueOpt::from_value(v)?) - } + "allowed_types" => b.allowed_types = FromValueOpt::from_value(v), + "require_id_number" => b.require_id_number = FromValueOpt::from_value(v), + "require_live_capture" => b.require_live_capture = FromValueOpt::from_value(v), "require_matching_selfie" => { - b.require_matching_selfie = Some(FromValueOpt::from_value(v)?) + b.require_matching_selfie = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-misc/src/gelato_session_email_options.rs b/generated/async-stripe-misc/src/gelato_session_email_options.rs index df7de767c..8b68a5b86 100644 --- a/generated/async-stripe-misc/src/gelato_session_email_options.rs +++ b/generated/async-stripe-misc/src/gelato_session_email_options.rs @@ -10,7 +10,12 @@ pub struct GelatoSessionEmailOptionsBuilder { require_verification: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { require_verification: self.require_verification? }) + let (Some(require_verification),) = (self.require_verification,) else { + return None; + }; + Some(Self::Out { require_verification }) } } @@ -82,9 +90,7 @@ const _: () = { let mut b = GelatoSessionEmailOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "require_verification" => { - b.require_verification = Some(FromValueOpt::from_value(v)?) - } + "require_verification" => b.require_verification = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_session_id_number_options.rs b/generated/async-stripe-misc/src/gelato_session_id_number_options.rs index f5ab31c98..a1520c544 100644 --- a/generated/async-stripe-misc/src/gelato_session_id_number_options.rs +++ b/generated/async-stripe-misc/src/gelato_session_id_number_options.rs @@ -5,7 +5,12 @@ pub struct GelatoSessionIdNumberOptions {} #[doc(hidden)] pub struct GelatoSessionIdNumberOptionsBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-misc/src/gelato_session_last_error.rs b/generated/async-stripe-misc/src/gelato_session_last_error.rs index 8c2b664dd..ac328453b 100644 --- a/generated/async-stripe-misc/src/gelato_session_last_error.rs +++ b/generated/async-stripe-misc/src/gelato_session_last_error.rs @@ -14,7 +14,12 @@ pub struct GelatoSessionLastErrorBuilder { reason: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { code: self.code?, reason: self.reason.take()? }) + let (Some(code), Some(reason)) = (self.code, self.reason.take()) else { + return None; + }; + Some(Self::Out { code, reason }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = GelatoSessionLastErrorBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "code" => b.code = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), + "code" => b.code = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_session_phone_options.rs b/generated/async-stripe-misc/src/gelato_session_phone_options.rs index 0c2252011..ac9310b1e 100644 --- a/generated/async-stripe-misc/src/gelato_session_phone_options.rs +++ b/generated/async-stripe-misc/src/gelato_session_phone_options.rs @@ -10,7 +10,12 @@ pub struct GelatoSessionPhoneOptionsBuilder { require_verification: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { require_verification: self.require_verification? }) + let (Some(require_verification),) = (self.require_verification,) else { + return None; + }; + Some(Self::Out { require_verification }) } } @@ -82,9 +90,7 @@ const _: () = { let mut b = GelatoSessionPhoneOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "require_verification" => { - b.require_verification = Some(FromValueOpt::from_value(v)?) - } + "require_verification" => b.require_verification = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_verification_report_options.rs b/generated/async-stripe-misc/src/gelato_verification_report_options.rs index 6fedefa1e..6c8fd9432 100644 --- a/generated/async-stripe-misc/src/gelato_verification_report_options.rs +++ b/generated/async-stripe-misc/src/gelato_verification_report_options.rs @@ -11,7 +11,12 @@ pub struct GelatoVerificationReportOptionsBuilder { id_number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -57,7 +62,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { document: self.document.take()?, id_number: self.id_number? }) + let (Some(document), Some(id_number)) = (self.document.take(), self.id_number) else { + return None; + }; + Some(Self::Out { document, id_number }) } } @@ -84,8 +92,8 @@ const _: () = { let mut b = GelatoVerificationReportOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "document" => b.document = Some(FromValueOpt::from_value(v)?), - "id_number" => b.id_number = Some(FromValueOpt::from_value(v)?), + "document" => b.document = FromValueOpt::from_value(v), + "id_number" => b.id_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_verification_session_options.rs b/generated/async-stripe-misc/src/gelato_verification_session_options.rs index 25a68c6ea..ace6c0571 100644 --- a/generated/async-stripe-misc/src/gelato_verification_session_options.rs +++ b/generated/async-stripe-misc/src/gelato_verification_session_options.rs @@ -15,7 +15,12 @@ pub struct GelatoVerificationSessionOptionsBuilder { phone: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,12 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - document: self.document.take()?, - email: self.email?, - id_number: self.id_number?, - phone: self.phone?, - }) + let (Some(document), Some(email), Some(id_number), Some(phone)) = + (self.document.take(), self.email, self.id_number, self.phone) + else { + return None; + }; + Some(Self::Out { document, email, id_number, phone }) } } @@ -100,10 +105,10 @@ const _: () = { let mut b = GelatoVerificationSessionOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "document" => b.document = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "id_number" => b.id_number = Some(FromValueOpt::from_value(v)?), - "phone" => b.phone = Some(FromValueOpt::from_value(v)?), + "document" => b.document = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "id_number" => b.id_number = FromValueOpt::from_value(v), + "phone" => b.phone = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/gelato_verified_outputs.rs b/generated/async-stripe-misc/src/gelato_verified_outputs.rs index fe7e8fae9..8096b7e9a 100644 --- a/generated/async-stripe-misc/src/gelato_verified_outputs.rs +++ b/generated/async-stripe-misc/src/gelato_verified_outputs.rs @@ -31,7 +31,12 @@ pub struct GelatoVerifiedOutputsBuilder { phone: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -92,15 +97,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(address), + Some(dob), + Some(email), + Some(first_name), + Some(id_number), + Some(id_number_type), + Some(last_name), + Some(phone), + ) = ( + self.address.take(), + self.dob, + self.email.take(), + self.first_name.take(), + self.id_number.take(), + self.id_number_type, + self.last_name.take(), + self.phone.take(), + ) + else { + return None; + }; Some(Self::Out { - address: self.address.take()?, - dob: self.dob?, - email: self.email.take()?, - first_name: self.first_name.take()?, - id_number: self.id_number.take()?, - id_number_type: self.id_number_type?, - last_name: self.last_name.take()?, - phone: self.phone.take()?, + address, + dob, + email, + first_name, + id_number, + id_number_type, + last_name, + phone, }) } } @@ -128,14 +155,14 @@ const _: () = { let mut b = GelatoVerifiedOutputsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), - "dob" => b.dob = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "first_name" => b.first_name = Some(FromValueOpt::from_value(v)?), - "id_number" => b.id_number = Some(FromValueOpt::from_value(v)?), - "id_number_type" => b.id_number_type = Some(FromValueOpt::from_value(v)?), - "last_name" => b.last_name = Some(FromValueOpt::from_value(v)?), - "phone" => b.phone = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), + "dob" => b.dob = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "first_name" => b.first_name = FromValueOpt::from_value(v), + "id_number" => b.id_number = FromValueOpt::from_value(v), + "id_number_type" => b.id_number_type = FromValueOpt::from_value(v), + "last_name" => b.last_name = FromValueOpt::from_value(v), + "phone" => b.phone = FromValueOpt::from_value(v), _ => {} } 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..938243937 100644 --- a/generated/async-stripe-misc/src/identity_verification_report/types.rs +++ b/generated/async-stripe-misc/src/identity_verification_report/types.rs @@ -54,7 +54,12 @@ pub struct IdentityVerificationReportBuilder { verification_session: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -125,20 +130,52 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(client_reference_id), + Some(created), + Some(document), + Some(email), + Some(id), + Some(id_number), + Some(livemode), + Some(options), + Some(phone), + Some(selfie), + Some(type_), + Some(verification_flow), + Some(verification_session), + ) = ( + self.client_reference_id.take(), + self.created, + self.document.take(), + self.email.take(), + self.id.take(), + self.id_number.take(), + self.livemode, + self.options.take(), + self.phone.take(), + self.selfie.take(), + self.type_, + self.verification_flow.take(), + self.verification_session.take(), + ) + else { + return None; + }; Some(Self::Out { - client_reference_id: self.client_reference_id.take()?, - created: self.created?, - document: self.document.take()?, - email: self.email.take()?, - id: self.id.take()?, - id_number: self.id_number.take()?, - livemode: self.livemode?, - options: self.options.take()?, - phone: self.phone.take()?, - selfie: self.selfie.take()?, - type_: self.type_?, - verification_flow: self.verification_flow.take()?, - verification_session: self.verification_session.take()?, + client_reference_id, + created, + document, + email, + id, + id_number, + livemode, + options, + phone, + selfie, + type_, + verification_flow, + verification_session, }) } } @@ -166,23 +203,19 @@ const _: () = { let mut b = IdentityVerificationReportBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "client_reference_id" => { - b.client_reference_id = Some(FromValueOpt::from_value(v)?) - } - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "document" => b.document = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "id_number" => b.id_number = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "options" => b.options = Some(FromValueOpt::from_value(v)?), - "phone" => b.phone = Some(FromValueOpt::from_value(v)?), - "selfie" => b.selfie = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "verification_flow" => b.verification_flow = Some(FromValueOpt::from_value(v)?), - "verification_session" => { - b.verification_session = Some(FromValueOpt::from_value(v)?) - } + "client_reference_id" => b.client_reference_id = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "document" => b.document = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "id_number" => b.id_number = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "options" => b.options = FromValueOpt::from_value(v), + "phone" => b.phone = FromValueOpt::from_value(v), + "selfie" => b.selfie = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "verification_flow" => b.verification_flow = FromValueOpt::from_value(v), + "verification_session" => b.verification_session = FromValueOpt::from_value(v), _ => {} } 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..2bb678e50 100644 --- a/generated/async-stripe-misc/src/identity_verification_session/types.rs +++ b/generated/async-stripe-misc/src/identity_verification_session/types.rs @@ -82,7 +82,12 @@ pub struct IdentityVerificationSessionBuilder { verified_outputs: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -161,23 +166,61 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(client_reference_id), + Some(client_secret), + Some(created), + Some(id), + Some(last_error), + Some(last_verification_report), + Some(livemode), + Some(metadata), + Some(options), + Some(provided_details), + Some(redaction), + Some(status), + Some(type_), + Some(url), + Some(verification_flow), + Some(verified_outputs), + ) = ( + self.client_reference_id.take(), + self.client_secret.take(), + self.created, + self.id.take(), + self.last_error.take(), + self.last_verification_report.take(), + self.livemode, + self.metadata.take(), + self.options.take(), + self.provided_details.take(), + self.redaction, + self.status, + self.type_, + self.url.take(), + self.verification_flow.take(), + self.verified_outputs.take(), + ) + else { + return None; + }; Some(Self::Out { - client_reference_id: self.client_reference_id.take()?, - client_secret: self.client_secret.take()?, - created: self.created?, - id: self.id.take()?, - last_error: self.last_error.take()?, - last_verification_report: self.last_verification_report.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - options: self.options.take()?, - provided_details: self.provided_details.take()?, - redaction: self.redaction?, - status: self.status?, - type_: self.type_?, - url: self.url.take()?, - verification_flow: self.verification_flow.take()?, - verified_outputs: self.verified_outputs.take()?, + client_reference_id, + client_secret, + created, + id, + last_error, + last_verification_report, + livemode, + metadata, + options, + provided_details, + redaction, + status, + type_, + url, + verification_flow, + verified_outputs, }) } } @@ -205,26 +248,24 @@ const _: () = { let mut b = IdentityVerificationSessionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "client_reference_id" => { - b.client_reference_id = Some(FromValueOpt::from_value(v)?) - } - "client_secret" => b.client_secret = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "last_error" => b.last_error = Some(FromValueOpt::from_value(v)?), + "client_reference_id" => b.client_reference_id = FromValueOpt::from_value(v), + "client_secret" => b.client_secret = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "last_error" => b.last_error = FromValueOpt::from_value(v), "last_verification_report" => { - b.last_verification_report = Some(FromValueOpt::from_value(v)?) + b.last_verification_report = FromValueOpt::from_value(v) } - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "options" => b.options = Some(FromValueOpt::from_value(v)?), - "provided_details" => b.provided_details = Some(FromValueOpt::from_value(v)?), - "redaction" => b.redaction = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), - "verification_flow" => b.verification_flow = Some(FromValueOpt::from_value(v)?), - "verified_outputs" => b.verified_outputs = Some(FromValueOpt::from_value(v)?), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "options" => b.options = FromValueOpt::from_value(v), + "provided_details" => b.provided_details = FromValueOpt::from_value(v), + "redaction" => b.redaction = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), + "verification_flow" => b.verification_flow = FromValueOpt::from_value(v), + "verified_outputs" => b.verified_outputs = FromValueOpt::from_value(v), _ => {} } 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..4d3a37cb4 100644 --- a/generated/async-stripe-misc/src/reporting_report_run/types.rs +++ b/generated/async-stripe-misc/src/reporting_report_run/types.rs @@ -47,7 +47,12 @@ pub struct ReportingReportRunBuilder { succeeded_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -110,16 +115,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(created), + Some(error), + Some(id), + Some(livemode), + Some(parameters), + Some(report_type), + Some(result), + Some(status), + Some(succeeded_at), + ) = ( + self.created, + self.error.take(), + self.id.take(), + self.livemode, + self.parameters.take(), + self.report_type.take(), + self.result.take(), + self.status.take(), + self.succeeded_at, + ) + else { + return None; + }; Some(Self::Out { - created: self.created?, - error: self.error.take()?, - id: self.id.take()?, - livemode: self.livemode?, - parameters: self.parameters.take()?, - report_type: self.report_type.take()?, - result: self.result.take()?, - status: self.status.take()?, - succeeded_at: self.succeeded_at?, + created, + error, + id, + livemode, + parameters, + report_type, + result, + status, + succeeded_at, }) } } @@ -147,15 +176,15 @@ const _: () = { let mut b = ReportingReportRunBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "error" => b.error = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "parameters" => b.parameters = Some(FromValueOpt::from_value(v)?), - "report_type" => b.report_type = Some(FromValueOpt::from_value(v)?), - "result" => b.result = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "succeeded_at" => b.succeeded_at = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "error" => b.error = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "parameters" => b.parameters = FromValueOpt::from_value(v), + "report_type" => b.report_type = FromValueOpt::from_value(v), + "result" => b.result = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "succeeded_at" => b.succeeded_at = FromValueOpt::from_value(v), _ => {} } 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..0c97f5a74 100644 --- a/generated/async-stripe-misc/src/reporting_report_type/types.rs +++ b/generated/async-stripe-misc/src/reporting_report_type/types.rs @@ -42,7 +42,12 @@ pub struct ReportingReportTypeBuilder { version: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -103,15 +108,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(data_available_end), + Some(data_available_start), + Some(default_columns), + Some(id), + Some(livemode), + Some(name), + Some(updated), + Some(version), + ) = ( + self.data_available_end, + self.data_available_start, + self.default_columns.take(), + self.id.take(), + self.livemode, + self.name.take(), + self.updated, + self.version, + ) + else { + return None; + }; Some(Self::Out { - data_available_end: self.data_available_end?, - data_available_start: self.data_available_start?, - default_columns: self.default_columns.take()?, - id: self.id.take()?, - livemode: self.livemode?, - name: self.name.take()?, - updated: self.updated?, - version: self.version?, + data_available_end, + data_available_start, + default_columns, + id, + livemode, + name, + updated, + version, }) } } @@ -139,18 +166,14 @@ const _: () = { let mut b = ReportingReportTypeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "data_available_end" => { - b.data_available_end = Some(FromValueOpt::from_value(v)?) - } - "data_available_start" => { - b.data_available_start = Some(FromValueOpt::from_value(v)?) - } - "default_columns" => b.default_columns = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "updated" => b.updated = Some(FromValueOpt::from_value(v)?), - "version" => b.version = Some(FromValueOpt::from_value(v)?), + "data_available_end" => b.data_available_end = FromValueOpt::from_value(v), + "data_available_start" => b.data_available_start = FromValueOpt::from_value(v), + "default_columns" => b.default_columns = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "updated" => b.updated = FromValueOpt::from_value(v), + "version" => b.version = FromValueOpt::from_value(v), _ => {} } 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..3386d680f 100644 --- a/generated/async-stripe-misc/src/scheduled_query_run/types.rs +++ b/generated/async-stripe-misc/src/scheduled_query_run/types.rs @@ -41,7 +41,12 @@ pub struct ScheduledQueryRunBuilder { title: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -106,17 +111,43 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(created), + Some(data_load_time), + Some(error), + Some(file), + Some(id), + Some(livemode), + Some(result_available_until), + Some(sql), + Some(status), + Some(title), + ) = ( + self.created, + self.data_load_time, + self.error.take(), + self.file.take(), + self.id.take(), + self.livemode, + self.result_available_until, + self.sql.take(), + self.status.take(), + self.title.take(), + ) + else { + return None; + }; Some(Self::Out { - created: self.created?, - data_load_time: self.data_load_time?, - error: self.error.take()?, - file: self.file.take()?, - id: self.id.take()?, - livemode: self.livemode?, - result_available_until: self.result_available_until?, - sql: self.sql.take()?, - status: self.status.take()?, - title: self.title.take()?, + created, + data_load_time, + error, + file, + id, + livemode, + result_available_until, + sql, + status, + title, }) } } @@ -144,18 +175,18 @@ const _: () = { let mut b = ScheduledQueryRunBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "data_load_time" => b.data_load_time = Some(FromValueOpt::from_value(v)?), - "error" => b.error = Some(FromValueOpt::from_value(v)?), - "file" => b.file = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "data_load_time" => b.data_load_time = FromValueOpt::from_value(v), + "error" => b.error = FromValueOpt::from_value(v), + "file" => b.file = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), "result_available_until" => { - b.result_available_until = Some(FromValueOpt::from_value(v)?) + b.result_available_until = FromValueOpt::from_value(v) } - "sql" => b.sql = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "title" => b.title = Some(FromValueOpt::from_value(v)?), + "sql" => b.sql = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "title" => b.title = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/sigma_scheduled_query_run_error.rs b/generated/async-stripe-misc/src/sigma_scheduled_query_run_error.rs index 4cee93946..3de038482 100644 --- a/generated/async-stripe-misc/src/sigma_scheduled_query_run_error.rs +++ b/generated/async-stripe-misc/src/sigma_scheduled_query_run_error.rs @@ -10,7 +10,12 @@ pub struct SigmaScheduledQueryRunErrorBuilder { message: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { message: self.message.take()? }) + let (Some(message),) = (self.message.take(),) else { + return None; + }; + Some(Self::Out { message }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = SigmaScheduledQueryRunErrorBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "message" => b.message = Some(FromValueOpt::from_value(v)?), + "message" => b.message = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_calculation/types.rs b/generated/async-stripe-misc/src/tax_calculation/types.rs index ffc5ac064..5bce63bf2 100644 --- a/generated/async-stripe-misc/src/tax_calculation/types.rs +++ b/generated/async-stripe-misc/src/tax_calculation/types.rs @@ -53,7 +53,12 @@ pub struct TaxCalculationBuilder { tax_date: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -126,21 +131,55 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount_total), + Some(currency), + Some(customer), + Some(customer_details), + Some(expires_at), + Some(id), + Some(line_items), + Some(livemode), + Some(ship_from_details), + Some(shipping_cost), + Some(tax_amount_exclusive), + Some(tax_amount_inclusive), + Some(tax_breakdown), + Some(tax_date), + ) = ( + self.amount_total, + self.currency, + self.customer.take(), + self.customer_details.take(), + self.expires_at, + self.id.take(), + self.line_items.take(), + self.livemode, + self.ship_from_details.take(), + self.shipping_cost.take(), + self.tax_amount_exclusive, + self.tax_amount_inclusive, + self.tax_breakdown.take(), + self.tax_date, + ) + else { + return None; + }; Some(Self::Out { - amount_total: self.amount_total?, - currency: self.currency?, - customer: self.customer.take()?, - customer_details: self.customer_details.take()?, - expires_at: self.expires_at?, - id: self.id.take()?, - line_items: self.line_items.take()?, - livemode: self.livemode?, - ship_from_details: self.ship_from_details.take()?, - shipping_cost: self.shipping_cost.take()?, - tax_amount_exclusive: self.tax_amount_exclusive?, - tax_amount_inclusive: self.tax_amount_inclusive?, - tax_breakdown: self.tax_breakdown.take()?, - tax_date: self.tax_date?, + amount_total, + currency, + customer, + customer_details, + expires_at, + id, + line_items, + livemode, + ship_from_details, + shipping_cost, + tax_amount_exclusive, + tax_amount_inclusive, + tax_breakdown, + tax_date, }) } } @@ -168,24 +207,20 @@ const _: () = { let mut b = TaxCalculationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_total" => b.amount_total = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "customer_details" => b.customer_details = Some(FromValueOpt::from_value(v)?), - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "line_items" => b.line_items = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "ship_from_details" => b.ship_from_details = Some(FromValueOpt::from_value(v)?), - "shipping_cost" => b.shipping_cost = Some(FromValueOpt::from_value(v)?), - "tax_amount_exclusive" => { - b.tax_amount_exclusive = Some(FromValueOpt::from_value(v)?) - } - "tax_amount_inclusive" => { - b.tax_amount_inclusive = Some(FromValueOpt::from_value(v)?) - } - "tax_breakdown" => b.tax_breakdown = Some(FromValueOpt::from_value(v)?), - "tax_date" => b.tax_date = Some(FromValueOpt::from_value(v)?), + "amount_total" => b.amount_total = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "customer_details" => b.customer_details = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "line_items" => b.line_items = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "ship_from_details" => b.ship_from_details = FromValueOpt::from_value(v), + "shipping_cost" => b.shipping_cost = FromValueOpt::from_value(v), + "tax_amount_exclusive" => b.tax_amount_exclusive = FromValueOpt::from_value(v), + "tax_amount_inclusive" => b.tax_amount_inclusive = FromValueOpt::from_value(v), + "tax_breakdown" => b.tax_breakdown = FromValueOpt::from_value(v), + "tax_date" => b.tax_date = FromValueOpt::from_value(v), _ => {} } 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..3b1cee82f 100644 --- a/generated/async-stripe-misc/src/tax_calculation_line_item.rs +++ b/generated/async-stripe-misc/src/tax_calculation_line_item.rs @@ -39,7 +39,12 @@ pub struct TaxCalculationLineItemBuilder { tax_code: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -104,17 +109,43 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_tax), + Some(id), + Some(livemode), + Some(product), + Some(quantity), + Some(reference), + Some(tax_behavior), + Some(tax_breakdown), + Some(tax_code), + ) = ( + self.amount, + self.amount_tax, + self.id.take(), + self.livemode, + self.product.take(), + self.quantity, + self.reference.take(), + self.tax_behavior, + self.tax_breakdown.take(), + self.tax_code.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_tax: self.amount_tax?, - id: self.id.take()?, - livemode: self.livemode?, - product: self.product.take()?, - quantity: self.quantity?, - reference: self.reference.take()?, - tax_behavior: self.tax_behavior?, - tax_breakdown: self.tax_breakdown.take()?, - tax_code: self.tax_code.take()?, + amount, + amount_tax, + id, + livemode, + product, + quantity, + reference, + tax_behavior, + tax_breakdown, + tax_code, }) } } @@ -142,16 +173,16 @@ const _: () = { let mut b = TaxCalculationLineItemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_tax" => b.amount_tax = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "product" => b.product = Some(FromValueOpt::from_value(v)?), - "quantity" => b.quantity = Some(FromValueOpt::from_value(v)?), - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "tax_behavior" => b.tax_behavior = Some(FromValueOpt::from_value(v)?), - "tax_breakdown" => b.tax_breakdown = Some(FromValueOpt::from_value(v)?), - "tax_code" => b.tax_code = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_tax" => b.amount_tax = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "product" => b.product = FromValueOpt::from_value(v), + "quantity" => b.quantity = FromValueOpt::from_value(v), + "reference" => b.reference = FromValueOpt::from_value(v), + "tax_behavior" => b.tax_behavior = FromValueOpt::from_value(v), + "tax_breakdown" => b.tax_breakdown = FromValueOpt::from_value(v), + "tax_code" => b.tax_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options.rs index ef3e09097..4f44bcdc6 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options.rs @@ -105,7 +105,12 @@ pub struct TaxProductRegistrationsResourceCountryOptionsBuilder { za: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -248,56 +253,160 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(ae), + Some(at), + Some(au), + Some(be), + Some(bg), + Some(ca), + Some(ch), + Some(cl), + Some(co), + Some(cy), + Some(cz), + Some(de), + Some(dk), + Some(ee), + Some(es), + Some(fi), + Some(fr), + Some(gb), + Some(gr), + Some(hr), + Some(hu), + Some(id), + Some(ie), + Some(is), + Some(it), + Some(jp), + Some(kr), + Some(lt), + Some(lu), + Some(lv), + Some(mt), + Some(mx), + Some(my), + Some(nl), + Some(no), + Some(nz), + Some(pl), + Some(pt), + Some(ro), + Some(sa), + Some(se), + Some(sg), + Some(si), + Some(sk), + Some(th), + Some(tr), + Some(us), + Some(vn), + Some(za), + ) = ( + self.ae, + self.at, + self.au, + self.be, + self.bg, + self.ca.take(), + self.ch, + self.cl, + self.co, + self.cy, + self.cz, + self.de, + self.dk, + self.ee, + self.es, + self.fi, + self.fr, + self.gb, + self.gr, + self.hr, + self.hu, + self.id, + self.ie, + self.is, + self.it, + self.jp, + self.kr, + self.lt, + self.lu, + self.lv, + self.mt, + self.mx, + self.my, + self.nl, + self.no, + self.nz, + self.pl, + self.pt, + self.ro, + self.sa, + self.se, + self.sg, + self.si, + self.sk, + self.th, + self.tr, + self.us.take(), + self.vn, + self.za, + ) + else { + return None; + }; Some(Self::Out { - ae: self.ae?, - at: self.at?, - au: self.au?, - be: self.be?, - bg: self.bg?, - ca: self.ca.take()?, - ch: self.ch?, - cl: self.cl?, - co: self.co?, - cy: self.cy?, - cz: self.cz?, - de: self.de?, - dk: self.dk?, - ee: self.ee?, - es: self.es?, - fi: self.fi?, - fr: self.fr?, - gb: self.gb?, - gr: self.gr?, - hr: self.hr?, - hu: self.hu?, - id: self.id?, - ie: self.ie?, - is: self.is?, - it: self.it?, - jp: self.jp?, - kr: self.kr?, - lt: self.lt?, - lu: self.lu?, - lv: self.lv?, - mt: self.mt?, - mx: self.mx?, - my: self.my?, - nl: self.nl?, - no: self.no?, - nz: self.nz?, - pl: self.pl?, - pt: self.pt?, - ro: self.ro?, - sa: self.sa?, - se: self.se?, - sg: self.sg?, - si: self.si?, - sk: self.sk?, - th: self.th?, - tr: self.tr?, - us: self.us.take()?, - vn: self.vn?, - za: self.za?, + ae, + at, + au, + be, + bg, + ca, + ch, + cl, + co, + cy, + cz, + de, + dk, + ee, + es, + fi, + fr, + gb, + gr, + hr, + hu, + id, + ie, + is, + it, + jp, + kr, + lt, + lu, + lv, + mt, + mx, + my, + nl, + no, + nz, + pl, + pt, + ro, + sa, + se, + sg, + si, + sk, + th, + tr, + us, + vn, + za, }) } } @@ -325,55 +434,55 @@ const _: () = { let mut b = TaxProductRegistrationsResourceCountryOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "ae" => b.ae = Some(FromValueOpt::from_value(v)?), - "at" => b.at = Some(FromValueOpt::from_value(v)?), - "au" => b.au = Some(FromValueOpt::from_value(v)?), - "be" => b.be = Some(FromValueOpt::from_value(v)?), - "bg" => b.bg = Some(FromValueOpt::from_value(v)?), - "ca" => b.ca = Some(FromValueOpt::from_value(v)?), - "ch" => b.ch = Some(FromValueOpt::from_value(v)?), - "cl" => b.cl = Some(FromValueOpt::from_value(v)?), - "co" => b.co = Some(FromValueOpt::from_value(v)?), - "cy" => b.cy = Some(FromValueOpt::from_value(v)?), - "cz" => b.cz = Some(FromValueOpt::from_value(v)?), - "de" => b.de = Some(FromValueOpt::from_value(v)?), - "dk" => b.dk = Some(FromValueOpt::from_value(v)?), - "ee" => b.ee = Some(FromValueOpt::from_value(v)?), - "es" => b.es = Some(FromValueOpt::from_value(v)?), - "fi" => b.fi = Some(FromValueOpt::from_value(v)?), - "fr" => b.fr = Some(FromValueOpt::from_value(v)?), - "gb" => b.gb = Some(FromValueOpt::from_value(v)?), - "gr" => b.gr = Some(FromValueOpt::from_value(v)?), - "hr" => b.hr = Some(FromValueOpt::from_value(v)?), - "hu" => b.hu = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "ie" => b.ie = Some(FromValueOpt::from_value(v)?), - "is" => b.is = Some(FromValueOpt::from_value(v)?), - "it" => b.it = Some(FromValueOpt::from_value(v)?), - "jp" => b.jp = Some(FromValueOpt::from_value(v)?), - "kr" => b.kr = Some(FromValueOpt::from_value(v)?), - "lt" => b.lt = Some(FromValueOpt::from_value(v)?), - "lu" => b.lu = Some(FromValueOpt::from_value(v)?), - "lv" => b.lv = Some(FromValueOpt::from_value(v)?), - "mt" => b.mt = Some(FromValueOpt::from_value(v)?), - "mx" => b.mx = Some(FromValueOpt::from_value(v)?), - "my" => b.my = Some(FromValueOpt::from_value(v)?), - "nl" => b.nl = Some(FromValueOpt::from_value(v)?), - "no" => b.no = Some(FromValueOpt::from_value(v)?), - "nz" => b.nz = Some(FromValueOpt::from_value(v)?), - "pl" => b.pl = Some(FromValueOpt::from_value(v)?), - "pt" => b.pt = Some(FromValueOpt::from_value(v)?), - "ro" => b.ro = Some(FromValueOpt::from_value(v)?), - "sa" => b.sa = Some(FromValueOpt::from_value(v)?), - "se" => b.se = Some(FromValueOpt::from_value(v)?), - "sg" => b.sg = Some(FromValueOpt::from_value(v)?), - "si" => b.si = Some(FromValueOpt::from_value(v)?), - "sk" => b.sk = Some(FromValueOpt::from_value(v)?), - "th" => b.th = Some(FromValueOpt::from_value(v)?), - "tr" => b.tr = Some(FromValueOpt::from_value(v)?), - "us" => b.us = Some(FromValueOpt::from_value(v)?), - "vn" => b.vn = Some(FromValueOpt::from_value(v)?), - "za" => b.za = Some(FromValueOpt::from_value(v)?), + "ae" => b.ae = FromValueOpt::from_value(v), + "at" => b.at = FromValueOpt::from_value(v), + "au" => b.au = FromValueOpt::from_value(v), + "be" => b.be = FromValueOpt::from_value(v), + "bg" => b.bg = FromValueOpt::from_value(v), + "ca" => b.ca = FromValueOpt::from_value(v), + "ch" => b.ch = FromValueOpt::from_value(v), + "cl" => b.cl = FromValueOpt::from_value(v), + "co" => b.co = FromValueOpt::from_value(v), + "cy" => b.cy = FromValueOpt::from_value(v), + "cz" => b.cz = FromValueOpt::from_value(v), + "de" => b.de = FromValueOpt::from_value(v), + "dk" => b.dk = FromValueOpt::from_value(v), + "ee" => b.ee = FromValueOpt::from_value(v), + "es" => b.es = FromValueOpt::from_value(v), + "fi" => b.fi = FromValueOpt::from_value(v), + "fr" => b.fr = FromValueOpt::from_value(v), + "gb" => b.gb = FromValueOpt::from_value(v), + "gr" => b.gr = FromValueOpt::from_value(v), + "hr" => b.hr = FromValueOpt::from_value(v), + "hu" => b.hu = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "ie" => b.ie = FromValueOpt::from_value(v), + "is" => b.is = FromValueOpt::from_value(v), + "it" => b.it = FromValueOpt::from_value(v), + "jp" => b.jp = FromValueOpt::from_value(v), + "kr" => b.kr = FromValueOpt::from_value(v), + "lt" => b.lt = FromValueOpt::from_value(v), + "lu" => b.lu = FromValueOpt::from_value(v), + "lv" => b.lv = FromValueOpt::from_value(v), + "mt" => b.mt = FromValueOpt::from_value(v), + "mx" => b.mx = FromValueOpt::from_value(v), + "my" => b.my = FromValueOpt::from_value(v), + "nl" => b.nl = FromValueOpt::from_value(v), + "no" => b.no = FromValueOpt::from_value(v), + "nz" => b.nz = FromValueOpt::from_value(v), + "pl" => b.pl = FromValueOpt::from_value(v), + "pt" => b.pt = FromValueOpt::from_value(v), + "ro" => b.ro = FromValueOpt::from_value(v), + "sa" => b.sa = FromValueOpt::from_value(v), + "se" => b.se = FromValueOpt::from_value(v), + "sg" => b.sg = FromValueOpt::from_value(v), + "si" => b.si = FromValueOpt::from_value(v), + "sk" => b.sk = FromValueOpt::from_value(v), + "th" => b.th = FromValueOpt::from_value(v), + "tr" => b.tr = FromValueOpt::from_value(v), + "us" => b.us = FromValueOpt::from_value(v), + "vn" => b.vn = FromValueOpt::from_value(v), + "za" => b.za = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_ca_province_standard.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_ca_province_standard.rs index b2f94cdcc..f9d769ae7 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_ca_province_standard.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_ca_province_standard.rs @@ -10,7 +10,12 @@ pub struct TaxProductRegistrationsResourceCountryOptionsCaProvinceStandardBuilde province: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { province: self.province.take()? }) + let (Some(province),) = (self.province.take(),) else { + return None; + }; + Some(Self::Out { province }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = TaxProductRegistrationsResourceCountryOptionsCaProvinceStandardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "province" => b.province = Some(FromValueOpt::from_value(v)?), + "province" => b.province = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_canada.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_canada.rs index b354b900f..571d1b9f4 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_canada.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_canada.rs @@ -16,7 +16,12 @@ pub struct TaxProductRegistrationsResourceCountryOptionsCanadaBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -63,10 +68,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - province_standard: self.province_standard.take()?, - type_: self.type_?, - }) + let (Some(province_standard), Some(type_)) = + (self.province_standard.take(), self.type_) + else { + return None; + }; + Some(Self::Out { province_standard, type_ }) } } @@ -93,8 +100,8 @@ const _: () = { let mut b = TaxProductRegistrationsResourceCountryOptionsCanadaBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "province_standard" => b.province_standard = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "province_standard" => b.province_standard = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_default.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_default.rs index 12f3bee77..87eb5c646 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_default.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_default.rs @@ -11,7 +11,12 @@ pub struct TaxProductRegistrationsResourceCountryOptionsDefaultBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -57,7 +62,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { type_: self.type_? }) + let (Some(type_),) = (self.type_,) else { + return None; + }; + Some(Self::Out { type_ }) } } @@ -85,7 +93,7 @@ const _: () = { TaxProductRegistrationsResourceCountryOptionsDefaultBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_eu_standard.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_eu_standard.rs index 7e74316fc..aa26d4f21 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_eu_standard.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_eu_standard.rs @@ -12,7 +12,12 @@ pub struct TaxProductRegistrationsResourceCountryOptionsEuStandardBuilder { Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { place_of_supply_scheme: self.place_of_supply_scheme? }) + let (Some(place_of_supply_scheme),) = (self.place_of_supply_scheme,) else { + return None; + }; + Some(Self::Out { place_of_supply_scheme }) } } @@ -87,7 +95,7 @@ const _: () = { for (k, v) in obj { match k.as_str() { "place_of_supply_scheme" => { - b.place_of_supply_scheme = Some(FromValueOpt::from_value(v)?) + b.place_of_supply_scheme = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_europe.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_europe.rs index d693d1b6a..c63ed3451 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_europe.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_europe.rs @@ -13,7 +13,12 @@ pub struct TaxProductRegistrationsResourceCountryOptionsEuropeBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { standard: self.standard?, type_: self.type_? }) + let (Some(standard), Some(type_)) = (self.standard, self.type_) else { + return None; + }; + Some(Self::Out { standard, type_ }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = TaxProductRegistrationsResourceCountryOptionsEuropeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "standard" => b.standard = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "standard" => b.standard = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_simplified.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_simplified.rs index e1fbf64cc..b7755f841 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_simplified.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_simplified.rs @@ -11,7 +11,12 @@ pub struct TaxProductRegistrationsResourceCountryOptionsSimplifiedBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -57,7 +62,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { type_: self.type_? }) + let (Some(type_),) = (self.type_,) else { + return None; + }; + Some(Self::Out { type_ }) } } @@ -85,7 +93,7 @@ const _: () = { TaxProductRegistrationsResourceCountryOptionsSimplifiedBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_united_states.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_united_states.rs index ce1a88378..acaf75329 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_united_states.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_united_states.rs @@ -23,7 +23,12 @@ pub struct TaxProductRegistrationsResourceCountryOptionsUnitedStatesBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -78,12 +83,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - local_amusement_tax: self.local_amusement_tax.take()?, - local_lease_tax: self.local_lease_tax.take()?, - state: self.state.take()?, - type_: self.type_?, - }) + let (Some(local_amusement_tax), Some(local_lease_tax), Some(state), Some(type_)) = ( + self.local_amusement_tax.take(), + self.local_lease_tax.take(), + self.state.take(), + self.type_, + ) else { + return None; + }; + Some(Self::Out { local_amusement_tax, local_lease_tax, state, type_ }) } } @@ -111,12 +119,10 @@ const _: () = { TaxProductRegistrationsResourceCountryOptionsUnitedStatesBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "local_amusement_tax" => { - b.local_amusement_tax = Some(FromValueOpt::from_value(v)?) - } - "local_lease_tax" => b.local_lease_tax = Some(FromValueOpt::from_value(v)?), - "state" => b.state = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "local_amusement_tax" => b.local_amusement_tax = FromValueOpt::from_value(v), + "local_lease_tax" => b.local_lease_tax = FromValueOpt::from_value(v), + "state" => b.state = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_amusement_tax.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_amusement_tax.rs index 9338915df..751f4c663 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_amusement_tax.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_amusement_tax.rs @@ -10,7 +10,12 @@ pub struct TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTaxBuild jurisdiction: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { jurisdiction: self.jurisdiction.take()? }) + let (Some(jurisdiction),) = (self.jurisdiction.take(),) else { + return None; + }; + Some(Self::Out { jurisdiction }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTaxBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "jurisdiction" => b.jurisdiction = Some(FromValueOpt::from_value(v)?), + "jurisdiction" => b.jurisdiction = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_lease_tax.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_lease_tax.rs index c682cb8e6..fd74a02ae 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_lease_tax.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_lease_tax.rs @@ -10,7 +10,12 @@ pub struct TaxProductRegistrationsResourceCountryOptionsUsLocalLeaseTaxBuilder { jurisdiction: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { jurisdiction: self.jurisdiction.take()? }) + let (Some(jurisdiction),) = (self.jurisdiction.take(),) else { + return None; + }; + Some(Self::Out { jurisdiction }) } } @@ -84,7 +92,7 @@ const _: () = { ); for (k, v) in obj { match k.as_str() { - "jurisdiction" => b.jurisdiction = Some(FromValueOpt::from_value(v)?), + "jurisdiction" => b.jurisdiction = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_customer_details.rs b/generated/async-stripe-misc/src/tax_product_resource_customer_details.rs index baeb7f34d..051a60d53 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_customer_details.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_customer_details.rs @@ -22,7 +22,12 @@ pub struct TaxProductResourceCustomerDetailsBuilder { taxability_override: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,13 +82,23 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - address: self.address.take()?, - address_source: self.address_source?, - ip_address: self.ip_address.take()?, - tax_ids: self.tax_ids.take()?, - taxability_override: self.taxability_override?, - }) + let ( + Some(address), + Some(address_source), + Some(ip_address), + Some(tax_ids), + Some(taxability_override), + ) = ( + self.address.take(), + self.address_source, + self.ip_address.take(), + self.tax_ids.take(), + self.taxability_override, + ) + else { + return None; + }; + Some(Self::Out { address, address_source, ip_address, tax_ids, taxability_override }) } } @@ -110,13 +125,11 @@ const _: () = { let mut b = TaxProductResourceCustomerDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), - "address_source" => b.address_source = Some(FromValueOpt::from_value(v)?), - "ip_address" => b.ip_address = Some(FromValueOpt::from_value(v)?), - "tax_ids" => b.tax_ids = Some(FromValueOpt::from_value(v)?), - "taxability_override" => { - b.taxability_override = Some(FromValueOpt::from_value(v)?) - } + "address" => b.address = FromValueOpt::from_value(v), + "address_source" => b.address_source = FromValueOpt::from_value(v), + "ip_address" => b.ip_address = FromValueOpt::from_value(v), + "tax_ids" => b.tax_ids = FromValueOpt::from_value(v), + "taxability_override" => b.taxability_override = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_customer_details_resource_tax_id.rs b/generated/async-stripe-misc/src/tax_product_resource_customer_details_resource_tax_id.rs index a8939f006..54d67f2f0 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_customer_details_resource_tax_id.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_customer_details_resource_tax_id.rs @@ -14,7 +14,12 @@ pub struct TaxProductResourceCustomerDetailsResourceTaxIdBuilder { value: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { type_: self.type_?, value: self.value.take()? }) + let (Some(type_), Some(value)) = (self.type_, self.value.take()) else { + return None; + }; + Some(Self::Out { type_, value }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = TaxProductResourceCustomerDetailsResourceTaxIdBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "value" => b.value = Some(FromValueOpt::from_value(v)?), + "type" => b.type_ = FromValueOpt::from_value(v), + "value" => b.value = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_jurisdiction.rs b/generated/async-stripe-misc/src/tax_product_resource_jurisdiction.rs index e08bfb2f9..49ca2d38b 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_jurisdiction.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_jurisdiction.rs @@ -20,7 +20,12 @@ pub struct TaxProductResourceJurisdictionBuilder { state: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,12 +78,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - country: self.country.take()?, - display_name: self.display_name.take()?, - level: self.level?, - state: self.state.take()?, - }) + let (Some(country), Some(display_name), Some(level), Some(state)) = + (self.country.take(), self.display_name.take(), self.level, self.state.take()) + else { + return None; + }; + Some(Self::Out { country, display_name, level, state }) } } @@ -105,10 +110,10 @@ const _: () = { let mut b = TaxProductResourceJurisdictionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "display_name" => b.display_name = Some(FromValueOpt::from_value(v)?), - "level" => b.level = Some(FromValueOpt::from_value(v)?), - "state" => b.state = Some(FromValueOpt::from_value(v)?), + "country" => b.country = FromValueOpt::from_value(v), + "display_name" => b.display_name = FromValueOpt::from_value(v), + "level" => b.level = FromValueOpt::from_value(v), + "state" => b.state = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_breakdown.rs b/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_breakdown.rs index 334761b05..47cb2a0b1 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_breakdown.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_breakdown.rs @@ -26,7 +26,12 @@ pub struct TaxProductResourceLineItemTaxBreakdownBuilder { taxable_amount: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -83,13 +88,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(jurisdiction), + Some(sourcing), + Some(tax_rate_details), + Some(taxability_reason), + Some(taxable_amount), + ) = ( + self.amount, + self.jurisdiction.take(), + self.sourcing, + self.tax_rate_details.take(), + self.taxability_reason, + self.taxable_amount, + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - jurisdiction: self.jurisdiction.take()?, - sourcing: self.sourcing?, - tax_rate_details: self.tax_rate_details.take()?, - taxability_reason: self.taxability_reason?, - taxable_amount: self.taxable_amount?, + amount, + jurisdiction, + sourcing, + tax_rate_details, + taxability_reason, + taxable_amount, }) } } @@ -117,12 +140,12 @@ const _: () = { let mut b = TaxProductResourceLineItemTaxBreakdownBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "jurisdiction" => b.jurisdiction = Some(FromValueOpt::from_value(v)?), - "sourcing" => b.sourcing = Some(FromValueOpt::from_value(v)?), - "tax_rate_details" => b.tax_rate_details = Some(FromValueOpt::from_value(v)?), - "taxability_reason" => b.taxability_reason = Some(FromValueOpt::from_value(v)?), - "taxable_amount" => b.taxable_amount = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "jurisdiction" => b.jurisdiction = FromValueOpt::from_value(v), + "sourcing" => b.sourcing = FromValueOpt::from_value(v), + "tax_rate_details" => b.tax_rate_details = FromValueOpt::from_value(v), + "taxability_reason" => b.taxability_reason = FromValueOpt::from_value(v), + "taxable_amount" => b.taxable_amount = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_rate_details.rs b/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_rate_details.rs index bea72f5cd..c3f6f5e03 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_rate_details.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_rate_details.rs @@ -17,7 +17,12 @@ pub struct TaxProductResourceLineItemTaxRateDetailsBuilder { tax_type: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - display_name: self.display_name.take()?, - percentage_decimal: self.percentage_decimal.take()?, - tax_type: self.tax_type?, - }) + let (Some(display_name), Some(percentage_decimal), Some(tax_type)) = + (self.display_name.take(), self.percentage_decimal.take(), self.tax_type) + else { + return None; + }; + Some(Self::Out { display_name, percentage_decimal, tax_type }) } } @@ -99,11 +105,9 @@ const _: () = { let mut b = TaxProductResourceLineItemTaxRateDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "display_name" => b.display_name = Some(FromValueOpt::from_value(v)?), - "percentage_decimal" => { - b.percentage_decimal = Some(FromValueOpt::from_value(v)?) - } - "tax_type" => b.tax_type = Some(FromValueOpt::from_value(v)?), + "display_name" => b.display_name = FromValueOpt::from_value(v), + "percentage_decimal" => b.percentage_decimal = FromValueOpt::from_value(v), + "tax_type" => b.tax_type = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_postal_address.rs b/generated/async-stripe-misc/src/tax_product_resource_postal_address.rs index 66bae8ef7..8f98aebed 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_postal_address.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_postal_address.rs @@ -26,7 +26,12 @@ pub struct TaxProductResourcePostalAddressBuilder { state: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -83,14 +88,25 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - city: self.city.take()?, - country: self.country.take()?, - line1: self.line1.take()?, - line2: self.line2.take()?, - postal_code: self.postal_code.take()?, - state: self.state.take()?, - }) + let ( + Some(city), + Some(country), + Some(line1), + Some(line2), + Some(postal_code), + Some(state), + ) = ( + self.city.take(), + self.country.take(), + self.line1.take(), + self.line2.take(), + self.postal_code.take(), + self.state.take(), + ) + else { + return None; + }; + Some(Self::Out { city, country, line1, line2, postal_code, state }) } } @@ -117,12 +133,12 @@ const _: () = { let mut b = TaxProductResourcePostalAddressBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "city" => b.city = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "line1" => b.line1 = Some(FromValueOpt::from_value(v)?), - "line2" => b.line2 = Some(FromValueOpt::from_value(v)?), - "postal_code" => b.postal_code = Some(FromValueOpt::from_value(v)?), - "state" => b.state = Some(FromValueOpt::from_value(v)?), + "city" => b.city = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "line1" => b.line1 = FromValueOpt::from_value(v), + "line2" => b.line2 = FromValueOpt::from_value(v), + "postal_code" => b.postal_code = FromValueOpt::from_value(v), + "state" => b.state = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_ship_from_details.rs b/generated/async-stripe-misc/src/tax_product_resource_ship_from_details.rs index 227133212..3f4f25fcc 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_ship_from_details.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_ship_from_details.rs @@ -9,7 +9,12 @@ pub struct TaxProductResourceShipFromDetailsBuilder { address: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -54,7 +59,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { address: self.address.take()? }) + let (Some(address),) = (self.address.take(),) else { + return None; + }; + Some(Self::Out { address }) } } @@ -81,7 +89,7 @@ const _: () = { let mut b = TaxProductResourceShipFromDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_breakdown.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_breakdown.rs index 07144e29e..6c6a48f45 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_breakdown.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_breakdown.rs @@ -22,7 +22,12 @@ pub struct TaxProductResourceTaxBreakdownBuilder { taxable_amount: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,12 +82,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(inclusive), + Some(tax_rate_details), + Some(taxability_reason), + Some(taxable_amount), + ) = ( + self.amount, + self.inclusive, + self.tax_rate_details.take(), + self.taxability_reason, + self.taxable_amount, + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - inclusive: self.inclusive?, - tax_rate_details: self.tax_rate_details.take()?, - taxability_reason: self.taxability_reason?, - taxable_amount: self.taxable_amount?, + amount, + inclusive, + tax_rate_details, + taxability_reason, + taxable_amount, }) } } @@ -110,11 +131,11 @@ const _: () = { let mut b = TaxProductResourceTaxBreakdownBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "inclusive" => b.inclusive = Some(FromValueOpt::from_value(v)?), - "tax_rate_details" => b.tax_rate_details = Some(FromValueOpt::from_value(v)?), - "taxability_reason" => b.taxability_reason = Some(FromValueOpt::from_value(v)?), - "taxable_amount" => b.taxable_amount = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "inclusive" => b.inclusive = FromValueOpt::from_value(v), + "tax_rate_details" => b.tax_rate_details = FromValueOpt::from_value(v), + "taxability_reason" => b.taxability_reason = FromValueOpt::from_value(v), + "taxable_amount" => b.taxable_amount = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_calculation_shipping_cost.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_calculation_shipping_cost.rs index d4db1eada..aa56ba1ac 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_calculation_shipping_cost.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_calculation_shipping_cost.rs @@ -28,7 +28,12 @@ pub struct TaxProductResourceTaxCalculationShippingCostBuilder { tax_code: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -85,13 +90,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_tax), + Some(shipping_rate), + Some(tax_behavior), + Some(tax_breakdown), + Some(tax_code), + ) = ( + self.amount, + self.amount_tax, + self.shipping_rate.take(), + self.tax_behavior, + self.tax_breakdown.take(), + self.tax_code.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_tax: self.amount_tax?, - shipping_rate: self.shipping_rate.take()?, - tax_behavior: self.tax_behavior?, - tax_breakdown: self.tax_breakdown.take()?, - tax_code: self.tax_code.take()?, + amount, + amount_tax, + shipping_rate, + tax_behavior, + tax_breakdown, + tax_code, }) } } @@ -119,12 +142,12 @@ const _: () = { let mut b = TaxProductResourceTaxCalculationShippingCostBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_tax" => b.amount_tax = Some(FromValueOpt::from_value(v)?), - "shipping_rate" => b.shipping_rate = Some(FromValueOpt::from_value(v)?), - "tax_behavior" => b.tax_behavior = Some(FromValueOpt::from_value(v)?), - "tax_breakdown" => b.tax_breakdown = Some(FromValueOpt::from_value(v)?), - "tax_code" => b.tax_code = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_tax" => b.amount_tax = FromValueOpt::from_value(v), + "shipping_rate" => b.shipping_rate = FromValueOpt::from_value(v), + "tax_behavior" => b.tax_behavior = FromValueOpt::from_value(v), + "tax_breakdown" => b.tax_breakdown = FromValueOpt::from_value(v), + "tax_code" => b.tax_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_rate_details.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_rate_details.rs index a562865ae..8870461f0 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_rate_details.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_rate_details.rs @@ -19,7 +19,12 @@ pub struct TaxProductResourceTaxRateDetailsBuilder { tax_type: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - country: self.country.take()?, - percentage_decimal: self.percentage_decimal.take()?, - state: self.state.take()?, - tax_type: self.tax_type?, - }) + let (Some(country), Some(percentage_decimal), Some(state), Some(tax_type)) = ( + self.country.take(), + self.percentage_decimal.take(), + self.state.take(), + self.tax_type, + ) else { + return None; + }; + Some(Self::Out { country, percentage_decimal, state, tax_type }) } } @@ -104,12 +112,10 @@ const _: () = { let mut b = TaxProductResourceTaxRateDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "percentage_decimal" => { - b.percentage_decimal = Some(FromValueOpt::from_value(v)?) - } - "state" => b.state = Some(FromValueOpt::from_value(v)?), - "tax_type" => b.tax_type = Some(FromValueOpt::from_value(v)?), + "country" => b.country = FromValueOpt::from_value(v), + "percentage_decimal" => b.percentage_decimal = FromValueOpt::from_value(v), + "state" => b.state = FromValueOpt::from_value(v), + "tax_type" => b.tax_type = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_defaults.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_defaults.rs index a00d899bc..e2fd23902 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_defaults.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_defaults.rs @@ -14,7 +14,12 @@ pub struct TaxProductResourceTaxSettingsDefaultsBuilder { tax_code: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { tax_behavior: self.tax_behavior?, tax_code: self.tax_code.take()? }) + let (Some(tax_behavior), Some(tax_code)) = (self.tax_behavior, self.tax_code.take()) + else { + return None; + }; + Some(Self::Out { tax_behavior, tax_code }) } } @@ -87,8 +96,8 @@ const _: () = { let mut b = TaxProductResourceTaxSettingsDefaultsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "tax_behavior" => b.tax_behavior = Some(FromValueOpt::from_value(v)?), - "tax_code" => b.tax_code = Some(FromValueOpt::from_value(v)?), + "tax_behavior" => b.tax_behavior = FromValueOpt::from_value(v), + "tax_code" => b.tax_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_head_office.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_head_office.rs index fc0a0783f..56eb0af1f 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_head_office.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_head_office.rs @@ -9,7 +9,12 @@ pub struct TaxProductResourceTaxSettingsHeadOfficeBuilder { address: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -54,7 +59,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { address: self.address.take()? }) + let (Some(address),) = (self.address.take(),) else { + return None; + }; + Some(Self::Out { address }) } } @@ -81,7 +89,7 @@ const _: () = { let mut b = TaxProductResourceTaxSettingsHeadOfficeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details.rs index 9f6307251..476df1f3f 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details.rs @@ -11,7 +11,12 @@ pub struct TaxProductResourceTaxSettingsStatusDetailsBuilder { pending: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -57,7 +62,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { active: self.active?, pending: self.pending.take()? }) + let (Some(active), Some(pending)) = (self.active, self.pending.take()) else { + return None; + }; + Some(Self::Out { active, pending }) } } @@ -84,8 +92,8 @@ const _: () = { let mut b = TaxProductResourceTaxSettingsStatusDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "active" => b.active = Some(FromValueOpt::from_value(v)?), - "pending" => b.pending = Some(FromValueOpt::from_value(v)?), + "active" => b.active = FromValueOpt::from_value(v), + "pending" => b.pending = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_active.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_active.rs index 20bd1e207..d2cea6d55 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_active.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_active.rs @@ -5,7 +5,12 @@ pub struct TaxProductResourceTaxSettingsStatusDetailsResourceActive {} #[doc(hidden)] pub struct TaxProductResourceTaxSettingsStatusDetailsResourceActiveBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -49,6 +54,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_pending.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_pending.rs index f9183c323..c1c01f236 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_pending.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_pending.rs @@ -13,7 +13,12 @@ pub struct TaxProductResourceTaxSettingsStatusDetailsResourcePendingBuilder { missing_fields: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { missing_fields: self.missing_fields.take()? }) + let (Some(missing_fields),) = (self.missing_fields.take(),) else { + return None; + }; + Some(Self::Out { missing_fields }) } } @@ -88,7 +96,7 @@ const _: () = { TaxProductResourceTaxSettingsStatusDetailsResourcePendingBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "missing_fields" => b.missing_fields = Some(FromValueOpt::from_value(v)?), + "missing_fields" => b.missing_fields = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_line_item_resource_reversal.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_line_item_resource_reversal.rs index e76567127..84f7b32f8 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_line_item_resource_reversal.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_line_item_resource_reversal.rs @@ -10,7 +10,12 @@ pub struct TaxProductResourceTaxTransactionLineItemResourceReversalBuilder { original_line_item: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { original_line_item: self.original_line_item.take()? }) + let (Some(original_line_item),) = (self.original_line_item.take(),) else { + return None; + }; + Some(Self::Out { original_line_item }) } } @@ -84,9 +92,7 @@ const _: () = { TaxProductResourceTaxTransactionLineItemResourceReversalBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "original_line_item" => { - b.original_line_item = Some(FromValueOpt::from_value(v)?) - } + "original_line_item" => b.original_line_item = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_resource_reversal.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_resource_reversal.rs index a2202cc1c..4223c6b75 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_resource_reversal.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_resource_reversal.rs @@ -10,7 +10,12 @@ pub struct TaxProductResourceTaxTransactionResourceReversalBuilder { original_transaction: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { original_transaction: self.original_transaction.take()? }) + let (Some(original_transaction),) = (self.original_transaction.take(),) else { + return None; + }; + Some(Self::Out { original_transaction }) } } @@ -82,9 +90,7 @@ const _: () = { let mut b = TaxProductResourceTaxTransactionResourceReversalBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "original_transaction" => { - b.original_transaction = Some(FromValueOpt::from_value(v)?) - } + "original_transaction" => b.original_transaction = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_shipping_cost.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_shipping_cost.rs index a5f2bb141..f11ee4191 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_shipping_cost.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_shipping_cost.rs @@ -29,7 +29,12 @@ pub struct TaxProductResourceTaxTransactionShippingCostBuilder { tax_code: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -86,13 +91,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_tax), + Some(shipping_rate), + Some(tax_behavior), + Some(tax_breakdown), + Some(tax_code), + ) = ( + self.amount, + self.amount_tax, + self.shipping_rate.take(), + self.tax_behavior, + self.tax_breakdown.take(), + self.tax_code.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_tax: self.amount_tax?, - shipping_rate: self.shipping_rate.take()?, - tax_behavior: self.tax_behavior?, - tax_breakdown: self.tax_breakdown.take()?, - tax_code: self.tax_code.take()?, + amount, + amount_tax, + shipping_rate, + tax_behavior, + tax_breakdown, + tax_code, }) } } @@ -120,12 +143,12 @@ const _: () = { let mut b = TaxProductResourceTaxTransactionShippingCostBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_tax" => b.amount_tax = Some(FromValueOpt::from_value(v)?), - "shipping_rate" => b.shipping_rate = Some(FromValueOpt::from_value(v)?), - "tax_behavior" => b.tax_behavior = Some(FromValueOpt::from_value(v)?), - "tax_breakdown" => b.tax_breakdown = Some(FromValueOpt::from_value(v)?), - "tax_code" => b.tax_code = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_tax" => b.amount_tax = FromValueOpt::from_value(v), + "shipping_rate" => b.shipping_rate = FromValueOpt::from_value(v), + "tax_behavior" => b.tax_behavior = FromValueOpt::from_value(v), + "tax_breakdown" => b.tax_breakdown = FromValueOpt::from_value(v), + "tax_code" => b.tax_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_registration/types.rs b/generated/async-stripe-misc/src/tax_registration/types.rs index 2853da506..675564836 100644 --- a/generated/async-stripe-misc/src/tax_registration/types.rs +++ b/generated/async-stripe-misc/src/tax_registration/types.rs @@ -38,7 +38,12 @@ pub struct TaxRegistrationBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -99,15 +104,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(active_from), + Some(country), + Some(country_options), + Some(created), + Some(expires_at), + Some(id), + Some(livemode), + Some(status), + ) = ( + self.active_from, + self.country.take(), + self.country_options.take(), + self.created, + self.expires_at, + self.id.take(), + self.livemode, + self.status, + ) + else { + return None; + }; Some(Self::Out { - active_from: self.active_from?, - country: self.country.take()?, - country_options: self.country_options.take()?, - created: self.created?, - expires_at: self.expires_at?, - id: self.id.take()?, - livemode: self.livemode?, - status: self.status?, + active_from, + country, + country_options, + created, + expires_at, + id, + livemode, + status, }) } } @@ -135,14 +162,14 @@ const _: () = { let mut b = TaxRegistrationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "active_from" => b.active_from = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "country_options" => b.country_options = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "active_from" => b.active_from = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "country_options" => b.country_options = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_settings/types.rs b/generated/async-stripe-misc/src/tax_settings/types.rs index a8df04eb7..5a93d03ef 100644 --- a/generated/async-stripe-misc/src/tax_settings/types.rs +++ b/generated/async-stripe-misc/src/tax_settings/types.rs @@ -25,7 +25,12 @@ pub struct TaxSettingsBuilder { status_details: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -80,13 +85,23 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - defaults: self.defaults.take()?, - head_office: self.head_office.take()?, - livemode: self.livemode?, - status: self.status?, - status_details: self.status_details.take()?, - }) + let ( + Some(defaults), + Some(head_office), + Some(livemode), + Some(status), + Some(status_details), + ) = ( + self.defaults.take(), + self.head_office.take(), + self.livemode, + self.status, + self.status_details.take(), + ) + else { + return None; + }; + Some(Self::Out { defaults, head_office, livemode, status, status_details }) } } @@ -113,11 +128,11 @@ const _: () = { let mut b = TaxSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "defaults" => b.defaults = Some(FromValueOpt::from_value(v)?), - "head_office" => b.head_office = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_details" => b.status_details = Some(FromValueOpt::from_value(v)?), + "defaults" => b.defaults = FromValueOpt::from_value(v), + "head_office" => b.head_office = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "status_details" => b.status_details = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/tax_transaction/types.rs b/generated/async-stripe-misc/src/tax_transaction/types.rs index 93b8cd456..98d2b8e9e 100644 --- a/generated/async-stripe-misc/src/tax_transaction/types.rs +++ b/generated/async-stripe-misc/src/tax_transaction/types.rs @@ -55,7 +55,12 @@ pub struct TaxTransactionBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -128,21 +133,55 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(created), + Some(currency), + Some(customer), + Some(customer_details), + Some(id), + Some(line_items), + Some(livemode), + Some(metadata), + Some(reference), + Some(reversal), + Some(ship_from_details), + Some(shipping_cost), + Some(tax_date), + Some(type_), + ) = ( + self.created, + self.currency, + self.customer.take(), + self.customer_details.take(), + self.id.take(), + self.line_items.take(), + self.livemode, + self.metadata.take(), + self.reference.take(), + self.reversal.take(), + self.ship_from_details.take(), + self.shipping_cost.take(), + self.tax_date, + self.type_, + ) + else { + return None; + }; Some(Self::Out { - created: self.created?, - currency: self.currency?, - customer: self.customer.take()?, - customer_details: self.customer_details.take()?, - id: self.id.take()?, - line_items: self.line_items.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - reference: self.reference.take()?, - reversal: self.reversal.take()?, - ship_from_details: self.ship_from_details.take()?, - shipping_cost: self.shipping_cost.take()?, - tax_date: self.tax_date?, - type_: self.type_?, + created, + currency, + customer, + customer_details, + id, + line_items, + livemode, + metadata, + reference, + reversal, + ship_from_details, + shipping_cost, + tax_date, + type_, }) } } @@ -170,20 +209,20 @@ const _: () = { let mut b = TaxTransactionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "customer_details" => b.customer_details = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "line_items" => b.line_items = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "reversal" => b.reversal = Some(FromValueOpt::from_value(v)?), - "ship_from_details" => b.ship_from_details = Some(FromValueOpt::from_value(v)?), - "shipping_cost" => b.shipping_cost = Some(FromValueOpt::from_value(v)?), - "tax_date" => b.tax_date = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "customer_details" => b.customer_details = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "line_items" => b.line_items = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "reference" => b.reference = FromValueOpt::from_value(v), + "reversal" => b.reversal = FromValueOpt::from_value(v), + "ship_from_details" => b.ship_from_details = FromValueOpt::from_value(v), + "shipping_cost" => b.shipping_cost = FromValueOpt::from_value(v), + "tax_date" => b.tax_date = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } 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..887dc758a 100644 --- a/generated/async-stripe-misc/src/tax_transaction_line_item.rs +++ b/generated/async-stripe-misc/src/tax_transaction_line_item.rs @@ -47,7 +47,12 @@ pub struct TaxTransactionLineItemBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -116,19 +121,49 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_tax), + Some(id), + Some(livemode), + Some(metadata), + Some(product), + Some(quantity), + Some(reference), + Some(reversal), + Some(tax_behavior), + Some(tax_code), + Some(type_), + ) = ( + self.amount, + self.amount_tax, + self.id.take(), + self.livemode, + self.metadata.take(), + self.product.take(), + self.quantity, + self.reference.take(), + self.reversal.take(), + self.tax_behavior, + self.tax_code.take(), + self.type_, + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_tax: self.amount_tax?, - id: self.id.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - product: self.product.take()?, - quantity: self.quantity?, - reference: self.reference.take()?, - reversal: self.reversal.take()?, - tax_behavior: self.tax_behavior?, - tax_code: self.tax_code.take()?, - type_: self.type_?, + amount, + amount_tax, + id, + livemode, + metadata, + product, + quantity, + reference, + reversal, + tax_behavior, + tax_code, + type_, }) } } @@ -156,18 +191,18 @@ const _: () = { let mut b = TaxTransactionLineItemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_tax" => b.amount_tax = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "product" => b.product = Some(FromValueOpt::from_value(v)?), - "quantity" => b.quantity = Some(FromValueOpt::from_value(v)?), - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "reversal" => b.reversal = Some(FromValueOpt::from_value(v)?), - "tax_behavior" => b.tax_behavior = Some(FromValueOpt::from_value(v)?), - "tax_code" => b.tax_code = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_tax" => b.amount_tax = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "product" => b.product = FromValueOpt::from_value(v), + "quantity" => b.quantity = FromValueOpt::from_value(v), + "reference" => b.reference = FromValueOpt::from_value(v), + "reversal" => b.reversal = FromValueOpt::from_value(v), + "tax_behavior" => b.tax_behavior = FromValueOpt::from_value(v), + "tax_code" => b.tax_code = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/verification_session_redaction.rs b/generated/async-stripe-misc/src/verification_session_redaction.rs index 30775d68b..3a3dc1c80 100644 --- a/generated/async-stripe-misc/src/verification_session_redaction.rs +++ b/generated/async-stripe-misc/src/verification_session_redaction.rs @@ -10,7 +10,12 @@ pub struct VerificationSessionRedactionBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { status: self.status? }) + let (Some(status),) = (self.status,) else { + return None; + }; + Some(Self::Out { status }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = VerificationSessionRedactionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-misc/src/webhook_endpoint/types.rs b/generated/async-stripe-misc/src/webhook_endpoint/types.rs index 02b5689cc..635b9d980 100644 --- a/generated/async-stripe-misc/src/webhook_endpoint/types.rs +++ b/generated/async-stripe-misc/src/webhook_endpoint/types.rs @@ -51,7 +51,12 @@ pub struct WebhookEndpointBuilder { url: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -118,18 +123,46 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(api_version), + Some(application), + Some(created), + Some(description), + Some(enabled_events), + Some(id), + Some(livemode), + Some(metadata), + Some(secret), + Some(status), + Some(url), + ) = ( + self.api_version.take(), + self.application.take(), + self.created, + self.description.take(), + self.enabled_events.take(), + self.id.take(), + self.livemode, + self.metadata.take(), + self.secret.take(), + self.status.take(), + self.url.take(), + ) + else { + return None; + }; Some(Self::Out { - api_version: self.api_version.take()?, - application: self.application.take()?, - created: self.created?, - description: self.description.take()?, - enabled_events: self.enabled_events.take()?, - id: self.id.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - secret: self.secret.take()?, - status: self.status.take()?, - url: self.url.take()?, + api_version, + application, + created, + description, + enabled_events, + id, + livemode, + metadata, + secret, + status, + url, }) } } @@ -157,17 +190,17 @@ const _: () = { let mut b = WebhookEndpointBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "api_version" => b.api_version = Some(FromValueOpt::from_value(v)?), - "application" => b.application = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "enabled_events" => b.enabled_events = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "secret" => b.secret = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "api_version" => b.api_version = FromValueOpt::from_value(v), + "application" => b.application = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "enabled_events" => b.enabled_events = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "secret" => b.secret = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-payment/src/confirmation_token/types.rs b/generated/async-stripe-payment/src/confirmation_token/types.rs index f31ce3bd9..9316b9bdb 100644 --- a/generated/async-stripe-payment/src/confirmation_token/types.rs +++ b/generated/async-stripe-payment/src/confirmation_token/types.rs @@ -54,7 +54,12 @@ pub struct ConfirmationTokenBuilder { use_stripe_sdk: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -123,19 +128,49 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(created), + Some(expires_at), + Some(id), + Some(livemode), + Some(mandate_data), + Some(payment_intent), + Some(payment_method_preview), + Some(return_url), + Some(setup_future_usage), + Some(setup_intent), + Some(shipping), + Some(use_stripe_sdk), + ) = ( + self.created, + self.expires_at, + self.id.take(), + self.livemode, + self.mandate_data.take(), + self.payment_intent.take(), + self.payment_method_preview.take(), + self.return_url.take(), + self.setup_future_usage, + self.setup_intent.take(), + self.shipping.take(), + self.use_stripe_sdk, + ) + else { + return None; + }; Some(Self::Out { - created: self.created?, - expires_at: self.expires_at?, - id: self.id.take()?, - livemode: self.livemode?, - mandate_data: self.mandate_data.take()?, - payment_intent: self.payment_intent.take()?, - payment_method_preview: self.payment_method_preview.take()?, - return_url: self.return_url.take()?, - setup_future_usage: self.setup_future_usage?, - setup_intent: self.setup_intent.take()?, - shipping: self.shipping.take()?, - use_stripe_sdk: self.use_stripe_sdk?, + created, + expires_at, + id, + livemode, + mandate_data, + payment_intent, + payment_method_preview, + return_url, + setup_future_usage, + setup_intent, + shipping, + use_stripe_sdk, }) } } @@ -163,22 +198,20 @@ const _: () = { let mut b = ConfirmationTokenBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "mandate_data" => b.mandate_data = Some(FromValueOpt::from_value(v)?), - "payment_intent" => b.payment_intent = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "mandate_data" => b.mandate_data = FromValueOpt::from_value(v), + "payment_intent" => b.payment_intent = FromValueOpt::from_value(v), "payment_method_preview" => { - b.payment_method_preview = Some(FromValueOpt::from_value(v)?) - } - "return_url" => b.return_url = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) + b.payment_method_preview = FromValueOpt::from_value(v) } - "setup_intent" => b.setup_intent = Some(FromValueOpt::from_value(v)?), - "shipping" => b.shipping = Some(FromValueOpt::from_value(v)?), - "use_stripe_sdk" => b.use_stripe_sdk = Some(FromValueOpt::from_value(v)?), + "return_url" => b.return_url = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), + "setup_intent" => b.setup_intent = FromValueOpt::from_value(v), + "shipping" => b.shipping = FromValueOpt::from_value(v), + "use_stripe_sdk" => b.use_stripe_sdk = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data.rs b/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data.rs index 15cb73a6b..62206a127 100644 --- a/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data.rs +++ b/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data.rs @@ -12,7 +12,12 @@ pub struct ConfirmationTokensResourceMandateDataBuilder { Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -57,7 +62,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { customer_acceptance: self.customer_acceptance.take()? }) + let (Some(customer_acceptance),) = (self.customer_acceptance.take(),) else { + return None; + }; + Some(Self::Out { customer_acceptance }) } } @@ -84,9 +92,7 @@ const _: () = { let mut b = ConfirmationTokensResourceMandateDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "customer_acceptance" => { - b.customer_acceptance = Some(FromValueOpt::from_value(v)?) - } + "customer_acceptance" => b.customer_acceptance = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance.rs b/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance.rs index d50c51f90..6af548bc0 100644 --- a/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance.rs +++ b/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance.rs @@ -17,7 +17,12 @@ type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -63,7 +68,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { online: self.online.take()?, type_: self.type_.take()? }) + let (Some(online), Some(type_)) = (self.online.take(), self.type_.take()) else { + return None; + }; + Some(Self::Out { online, type_ }) } } @@ -90,8 +98,8 @@ const _: () = { let mut b = ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "online" => b.online = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "online" => b.online = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online.rs b/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online.rs index eef5580bc..b64231ed6 100644 --- a/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online.rs +++ b/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online.rs @@ -14,7 +14,12 @@ pub struct ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResour user_agent: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,10 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - ip_address: self.ip_address.take()?, - user_agent: self.user_agent.take()?, - }) + let (Some(ip_address), Some(user_agent)) = + (self.ip_address.take(), self.user_agent.take()) + else { + return None; + }; + Some(Self::Out { ip_address, user_agent }) } } @@ -100,8 +107,8 @@ const _: () = { let mut b = ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnlineBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "ip_address" => b.ip_address = Some(FromValueOpt::from_value(v)?), - "user_agent" => b.user_agent = Some(FromValueOpt::from_value(v)?), + "ip_address" => b.ip_address = FromValueOpt::from_value(v), + "user_agent" => b.user_agent = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-payment/src/confirmation_tokens_resource_payment_method_preview.rs b/generated/async-stripe-payment/src/confirmation_tokens_resource_payment_method_preview.rs index 89cbe23ad..a3d02038d 100644 --- a/generated/async-stripe-payment/src/confirmation_tokens_resource_payment_method_preview.rs +++ b/generated/async-stripe-payment/src/confirmation_tokens_resource_payment_method_preview.rs @@ -90,7 +90,12 @@ pub struct ConfirmationTokensResourcePaymentMethodPreviewBuilder { zip: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -213,46 +218,130 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(acss_debit), + Some(affirm), + Some(afterpay_clearpay), + Some(alipay), + Some(amazon_pay), + Some(au_becs_debit), + Some(bacs_debit), + Some(bancontact), + Some(billing_details), + Some(blik), + Some(boleto), + Some(card), + Some(card_present), + Some(cashapp), + Some(customer_balance), + Some(eps), + Some(fpx), + Some(giropay), + Some(grabpay), + Some(ideal), + Some(interac_present), + Some(klarna), + Some(konbini), + Some(link), + Some(mobilepay), + Some(oxxo), + Some(p24), + Some(paynow), + Some(paypal), + Some(pix), + Some(promptpay), + Some(revolut_pay), + Some(sepa_debit), + Some(sofort), + Some(swish), + Some(type_), + Some(us_bank_account), + Some(wechat_pay), + Some(zip), + ) = ( + self.acss_debit.take(), + self.affirm, + self.afterpay_clearpay, + self.alipay, + self.amazon_pay, + self.au_becs_debit.take(), + self.bacs_debit.take(), + self.bancontact, + self.billing_details.take(), + self.blik, + self.boleto.take(), + self.card.take(), + self.card_present.take(), + self.cashapp.take(), + self.customer_balance, + self.eps, + self.fpx, + self.giropay, + self.grabpay, + self.ideal, + self.interac_present.take(), + self.klarna, + self.konbini, + self.link.take(), + self.mobilepay, + self.oxxo, + self.p24, + self.paynow, + self.paypal.take(), + self.pix, + self.promptpay, + self.revolut_pay, + self.sepa_debit.take(), + self.sofort.take(), + self.swish, + self.type_, + self.us_bank_account.take(), + self.wechat_pay, + self.zip, + ) + else { + return None; + }; Some(Self::Out { - acss_debit: self.acss_debit.take()?, - affirm: self.affirm?, - afterpay_clearpay: self.afterpay_clearpay?, - alipay: self.alipay?, - amazon_pay: self.amazon_pay?, - au_becs_debit: self.au_becs_debit.take()?, - bacs_debit: self.bacs_debit.take()?, - bancontact: self.bancontact?, - billing_details: self.billing_details.take()?, - blik: self.blik?, - boleto: self.boleto.take()?, - card: self.card.take()?, - card_present: self.card_present.take()?, - cashapp: self.cashapp.take()?, - customer_balance: self.customer_balance?, - eps: self.eps?, - fpx: self.fpx?, - giropay: self.giropay?, - grabpay: self.grabpay?, - ideal: self.ideal?, - interac_present: self.interac_present.take()?, - klarna: self.klarna?, - konbini: self.konbini?, - link: self.link.take()?, - mobilepay: self.mobilepay?, - oxxo: self.oxxo?, - p24: self.p24?, - paynow: self.paynow?, - paypal: self.paypal.take()?, - pix: self.pix?, - promptpay: self.promptpay?, - revolut_pay: self.revolut_pay?, - sepa_debit: self.sepa_debit.take()?, - sofort: self.sofort.take()?, - swish: self.swish?, - type_: self.type_?, - us_bank_account: self.us_bank_account.take()?, - wechat_pay: self.wechat_pay?, - zip: self.zip?, + acss_debit, + affirm, + afterpay_clearpay, + alipay, + amazon_pay, + au_becs_debit, + bacs_debit, + bancontact, + billing_details, + blik, + boleto, + card, + card_present, + cashapp, + customer_balance, + eps, + fpx, + giropay, + grabpay, + ideal, + interac_present, + klarna, + konbini, + link, + mobilepay, + oxxo, + p24, + paynow, + paypal, + pix, + promptpay, + revolut_pay, + sepa_debit, + sofort, + swish, + type_, + us_bank_account, + wechat_pay, + zip, }) } } @@ -280,45 +369,45 @@ const _: () = { let mut b = ConfirmationTokensResourcePaymentMethodPreviewBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "acss_debit" => b.acss_debit = Some(FromValueOpt::from_value(v)?), - "affirm" => b.affirm = Some(FromValueOpt::from_value(v)?), - "afterpay_clearpay" => b.afterpay_clearpay = Some(FromValueOpt::from_value(v)?), - "alipay" => b.alipay = Some(FromValueOpt::from_value(v)?), - "amazon_pay" => b.amazon_pay = Some(FromValueOpt::from_value(v)?), - "au_becs_debit" => b.au_becs_debit = Some(FromValueOpt::from_value(v)?), - "bacs_debit" => b.bacs_debit = Some(FromValueOpt::from_value(v)?), - "bancontact" => b.bancontact = Some(FromValueOpt::from_value(v)?), - "billing_details" => b.billing_details = Some(FromValueOpt::from_value(v)?), - "blik" => b.blik = Some(FromValueOpt::from_value(v)?), - "boleto" => b.boleto = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "card_present" => b.card_present = Some(FromValueOpt::from_value(v)?), - "cashapp" => b.cashapp = Some(FromValueOpt::from_value(v)?), - "customer_balance" => b.customer_balance = Some(FromValueOpt::from_value(v)?), - "eps" => b.eps = Some(FromValueOpt::from_value(v)?), - "fpx" => b.fpx = Some(FromValueOpt::from_value(v)?), - "giropay" => b.giropay = Some(FromValueOpt::from_value(v)?), - "grabpay" => b.grabpay = Some(FromValueOpt::from_value(v)?), - "ideal" => b.ideal = Some(FromValueOpt::from_value(v)?), - "interac_present" => b.interac_present = Some(FromValueOpt::from_value(v)?), - "klarna" => b.klarna = Some(FromValueOpt::from_value(v)?), - "konbini" => b.konbini = Some(FromValueOpt::from_value(v)?), - "link" => b.link = Some(FromValueOpt::from_value(v)?), - "mobilepay" => b.mobilepay = Some(FromValueOpt::from_value(v)?), - "oxxo" => b.oxxo = Some(FromValueOpt::from_value(v)?), - "p24" => b.p24 = Some(FromValueOpt::from_value(v)?), - "paynow" => b.paynow = Some(FromValueOpt::from_value(v)?), - "paypal" => b.paypal = Some(FromValueOpt::from_value(v)?), - "pix" => b.pix = Some(FromValueOpt::from_value(v)?), - "promptpay" => b.promptpay = Some(FromValueOpt::from_value(v)?), - "revolut_pay" => b.revolut_pay = Some(FromValueOpt::from_value(v)?), - "sepa_debit" => b.sepa_debit = Some(FromValueOpt::from_value(v)?), - "sofort" => b.sofort = Some(FromValueOpt::from_value(v)?), - "swish" => b.swish = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "us_bank_account" => b.us_bank_account = Some(FromValueOpt::from_value(v)?), - "wechat_pay" => b.wechat_pay = Some(FromValueOpt::from_value(v)?), - "zip" => b.zip = Some(FromValueOpt::from_value(v)?), + "acss_debit" => b.acss_debit = FromValueOpt::from_value(v), + "affirm" => b.affirm = FromValueOpt::from_value(v), + "afterpay_clearpay" => b.afterpay_clearpay = FromValueOpt::from_value(v), + "alipay" => b.alipay = FromValueOpt::from_value(v), + "amazon_pay" => b.amazon_pay = FromValueOpt::from_value(v), + "au_becs_debit" => b.au_becs_debit = FromValueOpt::from_value(v), + "bacs_debit" => b.bacs_debit = FromValueOpt::from_value(v), + "bancontact" => b.bancontact = FromValueOpt::from_value(v), + "billing_details" => b.billing_details = FromValueOpt::from_value(v), + "blik" => b.blik = FromValueOpt::from_value(v), + "boleto" => b.boleto = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "card_present" => b.card_present = FromValueOpt::from_value(v), + "cashapp" => b.cashapp = FromValueOpt::from_value(v), + "customer_balance" => b.customer_balance = FromValueOpt::from_value(v), + "eps" => b.eps = FromValueOpt::from_value(v), + "fpx" => b.fpx = FromValueOpt::from_value(v), + "giropay" => b.giropay = FromValueOpt::from_value(v), + "grabpay" => b.grabpay = FromValueOpt::from_value(v), + "ideal" => b.ideal = FromValueOpt::from_value(v), + "interac_present" => b.interac_present = FromValueOpt::from_value(v), + "klarna" => b.klarna = FromValueOpt::from_value(v), + "konbini" => b.konbini = FromValueOpt::from_value(v), + "link" => b.link = FromValueOpt::from_value(v), + "mobilepay" => b.mobilepay = FromValueOpt::from_value(v), + "oxxo" => b.oxxo = FromValueOpt::from_value(v), + "p24" => b.p24 = FromValueOpt::from_value(v), + "paynow" => b.paynow = FromValueOpt::from_value(v), + "paypal" => b.paypal = FromValueOpt::from_value(v), + "pix" => b.pix = FromValueOpt::from_value(v), + "promptpay" => b.promptpay = FromValueOpt::from_value(v), + "revolut_pay" => b.revolut_pay = FromValueOpt::from_value(v), + "sepa_debit" => b.sepa_debit = FromValueOpt::from_value(v), + "sofort" => b.sofort = FromValueOpt::from_value(v), + "swish" => b.swish = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "us_bank_account" => b.us_bank_account = FromValueOpt::from_value(v), + "wechat_pay" => b.wechat_pay = FromValueOpt::from_value(v), + "zip" => b.zip = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-payment/src/confirmation_tokens_resource_shipping.rs b/generated/async-stripe-payment/src/confirmation_tokens_resource_shipping.rs index a877842ae..eb18cb3e1 100644 --- a/generated/async-stripe-payment/src/confirmation_tokens_resource_shipping.rs +++ b/generated/async-stripe-payment/src/confirmation_tokens_resource_shipping.rs @@ -15,7 +15,12 @@ pub struct ConfirmationTokensResourceShippingBuilder { phone: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -66,11 +71,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - address: self.address.take()?, - name: self.name.take()?, - phone: self.phone.take()?, - }) + let (Some(address), Some(name), Some(phone)) = + (self.address.take(), self.name.take(), self.phone.take()) + else { + return None; + }; + Some(Self::Out { address, name, phone }) } } @@ -97,9 +103,9 @@ const _: () = { let mut b = ConfirmationTokensResourceShippingBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "phone" => b.phone = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "phone" => b.phone = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-payment/src/payment_method_config_resource_display_preference.rs b/generated/async-stripe-payment/src/payment_method_config_resource_display_preference.rs index e902d2b19..2cd4c2e2b 100644 --- a/generated/async-stripe-payment/src/payment_method_config_resource_display_preference.rs +++ b/generated/async-stripe-payment/src/payment_method_config_resource_display_preference.rs @@ -17,7 +17,12 @@ pub struct PaymentMethodConfigResourceDisplayPreferenceBuilder { value: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - overridable: self.overridable?, - preference: self.preference?, - value: self.value?, - }) + let (Some(overridable), Some(preference), Some(value)) = + (self.overridable, self.preference, self.value) + else { + return None; + }; + Some(Self::Out { overridable, preference, value }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = PaymentMethodConfigResourceDisplayPreferenceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "overridable" => b.overridable = Some(FromValueOpt::from_value(v)?), - "preference" => b.preference = Some(FromValueOpt::from_value(v)?), - "value" => b.value = Some(FromValueOpt::from_value(v)?), + "overridable" => b.overridable = FromValueOpt::from_value(v), + "preference" => b.preference = FromValueOpt::from_value(v), + "value" => b.value = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-payment/src/payment_method_config_resource_payment_method_properties.rs b/generated/async-stripe-payment/src/payment_method_config_resource_payment_method_properties.rs index c5cbe2547..b76d5fe3b 100644 --- a/generated/async-stripe-payment/src/payment_method_config_resource_payment_method_properties.rs +++ b/generated/async-stripe-payment/src/payment_method_config_resource_payment_method_properties.rs @@ -13,7 +13,12 @@ pub struct PaymentMethodConfigResourcePaymentMethodPropertiesBuilder { display_preference: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - available: self.available?, - display_preference: self.display_preference?, - }) + let (Some(available), Some(display_preference)) = + (self.available, self.display_preference) + else { + return None; + }; + Some(Self::Out { available, display_preference }) } } @@ -89,10 +96,8 @@ const _: () = { let mut b = PaymentMethodConfigResourcePaymentMethodPropertiesBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "available" => b.available = Some(FromValueOpt::from_value(v)?), - "display_preference" => { - b.display_preference = Some(FromValueOpt::from_value(v)?) - } + "available" => b.available = FromValueOpt::from_value(v), + "display_preference" => b.display_preference = FromValueOpt::from_value(v), _ => {} } 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..be28702d6 100644 --- a/generated/async-stripe-payment/src/payment_method_configuration/types.rs +++ b/generated/async-stripe-payment/src/payment_method_configuration/types.rs @@ -134,7 +134,12 @@ pub struct PaymentMethodConfigurationBuilder { zip: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -269,52 +274,148 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(acss_debit), + Some(active), + Some(affirm), + Some(afterpay_clearpay), + Some(alipay), + Some(amazon_pay), + Some(apple_pay), + Some(application), + Some(au_becs_debit), + Some(bacs_debit), + Some(bancontact), + Some(blik), + Some(boleto), + Some(card), + Some(cartes_bancaires), + Some(cashapp), + Some(customer_balance), + Some(eps), + Some(fpx), + Some(giropay), + Some(google_pay), + Some(grabpay), + Some(id), + Some(ideal), + Some(is_default), + Some(jcb), + Some(klarna), + Some(konbini), + Some(link), + Some(livemode), + Some(mobilepay), + Some(name), + Some(oxxo), + Some(p24), + Some(parent), + Some(paynow), + Some(paypal), + Some(promptpay), + Some(revolut_pay), + Some(sepa_debit), + Some(sofort), + Some(swish), + Some(us_bank_account), + Some(wechat_pay), + Some(zip), + ) = ( + self.acss_debit, + self.active, + self.affirm, + self.afterpay_clearpay, + self.alipay, + self.amazon_pay, + self.apple_pay, + self.application.take(), + self.au_becs_debit, + self.bacs_debit, + self.bancontact, + self.blik, + self.boleto, + self.card, + self.cartes_bancaires, + self.cashapp, + self.customer_balance, + self.eps, + self.fpx, + self.giropay, + self.google_pay, + self.grabpay, + self.id.take(), + self.ideal, + self.is_default, + self.jcb, + self.klarna, + self.konbini, + self.link, + self.livemode, + self.mobilepay, + self.name.take(), + self.oxxo, + self.p24, + self.parent.take(), + self.paynow, + self.paypal, + self.promptpay, + self.revolut_pay, + self.sepa_debit, + self.sofort, + self.swish, + self.us_bank_account, + self.wechat_pay, + self.zip, + ) + else { + return None; + }; Some(Self::Out { - acss_debit: self.acss_debit?, - active: self.active?, - affirm: self.affirm?, - afterpay_clearpay: self.afterpay_clearpay?, - alipay: self.alipay?, - amazon_pay: self.amazon_pay?, - apple_pay: self.apple_pay?, - application: self.application.take()?, - au_becs_debit: self.au_becs_debit?, - bacs_debit: self.bacs_debit?, - bancontact: self.bancontact?, - blik: self.blik?, - boleto: self.boleto?, - card: self.card?, - cartes_bancaires: self.cartes_bancaires?, - cashapp: self.cashapp?, - customer_balance: self.customer_balance?, - eps: self.eps?, - fpx: self.fpx?, - giropay: self.giropay?, - google_pay: self.google_pay?, - grabpay: self.grabpay?, - id: self.id.take()?, - ideal: self.ideal?, - is_default: self.is_default?, - jcb: self.jcb?, - klarna: self.klarna?, - konbini: self.konbini?, - link: self.link?, - livemode: self.livemode?, - mobilepay: self.mobilepay?, - name: self.name.take()?, - oxxo: self.oxxo?, - p24: self.p24?, - parent: self.parent.take()?, - paynow: self.paynow?, - paypal: self.paypal?, - promptpay: self.promptpay?, - revolut_pay: self.revolut_pay?, - sepa_debit: self.sepa_debit?, - sofort: self.sofort?, - swish: self.swish?, - us_bank_account: self.us_bank_account?, - wechat_pay: self.wechat_pay?, - zip: self.zip?, + acss_debit, + active, + affirm, + afterpay_clearpay, + alipay, + amazon_pay, + apple_pay, + application, + au_becs_debit, + bacs_debit, + bancontact, + blik, + boleto, + card, + cartes_bancaires, + cashapp, + customer_balance, + eps, + fpx, + giropay, + google_pay, + grabpay, + id, + ideal, + is_default, + jcb, + klarna, + konbini, + link, + livemode, + mobilepay, + name, + oxxo, + p24, + parent, + paynow, + paypal, + promptpay, + revolut_pay, + sepa_debit, + sofort, + swish, + us_bank_account, + wechat_pay, + zip, }) } } @@ -342,51 +443,51 @@ const _: () = { let mut b = PaymentMethodConfigurationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "acss_debit" => b.acss_debit = Some(FromValueOpt::from_value(v)?), - "active" => b.active = Some(FromValueOpt::from_value(v)?), - "affirm" => b.affirm = Some(FromValueOpt::from_value(v)?), - "afterpay_clearpay" => b.afterpay_clearpay = Some(FromValueOpt::from_value(v)?), - "alipay" => b.alipay = Some(FromValueOpt::from_value(v)?), - "amazon_pay" => b.amazon_pay = Some(FromValueOpt::from_value(v)?), - "apple_pay" => b.apple_pay = Some(FromValueOpt::from_value(v)?), - "application" => b.application = Some(FromValueOpt::from_value(v)?), - "au_becs_debit" => b.au_becs_debit = Some(FromValueOpt::from_value(v)?), - "bacs_debit" => b.bacs_debit = Some(FromValueOpt::from_value(v)?), - "bancontact" => b.bancontact = Some(FromValueOpt::from_value(v)?), - "blik" => b.blik = Some(FromValueOpt::from_value(v)?), - "boleto" => b.boleto = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "cartes_bancaires" => b.cartes_bancaires = Some(FromValueOpt::from_value(v)?), - "cashapp" => b.cashapp = Some(FromValueOpt::from_value(v)?), - "customer_balance" => b.customer_balance = Some(FromValueOpt::from_value(v)?), - "eps" => b.eps = Some(FromValueOpt::from_value(v)?), - "fpx" => b.fpx = Some(FromValueOpt::from_value(v)?), - "giropay" => b.giropay = Some(FromValueOpt::from_value(v)?), - "google_pay" => b.google_pay = Some(FromValueOpt::from_value(v)?), - "grabpay" => b.grabpay = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "ideal" => b.ideal = Some(FromValueOpt::from_value(v)?), - "is_default" => b.is_default = Some(FromValueOpt::from_value(v)?), - "jcb" => b.jcb = Some(FromValueOpt::from_value(v)?), - "klarna" => b.klarna = Some(FromValueOpt::from_value(v)?), - "konbini" => b.konbini = Some(FromValueOpt::from_value(v)?), - "link" => b.link = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "mobilepay" => b.mobilepay = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "oxxo" => b.oxxo = Some(FromValueOpt::from_value(v)?), - "p24" => b.p24 = Some(FromValueOpt::from_value(v)?), - "parent" => b.parent = Some(FromValueOpt::from_value(v)?), - "paynow" => b.paynow = Some(FromValueOpt::from_value(v)?), - "paypal" => b.paypal = Some(FromValueOpt::from_value(v)?), - "promptpay" => b.promptpay = Some(FromValueOpt::from_value(v)?), - "revolut_pay" => b.revolut_pay = Some(FromValueOpt::from_value(v)?), - "sepa_debit" => b.sepa_debit = Some(FromValueOpt::from_value(v)?), - "sofort" => b.sofort = Some(FromValueOpt::from_value(v)?), - "swish" => b.swish = Some(FromValueOpt::from_value(v)?), - "us_bank_account" => b.us_bank_account = Some(FromValueOpt::from_value(v)?), - "wechat_pay" => b.wechat_pay = Some(FromValueOpt::from_value(v)?), - "zip" => b.zip = Some(FromValueOpt::from_value(v)?), + "acss_debit" => b.acss_debit = FromValueOpt::from_value(v), + "active" => b.active = FromValueOpt::from_value(v), + "affirm" => b.affirm = FromValueOpt::from_value(v), + "afterpay_clearpay" => b.afterpay_clearpay = FromValueOpt::from_value(v), + "alipay" => b.alipay = FromValueOpt::from_value(v), + "amazon_pay" => b.amazon_pay = FromValueOpt::from_value(v), + "apple_pay" => b.apple_pay = FromValueOpt::from_value(v), + "application" => b.application = FromValueOpt::from_value(v), + "au_becs_debit" => b.au_becs_debit = FromValueOpt::from_value(v), + "bacs_debit" => b.bacs_debit = FromValueOpt::from_value(v), + "bancontact" => b.bancontact = FromValueOpt::from_value(v), + "blik" => b.blik = FromValueOpt::from_value(v), + "boleto" => b.boleto = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "cartes_bancaires" => b.cartes_bancaires = FromValueOpt::from_value(v), + "cashapp" => b.cashapp = FromValueOpt::from_value(v), + "customer_balance" => b.customer_balance = FromValueOpt::from_value(v), + "eps" => b.eps = FromValueOpt::from_value(v), + "fpx" => b.fpx = FromValueOpt::from_value(v), + "giropay" => b.giropay = FromValueOpt::from_value(v), + "google_pay" => b.google_pay = FromValueOpt::from_value(v), + "grabpay" => b.grabpay = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "ideal" => b.ideal = FromValueOpt::from_value(v), + "is_default" => b.is_default = FromValueOpt::from_value(v), + "jcb" => b.jcb = FromValueOpt::from_value(v), + "klarna" => b.klarna = FromValueOpt::from_value(v), + "konbini" => b.konbini = FromValueOpt::from_value(v), + "link" => b.link = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "mobilepay" => b.mobilepay = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "oxxo" => b.oxxo = FromValueOpt::from_value(v), + "p24" => b.p24 = FromValueOpt::from_value(v), + "parent" => b.parent = FromValueOpt::from_value(v), + "paynow" => b.paynow = FromValueOpt::from_value(v), + "paypal" => b.paypal = FromValueOpt::from_value(v), + "promptpay" => b.promptpay = FromValueOpt::from_value(v), + "revolut_pay" => b.revolut_pay = FromValueOpt::from_value(v), + "sepa_debit" => b.sepa_debit = FromValueOpt::from_value(v), + "sofort" => b.sofort = FromValueOpt::from_value(v), + "swish" => b.swish = FromValueOpt::from_value(v), + "us_bank_account" => b.us_bank_account = FromValueOpt::from_value(v), + "wechat_pay" => b.wechat_pay = FromValueOpt::from_value(v), + "zip" => b.zip = FromValueOpt::from_value(v), _ => {} } 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..f031280f6 100644 --- a/generated/async-stripe-payment/src/payment_method_domain/types.rs +++ b/generated/async-stripe-payment/src/payment_method_domain/types.rs @@ -36,7 +36,12 @@ pub struct PaymentMethodDomainBuilder { paypal: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -99,16 +104,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(apple_pay), + Some(created), + Some(domain_name), + Some(enabled), + Some(google_pay), + Some(id), + Some(link), + Some(livemode), + Some(paypal), + ) = ( + self.apple_pay.take(), + self.created, + self.domain_name.take(), + self.enabled, + self.google_pay.take(), + self.id.take(), + self.link.take(), + self.livemode, + self.paypal.take(), + ) + else { + return None; + }; Some(Self::Out { - apple_pay: self.apple_pay.take()?, - created: self.created?, - domain_name: self.domain_name.take()?, - enabled: self.enabled?, - google_pay: self.google_pay.take()?, - id: self.id.take()?, - link: self.link.take()?, - livemode: self.livemode?, - paypal: self.paypal.take()?, + apple_pay, + created, + domain_name, + enabled, + google_pay, + id, + link, + livemode, + paypal, }) } } @@ -136,15 +165,15 @@ const _: () = { let mut b = PaymentMethodDomainBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "apple_pay" => b.apple_pay = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "domain_name" => b.domain_name = Some(FromValueOpt::from_value(v)?), - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "google_pay" => b.google_pay = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "link" => b.link = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "paypal" => b.paypal = Some(FromValueOpt::from_value(v)?), + "apple_pay" => b.apple_pay = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "domain_name" => b.domain_name = FromValueOpt::from_value(v), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "google_pay" => b.google_pay = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "link" => b.link = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "paypal" => b.paypal = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status.rs b/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status.rs index ee2bfa81c..44277e585 100644 --- a/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status.rs +++ b/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status.rs @@ -15,7 +15,12 @@ pub struct PaymentMethodDomainResourcePaymentMethodStatusBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -61,7 +66,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { status: self.status?, status_details: self.status_details.take()? }) + let (Some(status), Some(status_details)) = (self.status, self.status_details.take()) + else { + return None; + }; + Some(Self::Out { status, status_details }) } } @@ -88,8 +97,8 @@ const _: () = { let mut b = PaymentMethodDomainResourcePaymentMethodStatusBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_details" => b.status_details = Some(FromValueOpt::from_value(v)?), + "status" => b.status = FromValueOpt::from_value(v), + "status_details" => b.status_details = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status_details.rs b/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status_details.rs index 3eb84b502..593ed3163 100644 --- a/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status_details.rs +++ b/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status_details.rs @@ -11,7 +11,12 @@ pub struct PaymentMethodDomainResourcePaymentMethodStatusDetailsBuilder { error_message: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -57,7 +62,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { error_message: self.error_message.take()? }) + let (Some(error_message),) = (self.error_message.take(),) else { + return None; + }; + Some(Self::Out { error_message }) } } @@ -85,7 +93,7 @@ const _: () = { PaymentMethodDomainResourcePaymentMethodStatusDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "error_message" => b.error_message = Some(FromValueOpt::from_value(v)?), + "error_message" => b.error_message = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-payment/src/source_mandate_notification.rs b/generated/async-stripe-payment/src/source_mandate_notification.rs index 5d1f5c4a6..c7c9f7d0e 100644 --- a/generated/async-stripe-payment/src/source_mandate_notification.rs +++ b/generated/async-stripe-payment/src/source_mandate_notification.rs @@ -42,7 +42,12 @@ pub struct SourceMandateNotificationBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -109,18 +114,46 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(acss_debit), + Some(amount), + Some(bacs_debit), + Some(created), + Some(id), + Some(livemode), + Some(reason), + Some(sepa_debit), + Some(source), + Some(status), + Some(type_), + ) = ( + self.acss_debit.take(), + self.amount, + self.bacs_debit.take(), + self.created, + self.id.take(), + self.livemode, + self.reason.take(), + self.sepa_debit.take(), + self.source.take(), + self.status.take(), + self.type_.take(), + ) + else { + return None; + }; Some(Self::Out { - acss_debit: self.acss_debit.take()?, - amount: self.amount?, - bacs_debit: self.bacs_debit.take()?, - created: self.created?, - id: self.id.take()?, - livemode: self.livemode?, - reason: self.reason.take()?, - sepa_debit: self.sepa_debit.take()?, - source: self.source.take()?, - status: self.status.take()?, - type_: self.type_.take()?, + acss_debit, + amount, + bacs_debit, + created, + id, + livemode, + reason, + sepa_debit, + source, + status, + type_, }) } } @@ -148,17 +181,17 @@ const _: () = { let mut b = SourceMandateNotificationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "acss_debit" => b.acss_debit = Some(FromValueOpt::from_value(v)?), - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "bacs_debit" => b.bacs_debit = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), - "sepa_debit" => b.sepa_debit = Some(FromValueOpt::from_value(v)?), - "source" => b.source = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "acss_debit" => b.acss_debit = FromValueOpt::from_value(v), + "amount" => b.amount = FromValueOpt::from_value(v), + "bacs_debit" => b.bacs_debit = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), + "sepa_debit" => b.sepa_debit = FromValueOpt::from_value(v), + "source" => b.source = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-payment/src/source_mandate_notification_acss_debit_data.rs b/generated/async-stripe-payment/src/source_mandate_notification_acss_debit_data.rs index 1fd2452fe..eb21fb24c 100644 --- a/generated/async-stripe-payment/src/source_mandate_notification_acss_debit_data.rs +++ b/generated/async-stripe-payment/src/source_mandate_notification_acss_debit_data.rs @@ -10,7 +10,12 @@ pub struct SourceMandateNotificationAcssDebitDataBuilder { statement_descriptor: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { statement_descriptor: self.statement_descriptor.take()? }) + let (Some(statement_descriptor),) = (self.statement_descriptor.take(),) else { + return None; + }; + Some(Self::Out { statement_descriptor }) } } @@ -82,9 +90,7 @@ const _: () = { let mut b = SourceMandateNotificationAcssDebitDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-payment/src/source_mandate_notification_bacs_debit_data.rs b/generated/async-stripe-payment/src/source_mandate_notification_bacs_debit_data.rs index 9cd4c2fcf..bf46ec2e4 100644 --- a/generated/async-stripe-payment/src/source_mandate_notification_bacs_debit_data.rs +++ b/generated/async-stripe-payment/src/source_mandate_notification_bacs_debit_data.rs @@ -10,7 +10,12 @@ pub struct SourceMandateNotificationBacsDebitDataBuilder { last4: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { last4: self.last4.take()? }) + let (Some(last4),) = (self.last4.take(),) else { + return None; + }; + Some(Self::Out { last4 }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = SourceMandateNotificationBacsDebitDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), + "last4" => b.last4 = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-payment/src/source_mandate_notification_sepa_debit_data.rs b/generated/async-stripe-payment/src/source_mandate_notification_sepa_debit_data.rs index 8a340de42..0a0052df7 100644 --- a/generated/async-stripe-payment/src/source_mandate_notification_sepa_debit_data.rs +++ b/generated/async-stripe-payment/src/source_mandate_notification_sepa_debit_data.rs @@ -16,7 +16,12 @@ pub struct SourceMandateNotificationSepaDebitDataBuilder { mandate_reference: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - creditor_identifier: self.creditor_identifier.take()?, - last4: self.last4.take()?, - mandate_reference: self.mandate_reference.take()?, - }) + let (Some(creditor_identifier), Some(last4), Some(mandate_reference)) = + (self.creditor_identifier.take(), self.last4.take(), self.mandate_reference.take()) + else { + return None; + }; + Some(Self::Out { creditor_identifier, last4, mandate_reference }) } } @@ -98,11 +104,9 @@ const _: () = { let mut b = SourceMandateNotificationSepaDebitDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "creditor_identifier" => { - b.creditor_identifier = Some(FromValueOpt::from_value(v)?) - } - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "mandate_reference" => b.mandate_reference = Some(FromValueOpt::from_value(v)?), + "creditor_identifier" => b.creditor_identifier = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "mandate_reference" => b.mandate_reference = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-product/src/deleted_product_feature.rs b/generated/async-stripe-product/src/deleted_product_feature.rs index 43b93757a..3c6834f93 100644 --- a/generated/async-stripe-product/src/deleted_product_feature.rs +++ b/generated/async-stripe-product/src/deleted_product_feature.rs @@ -12,7 +12,12 @@ pub struct DeletedProductFeatureBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedProductFeatureBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-product/src/product_feature/types.rs b/generated/async-stripe-product/src/product_feature/types.rs index 213ce8592..dd7128d57 100644 --- a/generated/async-stripe-product/src/product_feature/types.rs +++ b/generated/async-stripe-product/src/product_feature/types.rs @@ -16,7 +16,12 @@ pub struct ProductFeatureBuilder { livemode: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - entitlement_feature: self.entitlement_feature.take()?, - id: self.id.take()?, - livemode: self.livemode?, - }) + let (Some(entitlement_feature), Some(id), Some(livemode)) = + (self.entitlement_feature.take(), self.id.take(), self.livemode) + else { + return None; + }; + Some(Self::Out { entitlement_feature, id, livemode }) } } @@ -98,11 +104,9 @@ const _: () = { let mut b = ProductFeatureBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "entitlement_feature" => { - b.entitlement_feature = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), + "entitlement_feature" => b.entitlement_feature = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account.rs b/generated/async-stripe-shared/src/account.rs index 6e6ba3876..248a4d7b3 100644 --- a/generated/async-stripe-shared/src/account.rs +++ b/generated/async-stripe-shared/src/account.rs @@ -83,7 +83,12 @@ pub struct AccountBuilder { type_: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -167,28 +172,76 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(business_profile), + Some(business_type), + Some(capabilities), + Some(charges_enabled), + Some(company), + Some(controller), + Some(country), + Some(created), + Some(default_currency), + Some(details_submitted), + Some(email), + Some(external_accounts), + Some(future_requirements), + Some(id), + Some(individual), + Some(metadata), + Some(payouts_enabled), + Some(requirements), + Some(settings), + Some(tos_acceptance), + Some(type_), + ) = ( + self.business_profile.take(), + self.business_type, + self.capabilities, + self.charges_enabled, + self.company.take(), + self.controller, + self.country.take(), + self.created, + self.default_currency, + self.details_submitted, + self.email.take(), + self.external_accounts.take(), + self.future_requirements.take(), + self.id.take(), + self.individual.take(), + self.metadata.take(), + self.payouts_enabled, + self.requirements.take(), + self.settings.take(), + self.tos_acceptance.take(), + self.type_, + ) + else { + return None; + }; Some(Self::Out { - business_profile: self.business_profile.take()?, - business_type: self.business_type?, - capabilities: self.capabilities?, - charges_enabled: self.charges_enabled?, - company: self.company.take()?, - controller: self.controller?, - country: self.country.take()?, - created: self.created?, - default_currency: self.default_currency?, - details_submitted: self.details_submitted?, - email: self.email.take()?, - external_accounts: self.external_accounts.take()?, - future_requirements: self.future_requirements.take()?, - id: self.id.take()?, - individual: self.individual.take()?, - metadata: self.metadata.take()?, - payouts_enabled: self.payouts_enabled?, - requirements: self.requirements.take()?, - settings: self.settings.take()?, - tos_acceptance: self.tos_acceptance.take()?, - type_: self.type_?, + business_profile, + business_type, + capabilities, + charges_enabled, + company, + controller, + country, + created, + default_currency, + details_submitted, + email, + external_accounts, + future_requirements, + id, + individual, + metadata, + payouts_enabled, + requirements, + settings, + tos_acceptance, + type_, }) } } @@ -216,29 +269,27 @@ const _: () = { let mut b = AccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "business_profile" => b.business_profile = Some(FromValueOpt::from_value(v)?), - "business_type" => b.business_type = Some(FromValueOpt::from_value(v)?), - "capabilities" => b.capabilities = Some(FromValueOpt::from_value(v)?), - "charges_enabled" => b.charges_enabled = Some(FromValueOpt::from_value(v)?), - "company" => b.company = Some(FromValueOpt::from_value(v)?), - "controller" => b.controller = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "default_currency" => b.default_currency = Some(FromValueOpt::from_value(v)?), - "details_submitted" => b.details_submitted = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "external_accounts" => b.external_accounts = Some(FromValueOpt::from_value(v)?), - "future_requirements" => { - b.future_requirements = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "individual" => b.individual = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "payouts_enabled" => b.payouts_enabled = Some(FromValueOpt::from_value(v)?), - "requirements" => b.requirements = Some(FromValueOpt::from_value(v)?), - "settings" => b.settings = Some(FromValueOpt::from_value(v)?), - "tos_acceptance" => b.tos_acceptance = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "business_profile" => b.business_profile = FromValueOpt::from_value(v), + "business_type" => b.business_type = FromValueOpt::from_value(v), + "capabilities" => b.capabilities = FromValueOpt::from_value(v), + "charges_enabled" => b.charges_enabled = FromValueOpt::from_value(v), + "company" => b.company = FromValueOpt::from_value(v), + "controller" => b.controller = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "default_currency" => b.default_currency = FromValueOpt::from_value(v), + "details_submitted" => b.details_submitted = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "external_accounts" => b.external_accounts = FromValueOpt::from_value(v), + "future_requirements" => b.future_requirements = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "individual" => b.individual = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "payouts_enabled" => b.payouts_enabled = FromValueOpt::from_value(v), + "requirements" => b.requirements = FromValueOpt::from_value(v), + "settings" => b.settings = FromValueOpt::from_value(v), + "tos_acceptance" => b.tos_acceptance = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_annual_revenue.rs b/generated/async-stripe-shared/src/account_annual_revenue.rs index 9846301f9..e0741307f 100644 --- a/generated/async-stripe-shared/src/account_annual_revenue.rs +++ b/generated/async-stripe-shared/src/account_annual_revenue.rs @@ -19,7 +19,12 @@ pub struct AccountAnnualRevenueBuilder { fiscal_year_end: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,11 +75,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - currency: self.currency?, - fiscal_year_end: self.fiscal_year_end.take()?, - }) + let (Some(amount), Some(currency), Some(fiscal_year_end)) = + (self.amount, self.currency, self.fiscal_year_end.take()) + else { + return None; + }; + Some(Self::Out { amount, currency, fiscal_year_end }) } } @@ -101,9 +107,9 @@ const _: () = { let mut b = AccountAnnualRevenueBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "fiscal_year_end" => b.fiscal_year_end = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "fiscal_year_end" => b.fiscal_year_end = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_bacs_debit_payments_settings.rs b/generated/async-stripe-shared/src/account_bacs_debit_payments_settings.rs index a19a0d076..4be4dbce0 100644 --- a/generated/async-stripe-shared/src/account_bacs_debit_payments_settings.rs +++ b/generated/async-stripe-shared/src/account_bacs_debit_payments_settings.rs @@ -20,7 +20,12 @@ pub struct AccountBacsDebitPaymentsSettingsBuilder { service_user_number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,10 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - display_name: self.display_name.take()?, - service_user_number: self.service_user_number.take()?, - }) + let (Some(display_name), Some(service_user_number)) = + (self.display_name.take(), self.service_user_number.take()) + else { + return None; + }; + Some(Self::Out { display_name, service_user_number }) } } @@ -99,10 +106,8 @@ const _: () = { let mut b = AccountBacsDebitPaymentsSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "display_name" => b.display_name = Some(FromValueOpt::from_value(v)?), - "service_user_number" => { - b.service_user_number = Some(FromValueOpt::from_value(v)?) - } + "display_name" => b.display_name = FromValueOpt::from_value(v), + "service_user_number" => b.service_user_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_branding_settings.rs b/generated/async-stripe-shared/src/account_branding_settings.rs index 322ee84c8..1ef0299d8 100644 --- a/generated/async-stripe-shared/src/account_branding_settings.rs +++ b/generated/async-stripe-shared/src/account_branding_settings.rs @@ -21,7 +21,12 @@ pub struct AccountBrandingSettingsBuilder { secondary_color: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -74,12 +79,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - icon: self.icon.take()?, - logo: self.logo.take()?, - primary_color: self.primary_color.take()?, - secondary_color: self.secondary_color.take()?, - }) + let (Some(icon), Some(logo), Some(primary_color), Some(secondary_color)) = ( + self.icon.take(), + self.logo.take(), + self.primary_color.take(), + self.secondary_color.take(), + ) else { + return None; + }; + Some(Self::Out { icon, logo, primary_color, secondary_color }) } } @@ -106,10 +114,10 @@ const _: () = { let mut b = AccountBrandingSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "icon" => b.icon = Some(FromValueOpt::from_value(v)?), - "logo" => b.logo = Some(FromValueOpt::from_value(v)?), - "primary_color" => b.primary_color = Some(FromValueOpt::from_value(v)?), - "secondary_color" => b.secondary_color = Some(FromValueOpt::from_value(v)?), + "icon" => b.icon = FromValueOpt::from_value(v), + "logo" => b.logo = FromValueOpt::from_value(v), + "primary_color" => b.primary_color = FromValueOpt::from_value(v), + "secondary_color" => b.secondary_color = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_business_profile.rs b/generated/async-stripe-shared/src/account_business_profile.rs index 7dd1108b9..b7e6705e6 100644 --- a/generated/async-stripe-shared/src/account_business_profile.rs +++ b/generated/async-stripe-shared/src/account_business_profile.rs @@ -42,7 +42,12 @@ pub struct AccountBusinessProfileBuilder { url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -111,18 +116,46 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(annual_revenue), + Some(estimated_worker_count), + Some(mcc), + Some(monthly_estimated_revenue), + Some(name), + Some(product_description), + Some(support_address), + Some(support_email), + Some(support_phone), + Some(support_url), + Some(url), + ) = ( + self.annual_revenue.take(), + self.estimated_worker_count, + self.mcc.take(), + self.monthly_estimated_revenue, + self.name.take(), + self.product_description.take(), + self.support_address.take(), + self.support_email.take(), + self.support_phone.take(), + self.support_url.take(), + self.url.take(), + ) + else { + return None; + }; Some(Self::Out { - annual_revenue: self.annual_revenue.take()?, - estimated_worker_count: self.estimated_worker_count?, - mcc: self.mcc.take()?, - monthly_estimated_revenue: self.monthly_estimated_revenue?, - name: self.name.take()?, - product_description: self.product_description.take()?, - support_address: self.support_address.take()?, - support_email: self.support_email.take()?, - support_phone: self.support_phone.take()?, - support_url: self.support_url.take()?, - url: self.url.take()?, + annual_revenue, + estimated_worker_count, + mcc, + monthly_estimated_revenue, + name, + product_description, + support_address, + support_email, + support_phone, + support_url, + url, }) } } @@ -150,23 +183,21 @@ const _: () = { let mut b = AccountBusinessProfileBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "annual_revenue" => b.annual_revenue = Some(FromValueOpt::from_value(v)?), + "annual_revenue" => b.annual_revenue = FromValueOpt::from_value(v), "estimated_worker_count" => { - b.estimated_worker_count = Some(FromValueOpt::from_value(v)?) + b.estimated_worker_count = FromValueOpt::from_value(v) } - "mcc" => b.mcc = Some(FromValueOpt::from_value(v)?), + "mcc" => b.mcc = FromValueOpt::from_value(v), "monthly_estimated_revenue" => { - b.monthly_estimated_revenue = Some(FromValueOpt::from_value(v)?) - } - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "product_description" => { - b.product_description = Some(FromValueOpt::from_value(v)?) + b.monthly_estimated_revenue = FromValueOpt::from_value(v) } - "support_address" => b.support_address = Some(FromValueOpt::from_value(v)?), - "support_email" => b.support_email = Some(FromValueOpt::from_value(v)?), - "support_phone" => b.support_phone = Some(FromValueOpt::from_value(v)?), - "support_url" => b.support_url = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "name" => b.name = FromValueOpt::from_value(v), + "product_description" => b.product_description = FromValueOpt::from_value(v), + "support_address" => b.support_address = FromValueOpt::from_value(v), + "support_email" => b.support_email = FromValueOpt::from_value(v), + "support_phone" => b.support_phone = FromValueOpt::from_value(v), + "support_url" => b.support_url = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_capabilities.rs b/generated/async-stripe-shared/src/account_capabilities.rs index be5de388e..2619c372b 100644 --- a/generated/async-stripe-shared/src/account_capabilities.rs +++ b/generated/async-stripe-shared/src/account_capabilities.rs @@ -127,7 +127,12 @@ pub struct AccountCapabilitiesBuilder { zip_payments: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -262,47 +267,133 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(acss_debit_payments), + Some(affirm_payments), + Some(afterpay_clearpay_payments), + Some(amazon_pay_payments), + Some(au_becs_debit_payments), + Some(bacs_debit_payments), + Some(bancontact_payments), + Some(bank_transfer_payments), + Some(blik_payments), + Some(boleto_payments), + Some(card_issuing), + Some(card_payments), + Some(cartes_bancaires_payments), + Some(cashapp_payments), + Some(eps_payments), + Some(fpx_payments), + Some(giropay_payments), + Some(grabpay_payments), + Some(ideal_payments), + Some(india_international_payments), + Some(jcb_payments), + Some(klarna_payments), + Some(konbini_payments), + Some(legacy_payments), + Some(link_payments), + Some(mobilepay_payments), + Some(oxxo_payments), + Some(p24_payments), + Some(paynow_payments), + Some(promptpay_payments), + Some(revolut_pay_payments), + Some(sepa_debit_payments), + Some(sofort_payments), + Some(swish_payments), + Some(tax_reporting_us_1099_k), + Some(tax_reporting_us_1099_misc), + Some(transfers), + Some(treasury), + Some(us_bank_account_ach_payments), + Some(zip_payments), + ) = ( + self.acss_debit_payments, + self.affirm_payments, + self.afterpay_clearpay_payments, + self.amazon_pay_payments, + self.au_becs_debit_payments, + self.bacs_debit_payments, + self.bancontact_payments, + self.bank_transfer_payments, + self.blik_payments, + self.boleto_payments, + self.card_issuing, + self.card_payments, + self.cartes_bancaires_payments, + self.cashapp_payments, + self.eps_payments, + self.fpx_payments, + self.giropay_payments, + self.grabpay_payments, + self.ideal_payments, + self.india_international_payments, + self.jcb_payments, + self.klarna_payments, + self.konbini_payments, + self.legacy_payments, + self.link_payments, + self.mobilepay_payments, + self.oxxo_payments, + self.p24_payments, + self.paynow_payments, + self.promptpay_payments, + self.revolut_pay_payments, + self.sepa_debit_payments, + self.sofort_payments, + self.swish_payments, + self.tax_reporting_us_1099_k, + self.tax_reporting_us_1099_misc, + self.transfers, + self.treasury, + self.us_bank_account_ach_payments, + self.zip_payments, + ) + else { + return None; + }; Some(Self::Out { - acss_debit_payments: self.acss_debit_payments?, - affirm_payments: self.affirm_payments?, - afterpay_clearpay_payments: self.afterpay_clearpay_payments?, - amazon_pay_payments: self.amazon_pay_payments?, - au_becs_debit_payments: self.au_becs_debit_payments?, - bacs_debit_payments: self.bacs_debit_payments?, - bancontact_payments: self.bancontact_payments?, - bank_transfer_payments: self.bank_transfer_payments?, - blik_payments: self.blik_payments?, - boleto_payments: self.boleto_payments?, - card_issuing: self.card_issuing?, - card_payments: self.card_payments?, - cartes_bancaires_payments: self.cartes_bancaires_payments?, - cashapp_payments: self.cashapp_payments?, - eps_payments: self.eps_payments?, - fpx_payments: self.fpx_payments?, - giropay_payments: self.giropay_payments?, - grabpay_payments: self.grabpay_payments?, - ideal_payments: self.ideal_payments?, - india_international_payments: self.india_international_payments?, - jcb_payments: self.jcb_payments?, - klarna_payments: self.klarna_payments?, - konbini_payments: self.konbini_payments?, - legacy_payments: self.legacy_payments?, - link_payments: self.link_payments?, - mobilepay_payments: self.mobilepay_payments?, - oxxo_payments: self.oxxo_payments?, - p24_payments: self.p24_payments?, - paynow_payments: self.paynow_payments?, - promptpay_payments: self.promptpay_payments?, - revolut_pay_payments: self.revolut_pay_payments?, - sepa_debit_payments: self.sepa_debit_payments?, - sofort_payments: self.sofort_payments?, - swish_payments: self.swish_payments?, - tax_reporting_us_1099_k: self.tax_reporting_us_1099_k?, - tax_reporting_us_1099_misc: self.tax_reporting_us_1099_misc?, - transfers: self.transfers?, - treasury: self.treasury?, - us_bank_account_ach_payments: self.us_bank_account_ach_payments?, - zip_payments: self.zip_payments?, + acss_debit_payments, + affirm_payments, + afterpay_clearpay_payments, + amazon_pay_payments, + au_becs_debit_payments, + bacs_debit_payments, + bancontact_payments, + bank_transfer_payments, + blik_payments, + boleto_payments, + card_issuing, + card_payments, + cartes_bancaires_payments, + cashapp_payments, + eps_payments, + fpx_payments, + giropay_payments, + grabpay_payments, + ideal_payments, + india_international_payments, + jcb_payments, + klarna_payments, + konbini_payments, + legacy_payments, + link_payments, + mobilepay_payments, + oxxo_payments, + p24_payments, + paynow_payments, + promptpay_payments, + revolut_pay_payments, + sepa_debit_payments, + sofort_payments, + swish_payments, + tax_reporting_us_1099_k, + tax_reporting_us_1099_misc, + transfers, + treasury, + us_bank_account_ach_payments, + zip_payments, }) } } @@ -330,78 +421,62 @@ const _: () = { let mut b = AccountCapabilitiesBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "acss_debit_payments" => { - b.acss_debit_payments = Some(FromValueOpt::from_value(v)?) - } - "affirm_payments" => b.affirm_payments = Some(FromValueOpt::from_value(v)?), + "acss_debit_payments" => b.acss_debit_payments = FromValueOpt::from_value(v), + "affirm_payments" => b.affirm_payments = FromValueOpt::from_value(v), "afterpay_clearpay_payments" => { - b.afterpay_clearpay_payments = Some(FromValueOpt::from_value(v)?) - } - "amazon_pay_payments" => { - b.amazon_pay_payments = Some(FromValueOpt::from_value(v)?) + b.afterpay_clearpay_payments = FromValueOpt::from_value(v) } + "amazon_pay_payments" => b.amazon_pay_payments = FromValueOpt::from_value(v), "au_becs_debit_payments" => { - b.au_becs_debit_payments = Some(FromValueOpt::from_value(v)?) - } - "bacs_debit_payments" => { - b.bacs_debit_payments = Some(FromValueOpt::from_value(v)?) - } - "bancontact_payments" => { - b.bancontact_payments = Some(FromValueOpt::from_value(v)?) + b.au_becs_debit_payments = FromValueOpt::from_value(v) } + "bacs_debit_payments" => b.bacs_debit_payments = FromValueOpt::from_value(v), + "bancontact_payments" => b.bancontact_payments = FromValueOpt::from_value(v), "bank_transfer_payments" => { - b.bank_transfer_payments = Some(FromValueOpt::from_value(v)?) + b.bank_transfer_payments = FromValueOpt::from_value(v) } - "blik_payments" => b.blik_payments = Some(FromValueOpt::from_value(v)?), - "boleto_payments" => b.boleto_payments = Some(FromValueOpt::from_value(v)?), - "card_issuing" => b.card_issuing = Some(FromValueOpt::from_value(v)?), - "card_payments" => b.card_payments = Some(FromValueOpt::from_value(v)?), + "blik_payments" => b.blik_payments = FromValueOpt::from_value(v), + "boleto_payments" => b.boleto_payments = FromValueOpt::from_value(v), + "card_issuing" => b.card_issuing = FromValueOpt::from_value(v), + "card_payments" => b.card_payments = FromValueOpt::from_value(v), "cartes_bancaires_payments" => { - b.cartes_bancaires_payments = Some(FromValueOpt::from_value(v)?) + b.cartes_bancaires_payments = FromValueOpt::from_value(v) } - "cashapp_payments" => b.cashapp_payments = Some(FromValueOpt::from_value(v)?), - "eps_payments" => b.eps_payments = Some(FromValueOpt::from_value(v)?), - "fpx_payments" => b.fpx_payments = Some(FromValueOpt::from_value(v)?), - "giropay_payments" => b.giropay_payments = Some(FromValueOpt::from_value(v)?), - "grabpay_payments" => b.grabpay_payments = Some(FromValueOpt::from_value(v)?), - "ideal_payments" => b.ideal_payments = Some(FromValueOpt::from_value(v)?), + "cashapp_payments" => b.cashapp_payments = FromValueOpt::from_value(v), + "eps_payments" => b.eps_payments = FromValueOpt::from_value(v), + "fpx_payments" => b.fpx_payments = FromValueOpt::from_value(v), + "giropay_payments" => b.giropay_payments = FromValueOpt::from_value(v), + "grabpay_payments" => b.grabpay_payments = FromValueOpt::from_value(v), + "ideal_payments" => b.ideal_payments = FromValueOpt::from_value(v), "india_international_payments" => { - b.india_international_payments = Some(FromValueOpt::from_value(v)?) - } - "jcb_payments" => b.jcb_payments = Some(FromValueOpt::from_value(v)?), - "klarna_payments" => b.klarna_payments = Some(FromValueOpt::from_value(v)?), - "konbini_payments" => b.konbini_payments = Some(FromValueOpt::from_value(v)?), - "legacy_payments" => b.legacy_payments = Some(FromValueOpt::from_value(v)?), - "link_payments" => b.link_payments = Some(FromValueOpt::from_value(v)?), - "mobilepay_payments" => { - b.mobilepay_payments = Some(FromValueOpt::from_value(v)?) - } - "oxxo_payments" => b.oxxo_payments = Some(FromValueOpt::from_value(v)?), - "p24_payments" => b.p24_payments = Some(FromValueOpt::from_value(v)?), - "paynow_payments" => b.paynow_payments = Some(FromValueOpt::from_value(v)?), - "promptpay_payments" => { - b.promptpay_payments = Some(FromValueOpt::from_value(v)?) - } - "revolut_pay_payments" => { - b.revolut_pay_payments = Some(FromValueOpt::from_value(v)?) - } - "sepa_debit_payments" => { - b.sepa_debit_payments = Some(FromValueOpt::from_value(v)?) + b.india_international_payments = FromValueOpt::from_value(v) } - "sofort_payments" => b.sofort_payments = Some(FromValueOpt::from_value(v)?), - "swish_payments" => b.swish_payments = Some(FromValueOpt::from_value(v)?), + "jcb_payments" => b.jcb_payments = FromValueOpt::from_value(v), + "klarna_payments" => b.klarna_payments = FromValueOpt::from_value(v), + "konbini_payments" => b.konbini_payments = FromValueOpt::from_value(v), + "legacy_payments" => b.legacy_payments = FromValueOpt::from_value(v), + "link_payments" => b.link_payments = FromValueOpt::from_value(v), + "mobilepay_payments" => b.mobilepay_payments = FromValueOpt::from_value(v), + "oxxo_payments" => b.oxxo_payments = FromValueOpt::from_value(v), + "p24_payments" => b.p24_payments = FromValueOpt::from_value(v), + "paynow_payments" => b.paynow_payments = FromValueOpt::from_value(v), + "promptpay_payments" => b.promptpay_payments = FromValueOpt::from_value(v), + "revolut_pay_payments" => b.revolut_pay_payments = FromValueOpt::from_value(v), + "sepa_debit_payments" => b.sepa_debit_payments = FromValueOpt::from_value(v), + "sofort_payments" => b.sofort_payments = FromValueOpt::from_value(v), + "swish_payments" => b.swish_payments = FromValueOpt::from_value(v), "tax_reporting_us_1099_k" => { - b.tax_reporting_us_1099_k = Some(FromValueOpt::from_value(v)?) + b.tax_reporting_us_1099_k = FromValueOpt::from_value(v) } "tax_reporting_us_1099_misc" => { - b.tax_reporting_us_1099_misc = Some(FromValueOpt::from_value(v)?) + b.tax_reporting_us_1099_misc = FromValueOpt::from_value(v) } - "transfers" => b.transfers = Some(FromValueOpt::from_value(v)?), - "treasury" => b.treasury = Some(FromValueOpt::from_value(v)?), + "transfers" => b.transfers = FromValueOpt::from_value(v), + "treasury" => b.treasury = FromValueOpt::from_value(v), "us_bank_account_ach_payments" => { - b.us_bank_account_ach_payments = Some(FromValueOpt::from_value(v)?) + b.us_bank_account_ach_payments = FromValueOpt::from_value(v) } - "zip_payments" => b.zip_payments = Some(FromValueOpt::from_value(v)?), + "zip_payments" => b.zip_payments = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_capability_future_requirements.rs b/generated/async-stripe-shared/src/account_capability_future_requirements.rs index 0e06cb578..0daebf7f7 100644 --- a/generated/async-stripe-shared/src/account_capability_future_requirements.rs +++ b/generated/async-stripe-shared/src/account_capability_future_requirements.rs @@ -39,7 +39,12 @@ pub struct AccountCapabilityFutureRequirementsBuilder { pending_verification: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -100,15 +105,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(alternatives), + Some(current_deadline), + Some(currently_due), + Some(disabled_reason), + Some(errors), + Some(eventually_due), + Some(past_due), + Some(pending_verification), + ) = ( + self.alternatives.take(), + self.current_deadline, + self.currently_due.take(), + self.disabled_reason.take(), + self.errors.take(), + self.eventually_due.take(), + self.past_due.take(), + self.pending_verification.take(), + ) + else { + return None; + }; Some(Self::Out { - alternatives: self.alternatives.take()?, - current_deadline: self.current_deadline?, - currently_due: self.currently_due.take()?, - disabled_reason: self.disabled_reason.take()?, - errors: self.errors.take()?, - eventually_due: self.eventually_due.take()?, - past_due: self.past_due.take()?, - pending_verification: self.pending_verification.take()?, + alternatives, + current_deadline, + currently_due, + disabled_reason, + errors, + eventually_due, + past_due, + pending_verification, }) } } @@ -136,16 +163,14 @@ const _: () = { let mut b = AccountCapabilityFutureRequirementsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "alternatives" => b.alternatives = Some(FromValueOpt::from_value(v)?), - "current_deadline" => b.current_deadline = Some(FromValueOpt::from_value(v)?), - "currently_due" => b.currently_due = Some(FromValueOpt::from_value(v)?), - "disabled_reason" => b.disabled_reason = Some(FromValueOpt::from_value(v)?), - "errors" => b.errors = Some(FromValueOpt::from_value(v)?), - "eventually_due" => b.eventually_due = Some(FromValueOpt::from_value(v)?), - "past_due" => b.past_due = Some(FromValueOpt::from_value(v)?), - "pending_verification" => { - b.pending_verification = Some(FromValueOpt::from_value(v)?) - } + "alternatives" => b.alternatives = FromValueOpt::from_value(v), + "current_deadline" => b.current_deadline = FromValueOpt::from_value(v), + "currently_due" => b.currently_due = FromValueOpt::from_value(v), + "disabled_reason" => b.disabled_reason = FromValueOpt::from_value(v), + "errors" => b.errors = FromValueOpt::from_value(v), + "eventually_due" => b.eventually_due = FromValueOpt::from_value(v), + "past_due" => b.past_due = FromValueOpt::from_value(v), + "pending_verification" => b.pending_verification = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_capability_requirements.rs b/generated/async-stripe-shared/src/account_capability_requirements.rs index 64b313d40..87132779f 100644 --- a/generated/async-stripe-shared/src/account_capability_requirements.rs +++ b/generated/async-stripe-shared/src/account_capability_requirements.rs @@ -48,7 +48,12 @@ pub struct AccountCapabilityRequirementsBuilder { pending_verification: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -109,15 +114,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(alternatives), + Some(current_deadline), + Some(currently_due), + Some(disabled_reason), + Some(errors), + Some(eventually_due), + Some(past_due), + Some(pending_verification), + ) = ( + self.alternatives.take(), + self.current_deadline, + self.currently_due.take(), + self.disabled_reason.take(), + self.errors.take(), + self.eventually_due.take(), + self.past_due.take(), + self.pending_verification.take(), + ) + else { + return None; + }; Some(Self::Out { - alternatives: self.alternatives.take()?, - current_deadline: self.current_deadline?, - currently_due: self.currently_due.take()?, - disabled_reason: self.disabled_reason.take()?, - errors: self.errors.take()?, - eventually_due: self.eventually_due.take()?, - past_due: self.past_due.take()?, - pending_verification: self.pending_verification.take()?, + alternatives, + current_deadline, + currently_due, + disabled_reason, + errors, + eventually_due, + past_due, + pending_verification, }) } } @@ -145,16 +172,14 @@ const _: () = { let mut b = AccountCapabilityRequirementsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "alternatives" => b.alternatives = Some(FromValueOpt::from_value(v)?), - "current_deadline" => b.current_deadline = Some(FromValueOpt::from_value(v)?), - "currently_due" => b.currently_due = Some(FromValueOpt::from_value(v)?), - "disabled_reason" => b.disabled_reason = Some(FromValueOpt::from_value(v)?), - "errors" => b.errors = Some(FromValueOpt::from_value(v)?), - "eventually_due" => b.eventually_due = Some(FromValueOpt::from_value(v)?), - "past_due" => b.past_due = Some(FromValueOpt::from_value(v)?), - "pending_verification" => { - b.pending_verification = Some(FromValueOpt::from_value(v)?) - } + "alternatives" => b.alternatives = FromValueOpt::from_value(v), + "current_deadline" => b.current_deadline = FromValueOpt::from_value(v), + "currently_due" => b.currently_due = FromValueOpt::from_value(v), + "disabled_reason" => b.disabled_reason = FromValueOpt::from_value(v), + "errors" => b.errors = FromValueOpt::from_value(v), + "eventually_due" => b.eventually_due = FromValueOpt::from_value(v), + "past_due" => b.past_due = FromValueOpt::from_value(v), + "pending_verification" => b.pending_verification = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_card_issuing_settings.rs b/generated/async-stripe-shared/src/account_card_issuing_settings.rs index 5662c049d..bdabcd63a 100644 --- a/generated/async-stripe-shared/src/account_card_issuing_settings.rs +++ b/generated/async-stripe-shared/src/account_card_issuing_settings.rs @@ -9,7 +9,12 @@ pub struct AccountCardIssuingSettingsBuilder { tos_acceptance: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -54,7 +59,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { tos_acceptance: self.tos_acceptance.take()? }) + let (Some(tos_acceptance),) = (self.tos_acceptance.take(),) else { + return None; + }; + Some(Self::Out { tos_acceptance }) } } @@ -81,7 +89,7 @@ const _: () = { let mut b = AccountCardIssuingSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "tos_acceptance" => b.tos_acceptance = Some(FromValueOpt::from_value(v)?), + "tos_acceptance" => b.tos_acceptance = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_card_payments_settings.rs b/generated/async-stripe-shared/src/account_card_payments_settings.rs index cee02bd97..2354c16fe 100644 --- a/generated/async-stripe-shared/src/account_card_payments_settings.rs +++ b/generated/async-stripe-shared/src/account_card_payments_settings.rs @@ -24,7 +24,12 @@ pub struct AccountCardPaymentsSettingsBuilder { statement_descriptor_prefix_kanji: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -83,11 +88,25 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(decline_on), + Some(statement_descriptor_prefix), + Some(statement_descriptor_prefix_kana), + Some(statement_descriptor_prefix_kanji), + ) = ( + self.decline_on, + self.statement_descriptor_prefix.take(), + self.statement_descriptor_prefix_kana.take(), + self.statement_descriptor_prefix_kanji.take(), + ) + else { + return None; + }; Some(Self::Out { - decline_on: self.decline_on?, - statement_descriptor_prefix: self.statement_descriptor_prefix.take()?, - statement_descriptor_prefix_kana: self.statement_descriptor_prefix_kana.take()?, - statement_descriptor_prefix_kanji: self.statement_descriptor_prefix_kanji.take()?, + decline_on, + statement_descriptor_prefix, + statement_descriptor_prefix_kana, + statement_descriptor_prefix_kanji, }) } } @@ -115,15 +134,15 @@ const _: () = { let mut b = AccountCardPaymentsSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "decline_on" => b.decline_on = Some(FromValueOpt::from_value(v)?), + "decline_on" => b.decline_on = FromValueOpt::from_value(v), "statement_descriptor_prefix" => { - b.statement_descriptor_prefix = Some(FromValueOpt::from_value(v)?) + b.statement_descriptor_prefix = FromValueOpt::from_value(v) } "statement_descriptor_prefix_kana" => { - b.statement_descriptor_prefix_kana = Some(FromValueOpt::from_value(v)?) + b.statement_descriptor_prefix_kana = FromValueOpt::from_value(v) } "statement_descriptor_prefix_kanji" => { - b.statement_descriptor_prefix_kanji = Some(FromValueOpt::from_value(v)?) + b.statement_descriptor_prefix_kanji = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/account_dashboard_settings.rs b/generated/async-stripe-shared/src/account_dashboard_settings.rs index ffad1128f..435bd3c62 100644 --- a/generated/async-stripe-shared/src/account_dashboard_settings.rs +++ b/generated/async-stripe-shared/src/account_dashboard_settings.rs @@ -15,7 +15,12 @@ pub struct AccountDashboardSettingsBuilder { timezone: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -61,10 +66,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - display_name: self.display_name.take()?, - timezone: self.timezone.take()?, - }) + let (Some(display_name), Some(timezone)) = + (self.display_name.take(), self.timezone.take()) + else { + return None; + }; + Some(Self::Out { display_name, timezone }) } } @@ -91,8 +98,8 @@ const _: () = { let mut b = AccountDashboardSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "display_name" => b.display_name = Some(FromValueOpt::from_value(v)?), - "timezone" => b.timezone = Some(FromValueOpt::from_value(v)?), + "display_name" => b.display_name = FromValueOpt::from_value(v), + "timezone" => b.timezone = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_decline_charge_on.rs b/generated/async-stripe-shared/src/account_decline_charge_on.rs index f6615b4ab..5278d4bf1 100644 --- a/generated/async-stripe-shared/src/account_decline_charge_on.rs +++ b/generated/async-stripe-shared/src/account_decline_charge_on.rs @@ -15,7 +15,12 @@ pub struct AccountDeclineChargeOnBuilder { cvc_failure: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -61,7 +66,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { avs_failure: self.avs_failure?, cvc_failure: self.cvc_failure? }) + let (Some(avs_failure), Some(cvc_failure)) = (self.avs_failure, self.cvc_failure) + else { + return None; + }; + Some(Self::Out { avs_failure, cvc_failure }) } } @@ -88,8 +97,8 @@ const _: () = { let mut b = AccountDeclineChargeOnBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "avs_failure" => b.avs_failure = Some(FromValueOpt::from_value(v)?), - "cvc_failure" => b.cvc_failure = Some(FromValueOpt::from_value(v)?), + "avs_failure" => b.avs_failure = FromValueOpt::from_value(v), + "cvc_failure" => b.cvc_failure = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_future_requirements.rs b/generated/async-stripe-shared/src/account_future_requirements.rs index f74455c87..68e159d47 100644 --- a/generated/async-stripe-shared/src/account_future_requirements.rs +++ b/generated/async-stripe-shared/src/account_future_requirements.rs @@ -39,7 +39,12 @@ pub struct AccountFutureRequirementsBuilder { pending_verification: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -100,15 +105,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(alternatives), + Some(current_deadline), + Some(currently_due), + Some(disabled_reason), + Some(errors), + Some(eventually_due), + Some(past_due), + Some(pending_verification), + ) = ( + self.alternatives.take(), + self.current_deadline, + self.currently_due.take(), + self.disabled_reason.take(), + self.errors.take(), + self.eventually_due.take(), + self.past_due.take(), + self.pending_verification.take(), + ) + else { + return None; + }; Some(Self::Out { - alternatives: self.alternatives.take()?, - current_deadline: self.current_deadline?, - currently_due: self.currently_due.take()?, - disabled_reason: self.disabled_reason.take()?, - errors: self.errors.take()?, - eventually_due: self.eventually_due.take()?, - past_due: self.past_due.take()?, - pending_verification: self.pending_verification.take()?, + alternatives, + current_deadline, + currently_due, + disabled_reason, + errors, + eventually_due, + past_due, + pending_verification, }) } } @@ -136,16 +163,14 @@ const _: () = { let mut b = AccountFutureRequirementsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "alternatives" => b.alternatives = Some(FromValueOpt::from_value(v)?), - "current_deadline" => b.current_deadline = Some(FromValueOpt::from_value(v)?), - "currently_due" => b.currently_due = Some(FromValueOpt::from_value(v)?), - "disabled_reason" => b.disabled_reason = Some(FromValueOpt::from_value(v)?), - "errors" => b.errors = Some(FromValueOpt::from_value(v)?), - "eventually_due" => b.eventually_due = Some(FromValueOpt::from_value(v)?), - "past_due" => b.past_due = Some(FromValueOpt::from_value(v)?), - "pending_verification" => { - b.pending_verification = Some(FromValueOpt::from_value(v)?) - } + "alternatives" => b.alternatives = FromValueOpt::from_value(v), + "current_deadline" => b.current_deadline = FromValueOpt::from_value(v), + "currently_due" => b.currently_due = FromValueOpt::from_value(v), + "disabled_reason" => b.disabled_reason = FromValueOpt::from_value(v), + "errors" => b.errors = FromValueOpt::from_value(v), + "eventually_due" => b.eventually_due = FromValueOpt::from_value(v), + "past_due" => b.past_due = FromValueOpt::from_value(v), + "pending_verification" => b.pending_verification = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_invoices_settings.rs b/generated/async-stripe-shared/src/account_invoices_settings.rs index bd789a01f..062ea66fc 100644 --- a/generated/async-stripe-shared/src/account_invoices_settings.rs +++ b/generated/async-stripe-shared/src/account_invoices_settings.rs @@ -11,7 +11,12 @@ pub struct AccountInvoicesSettingsBuilder { default_account_tax_ids: Option>>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { default_account_tax_ids: self.default_account_tax_ids.take()? }) + let (Some(default_account_tax_ids),) = (self.default_account_tax_ids.take(),) else { + return None; + }; + Some(Self::Out { default_account_tax_ids }) } } @@ -84,7 +92,7 @@ const _: () = { for (k, v) in obj { match k.as_str() { "default_account_tax_ids" => { - b.default_account_tax_ids = Some(FromValueOpt::from_value(v)?) + b.default_account_tax_ids = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/account_monthly_estimated_revenue.rs b/generated/async-stripe-shared/src/account_monthly_estimated_revenue.rs index 4735343f7..ffbfa7b16 100644 --- a/generated/async-stripe-shared/src/account_monthly_estimated_revenue.rs +++ b/generated/async-stripe-shared/src/account_monthly_estimated_revenue.rs @@ -14,7 +14,12 @@ pub struct AccountMonthlyEstimatedRevenueBuilder { currency: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { amount: self.amount?, currency: self.currency? }) + let (Some(amount), Some(currency)) = (self.amount, self.currency) else { + return None; + }; + Some(Self::Out { amount, currency }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = AccountMonthlyEstimatedRevenueBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_payments_settings.rs b/generated/async-stripe-shared/src/account_payments_settings.rs index c86f7b073..85c1c7c1d 100644 --- a/generated/async-stripe-shared/src/account_payments_settings.rs +++ b/generated/async-stripe-shared/src/account_payments_settings.rs @@ -27,7 +27,12 @@ pub struct AccountPaymentsSettingsBuilder { statement_descriptor_prefix_kanji: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -90,12 +95,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(statement_descriptor), + Some(statement_descriptor_kana), + Some(statement_descriptor_kanji), + Some(statement_descriptor_prefix_kana), + Some(statement_descriptor_prefix_kanji), + ) = ( + self.statement_descriptor.take(), + self.statement_descriptor_kana.take(), + self.statement_descriptor_kanji.take(), + self.statement_descriptor_prefix_kana.take(), + self.statement_descriptor_prefix_kanji.take(), + ) + else { + return None; + }; Some(Self::Out { - statement_descriptor: self.statement_descriptor.take()?, - statement_descriptor_kana: self.statement_descriptor_kana.take()?, - statement_descriptor_kanji: self.statement_descriptor_kanji.take()?, - statement_descriptor_prefix_kana: self.statement_descriptor_prefix_kana.take()?, - statement_descriptor_prefix_kanji: self.statement_descriptor_prefix_kanji.take()?, + statement_descriptor, + statement_descriptor_kana, + statement_descriptor_kanji, + statement_descriptor_prefix_kana, + statement_descriptor_prefix_kanji, }) } } @@ -123,20 +144,18 @@ const _: () = { let mut b = AccountPaymentsSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), "statement_descriptor_kana" => { - b.statement_descriptor_kana = Some(FromValueOpt::from_value(v)?) + b.statement_descriptor_kana = FromValueOpt::from_value(v) } "statement_descriptor_kanji" => { - b.statement_descriptor_kanji = Some(FromValueOpt::from_value(v)?) + b.statement_descriptor_kanji = FromValueOpt::from_value(v) } "statement_descriptor_prefix_kana" => { - b.statement_descriptor_prefix_kana = Some(FromValueOpt::from_value(v)?) + b.statement_descriptor_prefix_kana = FromValueOpt::from_value(v) } "statement_descriptor_prefix_kanji" => { - b.statement_descriptor_prefix_kanji = Some(FromValueOpt::from_value(v)?) + b.statement_descriptor_prefix_kanji = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/account_payout_settings.rs b/generated/async-stripe-shared/src/account_payout_settings.rs index 570cb145a..aecd4bc32 100644 --- a/generated/async-stripe-shared/src/account_payout_settings.rs +++ b/generated/async-stripe-shared/src/account_payout_settings.rs @@ -18,7 +18,12 @@ pub struct AccountPayoutSettingsBuilder { statement_descriptor: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,14 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - debit_negative_balances: self.debit_negative_balances?, - schedule: self.schedule.take()?, - statement_descriptor: self.statement_descriptor.take()?, - }) + let (Some(debit_negative_balances), Some(schedule), Some(statement_descriptor)) = ( + self.debit_negative_balances, + self.schedule.take(), + self.statement_descriptor.take(), + ) else { + return None; + }; + Some(Self::Out { debit_negative_balances, schedule, statement_descriptor }) } } @@ -101,12 +109,10 @@ const _: () = { for (k, v) in obj { match k.as_str() { "debit_negative_balances" => { - b.debit_negative_balances = Some(FromValueOpt::from_value(v)?) - } - "schedule" => b.schedule = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) + b.debit_negative_balances = FromValueOpt::from_value(v) } + "schedule" => b.schedule = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_requirements.rs b/generated/async-stripe-shared/src/account_requirements.rs index ed75d6198..2f9c84d26 100644 --- a/generated/async-stripe-shared/src/account_requirements.rs +++ b/generated/async-stripe-shared/src/account_requirements.rs @@ -40,7 +40,12 @@ pub struct AccountRequirementsBuilder { pending_verification: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -101,15 +106,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(alternatives), + Some(current_deadline), + Some(currently_due), + Some(disabled_reason), + Some(errors), + Some(eventually_due), + Some(past_due), + Some(pending_verification), + ) = ( + self.alternatives.take(), + self.current_deadline, + self.currently_due.take(), + self.disabled_reason.take(), + self.errors.take(), + self.eventually_due.take(), + self.past_due.take(), + self.pending_verification.take(), + ) + else { + return None; + }; Some(Self::Out { - alternatives: self.alternatives.take()?, - current_deadline: self.current_deadline?, - currently_due: self.currently_due.take()?, - disabled_reason: self.disabled_reason.take()?, - errors: self.errors.take()?, - eventually_due: self.eventually_due.take()?, - past_due: self.past_due.take()?, - pending_verification: self.pending_verification.take()?, + alternatives, + current_deadline, + currently_due, + disabled_reason, + errors, + eventually_due, + past_due, + pending_verification, }) } } @@ -137,16 +164,14 @@ const _: () = { let mut b = AccountRequirementsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "alternatives" => b.alternatives = Some(FromValueOpt::from_value(v)?), - "current_deadline" => b.current_deadline = Some(FromValueOpt::from_value(v)?), - "currently_due" => b.currently_due = Some(FromValueOpt::from_value(v)?), - "disabled_reason" => b.disabled_reason = Some(FromValueOpt::from_value(v)?), - "errors" => b.errors = Some(FromValueOpt::from_value(v)?), - "eventually_due" => b.eventually_due = Some(FromValueOpt::from_value(v)?), - "past_due" => b.past_due = Some(FromValueOpt::from_value(v)?), - "pending_verification" => { - b.pending_verification = Some(FromValueOpt::from_value(v)?) - } + "alternatives" => b.alternatives = FromValueOpt::from_value(v), + "current_deadline" => b.current_deadline = FromValueOpt::from_value(v), + "currently_due" => b.currently_due = FromValueOpt::from_value(v), + "disabled_reason" => b.disabled_reason = FromValueOpt::from_value(v), + "errors" => b.errors = FromValueOpt::from_value(v), + "eventually_due" => b.eventually_due = FromValueOpt::from_value(v), + "past_due" => b.past_due = FromValueOpt::from_value(v), + "pending_verification" => b.pending_verification = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_requirements_alternative.rs b/generated/async-stripe-shared/src/account_requirements_alternative.rs index 1c56c0402..a33954edc 100644 --- a/generated/async-stripe-shared/src/account_requirements_alternative.rs +++ b/generated/async-stripe-shared/src/account_requirements_alternative.rs @@ -13,7 +13,12 @@ pub struct AccountRequirementsAlternativeBuilder { original_fields_due: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,10 +67,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - alternative_fields_due: self.alternative_fields_due.take()?, - original_fields_due: self.original_fields_due.take()?, - }) + let (Some(alternative_fields_due), Some(original_fields_due)) = + (self.alternative_fields_due.take(), self.original_fields_due.take()) + else { + return None; + }; + Some(Self::Out { alternative_fields_due, original_fields_due }) } } @@ -93,11 +100,9 @@ const _: () = { for (k, v) in obj { match k.as_str() { "alternative_fields_due" => { - b.alternative_fields_due = Some(FromValueOpt::from_value(v)?) - } - "original_fields_due" => { - b.original_fields_due = Some(FromValueOpt::from_value(v)?) + b.alternative_fields_due = FromValueOpt::from_value(v) } + "original_fields_due" => b.original_fields_due = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_requirements_error.rs b/generated/async-stripe-shared/src/account_requirements_error.rs index a22ed41b4..e3db6000e 100644 --- a/generated/async-stripe-shared/src/account_requirements_error.rs +++ b/generated/async-stripe-shared/src/account_requirements_error.rs @@ -16,7 +16,12 @@ pub struct AccountRequirementsErrorBuilder { requirement: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - code: self.code?, - reason: self.reason.take()?, - requirement: self.requirement.take()?, - }) + let (Some(code), Some(reason), Some(requirement)) = + (self.code, self.reason.take(), self.requirement.take()) + else { + return None; + }; + Some(Self::Out { code, reason, requirement }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = AccountRequirementsErrorBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "code" => b.code = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), - "requirement" => b.requirement = Some(FromValueOpt::from_value(v)?), + "code" => b.code = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), + "requirement" => b.requirement = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_sepa_debit_payments_settings.rs b/generated/async-stripe-shared/src/account_sepa_debit_payments_settings.rs index bc94d7c08..d28289b75 100644 --- a/generated/async-stripe-shared/src/account_sepa_debit_payments_settings.rs +++ b/generated/async-stripe-shared/src/account_sepa_debit_payments_settings.rs @@ -10,7 +10,12 @@ pub struct AccountSepaDebitPaymentsSettingsBuilder { creditor_id: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { creditor_id: self.creditor_id.take()? }) + let (Some(creditor_id),) = (self.creditor_id.take(),) else { + return None; + }; + Some(Self::Out { creditor_id }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = AccountSepaDebitPaymentsSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "creditor_id" => b.creditor_id = Some(FromValueOpt::from_value(v)?), + "creditor_id" => b.creditor_id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_settings.rs b/generated/async-stripe-shared/src/account_settings.rs index 229bcafb2..b43b7ece8 100644 --- a/generated/async-stripe-shared/src/account_settings.rs +++ b/generated/async-stripe-shared/src/account_settings.rs @@ -27,7 +27,12 @@ pub struct AccountSettingsBuilder { treasury: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -92,17 +97,43 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(bacs_debit_payments), + Some(branding), + Some(card_issuing), + Some(card_payments), + Some(dashboard), + Some(invoices), + Some(payments), + Some(payouts), + Some(sepa_debit_payments), + Some(treasury), + ) = ( + self.bacs_debit_payments.take(), + self.branding.take(), + self.card_issuing.take(), + self.card_payments.take(), + self.dashboard.take(), + self.invoices.take(), + self.payments.take(), + self.payouts.take(), + self.sepa_debit_payments.take(), + self.treasury.take(), + ) + else { + return None; + }; Some(Self::Out { - bacs_debit_payments: self.bacs_debit_payments.take()?, - branding: self.branding.take()?, - card_issuing: self.card_issuing.take()?, - card_payments: self.card_payments.take()?, - dashboard: self.dashboard.take()?, - invoices: self.invoices.take()?, - payments: self.payments.take()?, - payouts: self.payouts.take()?, - sepa_debit_payments: self.sepa_debit_payments.take()?, - treasury: self.treasury.take()?, + bacs_debit_payments, + branding, + card_issuing, + card_payments, + dashboard, + invoices, + payments, + payouts, + sepa_debit_payments, + treasury, }) } } @@ -130,20 +161,16 @@ const _: () = { let mut b = AccountSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bacs_debit_payments" => { - b.bacs_debit_payments = Some(FromValueOpt::from_value(v)?) - } - "branding" => b.branding = Some(FromValueOpt::from_value(v)?), - "card_issuing" => b.card_issuing = Some(FromValueOpt::from_value(v)?), - "card_payments" => b.card_payments = Some(FromValueOpt::from_value(v)?), - "dashboard" => b.dashboard = Some(FromValueOpt::from_value(v)?), - "invoices" => b.invoices = Some(FromValueOpt::from_value(v)?), - "payments" => b.payments = Some(FromValueOpt::from_value(v)?), - "payouts" => b.payouts = Some(FromValueOpt::from_value(v)?), - "sepa_debit_payments" => { - b.sepa_debit_payments = Some(FromValueOpt::from_value(v)?) - } - "treasury" => b.treasury = Some(FromValueOpt::from_value(v)?), + "bacs_debit_payments" => b.bacs_debit_payments = FromValueOpt::from_value(v), + "branding" => b.branding = FromValueOpt::from_value(v), + "card_issuing" => b.card_issuing = FromValueOpt::from_value(v), + "card_payments" => b.card_payments = FromValueOpt::from_value(v), + "dashboard" => b.dashboard = FromValueOpt::from_value(v), + "invoices" => b.invoices = FromValueOpt::from_value(v), + "payments" => b.payments = FromValueOpt::from_value(v), + "payouts" => b.payouts = FromValueOpt::from_value(v), + "sepa_debit_payments" => b.sepa_debit_payments = FromValueOpt::from_value(v), + "treasury" => b.treasury = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_terms_of_service.rs b/generated/async-stripe-shared/src/account_terms_of_service.rs index 6719b801a..86102c45d 100644 --- a/generated/async-stripe-shared/src/account_terms_of_service.rs +++ b/generated/async-stripe-shared/src/account_terms_of_service.rs @@ -16,7 +16,12 @@ pub struct AccountTermsOfServiceBuilder { user_agent: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - date: self.date?, - ip: self.ip.take()?, - user_agent: self.user_agent.take()?, - }) + let (Some(date), Some(ip), Some(user_agent)) = + (self.date, self.ip.take(), self.user_agent.take()) + else { + return None; + }; + Some(Self::Out { date, ip, user_agent }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = AccountTermsOfServiceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "date" => b.date = Some(FromValueOpt::from_value(v)?), - "ip" => b.ip = Some(FromValueOpt::from_value(v)?), - "user_agent" => b.user_agent = Some(FromValueOpt::from_value(v)?), + "date" => b.date = FromValueOpt::from_value(v), + "ip" => b.ip = FromValueOpt::from_value(v), + "user_agent" => b.user_agent = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_tos_acceptance.rs b/generated/async-stripe-shared/src/account_tos_acceptance.rs index b328d0358..21267fad0 100644 --- a/generated/async-stripe-shared/src/account_tos_acceptance.rs +++ b/generated/async-stripe-shared/src/account_tos_acceptance.rs @@ -19,7 +19,12 @@ pub struct AccountTosAcceptanceBuilder { user_agent: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - date: self.date?, - ip: self.ip.take()?, - service_agreement: self.service_agreement.take()?, - user_agent: self.user_agent.take()?, - }) + let (Some(date), Some(ip), Some(service_agreement), Some(user_agent)) = + (self.date, self.ip.take(), self.service_agreement.take(), self.user_agent.take()) + else { + return None; + }; + Some(Self::Out { date, ip, service_agreement, user_agent }) } } @@ -104,10 +109,10 @@ const _: () = { let mut b = AccountTosAcceptanceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "date" => b.date = Some(FromValueOpt::from_value(v)?), - "ip" => b.ip = Some(FromValueOpt::from_value(v)?), - "service_agreement" => b.service_agreement = Some(FromValueOpt::from_value(v)?), - "user_agent" => b.user_agent = Some(FromValueOpt::from_value(v)?), + "date" => b.date = FromValueOpt::from_value(v), + "ip" => b.ip = FromValueOpt::from_value(v), + "service_agreement" => b.service_agreement = FromValueOpt::from_value(v), + "user_agent" => b.user_agent = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_treasury_settings.rs b/generated/async-stripe-shared/src/account_treasury_settings.rs index dc93af8fc..578be67b3 100644 --- a/generated/async-stripe-shared/src/account_treasury_settings.rs +++ b/generated/async-stripe-shared/src/account_treasury_settings.rs @@ -9,7 +9,12 @@ pub struct AccountTreasurySettingsBuilder { tos_acceptance: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -54,7 +59,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { tos_acceptance: self.tos_acceptance.take()? }) + let (Some(tos_acceptance),) = (self.tos_acceptance.take(),) else { + return None; + }; + Some(Self::Out { tos_acceptance }) } } @@ -81,7 +89,7 @@ const _: () = { let mut b = AccountTreasurySettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "tos_acceptance" => b.tos_acceptance = Some(FromValueOpt::from_value(v)?), + "tos_acceptance" => b.tos_acceptance = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_unification_account_controller.rs b/generated/async-stripe-shared/src/account_unification_account_controller.rs index f8399df31..a6a9b1865 100644 --- a/generated/async-stripe-shared/src/account_unification_account_controller.rs +++ b/generated/async-stripe-shared/src/account_unification_account_controller.rs @@ -28,7 +28,12 @@ pub struct AccountUnificationAccountControllerBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -85,13 +90,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(fees), + Some(is_controller), + Some(losses), + Some(requirement_collection), + Some(stripe_dashboard), + Some(type_), + ) = ( + self.fees, + self.is_controller, + self.losses, + self.requirement_collection, + self.stripe_dashboard, + self.type_, + ) + else { + return None; + }; Some(Self::Out { - fees: self.fees?, - is_controller: self.is_controller?, - losses: self.losses?, - requirement_collection: self.requirement_collection?, - stripe_dashboard: self.stripe_dashboard?, - type_: self.type_?, + fees, + is_controller, + losses, + requirement_collection, + stripe_dashboard, + type_, }) } } @@ -119,14 +142,14 @@ const _: () = { let mut b = AccountUnificationAccountControllerBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "fees" => b.fees = Some(FromValueOpt::from_value(v)?), - "is_controller" => b.is_controller = Some(FromValueOpt::from_value(v)?), - "losses" => b.losses = Some(FromValueOpt::from_value(v)?), + "fees" => b.fees = FromValueOpt::from_value(v), + "is_controller" => b.is_controller = FromValueOpt::from_value(v), + "losses" => b.losses = FromValueOpt::from_value(v), "requirement_collection" => { - b.requirement_collection = Some(FromValueOpt::from_value(v)?) + b.requirement_collection = FromValueOpt::from_value(v) } - "stripe_dashboard" => b.stripe_dashboard = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "stripe_dashboard" => b.stripe_dashboard = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_unification_account_controller_fees.rs b/generated/async-stripe-shared/src/account_unification_account_controller_fees.rs index 2db8acd4f..54df02e6e 100644 --- a/generated/async-stripe-shared/src/account_unification_account_controller_fees.rs +++ b/generated/async-stripe-shared/src/account_unification_account_controller_fees.rs @@ -11,7 +11,12 @@ pub struct AccountUnificationAccountControllerFeesBuilder { payer: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { payer: self.payer? }) + let (Some(payer),) = (self.payer,) else { + return None; + }; + Some(Self::Out { payer }) } } @@ -83,7 +91,7 @@ const _: () = { let mut b = AccountUnificationAccountControllerFeesBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "payer" => b.payer = Some(FromValueOpt::from_value(v)?), + "payer" => b.payer = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_unification_account_controller_losses.rs b/generated/async-stripe-shared/src/account_unification_account_controller_losses.rs index ea970948a..85e385267 100644 --- a/generated/async-stripe-shared/src/account_unification_account_controller_losses.rs +++ b/generated/async-stripe-shared/src/account_unification_account_controller_losses.rs @@ -10,7 +10,12 @@ pub struct AccountUnificationAccountControllerLossesBuilder { payments: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { payments: self.payments? }) + let (Some(payments),) = (self.payments,) else { + return None; + }; + Some(Self::Out { payments }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = AccountUnificationAccountControllerLossesBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "payments" => b.payments = Some(FromValueOpt::from_value(v)?), + "payments" => b.payments = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/account_unification_account_controller_stripe_dashboard.rs b/generated/async-stripe-shared/src/account_unification_account_controller_stripe_dashboard.rs index aee142ec0..0461ee595 100644 --- a/generated/async-stripe-shared/src/account_unification_account_controller_stripe_dashboard.rs +++ b/generated/async-stripe-shared/src/account_unification_account_controller_stripe_dashboard.rs @@ -11,7 +11,12 @@ pub struct AccountUnificationAccountControllerStripeDashboardBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { type_: self.type_? }) + let (Some(type_),) = (self.type_,) else { + return None; + }; + Some(Self::Out { type_ }) } } @@ -83,7 +91,7 @@ const _: () = { let mut b = AccountUnificationAccountControllerStripeDashboardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/address.rs b/generated/async-stripe-shared/src/address.rs index 1e2de7d64..9911d5f83 100644 --- a/generated/async-stripe-shared/src/address.rs +++ b/generated/async-stripe-shared/src/address.rs @@ -25,7 +25,12 @@ pub struct AddressBuilder { state: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -79,14 +84,25 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - city: self.city.take()?, - country: self.country.take()?, - line1: self.line1.take()?, - line2: self.line2.take()?, - postal_code: self.postal_code.take()?, - state: self.state.take()?, - }) + let ( + Some(city), + Some(country), + Some(line1), + Some(line2), + Some(postal_code), + Some(state), + ) = ( + self.city.take(), + self.country.take(), + self.line1.take(), + self.line2.take(), + self.postal_code.take(), + self.state.take(), + ) + else { + return None; + }; + Some(Self::Out { city, country, line1, line2, postal_code, state }) } } @@ -113,12 +129,12 @@ const _: () = { let mut b = AddressBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "city" => b.city = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "line1" => b.line1 = Some(FromValueOpt::from_value(v)?), - "line2" => b.line2 = Some(FromValueOpt::from_value(v)?), - "postal_code" => b.postal_code = Some(FromValueOpt::from_value(v)?), - "state" => b.state = Some(FromValueOpt::from_value(v)?), + "city" => b.city = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "line1" => b.line1 = FromValueOpt::from_value(v), + "line2" => b.line2 = FromValueOpt::from_value(v), + "postal_code" => b.postal_code = FromValueOpt::from_value(v), + "state" => b.state = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/api_errors.rs b/generated/async-stripe-shared/src/api_errors.rs index 86871e514..66496b3c7 100644 --- a/generated/async-stripe-shared/src/api_errors.rs +++ b/generated/async-stripe-shared/src/api_errors.rs @@ -47,7 +47,12 @@ pub struct ApiErrorsBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -115,20 +120,52 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(charge), + Some(code), + Some(decline_code), + Some(doc_url), + Some(message), + Some(param), + Some(payment_intent), + Some(payment_method), + Some(payment_method_type), + Some(request_log_url), + Some(setup_intent), + Some(source), + Some(type_), + ) = ( + self.charge.take(), + self.code, + self.decline_code.take(), + self.doc_url.take(), + self.message.take(), + self.param.take(), + self.payment_intent.take(), + self.payment_method.take(), + self.payment_method_type.take(), + self.request_log_url.take(), + self.setup_intent.take(), + self.source.take(), + self.type_, + ) + else { + return None; + }; Some(Self::Out { - charge: self.charge.take()?, - code: self.code?, - decline_code: self.decline_code.take()?, - doc_url: self.doc_url.take()?, - message: self.message.take()?, - param: self.param.take()?, - payment_intent: self.payment_intent.take()?, - payment_method: self.payment_method.take()?, - payment_method_type: self.payment_method_type.take()?, - request_log_url: self.request_log_url.take()?, - setup_intent: self.setup_intent.take()?, - source: self.source.take()?, - type_: self.type_?, + charge, + code, + decline_code, + doc_url, + message, + param, + payment_intent, + payment_method, + payment_method_type, + request_log_url, + setup_intent, + source, + type_, }) } } @@ -156,21 +193,19 @@ const _: () = { let mut b = ApiErrorsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "charge" => b.charge = Some(FromValueOpt::from_value(v)?), - "code" => b.code = Some(FromValueOpt::from_value(v)?), - "decline_code" => b.decline_code = Some(FromValueOpt::from_value(v)?), - "doc_url" => b.doc_url = Some(FromValueOpt::from_value(v)?), - "message" => b.message = Some(FromValueOpt::from_value(v)?), - "param" => b.param = Some(FromValueOpt::from_value(v)?), - "payment_intent" => b.payment_intent = Some(FromValueOpt::from_value(v)?), - "payment_method" => b.payment_method = Some(FromValueOpt::from_value(v)?), - "payment_method_type" => { - b.payment_method_type = Some(FromValueOpt::from_value(v)?) - } - "request_log_url" => b.request_log_url = Some(FromValueOpt::from_value(v)?), - "setup_intent" => b.setup_intent = Some(FromValueOpt::from_value(v)?), - "source" => b.source = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "charge" => b.charge = FromValueOpt::from_value(v), + "code" => b.code = FromValueOpt::from_value(v), + "decline_code" => b.decline_code = FromValueOpt::from_value(v), + "doc_url" => b.doc_url = FromValueOpt::from_value(v), + "message" => b.message = FromValueOpt::from_value(v), + "param" => b.param = FromValueOpt::from_value(v), + "payment_intent" => b.payment_intent = FromValueOpt::from_value(v), + "payment_method" => b.payment_method = FromValueOpt::from_value(v), + "payment_method_type" => b.payment_method_type = FromValueOpt::from_value(v), + "request_log_url" => b.request_log_url = FromValueOpt::from_value(v), + "setup_intent" => b.setup_intent = FromValueOpt::from_value(v), + "source" => b.source = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/application.rs b/generated/async-stripe-shared/src/application.rs index 1945eb58e..cef86b6f6 100644 --- a/generated/async-stripe-shared/src/application.rs +++ b/generated/async-stripe-shared/src/application.rs @@ -12,7 +12,12 @@ pub struct ApplicationBuilder { name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { id: self.id.take()?, name: self.name.take()? }) + let (Some(id), Some(name)) = (self.id.take(), self.name.take()) else { + return None; + }; + Some(Self::Out { id, name }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = ApplicationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/application_fee.rs b/generated/async-stripe-shared/src/application_fee.rs index 50b7d47a6..5f8d079c7 100644 --- a/generated/async-stripe-shared/src/application_fee.rs +++ b/generated/async-stripe-shared/src/application_fee.rs @@ -49,7 +49,12 @@ pub struct ApplicationFeeBuilder { refunds: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -120,20 +125,52 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account), + Some(amount), + Some(amount_refunded), + Some(application), + Some(balance_transaction), + Some(charge), + Some(created), + Some(currency), + Some(id), + Some(livemode), + Some(originating_transaction), + Some(refunded), + Some(refunds), + ) = ( + self.account.take(), + self.amount, + self.amount_refunded, + self.application.take(), + self.balance_transaction.take(), + self.charge.take(), + self.created, + self.currency, + self.id.take(), + self.livemode, + self.originating_transaction.take(), + self.refunded, + self.refunds.take(), + ) + else { + return None; + }; Some(Self::Out { - account: self.account.take()?, - amount: self.amount?, - amount_refunded: self.amount_refunded?, - application: self.application.take()?, - balance_transaction: self.balance_transaction.take()?, - charge: self.charge.take()?, - created: self.created?, - currency: self.currency?, - id: self.id.take()?, - livemode: self.livemode?, - originating_transaction: self.originating_transaction.take()?, - refunded: self.refunded?, - refunds: self.refunds.take()?, + account, + amount, + amount_refunded, + application, + balance_transaction, + charge, + created, + currency, + id, + livemode, + originating_transaction, + refunded, + refunds, }) } } @@ -161,23 +198,21 @@ const _: () = { let mut b = ApplicationFeeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account" => b.account = Some(FromValueOpt::from_value(v)?), - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_refunded" => b.amount_refunded = Some(FromValueOpt::from_value(v)?), - "application" => b.application = Some(FromValueOpt::from_value(v)?), - "balance_transaction" => { - b.balance_transaction = Some(FromValueOpt::from_value(v)?) - } - "charge" => b.charge = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), + "account" => b.account = FromValueOpt::from_value(v), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_refunded" => b.amount_refunded = FromValueOpt::from_value(v), + "application" => b.application = FromValueOpt::from_value(v), + "balance_transaction" => b.balance_transaction = FromValueOpt::from_value(v), + "charge" => b.charge = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), "originating_transaction" => { - b.originating_transaction = Some(FromValueOpt::from_value(v)?) + b.originating_transaction = FromValueOpt::from_value(v) } - "refunded" => b.refunded = Some(FromValueOpt::from_value(v)?), - "refunds" => b.refunds = Some(FromValueOpt::from_value(v)?), + "refunded" => b.refunded = FromValueOpt::from_value(v), + "refunds" => b.refunds = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/application_fee_refund.rs b/generated/async-stripe-shared/src/application_fee_refund.rs index 29862e781..7452b1421 100644 --- a/generated/async-stripe-shared/src/application_fee_refund.rs +++ b/generated/async-stripe-shared/src/application_fee_refund.rs @@ -37,7 +37,12 @@ pub struct ApplicationFeeRefundBuilder { metadata: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -96,15 +101,27 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - balance_transaction: self.balance_transaction.take()?, - created: self.created?, - currency: self.currency?, - fee: self.fee.take()?, - id: self.id.take()?, - metadata: self.metadata.take()?, - }) + let ( + Some(amount), + Some(balance_transaction), + Some(created), + Some(currency), + Some(fee), + Some(id), + Some(metadata), + ) = ( + self.amount, + self.balance_transaction.take(), + self.created, + self.currency, + self.fee.take(), + self.id.take(), + self.metadata.take(), + ) + else { + return None; + }; + Some(Self::Out { amount, balance_transaction, created, currency, fee, id, metadata }) } } @@ -131,15 +148,13 @@ const _: () = { let mut b = ApplicationFeeRefundBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "balance_transaction" => { - b.balance_transaction = Some(FromValueOpt::from_value(v)?) - } - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "fee" => b.fee = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "balance_transaction" => b.balance_transaction = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "fee" => b.fee = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/automatic_tax.rs b/generated/async-stripe-shared/src/automatic_tax.rs index d12ad6274..bae6c4674 100644 --- a/generated/async-stripe-shared/src/automatic_tax.rs +++ b/generated/async-stripe-shared/src/automatic_tax.rs @@ -19,7 +19,12 @@ pub struct AutomaticTaxBuilder { status: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,11 +75,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - enabled: self.enabled?, - liability: self.liability.take()?, - status: self.status?, - }) + let (Some(enabled), Some(liability), Some(status)) = + (self.enabled, self.liability.take(), self.status) + else { + return None; + }; + Some(Self::Out { enabled, liability, status }) } } @@ -101,9 +107,9 @@ const _: () = { let mut b = AutomaticTaxBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "liability" => b.liability = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "liability" => b.liability = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/balance_transaction.rs b/generated/async-stripe-shared/src/balance_transaction.rs index 24917afe1..67abef312 100644 --- a/generated/async-stripe-shared/src/balance_transaction.rs +++ b/generated/async-stripe-shared/src/balance_transaction.rs @@ -65,7 +65,12 @@ pub struct BalanceTransactionBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -138,21 +143,55 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(available_on), + Some(created), + Some(currency), + Some(description), + Some(exchange_rate), + Some(fee), + Some(fee_details), + Some(id), + Some(net), + Some(reporting_category), + Some(source), + Some(status), + Some(type_), + ) = ( + self.amount, + self.available_on, + self.created, + self.currency, + self.description.take(), + self.exchange_rate, + self.fee, + self.fee_details.take(), + self.id.take(), + self.net, + self.reporting_category.take(), + self.source.take(), + self.status.take(), + self.type_, + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - available_on: self.available_on?, - created: self.created?, - currency: self.currency?, - description: self.description.take()?, - exchange_rate: self.exchange_rate?, - fee: self.fee?, - fee_details: self.fee_details.take()?, - id: self.id.take()?, - net: self.net?, - reporting_category: self.reporting_category.take()?, - source: self.source.take()?, - status: self.status.take()?, - type_: self.type_?, + amount, + available_on, + created, + currency, + description, + exchange_rate, + fee, + fee_details, + id, + net, + reporting_category, + source, + status, + type_, }) } } @@ -180,22 +219,20 @@ const _: () = { let mut b = BalanceTransactionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "available_on" => b.available_on = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "exchange_rate" => b.exchange_rate = Some(FromValueOpt::from_value(v)?), - "fee" => b.fee = Some(FromValueOpt::from_value(v)?), - "fee_details" => b.fee_details = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "net" => b.net = Some(FromValueOpt::from_value(v)?), - "reporting_category" => { - b.reporting_category = Some(FromValueOpt::from_value(v)?) - } - "source" => b.source = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "available_on" => b.available_on = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "exchange_rate" => b.exchange_rate = FromValueOpt::from_value(v), + "fee" => b.fee = FromValueOpt::from_value(v), + "fee_details" => b.fee_details = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "net" => b.net = FromValueOpt::from_value(v), + "reporting_category" => b.reporting_category = FromValueOpt::from_value(v), + "source" => b.source = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/bank_account.rs b/generated/async-stripe-shared/src/bank_account.rs index 41bcd9a3b..6db97c4a0 100644 --- a/generated/async-stripe-shared/src/bank_account.rs +++ b/generated/async-stripe-shared/src/bank_account.rs @@ -85,7 +85,12 @@ pub struct BankAccountBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -168,25 +173,67 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account), + Some(account_holder_name), + Some(account_holder_type), + Some(account_type), + Some(available_payout_methods), + Some(bank_name), + Some(country), + Some(currency), + Some(customer), + Some(default_for_currency), + Some(fingerprint), + Some(future_requirements), + Some(id), + Some(last4), + Some(metadata), + Some(requirements), + Some(routing_number), + Some(status), + ) = ( + self.account.take(), + self.account_holder_name.take(), + self.account_holder_type.take(), + self.account_type.take(), + self.available_payout_methods.take(), + self.bank_name.take(), + self.country.take(), + self.currency, + self.customer.take(), + self.default_for_currency, + self.fingerprint.take(), + self.future_requirements.take(), + self.id.take(), + self.last4.take(), + self.metadata.take(), + self.requirements.take(), + self.routing_number.take(), + self.status.take(), + ) + else { + return None; + }; Some(Self::Out { - account: self.account.take()?, - account_holder_name: self.account_holder_name.take()?, - account_holder_type: self.account_holder_type.take()?, - account_type: self.account_type.take()?, - available_payout_methods: self.available_payout_methods.take()?, - bank_name: self.bank_name.take()?, - country: self.country.take()?, - currency: self.currency?, - customer: self.customer.take()?, - default_for_currency: self.default_for_currency?, - fingerprint: self.fingerprint.take()?, - future_requirements: self.future_requirements.take()?, - id: self.id.take()?, - last4: self.last4.take()?, - metadata: self.metadata.take()?, - requirements: self.requirements.take()?, - routing_number: self.routing_number.take()?, - status: self.status.take()?, + account, + account_holder_name, + account_holder_type, + account_type, + available_payout_methods, + bank_name, + country, + currency, + customer, + default_for_currency, + fingerprint, + future_requirements, + id, + last4, + metadata, + requirements, + routing_number, + status, }) } } @@ -214,34 +261,26 @@ const _: () = { let mut b = BankAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account" => b.account = Some(FromValueOpt::from_value(v)?), - "account_holder_name" => { - b.account_holder_name = Some(FromValueOpt::from_value(v)?) - } - "account_holder_type" => { - b.account_holder_type = Some(FromValueOpt::from_value(v)?) - } - "account_type" => b.account_type = Some(FromValueOpt::from_value(v)?), + "account" => b.account = FromValueOpt::from_value(v), + "account_holder_name" => b.account_holder_name = FromValueOpt::from_value(v), + "account_holder_type" => b.account_holder_type = FromValueOpt::from_value(v), + "account_type" => b.account_type = FromValueOpt::from_value(v), "available_payout_methods" => { - b.available_payout_methods = Some(FromValueOpt::from_value(v)?) - } - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "default_for_currency" => { - b.default_for_currency = Some(FromValueOpt::from_value(v)?) - } - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "future_requirements" => { - b.future_requirements = Some(FromValueOpt::from_value(v)?) + b.available_payout_methods = FromValueOpt::from_value(v) } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "requirements" => b.requirements = Some(FromValueOpt::from_value(v)?), - "routing_number" => b.routing_number = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "default_for_currency" => b.default_for_currency = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "future_requirements" => b.future_requirements = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "requirements" => b.requirements = FromValueOpt::from_value(v), + "routing_number" => b.routing_number = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/billing_details.rs b/generated/async-stripe-shared/src/billing_details.rs index f76f1f3d7..ab4886f8c 100644 --- a/generated/async-stripe-shared/src/billing_details.rs +++ b/generated/async-stripe-shared/src/billing_details.rs @@ -19,7 +19,12 @@ pub struct BillingDetailsBuilder { phone: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - address: self.address.take()?, - email: self.email.take()?, - name: self.name.take()?, - phone: self.phone.take()?, - }) + let (Some(address), Some(email), Some(name), Some(phone)) = + (self.address.take(), self.email.take(), self.name.take(), self.phone.take()) + else { + return None; + }; + Some(Self::Out { address, email, name, phone }) } } @@ -104,10 +109,10 @@ const _: () = { let mut b = BillingDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "phone" => b.phone = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "phone" => b.phone = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/cancellation_details.rs b/generated/async-stripe-shared/src/cancellation_details.rs index 1496f7357..0d8e7741d 100644 --- a/generated/async-stripe-shared/src/cancellation_details.rs +++ b/generated/async-stripe-shared/src/cancellation_details.rs @@ -16,7 +16,12 @@ pub struct CancellationDetailsBuilder { reason: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - comment: self.comment.take()?, - feedback: self.feedback?, - reason: self.reason?, - }) + let (Some(comment), Some(feedback), Some(reason)) = + (self.comment.take(), self.feedback, self.reason) + else { + return None; + }; + Some(Self::Out { comment, feedback, reason }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = CancellationDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "comment" => b.comment = Some(FromValueOpt::from_value(v)?), - "feedback" => b.feedback = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), + "comment" => b.comment = FromValueOpt::from_value(v), + "feedback" => b.feedback = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/capability.rs b/generated/async-stripe-shared/src/capability.rs index 7d36c61ec..2801bc169 100644 --- a/generated/async-stripe-shared/src/capability.rs +++ b/generated/async-stripe-shared/src/capability.rs @@ -30,7 +30,12 @@ pub struct CapabilityBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -89,14 +94,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account), + Some(future_requirements), + Some(id), + Some(requested), + Some(requested_at), + Some(requirements), + Some(status), + ) = ( + self.account.take(), + self.future_requirements.take(), + self.id.take(), + self.requested, + self.requested_at, + self.requirements.take(), + self.status, + ) + else { + return None; + }; Some(Self::Out { - account: self.account.take()?, - future_requirements: self.future_requirements.take()?, - id: self.id.take()?, - requested: self.requested?, - requested_at: self.requested_at?, - requirements: self.requirements.take()?, - status: self.status?, + account, + future_requirements, + id, + requested, + requested_at, + requirements, + status, }) } } @@ -124,15 +149,13 @@ const _: () = { let mut b = CapabilityBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account" => b.account = Some(FromValueOpt::from_value(v)?), - "future_requirements" => { - b.future_requirements = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "requested" => b.requested = Some(FromValueOpt::from_value(v)?), - "requested_at" => b.requested_at = Some(FromValueOpt::from_value(v)?), - "requirements" => b.requirements = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "account" => b.account = FromValueOpt::from_value(v), + "future_requirements" => b.future_requirements = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "requested" => b.requested = FromValueOpt::from_value(v), + "requested_at" => b.requested_at = FromValueOpt::from_value(v), + "requirements" => b.requirements = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/card.rs b/generated/async-stripe-shared/src/card.rs index 763add6f9..37c4e32d5 100644 --- a/generated/async-stripe-shared/src/card.rs +++ b/generated/async-stripe-shared/src/card.rs @@ -128,7 +128,12 @@ pub struct CardBuilder { tokenization_method: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -234,38 +239,106 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account), + Some(address_city), + Some(address_country), + Some(address_line1), + Some(address_line1_check), + Some(address_line2), + Some(address_state), + Some(address_zip), + Some(address_zip_check), + Some(available_payout_methods), + Some(brand), + Some(country), + Some(currency), + Some(customer), + Some(cvc_check), + Some(default_for_currency), + Some(description), + Some(dynamic_last4), + Some(exp_month), + Some(exp_year), + Some(fingerprint), + Some(funding), + Some(id), + Some(iin), + Some(issuer), + Some(last4), + Some(metadata), + Some(name), + Some(networks), + Some(status), + Some(tokenization_method), + ) = ( + self.account.take(), + self.address_city.take(), + self.address_country.take(), + self.address_line1.take(), + self.address_line1_check.take(), + self.address_line2.take(), + self.address_state.take(), + self.address_zip.take(), + self.address_zip_check.take(), + self.available_payout_methods.take(), + self.brand.take(), + self.country.take(), + self.currency, + self.customer.take(), + self.cvc_check.take(), + self.default_for_currency, + self.description.take(), + self.dynamic_last4.take(), + self.exp_month, + self.exp_year, + self.fingerprint.take(), + self.funding.take(), + self.id.take(), + self.iin.take(), + self.issuer.take(), + self.last4.take(), + self.metadata.take(), + self.name.take(), + self.networks.take(), + self.status.take(), + self.tokenization_method.take(), + ) + else { + return None; + }; Some(Self::Out { - account: self.account.take()?, - address_city: self.address_city.take()?, - address_country: self.address_country.take()?, - address_line1: self.address_line1.take()?, - address_line1_check: self.address_line1_check.take()?, - address_line2: self.address_line2.take()?, - address_state: self.address_state.take()?, - address_zip: self.address_zip.take()?, - address_zip_check: self.address_zip_check.take()?, - available_payout_methods: self.available_payout_methods.take()?, - brand: self.brand.take()?, - country: self.country.take()?, - currency: self.currency?, - customer: self.customer.take()?, - cvc_check: self.cvc_check.take()?, - default_for_currency: self.default_for_currency?, - description: self.description.take()?, - dynamic_last4: self.dynamic_last4.take()?, - exp_month: self.exp_month?, - exp_year: self.exp_year?, - fingerprint: self.fingerprint.take()?, - funding: self.funding.take()?, - id: self.id.take()?, - iin: self.iin.take()?, - issuer: self.issuer.take()?, - last4: self.last4.take()?, - metadata: self.metadata.take()?, - name: self.name.take()?, - networks: self.networks.take()?, - status: self.status.take()?, - tokenization_method: self.tokenization_method.take()?, + account, + address_city, + address_country, + address_line1, + address_line1_check, + address_line2, + address_state, + address_zip, + address_zip_check, + available_payout_methods, + brand, + country, + currency, + customer, + cvc_check, + default_for_currency, + description, + dynamic_last4, + exp_month, + exp_year, + fingerprint, + funding, + id, + iin, + issuer, + last4, + metadata, + name, + networks, + status, + tokenization_method, }) } } @@ -293,45 +366,39 @@ const _: () = { let mut b = CardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account" => b.account = Some(FromValueOpt::from_value(v)?), - "address_city" => b.address_city = Some(FromValueOpt::from_value(v)?), - "address_country" => b.address_country = Some(FromValueOpt::from_value(v)?), - "address_line1" => b.address_line1 = Some(FromValueOpt::from_value(v)?), - "address_line1_check" => { - b.address_line1_check = Some(FromValueOpt::from_value(v)?) - } - "address_line2" => b.address_line2 = Some(FromValueOpt::from_value(v)?), - "address_state" => b.address_state = Some(FromValueOpt::from_value(v)?), - "address_zip" => b.address_zip = Some(FromValueOpt::from_value(v)?), - "address_zip_check" => b.address_zip_check = Some(FromValueOpt::from_value(v)?), + "account" => b.account = FromValueOpt::from_value(v), + "address_city" => b.address_city = FromValueOpt::from_value(v), + "address_country" => b.address_country = FromValueOpt::from_value(v), + "address_line1" => b.address_line1 = FromValueOpt::from_value(v), + "address_line1_check" => b.address_line1_check = FromValueOpt::from_value(v), + "address_line2" => b.address_line2 = FromValueOpt::from_value(v), + "address_state" => b.address_state = FromValueOpt::from_value(v), + "address_zip" => b.address_zip = FromValueOpt::from_value(v), + "address_zip_check" => b.address_zip_check = FromValueOpt::from_value(v), "available_payout_methods" => { - b.available_payout_methods = Some(FromValueOpt::from_value(v)?) - } - "brand" => b.brand = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "cvc_check" => b.cvc_check = Some(FromValueOpt::from_value(v)?), - "default_for_currency" => { - b.default_for_currency = Some(FromValueOpt::from_value(v)?) - } - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "dynamic_last4" => b.dynamic_last4 = Some(FromValueOpt::from_value(v)?), - "exp_month" => b.exp_month = Some(FromValueOpt::from_value(v)?), - "exp_year" => b.exp_year = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "funding" => b.funding = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "iin" => b.iin = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "networks" => b.networks = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "tokenization_method" => { - b.tokenization_method = Some(FromValueOpt::from_value(v)?) + b.available_payout_methods = FromValueOpt::from_value(v) } + "brand" => b.brand = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "cvc_check" => b.cvc_check = FromValueOpt::from_value(v), + "default_for_currency" => b.default_for_currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "dynamic_last4" => b.dynamic_last4 = FromValueOpt::from_value(v), + "exp_month" => b.exp_month = FromValueOpt::from_value(v), + "exp_year" => b.exp_year = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "funding" => b.funding = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "iin" => b.iin = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "networks" => b.networks = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "tokenization_method" => b.tokenization_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/card_issuing_account_terms_of_service.rs b/generated/async-stripe-shared/src/card_issuing_account_terms_of_service.rs index ee890e3b4..1522220c6 100644 --- a/generated/async-stripe-shared/src/card_issuing_account_terms_of_service.rs +++ b/generated/async-stripe-shared/src/card_issuing_account_terms_of_service.rs @@ -16,7 +16,12 @@ pub struct CardIssuingAccountTermsOfServiceBuilder { user_agent: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - date: self.date?, - ip: self.ip.take()?, - user_agent: self.user_agent.take()?, - }) + let (Some(date), Some(ip), Some(user_agent)) = + (self.date, self.ip.take(), self.user_agent.take()) + else { + return None; + }; + Some(Self::Out { date, ip, user_agent }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = CardIssuingAccountTermsOfServiceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "date" => b.date = Some(FromValueOpt::from_value(v)?), - "ip" => b.ip = Some(FromValueOpt::from_value(v)?), - "user_agent" => b.user_agent = Some(FromValueOpt::from_value(v)?), + "date" => b.date = FromValueOpt::from_value(v), + "ip" => b.ip = FromValueOpt::from_value(v), + "user_agent" => b.user_agent = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/card_mandate_payment_method_details.rs b/generated/async-stripe-shared/src/card_mandate_payment_method_details.rs index ebd9ccb0c..ddd5dc08b 100644 --- a/generated/async-stripe-shared/src/card_mandate_payment_method_details.rs +++ b/generated/async-stripe-shared/src/card_mandate_payment_method_details.rs @@ -5,7 +5,12 @@ pub struct CardMandatePaymentMethodDetails {} #[doc(hidden)] pub struct CardMandatePaymentMethodDetailsBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/cash_balance.rs b/generated/async-stripe-shared/src/cash_balance.rs index 870bd9684..ccb5d26f5 100644 --- a/generated/async-stripe-shared/src/cash_balance.rs +++ b/generated/async-stripe-shared/src/cash_balance.rs @@ -24,7 +24,12 @@ pub struct CashBalanceBuilder { settings: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,12 +82,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - available: self.available.take()?, - customer: self.customer.take()?, - livemode: self.livemode?, - settings: self.settings?, - }) + let (Some(available), Some(customer), Some(livemode), Some(settings)) = + (self.available.take(), self.customer.take(), self.livemode, self.settings) + else { + return None; + }; + Some(Self::Out { available, customer, livemode, settings }) } } @@ -109,10 +114,10 @@ const _: () = { let mut b = CashBalanceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "available" => b.available = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "settings" => b.settings = Some(FromValueOpt::from_value(v)?), + "available" => b.available = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "settings" => b.settings = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/charge.rs b/generated/async-stripe-shared/src/charge.rs index 24ae42171..a2f5bc623 100644 --- a/generated/async-stripe-shared/src/charge.rs +++ b/generated/async-stripe-shared/src/charge.rs @@ -177,7 +177,12 @@ pub struct ChargeBuilder { transfer_group: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -319,54 +324,154 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_captured), + Some(amount_refunded), + Some(application), + Some(application_fee), + Some(application_fee_amount), + Some(authorization_code), + Some(balance_transaction), + Some(billing_details), + Some(calculated_statement_descriptor), + Some(captured), + Some(created), + Some(currency), + Some(customer), + Some(description), + Some(disputed), + Some(failure_balance_transaction), + Some(failure_code), + Some(failure_message), + Some(fraud_details), + Some(id), + Some(invoice), + Some(level3), + Some(livemode), + Some(metadata), + Some(on_behalf_of), + Some(outcome), + Some(paid), + Some(payment_intent), + Some(payment_method), + Some(payment_method_details), + Some(radar_options), + Some(receipt_email), + Some(receipt_number), + Some(receipt_url), + Some(refunded), + Some(refunds), + Some(review), + Some(shipping), + Some(source), + Some(source_transfer), + Some(statement_descriptor), + Some(statement_descriptor_suffix), + Some(status), + Some(transfer), + Some(transfer_data), + Some(transfer_group), + ) = ( + self.amount, + self.amount_captured, + self.amount_refunded, + self.application.take(), + self.application_fee.take(), + self.application_fee_amount, + self.authorization_code.take(), + self.balance_transaction.take(), + self.billing_details.take(), + self.calculated_statement_descriptor.take(), + self.captured, + self.created, + self.currency, + self.customer.take(), + self.description.take(), + self.disputed, + self.failure_balance_transaction.take(), + self.failure_code.take(), + self.failure_message.take(), + self.fraud_details.take(), + self.id.take(), + self.invoice.take(), + self.level3.take(), + self.livemode, + self.metadata.take(), + self.on_behalf_of.take(), + self.outcome.take(), + self.paid, + self.payment_intent.take(), + self.payment_method.take(), + self.payment_method_details.take(), + self.radar_options.take(), + self.receipt_email.take(), + self.receipt_number.take(), + self.receipt_url.take(), + self.refunded, + self.refunds.take(), + self.review.take(), + self.shipping.take(), + self.source.take(), + self.source_transfer.take(), + self.statement_descriptor.take(), + self.statement_descriptor_suffix.take(), + self.status, + self.transfer.take(), + self.transfer_data.take(), + self.transfer_group.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_captured: self.amount_captured?, - amount_refunded: self.amount_refunded?, - application: self.application.take()?, - application_fee: self.application_fee.take()?, - application_fee_amount: self.application_fee_amount?, - authorization_code: self.authorization_code.take()?, - balance_transaction: self.balance_transaction.take()?, - billing_details: self.billing_details.take()?, - calculated_statement_descriptor: self.calculated_statement_descriptor.take()?, - captured: self.captured?, - created: self.created?, - currency: self.currency?, - customer: self.customer.take()?, - description: self.description.take()?, - disputed: self.disputed?, - failure_balance_transaction: self.failure_balance_transaction.take()?, - failure_code: self.failure_code.take()?, - failure_message: self.failure_message.take()?, - fraud_details: self.fraud_details.take()?, - id: self.id.take()?, - invoice: self.invoice.take()?, - level3: self.level3.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - on_behalf_of: self.on_behalf_of.take()?, - outcome: self.outcome.take()?, - paid: self.paid?, - payment_intent: self.payment_intent.take()?, - payment_method: self.payment_method.take()?, - payment_method_details: self.payment_method_details.take()?, - radar_options: self.radar_options.take()?, - receipt_email: self.receipt_email.take()?, - receipt_number: self.receipt_number.take()?, - receipt_url: self.receipt_url.take()?, - refunded: self.refunded?, - refunds: self.refunds.take()?, - review: self.review.take()?, - shipping: self.shipping.take()?, - source: self.source.take()?, - source_transfer: self.source_transfer.take()?, - statement_descriptor: self.statement_descriptor.take()?, - statement_descriptor_suffix: self.statement_descriptor_suffix.take()?, - status: self.status?, - transfer: self.transfer.take()?, - transfer_data: self.transfer_data.take()?, - transfer_group: self.transfer_group.take()?, + amount, + amount_captured, + amount_refunded, + application, + application_fee, + application_fee_amount, + authorization_code, + balance_transaction, + billing_details, + calculated_statement_descriptor, + captured, + created, + currency, + customer, + description, + disputed, + failure_balance_transaction, + failure_code, + failure_message, + fraud_details, + id, + invoice, + level3, + livemode, + metadata, + on_behalf_of, + outcome, + paid, + payment_intent, + payment_method, + payment_method_details, + radar_options, + receipt_email, + receipt_number, + receipt_url, + refunded, + refunds, + review, + shipping, + source, + source_transfer, + statement_descriptor, + statement_descriptor_suffix, + status, + transfer, + transfer_data, + transfer_group, }) } } @@ -394,69 +499,63 @@ const _: () = { let mut b = ChargeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_captured" => b.amount_captured = Some(FromValueOpt::from_value(v)?), - "amount_refunded" => b.amount_refunded = Some(FromValueOpt::from_value(v)?), - "application" => b.application = Some(FromValueOpt::from_value(v)?), - "application_fee" => b.application_fee = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_captured" => b.amount_captured = FromValueOpt::from_value(v), + "amount_refunded" => b.amount_refunded = FromValueOpt::from_value(v), + "application" => b.application = FromValueOpt::from_value(v), + "application_fee" => b.application_fee = FromValueOpt::from_value(v), "application_fee_amount" => { - b.application_fee_amount = Some(FromValueOpt::from_value(v)?) - } - "authorization_code" => { - b.authorization_code = Some(FromValueOpt::from_value(v)?) + b.application_fee_amount = FromValueOpt::from_value(v) } - "balance_transaction" => { - b.balance_transaction = Some(FromValueOpt::from_value(v)?) - } - "billing_details" => b.billing_details = Some(FromValueOpt::from_value(v)?), + "authorization_code" => b.authorization_code = FromValueOpt::from_value(v), + "balance_transaction" => b.balance_transaction = FromValueOpt::from_value(v), + "billing_details" => b.billing_details = FromValueOpt::from_value(v), "calculated_statement_descriptor" => { - b.calculated_statement_descriptor = Some(FromValueOpt::from_value(v)?) + b.calculated_statement_descriptor = FromValueOpt::from_value(v) } - "captured" => b.captured = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "disputed" => b.disputed = Some(FromValueOpt::from_value(v)?), + "captured" => b.captured = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "disputed" => b.disputed = FromValueOpt::from_value(v), "failure_balance_transaction" => { - b.failure_balance_transaction = Some(FromValueOpt::from_value(v)?) + b.failure_balance_transaction = FromValueOpt::from_value(v) } - "failure_code" => b.failure_code = Some(FromValueOpt::from_value(v)?), - "failure_message" => b.failure_message = Some(FromValueOpt::from_value(v)?), - "fraud_details" => b.fraud_details = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "invoice" => b.invoice = Some(FromValueOpt::from_value(v)?), - "level3" => b.level3 = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "on_behalf_of" => b.on_behalf_of = Some(FromValueOpt::from_value(v)?), - "outcome" => b.outcome = Some(FromValueOpt::from_value(v)?), - "paid" => b.paid = Some(FromValueOpt::from_value(v)?), - "payment_intent" => b.payment_intent = Some(FromValueOpt::from_value(v)?), - "payment_method" => b.payment_method = Some(FromValueOpt::from_value(v)?), + "failure_code" => b.failure_code = FromValueOpt::from_value(v), + "failure_message" => b.failure_message = FromValueOpt::from_value(v), + "fraud_details" => b.fraud_details = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "invoice" => b.invoice = FromValueOpt::from_value(v), + "level3" => b.level3 = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "on_behalf_of" => b.on_behalf_of = FromValueOpt::from_value(v), + "outcome" => b.outcome = FromValueOpt::from_value(v), + "paid" => b.paid = FromValueOpt::from_value(v), + "payment_intent" => b.payment_intent = FromValueOpt::from_value(v), + "payment_method" => b.payment_method = FromValueOpt::from_value(v), "payment_method_details" => { - b.payment_method_details = Some(FromValueOpt::from_value(v)?) - } - "radar_options" => b.radar_options = Some(FromValueOpt::from_value(v)?), - "receipt_email" => b.receipt_email = Some(FromValueOpt::from_value(v)?), - "receipt_number" => b.receipt_number = Some(FromValueOpt::from_value(v)?), - "receipt_url" => b.receipt_url = Some(FromValueOpt::from_value(v)?), - "refunded" => b.refunded = Some(FromValueOpt::from_value(v)?), - "refunds" => b.refunds = Some(FromValueOpt::from_value(v)?), - "review" => b.review = Some(FromValueOpt::from_value(v)?), - "shipping" => b.shipping = Some(FromValueOpt::from_value(v)?), - "source" => b.source = Some(FromValueOpt::from_value(v)?), - "source_transfer" => b.source_transfer = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) + b.payment_method_details = FromValueOpt::from_value(v) } + "radar_options" => b.radar_options = FromValueOpt::from_value(v), + "receipt_email" => b.receipt_email = FromValueOpt::from_value(v), + "receipt_number" => b.receipt_number = FromValueOpt::from_value(v), + "receipt_url" => b.receipt_url = FromValueOpt::from_value(v), + "refunded" => b.refunded = FromValueOpt::from_value(v), + "refunds" => b.refunds = FromValueOpt::from_value(v), + "review" => b.review = FromValueOpt::from_value(v), + "shipping" => b.shipping = FromValueOpt::from_value(v), + "source" => b.source = FromValueOpt::from_value(v), + "source_transfer" => b.source_transfer = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), "statement_descriptor_suffix" => { - b.statement_descriptor_suffix = Some(FromValueOpt::from_value(v)?) + b.statement_descriptor_suffix = FromValueOpt::from_value(v) } - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "transfer" => b.transfer = Some(FromValueOpt::from_value(v)?), - "transfer_data" => b.transfer_data = Some(FromValueOpt::from_value(v)?), - "transfer_group" => b.transfer_group = Some(FromValueOpt::from_value(v)?), + "status" => b.status = FromValueOpt::from_value(v), + "transfer" => b.transfer = FromValueOpt::from_value(v), + "transfer_data" => b.transfer_data = FromValueOpt::from_value(v), + "transfer_group" => b.transfer_group = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/charge_fraud_details.rs b/generated/async-stripe-shared/src/charge_fraud_details.rs index 2d326361e..cdb40b60a 100644 --- a/generated/async-stripe-shared/src/charge_fraud_details.rs +++ b/generated/async-stripe-shared/src/charge_fraud_details.rs @@ -13,7 +13,12 @@ pub struct ChargeFraudDetailsBuilder { user_report: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - stripe_report: self.stripe_report.take()?, - user_report: self.user_report.take()?, - }) + let (Some(stripe_report), Some(user_report)) = + (self.stripe_report.take(), self.user_report.take()) + else { + return None; + }; + Some(Self::Out { stripe_report, user_report }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = ChargeFraudDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "stripe_report" => b.stripe_report = Some(FromValueOpt::from_value(v)?), - "user_report" => b.user_report = Some(FromValueOpt::from_value(v)?), + "stripe_report" => b.stripe_report = FromValueOpt::from_value(v), + "user_report" => b.user_report = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/charge_outcome.rs b/generated/async-stripe-shared/src/charge_outcome.rs index d4028157d..81c524a54 100644 --- a/generated/async-stripe-shared/src/charge_outcome.rs +++ b/generated/async-stripe-shared/src/charge_outcome.rs @@ -42,7 +42,12 @@ pub struct ChargeOutcomeBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -101,14 +106,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(network_status), + Some(reason), + Some(risk_level), + Some(risk_score), + Some(rule), + Some(seller_message), + Some(type_), + ) = ( + self.network_status.take(), + self.reason.take(), + self.risk_level.take(), + self.risk_score, + self.rule.take(), + self.seller_message.take(), + self.type_.take(), + ) + else { + return None; + }; Some(Self::Out { - network_status: self.network_status.take()?, - reason: self.reason.take()?, - risk_level: self.risk_level.take()?, - risk_score: self.risk_score?, - rule: self.rule.take()?, - seller_message: self.seller_message.take()?, - type_: self.type_.take()?, + network_status, + reason, + risk_level, + risk_score, + rule, + seller_message, + type_, }) } } @@ -136,13 +161,13 @@ const _: () = { let mut b = ChargeOutcomeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "network_status" => b.network_status = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), - "risk_level" => b.risk_level = Some(FromValueOpt::from_value(v)?), - "risk_score" => b.risk_score = Some(FromValueOpt::from_value(v)?), - "rule" => b.rule = Some(FromValueOpt::from_value(v)?), - "seller_message" => b.seller_message = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "network_status" => b.network_status = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), + "risk_level" => b.risk_level = FromValueOpt::from_value(v), + "risk_score" => b.risk_score = FromValueOpt::from_value(v), + "rule" => b.rule = FromValueOpt::from_value(v), + "seller_message" => b.seller_message = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/charge_transfer_data.rs b/generated/async-stripe-shared/src/charge_transfer_data.rs index 4504e2bb4..6d758d56b 100644 --- a/generated/async-stripe-shared/src/charge_transfer_data.rs +++ b/generated/async-stripe-shared/src/charge_transfer_data.rs @@ -14,7 +14,12 @@ pub struct ChargeTransferDataBuilder { destination: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { amount: self.amount?, destination: self.destination.take()? }) + let (Some(amount), Some(destination)) = (self.amount, self.destination.take()) else { + return None; + }; + Some(Self::Out { amount, destination }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = ChargeTransferDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "destination" => b.destination = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "destination" => b.destination = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/checkout_session_item.rs b/generated/async-stripe-shared/src/checkout_session_item.rs index 28217ba00..8057937e4 100644 --- a/generated/async-stripe-shared/src/checkout_session_item.rs +++ b/generated/async-stripe-shared/src/checkout_session_item.rs @@ -43,7 +43,12 @@ pub struct CheckoutSessionItemBuilder { taxes: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -110,18 +115,46 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount_discount), + Some(amount_subtotal), + Some(amount_tax), + Some(amount_total), + Some(currency), + Some(description), + Some(discounts), + Some(id), + Some(price), + Some(quantity), + Some(taxes), + ) = ( + self.amount_discount, + self.amount_subtotal, + self.amount_tax, + self.amount_total, + self.currency, + self.description.take(), + self.discounts.take(), + self.id.take(), + self.price.take(), + self.quantity, + self.taxes.take(), + ) + else { + return None; + }; Some(Self::Out { - amount_discount: self.amount_discount?, - amount_subtotal: self.amount_subtotal?, - amount_tax: self.amount_tax?, - amount_total: self.amount_total?, - currency: self.currency?, - description: self.description.take()?, - discounts: self.discounts.take()?, - id: self.id.take()?, - price: self.price.take()?, - quantity: self.quantity?, - taxes: self.taxes.take()?, + amount_discount, + amount_subtotal, + amount_tax, + amount_total, + currency, + description, + discounts, + id, + price, + quantity, + taxes, }) } } @@ -149,17 +182,17 @@ const _: () = { let mut b = CheckoutSessionItemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_discount" => b.amount_discount = Some(FromValueOpt::from_value(v)?), - "amount_subtotal" => b.amount_subtotal = Some(FromValueOpt::from_value(v)?), - "amount_tax" => b.amount_tax = Some(FromValueOpt::from_value(v)?), - "amount_total" => b.amount_total = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "discounts" => b.discounts = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "price" => b.price = Some(FromValueOpt::from_value(v)?), - "quantity" => b.quantity = Some(FromValueOpt::from_value(v)?), - "taxes" => b.taxes = Some(FromValueOpt::from_value(v)?), + "amount_discount" => b.amount_discount = FromValueOpt::from_value(v), + "amount_subtotal" => b.amount_subtotal = FromValueOpt::from_value(v), + "amount_tax" => b.amount_tax = FromValueOpt::from_value(v), + "amount_total" => b.amount_total = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "discounts" => b.discounts = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "price" => b.price = FromValueOpt::from_value(v), + "quantity" => b.quantity = FromValueOpt::from_value(v), + "taxes" => b.taxes = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/connect_account_reference.rs b/generated/async-stripe-shared/src/connect_account_reference.rs index f6aaf42f7..ff2de5d72 100644 --- a/generated/async-stripe-shared/src/connect_account_reference.rs +++ b/generated/async-stripe-shared/src/connect_account_reference.rs @@ -14,7 +14,12 @@ pub struct ConnectAccountReferenceBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { account: self.account.take()?, type_: self.type_? }) + let (Some(account), Some(type_)) = (self.account.take(), self.type_) else { + return None; + }; + Some(Self::Out { account, type_ }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = ConnectAccountReferenceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account" => b.account = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "account" => b.account = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/connect_collection_transfer.rs b/generated/async-stripe-shared/src/connect_collection_transfer.rs index d8788d43b..e476d6507 100644 --- a/generated/async-stripe-shared/src/connect_collection_transfer.rs +++ b/generated/async-stripe-shared/src/connect_collection_transfer.rs @@ -22,7 +22,12 @@ pub struct ConnectCollectionTransferBuilder { livemode: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,13 +82,16 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - currency: self.currency?, - destination: self.destination.take()?, - id: self.id.take()?, - livemode: self.livemode?, - }) + let (Some(amount), Some(currency), Some(destination), Some(id), Some(livemode)) = ( + self.amount, + self.currency, + self.destination.take(), + self.id.take(), + self.livemode, + ) else { + return None; + }; + Some(Self::Out { amount, currency, destination, id, livemode }) } } @@ -110,11 +118,11 @@ const _: () = { let mut b = ConnectCollectionTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "destination" => b.destination = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "destination" => b.destination = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/coupon.rs b/generated/async-stripe-shared/src/coupon.rs index c0fc77052..a3205c7b9 100644 --- a/generated/async-stripe-shared/src/coupon.rs +++ b/generated/async-stripe-shared/src/coupon.rs @@ -71,7 +71,12 @@ pub struct CouponBuilder { valid: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -145,23 +150,61 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount_off), + Some(applies_to), + Some(created), + Some(currency), + Some(currency_options), + Some(duration), + Some(duration_in_months), + Some(id), + Some(livemode), + Some(max_redemptions), + Some(metadata), + Some(name), + Some(percent_off), + Some(redeem_by), + Some(times_redeemed), + Some(valid), + ) = ( + self.amount_off, + self.applies_to.take(), + self.created, + self.currency, + self.currency_options.take(), + self.duration, + self.duration_in_months, + self.id.take(), + self.livemode, + self.max_redemptions, + self.metadata.take(), + self.name.take(), + self.percent_off, + self.redeem_by, + self.times_redeemed, + self.valid, + ) + else { + return None; + }; Some(Self::Out { - amount_off: self.amount_off?, - applies_to: self.applies_to.take()?, - created: self.created?, - currency: self.currency?, - currency_options: self.currency_options.take()?, - duration: self.duration?, - duration_in_months: self.duration_in_months?, - id: self.id.take()?, - livemode: self.livemode?, - max_redemptions: self.max_redemptions?, - metadata: self.metadata.take()?, - name: self.name.take()?, - percent_off: self.percent_off?, - redeem_by: self.redeem_by?, - times_redeemed: self.times_redeemed?, - valid: self.valid?, + amount_off, + applies_to, + created, + currency, + currency_options, + duration, + duration_in_months, + id, + livemode, + max_redemptions, + metadata, + name, + percent_off, + redeem_by, + times_redeemed, + valid, }) } } @@ -189,24 +232,22 @@ const _: () = { let mut b = CouponBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_off" => b.amount_off = Some(FromValueOpt::from_value(v)?), - "applies_to" => b.applies_to = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "currency_options" => b.currency_options = Some(FromValueOpt::from_value(v)?), - "duration" => b.duration = Some(FromValueOpt::from_value(v)?), - "duration_in_months" => { - b.duration_in_months = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "max_redemptions" => b.max_redemptions = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "percent_off" => b.percent_off = Some(FromValueOpt::from_value(v)?), - "redeem_by" => b.redeem_by = Some(FromValueOpt::from_value(v)?), - "times_redeemed" => b.times_redeemed = Some(FromValueOpt::from_value(v)?), - "valid" => b.valid = Some(FromValueOpt::from_value(v)?), + "amount_off" => b.amount_off = FromValueOpt::from_value(v), + "applies_to" => b.applies_to = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "currency_options" => b.currency_options = FromValueOpt::from_value(v), + "duration" => b.duration = FromValueOpt::from_value(v), + "duration_in_months" => b.duration_in_months = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "max_redemptions" => b.max_redemptions = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "percent_off" => b.percent_off = FromValueOpt::from_value(v), + "redeem_by" => b.redeem_by = FromValueOpt::from_value(v), + "times_redeemed" => b.times_redeemed = FromValueOpt::from_value(v), + "valid" => b.valid = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/coupon_applies_to.rs b/generated/async-stripe-shared/src/coupon_applies_to.rs index a6779ded5..90e0eb77b 100644 --- a/generated/async-stripe-shared/src/coupon_applies_to.rs +++ b/generated/async-stripe-shared/src/coupon_applies_to.rs @@ -10,7 +10,12 @@ pub struct CouponAppliesToBuilder { products: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { products: self.products.take()? }) + let (Some(products),) = (self.products.take(),) else { + return None; + }; + Some(Self::Out { products }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = CouponAppliesToBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "products" => b.products = Some(FromValueOpt::from_value(v)?), + "products" => b.products = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/coupon_currency_option.rs b/generated/async-stripe-shared/src/coupon_currency_option.rs index bbbc08ce0..da19baf1a 100644 --- a/generated/async-stripe-shared/src/coupon_currency_option.rs +++ b/generated/async-stripe-shared/src/coupon_currency_option.rs @@ -10,7 +10,12 @@ pub struct CouponCurrencyOptionBuilder { amount_off: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { amount_off: self.amount_off? }) + let (Some(amount_off),) = (self.amount_off,) else { + return None; + }; + Some(Self::Out { amount_off }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = CouponCurrencyOptionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_off" => b.amount_off = Some(FromValueOpt::from_value(v)?), + "amount_off" => b.amount_off = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/credit_note.rs b/generated/async-stripe-shared/src/credit_note.rs index 0f5bcd4b0..3d3c53c68 100644 --- a/generated/async-stripe-shared/src/credit_note.rs +++ b/generated/async-stripe-shared/src/credit_note.rs @@ -108,7 +108,12 @@ pub struct CreditNoteBuilder { voided_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -213,36 +218,100 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_shipping), + Some(created), + Some(currency), + Some(customer), + Some(customer_balance_transaction), + Some(discount_amount), + Some(discount_amounts), + Some(effective_at), + Some(id), + Some(invoice), + Some(lines), + Some(livemode), + Some(memo), + Some(metadata), + Some(number), + Some(out_of_band_amount), + Some(pdf), + Some(reason), + Some(refund), + Some(shipping_cost), + Some(status), + Some(subtotal), + Some(subtotal_excluding_tax), + Some(tax_amounts), + Some(total), + Some(total_excluding_tax), + Some(type_), + Some(voided_at), + ) = ( + self.amount, + self.amount_shipping, + self.created, + self.currency, + self.customer.take(), + self.customer_balance_transaction.take(), + self.discount_amount, + self.discount_amounts.take(), + self.effective_at, + self.id.take(), + self.invoice.take(), + self.lines.take(), + self.livemode, + self.memo.take(), + self.metadata.take(), + self.number.take(), + self.out_of_band_amount, + self.pdf.take(), + self.reason, + self.refund.take(), + self.shipping_cost.take(), + self.status, + self.subtotal, + self.subtotal_excluding_tax, + self.tax_amounts.take(), + self.total, + self.total_excluding_tax, + self.type_, + self.voided_at, + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_shipping: self.amount_shipping?, - created: self.created?, - currency: self.currency?, - customer: self.customer.take()?, - customer_balance_transaction: self.customer_balance_transaction.take()?, - discount_amount: self.discount_amount?, - discount_amounts: self.discount_amounts.take()?, - effective_at: self.effective_at?, - id: self.id.take()?, - invoice: self.invoice.take()?, - lines: self.lines.take()?, - livemode: self.livemode?, - memo: self.memo.take()?, - metadata: self.metadata.take()?, - number: self.number.take()?, - out_of_band_amount: self.out_of_band_amount?, - pdf: self.pdf.take()?, - reason: self.reason?, - refund: self.refund.take()?, - shipping_cost: self.shipping_cost.take()?, - status: self.status?, - subtotal: self.subtotal?, - subtotal_excluding_tax: self.subtotal_excluding_tax?, - tax_amounts: self.tax_amounts.take()?, - total: self.total?, - total_excluding_tax: self.total_excluding_tax?, - type_: self.type_?, - voided_at: self.voided_at?, + amount, + amount_shipping, + created, + currency, + customer, + customer_balance_transaction, + discount_amount, + discount_amounts, + effective_at, + id, + invoice, + lines, + livemode, + memo, + metadata, + number, + out_of_band_amount, + pdf, + reason, + refund, + shipping_cost, + status, + subtotal, + subtotal_excluding_tax, + tax_amounts, + total, + total_excluding_tax, + type_, + voided_at, }) } } @@ -270,43 +339,39 @@ const _: () = { let mut b = CreditNoteBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_shipping" => b.amount_shipping = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_shipping" => b.amount_shipping = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), "customer_balance_transaction" => { - b.customer_balance_transaction = Some(FromValueOpt::from_value(v)?) + b.customer_balance_transaction = FromValueOpt::from_value(v) } - "discount_amount" => b.discount_amount = Some(FromValueOpt::from_value(v)?), - "discount_amounts" => b.discount_amounts = Some(FromValueOpt::from_value(v)?), - "effective_at" => b.effective_at = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "invoice" => b.invoice = Some(FromValueOpt::from_value(v)?), - "lines" => b.lines = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "memo" => b.memo = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "number" => b.number = Some(FromValueOpt::from_value(v)?), - "out_of_band_amount" => { - b.out_of_band_amount = Some(FromValueOpt::from_value(v)?) - } - "pdf" => b.pdf = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), - "refund" => b.refund = Some(FromValueOpt::from_value(v)?), - "shipping_cost" => b.shipping_cost = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "subtotal" => b.subtotal = Some(FromValueOpt::from_value(v)?), + "discount_amount" => b.discount_amount = FromValueOpt::from_value(v), + "discount_amounts" => b.discount_amounts = FromValueOpt::from_value(v), + "effective_at" => b.effective_at = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "invoice" => b.invoice = FromValueOpt::from_value(v), + "lines" => b.lines = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "memo" => b.memo = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "number" => b.number = FromValueOpt::from_value(v), + "out_of_band_amount" => b.out_of_band_amount = FromValueOpt::from_value(v), + "pdf" => b.pdf = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), + "refund" => b.refund = FromValueOpt::from_value(v), + "shipping_cost" => b.shipping_cost = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "subtotal" => b.subtotal = FromValueOpt::from_value(v), "subtotal_excluding_tax" => { - b.subtotal_excluding_tax = Some(FromValueOpt::from_value(v)?) - } - "tax_amounts" => b.tax_amounts = Some(FromValueOpt::from_value(v)?), - "total" => b.total = Some(FromValueOpt::from_value(v)?), - "total_excluding_tax" => { - b.total_excluding_tax = Some(FromValueOpt::from_value(v)?) + b.subtotal_excluding_tax = FromValueOpt::from_value(v) } - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "voided_at" => b.voided_at = Some(FromValueOpt::from_value(v)?), + "tax_amounts" => b.tax_amounts = FromValueOpt::from_value(v), + "total" => b.total = FromValueOpt::from_value(v), + "total_excluding_tax" => b.total_excluding_tax = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "voided_at" => b.voided_at = FromValueOpt::from_value(v), _ => {} } 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..229c5262e 100644 --- a/generated/async-stripe-shared/src/credit_note_line_item.rs +++ b/generated/async-stripe-shared/src/credit_note_line_item.rs @@ -56,7 +56,12 @@ pub struct CreditNoteLineItemBuilder { unit_amount_excluding_tax: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -133,22 +138,58 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_excluding_tax), + Some(description), + Some(discount_amount), + Some(discount_amounts), + Some(id), + Some(invoice_line_item), + Some(livemode), + Some(quantity), + Some(tax_amounts), + Some(tax_rates), + Some(type_), + Some(unit_amount), + Some(unit_amount_decimal), + Some(unit_amount_excluding_tax), + ) = ( + self.amount, + self.amount_excluding_tax, + self.description.take(), + self.discount_amount, + self.discount_amounts.take(), + self.id.take(), + self.invoice_line_item.take(), + self.livemode, + self.quantity, + self.tax_amounts.take(), + self.tax_rates.take(), + self.type_, + self.unit_amount, + self.unit_amount_decimal.take(), + self.unit_amount_excluding_tax.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_excluding_tax: self.amount_excluding_tax?, - description: self.description.take()?, - discount_amount: self.discount_amount?, - discount_amounts: self.discount_amounts.take()?, - id: self.id.take()?, - invoice_line_item: self.invoice_line_item.take()?, - livemode: self.livemode?, - quantity: self.quantity?, - tax_amounts: self.tax_amounts.take()?, - tax_rates: self.tax_rates.take()?, - type_: self.type_?, - unit_amount: self.unit_amount?, - unit_amount_decimal: self.unit_amount_decimal.take()?, - unit_amount_excluding_tax: self.unit_amount_excluding_tax.take()?, + amount, + amount_excluding_tax, + description, + discount_amount, + discount_amounts, + id, + invoice_line_item, + livemode, + quantity, + tax_amounts, + tax_rates, + type_, + unit_amount, + unit_amount_decimal, + unit_amount_excluding_tax, }) } } @@ -176,26 +217,22 @@ const _: () = { let mut b = CreditNoteLineItemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_excluding_tax" => { - b.amount_excluding_tax = Some(FromValueOpt::from_value(v)?) - } - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "discount_amount" => b.discount_amount = Some(FromValueOpt::from_value(v)?), - "discount_amounts" => b.discount_amounts = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "invoice_line_item" => b.invoice_line_item = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "quantity" => b.quantity = Some(FromValueOpt::from_value(v)?), - "tax_amounts" => b.tax_amounts = Some(FromValueOpt::from_value(v)?), - "tax_rates" => b.tax_rates = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "unit_amount" => b.unit_amount = Some(FromValueOpt::from_value(v)?), - "unit_amount_decimal" => { - b.unit_amount_decimal = Some(FromValueOpt::from_value(v)?) - } + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_excluding_tax" => b.amount_excluding_tax = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "discount_amount" => b.discount_amount = FromValueOpt::from_value(v), + "discount_amounts" => b.discount_amounts = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "invoice_line_item" => b.invoice_line_item = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "quantity" => b.quantity = FromValueOpt::from_value(v), + "tax_amounts" => b.tax_amounts = FromValueOpt::from_value(v), + "tax_rates" => b.tax_rates = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "unit_amount" => b.unit_amount = FromValueOpt::from_value(v), + "unit_amount_decimal" => b.unit_amount_decimal = FromValueOpt::from_value(v), "unit_amount_excluding_tax" => { - b.unit_amount_excluding_tax = Some(FromValueOpt::from_value(v)?) + b.unit_amount_excluding_tax = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/credit_note_tax_amount.rs b/generated/async-stripe-shared/src/credit_note_tax_amount.rs index 4d3cd6572..b389dafe5 100644 --- a/generated/async-stripe-shared/src/credit_note_tax_amount.rs +++ b/generated/async-stripe-shared/src/credit_note_tax_amount.rs @@ -23,7 +23,12 @@ pub struct CreditNoteTaxAmountBuilder { taxable_amount: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -78,13 +83,23 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - inclusive: self.inclusive?, - tax_rate: self.tax_rate.take()?, - taxability_reason: self.taxability_reason?, - taxable_amount: self.taxable_amount?, - }) + let ( + Some(amount), + Some(inclusive), + Some(tax_rate), + Some(taxability_reason), + Some(taxable_amount), + ) = ( + self.amount, + self.inclusive, + self.tax_rate.take(), + self.taxability_reason, + self.taxable_amount, + ) + else { + return None; + }; + Some(Self::Out { amount, inclusive, tax_rate, taxability_reason, taxable_amount }) } } @@ -111,11 +126,11 @@ const _: () = { let mut b = CreditNoteTaxAmountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "inclusive" => b.inclusive = Some(FromValueOpt::from_value(v)?), - "tax_rate" => b.tax_rate = Some(FromValueOpt::from_value(v)?), - "taxability_reason" => b.taxability_reason = Some(FromValueOpt::from_value(v)?), - "taxable_amount" => b.taxable_amount = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "inclusive" => b.inclusive = FromValueOpt::from_value(v), + "tax_rate" => b.tax_rate = FromValueOpt::from_value(v), + "taxability_reason" => b.taxability_reason = FromValueOpt::from_value(v), + "taxable_amount" => b.taxable_amount = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/currency_option.rs b/generated/async-stripe-shared/src/currency_option.rs index 0122d8a52..787a9f286 100644 --- a/generated/async-stripe-shared/src/currency_option.rs +++ b/generated/async-stripe-shared/src/currency_option.rs @@ -29,7 +29,12 @@ pub struct CurrencyOptionBuilder { unit_amount_decimal: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -84,12 +89,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(custom_unit_amount), + Some(tax_behavior), + Some(tiers), + Some(unit_amount), + Some(unit_amount_decimal), + ) = ( + self.custom_unit_amount, + self.tax_behavior, + self.tiers.take(), + self.unit_amount, + self.unit_amount_decimal.take(), + ) + else { + return None; + }; Some(Self::Out { - custom_unit_amount: self.custom_unit_amount?, - tax_behavior: self.tax_behavior?, - tiers: self.tiers.take()?, - unit_amount: self.unit_amount?, - unit_amount_decimal: self.unit_amount_decimal.take()?, + custom_unit_amount, + tax_behavior, + tiers, + unit_amount, + unit_amount_decimal, }) } } @@ -117,15 +138,11 @@ const _: () = { let mut b = CurrencyOptionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "custom_unit_amount" => { - b.custom_unit_amount = Some(FromValueOpt::from_value(v)?) - } - "tax_behavior" => b.tax_behavior = Some(FromValueOpt::from_value(v)?), - "tiers" => b.tiers = Some(FromValueOpt::from_value(v)?), - "unit_amount" => b.unit_amount = Some(FromValueOpt::from_value(v)?), - "unit_amount_decimal" => { - b.unit_amount_decimal = Some(FromValueOpt::from_value(v)?) - } + "custom_unit_amount" => b.custom_unit_amount = FromValueOpt::from_value(v), + "tax_behavior" => b.tax_behavior = FromValueOpt::from_value(v), + "tiers" => b.tiers = FromValueOpt::from_value(v), + "unit_amount" => b.unit_amount = FromValueOpt::from_value(v), + "unit_amount_decimal" => b.unit_amount_decimal = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/custom_unit_amount.rs b/generated/async-stripe-shared/src/custom_unit_amount.rs index a978b3395..45986f002 100644 --- a/generated/async-stripe-shared/src/custom_unit_amount.rs +++ b/generated/async-stripe-shared/src/custom_unit_amount.rs @@ -17,7 +17,12 @@ pub struct CustomUnitAmountBuilder { preset: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,7 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { maximum: self.maximum?, minimum: self.minimum?, preset: self.preset? }) + let (Some(maximum), Some(minimum), Some(preset)) = + (self.maximum, self.minimum, self.preset) + else { + return None; + }; + Some(Self::Out { maximum, minimum, preset }) } } @@ -95,9 +105,9 @@ const _: () = { let mut b = CustomUnitAmountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "maximum" => b.maximum = Some(FromValueOpt::from_value(v)?), - "minimum" => b.minimum = Some(FromValueOpt::from_value(v)?), - "preset" => b.preset = Some(FromValueOpt::from_value(v)?), + "maximum" => b.maximum = FromValueOpt::from_value(v), + "minimum" => b.minimum = FromValueOpt::from_value(v), + "preset" => b.preset = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/customer.rs b/generated/async-stripe-shared/src/customer.rs index 7c9498db3..0d1225ad1 100644 --- a/generated/async-stripe-shared/src/customer.rs +++ b/generated/async-stripe-shared/src/customer.rs @@ -114,7 +114,12 @@ pub struct CustomerBuilder { test_clock: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -210,34 +215,94 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(address), + Some(balance), + Some(cash_balance), + Some(created), + Some(currency), + Some(default_source), + Some(delinquent), + Some(description), + Some(discount), + Some(email), + Some(id), + Some(invoice_credit_balance), + Some(invoice_prefix), + Some(invoice_settings), + Some(livemode), + Some(metadata), + Some(name), + Some(next_invoice_sequence), + Some(phone), + Some(preferred_locales), + Some(shipping), + Some(sources), + Some(subscriptions), + Some(tax), + Some(tax_exempt), + Some(tax_ids), + Some(test_clock), + ) = ( + self.address.take(), + self.balance, + self.cash_balance.take(), + self.created, + self.currency, + self.default_source.take(), + self.delinquent, + self.description.take(), + self.discount.take(), + self.email.take(), + self.id.take(), + self.invoice_credit_balance.take(), + self.invoice_prefix.take(), + self.invoice_settings.take(), + self.livemode, + self.metadata.take(), + self.name.take(), + self.next_invoice_sequence, + self.phone.take(), + self.preferred_locales.take(), + self.shipping.take(), + self.sources.take(), + self.subscriptions.take(), + self.tax.take(), + self.tax_exempt, + self.tax_ids.take(), + self.test_clock.take(), + ) + else { + return None; + }; Some(Self::Out { - address: self.address.take()?, - balance: self.balance?, - cash_balance: self.cash_balance.take()?, - created: self.created?, - currency: self.currency?, - default_source: self.default_source.take()?, - delinquent: self.delinquent?, - description: self.description.take()?, - discount: self.discount.take()?, - email: self.email.take()?, - id: self.id.take()?, - invoice_credit_balance: self.invoice_credit_balance.take()?, - invoice_prefix: self.invoice_prefix.take()?, - invoice_settings: self.invoice_settings.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - name: self.name.take()?, - next_invoice_sequence: self.next_invoice_sequence?, - phone: self.phone.take()?, - preferred_locales: self.preferred_locales.take()?, - shipping: self.shipping.take()?, - sources: self.sources.take()?, - subscriptions: self.subscriptions.take()?, - tax: self.tax.take()?, - tax_exempt: self.tax_exempt?, - tax_ids: self.tax_ids.take()?, - test_clock: self.test_clock.take()?, + address, + balance, + cash_balance, + created, + currency, + default_source, + delinquent, + description, + discount, + email, + id, + invoice_credit_balance, + invoice_prefix, + invoice_settings, + livemode, + metadata, + name, + next_invoice_sequence, + phone, + preferred_locales, + shipping, + sources, + subscriptions, + tax, + tax_exempt, + tax_ids, + test_clock, }) } } @@ -265,37 +330,37 @@ const _: () = { let mut b = CustomerBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), - "balance" => b.balance = Some(FromValueOpt::from_value(v)?), - "cash_balance" => b.cash_balance = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "default_source" => b.default_source = Some(FromValueOpt::from_value(v)?), - "delinquent" => b.delinquent = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "discount" => b.discount = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), + "balance" => b.balance = FromValueOpt::from_value(v), + "cash_balance" => b.cash_balance = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "default_source" => b.default_source = FromValueOpt::from_value(v), + "delinquent" => b.delinquent = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "discount" => b.discount = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), "invoice_credit_balance" => { - b.invoice_credit_balance = Some(FromValueOpt::from_value(v)?) + b.invoice_credit_balance = FromValueOpt::from_value(v) } - "invoice_prefix" => b.invoice_prefix = Some(FromValueOpt::from_value(v)?), - "invoice_settings" => b.invoice_settings = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), + "invoice_prefix" => b.invoice_prefix = FromValueOpt::from_value(v), + "invoice_settings" => b.invoice_settings = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), "next_invoice_sequence" => { - b.next_invoice_sequence = Some(FromValueOpt::from_value(v)?) + b.next_invoice_sequence = FromValueOpt::from_value(v) } - "phone" => b.phone = Some(FromValueOpt::from_value(v)?), - "preferred_locales" => b.preferred_locales = Some(FromValueOpt::from_value(v)?), - "shipping" => b.shipping = Some(FromValueOpt::from_value(v)?), - "sources" => b.sources = Some(FromValueOpt::from_value(v)?), - "subscriptions" => b.subscriptions = Some(FromValueOpt::from_value(v)?), - "tax" => b.tax = Some(FromValueOpt::from_value(v)?), - "tax_exempt" => b.tax_exempt = Some(FromValueOpt::from_value(v)?), - "tax_ids" => b.tax_ids = Some(FromValueOpt::from_value(v)?), - "test_clock" => b.test_clock = Some(FromValueOpt::from_value(v)?), + "phone" => b.phone = FromValueOpt::from_value(v), + "preferred_locales" => b.preferred_locales = FromValueOpt::from_value(v), + "shipping" => b.shipping = FromValueOpt::from_value(v), + "sources" => b.sources = FromValueOpt::from_value(v), + "subscriptions" => b.subscriptions = FromValueOpt::from_value(v), + "tax" => b.tax = FromValueOpt::from_value(v), + "tax_exempt" => b.tax_exempt = FromValueOpt::from_value(v), + "tax_ids" => b.tax_ids = FromValueOpt::from_value(v), + "test_clock" => b.test_clock = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/customer_acceptance.rs b/generated/async-stripe-shared/src/customer_acceptance.rs index 7f53ac127..74bf44386 100644 --- a/generated/async-stripe-shared/src/customer_acceptance.rs +++ b/generated/async-stripe-shared/src/customer_acceptance.rs @@ -18,7 +18,12 @@ pub struct CustomerAcceptanceBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -71,12 +76,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - accepted_at: self.accepted_at?, - offline: self.offline?, - online: self.online.take()?, - type_: self.type_?, - }) + let (Some(accepted_at), Some(offline), Some(online), Some(type_)) = + (self.accepted_at, self.offline, self.online.take(), self.type_) + else { + return None; + }; + Some(Self::Out { accepted_at, offline, online, type_ }) } } @@ -103,10 +108,10 @@ const _: () = { let mut b = CustomerAcceptanceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "accepted_at" => b.accepted_at = Some(FromValueOpt::from_value(v)?), - "offline" => b.offline = Some(FromValueOpt::from_value(v)?), - "online" => b.online = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "accepted_at" => b.accepted_at = FromValueOpt::from_value(v), + "offline" => b.offline = FromValueOpt::from_value(v), + "online" => b.online = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/customer_balance_customer_balance_settings.rs b/generated/async-stripe-shared/src/customer_balance_customer_balance_settings.rs index c5c406714..726d03af1 100644 --- a/generated/async-stripe-shared/src/customer_balance_customer_balance_settings.rs +++ b/generated/async-stripe-shared/src/customer_balance_customer_balance_settings.rs @@ -13,7 +13,12 @@ pub struct CustomerBalanceCustomerBalanceSettingsBuilder { using_merchant_default: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,10 +67,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - reconciliation_mode: self.reconciliation_mode?, - using_merchant_default: self.using_merchant_default?, - }) + let (Some(reconciliation_mode), Some(using_merchant_default)) = + (self.reconciliation_mode, self.using_merchant_default) + else { + return None; + }; + Some(Self::Out { reconciliation_mode, using_merchant_default }) } } @@ -92,11 +99,9 @@ const _: () = { let mut b = CustomerBalanceCustomerBalanceSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "reconciliation_mode" => { - b.reconciliation_mode = Some(FromValueOpt::from_value(v)?) - } + "reconciliation_mode" => b.reconciliation_mode = FromValueOpt::from_value(v), "using_merchant_default" => { - b.using_merchant_default = Some(FromValueOpt::from_value(v)?) + b.using_merchant_default = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft.rs index b23a4011e..9831bf6d6 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft.rs @@ -14,7 +14,12 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverd Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,10 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - balance_transaction: self.balance_transaction.take()?, - linked_transaction: self.linked_transaction.take()?, - }) + let (Some(balance_transaction), Some(linked_transaction)) = + (self.balance_transaction.take(), self.linked_transaction.take()) + else { + return None; + }; + Some(Self::Out { balance_transaction, linked_transaction }) } } @@ -98,12 +105,8 @@ const _: () = { let mut b = CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraftBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "balance_transaction" => { - b.balance_transaction = Some(FromValueOpt::from_value(v)?) - } - "linked_transaction" => { - b.linked_transaction = Some(FromValueOpt::from_value(v)?) - } + "balance_transaction" => b.balance_transaction = FromValueOpt::from_value(v), + "linked_transaction" => b.linked_transaction = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction.rs index 9af21a07e..6035bde4c 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction.rs @@ -10,7 +10,12 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPayment payment_intent: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -64,7 +69,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { payment_intent: self.payment_intent.take()? }) + let (Some(payment_intent),) = (self.payment_intent.take(),) else { + return None; + }; + Some(Self::Out { payment_intent }) } } @@ -96,7 +104,7 @@ const _: () = { let mut b = CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransactionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "payment_intent" => b.payment_intent = Some(FromValueOpt::from_value(v)?), + "payment_intent" => b.payment_intent = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction.rs index 44af712b6..1b840acb6 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction.rs @@ -11,7 +11,12 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactio } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { bank_transfer: self.bank_transfer.take()? }) + let (Some(bank_transfer),) = (self.bank_transfer.take(),) else { + return None; + }; + Some(Self::Out { bank_transfer }) } } @@ -84,7 +92,7 @@ const _: () = { let mut b = CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_transfer" => b.bank_transfer = Some(FromValueOpt::from_value(v)?), + "bank_transfer" => b.bank_transfer = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer.rs index 89e2d9380..b435e44ca 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer.rs @@ -25,7 +25,12 @@ us_bank_transfer: Option Option { - Some(Self::Out { eu_bank_transfer: self.eu_bank_transfer.take()?, -gb_bank_transfer: self.gb_bank_transfer.take()?, -jp_bank_transfer: self.jp_bank_transfer.take()?, -reference: self.reference.take()?, -type_: self.type_?, -us_bank_transfer: self.us_bank_transfer.take()?, - }) + let (Some(eu_bank_transfer), +Some(gb_bank_transfer), +Some(jp_bank_transfer), +Some(reference), +Some(type_), +Some(us_bank_transfer), +) = (self.eu_bank_transfer.take(), +self.gb_bank_transfer.take(), +self.jp_bank_transfer.take(), +self.reference.take(), +self.type_, +self.us_bank_transfer.take(), +) else { + return None; + }; + Some(Self::Out { eu_bank_transfer,gb_bank_transfer,jp_bank_transfer,reference,type_,us_bank_transfer }) } } @@ -116,12 +130,12 @@ us_bank_transfer: self.us_bank_transfer.take()?, let mut b = CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "eu_bank_transfer" => b.eu_bank_transfer = Some(FromValueOpt::from_value(v)?), -"gb_bank_transfer" => b.gb_bank_transfer = Some(FromValueOpt::from_value(v)?), -"jp_bank_transfer" => b.jp_bank_transfer = Some(FromValueOpt::from_value(v)?), -"reference" => b.reference = Some(FromValueOpt::from_value(v)?), -"type" => b.type_ = Some(FromValueOpt::from_value(v)?), -"us_bank_transfer" => b.us_bank_transfer = Some(FromValueOpt::from_value(v)?), + "eu_bank_transfer" => b.eu_bank_transfer = FromValueOpt::from_value(v), +"gb_bank_transfer" => b.gb_bank_transfer = FromValueOpt::from_value(v), +"jp_bank_transfer" => b.jp_bank_transfer = FromValueOpt::from_value(v), +"reference" => b.reference = FromValueOpt::from_value(v), +"type" => b.type_ = FromValueOpt::from_value(v), +"us_bank_transfer" => b.us_bank_transfer = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer.rs index da68104a4..e46d16c7d 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer.rs @@ -18,7 +18,12 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactio sender_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,10 +75,16 @@ sender_name: Deserialize::default(), } fn take_out(&mut self) -> Option { - Some(Self::Out { bic: self.bic.take()?, -iban_last4: self.iban_last4.take()?, -sender_name: self.sender_name.take()?, - }) + let (Some(bic), +Some(iban_last4), +Some(sender_name), +) = (self.bic.take(), +self.iban_last4.take(), +self.sender_name.take(), +) else { + return None; + }; + Some(Self::Out { bic,iban_last4,sender_name }) } } @@ -100,9 +111,9 @@ sender_name: self.sender_name.take()?, let mut b = CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), -"iban_last4" => b.iban_last4 = Some(FromValueOpt::from_value(v)?), -"sender_name" => b.sender_name = Some(FromValueOpt::from_value(v)?), + "bic" => b.bic = FromValueOpt::from_value(v), +"iban_last4" => b.iban_last4 = FromValueOpt::from_value(v), +"sender_name" => b.sender_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_gb_bank_transfer.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_gb_bank_transfer.rs index f0a494afc..ad6bdad6b 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_gb_bank_transfer.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_gb_bank_transfer.rs @@ -18,7 +18,12 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactio sort_code: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,10 +75,16 @@ sort_code: Deserialize::default(), } fn take_out(&mut self) -> Option { - Some(Self::Out { account_number_last4: self.account_number_last4.take()?, -sender_name: self.sender_name.take()?, -sort_code: self.sort_code.take()?, - }) + let (Some(account_number_last4), +Some(sender_name), +Some(sort_code), +) = (self.account_number_last4.take(), +self.sender_name.take(), +self.sort_code.take(), +) else { + return None; + }; + Some(Self::Out { account_number_last4,sender_name,sort_code }) } } @@ -100,9 +111,9 @@ sort_code: self.sort_code.take()?, let mut b = CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_number_last4" => b.account_number_last4 = Some(FromValueOpt::from_value(v)?), -"sender_name" => b.sender_name = Some(FromValueOpt::from_value(v)?), -"sort_code" => b.sort_code = Some(FromValueOpt::from_value(v)?), + "account_number_last4" => b.account_number_last4 = FromValueOpt::from_value(v), +"sender_name" => b.sender_name = FromValueOpt::from_value(v), +"sort_code" => b.sort_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_jp_bank_transfer.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_jp_bank_transfer.rs index 4f4973745..308246538 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_jp_bank_transfer.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_jp_bank_transfer.rs @@ -18,7 +18,12 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactio sender_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,10 +75,16 @@ sender_name: Deserialize::default(), } fn take_out(&mut self) -> Option { - Some(Self::Out { sender_bank: self.sender_bank.take()?, -sender_branch: self.sender_branch.take()?, -sender_name: self.sender_name.take()?, - }) + let (Some(sender_bank), +Some(sender_branch), +Some(sender_name), +) = (self.sender_bank.take(), +self.sender_branch.take(), +self.sender_name.take(), +) else { + return None; + }; + Some(Self::Out { sender_bank,sender_branch,sender_name }) } } @@ -100,9 +111,9 @@ sender_name: self.sender_name.take()?, let mut b = CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "sender_bank" => b.sender_bank = Some(FromValueOpt::from_value(v)?), -"sender_branch" => b.sender_branch = Some(FromValueOpt::from_value(v)?), -"sender_name" => b.sender_name = Some(FromValueOpt::from_value(v)?), + "sender_bank" => b.sender_bank = FromValueOpt::from_value(v), +"sender_branch" => b.sender_branch = FromValueOpt::from_value(v), +"sender_name" => b.sender_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_us_bank_transfer.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_us_bank_transfer.rs index af9ee1aa1..4adb13265 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_us_bank_transfer.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_us_bank_transfer.rs @@ -15,7 +15,12 @@ sender_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -65,9 +70,14 @@ sender_name: Deserialize::default(), } fn take_out(&mut self) -> Option { - Some(Self::Out { network: self.network?, -sender_name: self.sender_name.take()?, - }) + let (Some(network), +Some(sender_name), +) = (self.network, +self.sender_name.take(), +) else { + return None; + }; + Some(Self::Out { network,sender_name }) } } @@ -94,8 +104,8 @@ sender_name: self.sender_name.take()?, let mut b = CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "network" => b.network = Some(FromValueOpt::from_value(v)?), -"sender_name" => b.sender_name = Some(FromValueOpt::from_value(v)?), + "network" => b.network = FromValueOpt::from_value(v), +"sender_name" => b.sender_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction.rs index 17a71cf4c..b3dd52dd7 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction.rs @@ -11,7 +11,12 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaym refund: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -65,8 +70,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { refund: self.refund.take()?, - }) + let (Some(refund), +) = (self.refund.take(), +) else { + return None; + }; + Some(Self::Out { refund }) } } @@ -97,7 +106,7 @@ const _: () = { let mut b = CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransactionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "refund" => b.refund = Some(FromValueOpt::from_value(v)?), + "refund" => b.refund = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance.rs index 97f2dffc3..cdec70c71 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance.rs @@ -10,7 +10,12 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBal balance_transaction: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { balance_transaction: self.balance_transaction.take()? }) + let (Some(balance_transaction),) = (self.balance_transaction.take(),) else { + return None; + }; + Some(Self::Out { balance_transaction }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalanceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "balance_transaction" => { - b.balance_transaction = Some(FromValueOpt::from_value(v)?) - } + "balance_transaction" => b.balance_transaction = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction.rs index 5799588ec..a138ae0be 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction.rs @@ -11,7 +11,12 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPay payment_intent: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -65,8 +70,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { payment_intent: self.payment_intent.take()?, - }) + let (Some(payment_intent), +) = (self.payment_intent.take(), +) else { + return None; + }; + Some(Self::Out { payment_intent }) } } @@ -97,7 +106,7 @@ const _: () = { let mut b = CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransactionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "payment_intent" => b.payment_intent = Some(FromValueOpt::from_value(v)?), + "payment_intent" => b.payment_intent = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/customer_balance_transaction.rs b/generated/async-stripe-shared/src/customer_balance_transaction.rs index 38b86f60f..3f2db124c 100644 --- a/generated/async-stripe-shared/src/customer_balance_transaction.rs +++ b/generated/async-stripe-shared/src/customer_balance_transaction.rs @@ -57,7 +57,12 @@ pub struct CustomerBalanceTransactionBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -126,19 +131,49 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(created), + Some(credit_note), + Some(currency), + Some(customer), + Some(description), + Some(ending_balance), + Some(id), + Some(invoice), + Some(livemode), + Some(metadata), + Some(type_), + ) = ( + self.amount, + self.created, + self.credit_note.take(), + self.currency, + self.customer.take(), + self.description.take(), + self.ending_balance, + self.id.take(), + self.invoice.take(), + self.livemode, + self.metadata.take(), + self.type_, + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - created: self.created?, - credit_note: self.credit_note.take()?, - currency: self.currency?, - customer: self.customer.take()?, - description: self.description.take()?, - ending_balance: self.ending_balance?, - id: self.id.take()?, - invoice: self.invoice.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - type_: self.type_?, + amount, + created, + credit_note, + currency, + customer, + description, + ending_balance, + id, + invoice, + livemode, + metadata, + type_, }) } } @@ -166,18 +201,18 @@ const _: () = { let mut b = CustomerBalanceTransactionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "credit_note" => b.credit_note = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "ending_balance" => b.ending_balance = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "invoice" => b.invoice = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "credit_note" => b.credit_note = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "ending_balance" => b.ending_balance = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "invoice" => b.invoice = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } 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..927463bc5 100644 --- a/generated/async-stripe-shared/src/customer_cash_balance_transaction.rs +++ b/generated/async-stripe-shared/src/customer_cash_balance_transaction.rs @@ -58,7 +58,12 @@ unapplied_from_payment: Option Option { + let ( + Some(adjusted_for_overdraft), + Some(applied_to_payment), + Some(created), + Some(currency), + Some(customer), + Some(ending_balance), + Some(funded), + Some(id), + Some(livemode), + Some(net_amount), + Some(refunded_from_payment), + Some(transferred_to_balance), + Some(type_), + Some(unapplied_from_payment), + ) = ( + self.adjusted_for_overdraft.take(), + self.applied_to_payment.take(), + self.created, + self.currency, + self.customer.take(), + self.ending_balance, + self.funded.take(), + self.id.take(), + self.livemode, + self.net_amount, + self.refunded_from_payment.take(), + self.transferred_to_balance.take(), + self.type_, + self.unapplied_from_payment.take(), + ) + else { + return None; + }; Some(Self::Out { - adjusted_for_overdraft: self.adjusted_for_overdraft.take()?, - applied_to_payment: self.applied_to_payment.take()?, - created: self.created?, - currency: self.currency?, - customer: self.customer.take()?, - ending_balance: self.ending_balance?, - funded: self.funded.take()?, - id: self.id.take()?, - livemode: self.livemode?, - net_amount: self.net_amount?, - refunded_from_payment: self.refunded_from_payment.take()?, - transferred_to_balance: self.transferred_to_balance.take()?, - type_: self.type_?, - unapplied_from_payment: self.unapplied_from_payment.take()?, + adjusted_for_overdraft, + applied_to_payment, + created, + currency, + customer, + ending_balance, + funded, + id, + livemode, + net_amount, + refunded_from_payment, + transferred_to_balance, + type_, + unapplied_from_payment, }) } } @@ -174,28 +213,26 @@ const _: () = { for (k, v) in obj { match k.as_str() { "adjusted_for_overdraft" => { - b.adjusted_for_overdraft = Some(FromValueOpt::from_value(v)?) - } - "applied_to_payment" => { - b.applied_to_payment = Some(FromValueOpt::from_value(v)?) + b.adjusted_for_overdraft = FromValueOpt::from_value(v) } - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "ending_balance" => b.ending_balance = Some(FromValueOpt::from_value(v)?), - "funded" => b.funded = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "net_amount" => b.net_amount = Some(FromValueOpt::from_value(v)?), + "applied_to_payment" => b.applied_to_payment = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "ending_balance" => b.ending_balance = FromValueOpt::from_value(v), + "funded" => b.funded = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "net_amount" => b.net_amount = FromValueOpt::from_value(v), "refunded_from_payment" => { - b.refunded_from_payment = Some(FromValueOpt::from_value(v)?) + b.refunded_from_payment = FromValueOpt::from_value(v) } "transferred_to_balance" => { - b.transferred_to_balance = Some(FromValueOpt::from_value(v)?) + b.transferred_to_balance = FromValueOpt::from_value(v) } - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "type" => b.type_ = FromValueOpt::from_value(v), "unapplied_from_payment" => { - b.unapplied_from_payment = Some(FromValueOpt::from_value(v)?) + b.unapplied_from_payment = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/customer_tax.rs b/generated/async-stripe-shared/src/customer_tax.rs index b183d4d0b..46963ec51 100644 --- a/generated/async-stripe-shared/src/customer_tax.rs +++ b/generated/async-stripe-shared/src/customer_tax.rs @@ -16,7 +16,12 @@ pub struct CustomerTaxBuilder { location: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - automatic_tax: self.automatic_tax?, - ip_address: self.ip_address.take()?, - location: self.location.take()?, - }) + let (Some(automatic_tax), Some(ip_address), Some(location)) = + (self.automatic_tax, self.ip_address.take(), self.location.take()) + else { + return None; + }; + Some(Self::Out { automatic_tax, ip_address, location }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = CustomerTaxBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "automatic_tax" => b.automatic_tax = Some(FromValueOpt::from_value(v)?), - "ip_address" => b.ip_address = Some(FromValueOpt::from_value(v)?), - "location" => b.location = Some(FromValueOpt::from_value(v)?), + "automatic_tax" => b.automatic_tax = FromValueOpt::from_value(v), + "ip_address" => b.ip_address = FromValueOpt::from_value(v), + "location" => b.location = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/customer_tax_location.rs b/generated/async-stripe-shared/src/customer_tax_location.rs index 5bcda6df9..d6258a05c 100644 --- a/generated/async-stripe-shared/src/customer_tax_location.rs +++ b/generated/async-stripe-shared/src/customer_tax_location.rs @@ -16,7 +16,12 @@ pub struct CustomerTaxLocationBuilder { state: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - country: self.country.take()?, - source: self.source?, - state: self.state.take()?, - }) + let (Some(country), Some(source), Some(state)) = + (self.country.take(), self.source, self.state.take()) + else { + return None; + }; + Some(Self::Out { country, source, state }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = CustomerTaxLocationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "source" => b.source = Some(FromValueOpt::from_value(v)?), - "state" => b.state = Some(FromValueOpt::from_value(v)?), + "country" => b.country = FromValueOpt::from_value(v), + "source" => b.source = FromValueOpt::from_value(v), + "state" => b.state = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/deleted_account.rs b/generated/async-stripe-shared/src/deleted_account.rs index 99c389f25..c22fe8cda 100644 --- a/generated/async-stripe-shared/src/deleted_account.rs +++ b/generated/async-stripe-shared/src/deleted_account.rs @@ -12,7 +12,12 @@ pub struct DeletedAccountBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/deleted_bank_account.rs b/generated/async-stripe-shared/src/deleted_bank_account.rs index fc12b52f0..625701b74 100644 --- a/generated/async-stripe-shared/src/deleted_bank_account.rs +++ b/generated/async-stripe-shared/src/deleted_bank_account.rs @@ -15,7 +15,12 @@ pub struct DeletedBankAccountBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -66,11 +71,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - currency: self.currency?, - deleted: self.deleted?, - id: self.id.take()?, - }) + let (Some(currency), Some(deleted), Some(id)) = + (self.currency, self.deleted, self.id.take()) + else { + return None; + }; + Some(Self::Out { currency, deleted, id }) } } @@ -97,9 +103,9 @@ const _: () = { let mut b = DeletedBankAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "currency" => b.currency = FromValueOpt::from_value(v), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/deleted_card.rs b/generated/async-stripe-shared/src/deleted_card.rs index 2474c9f04..a1d03cf18 100644 --- a/generated/async-stripe-shared/src/deleted_card.rs +++ b/generated/async-stripe-shared/src/deleted_card.rs @@ -15,7 +15,12 @@ pub struct DeletedCardBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -66,11 +71,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - currency: self.currency?, - deleted: self.deleted?, - id: self.id.take()?, - }) + let (Some(currency), Some(deleted), Some(id)) = + (self.currency, self.deleted, self.id.take()) + else { + return None; + }; + Some(Self::Out { currency, deleted, id }) } } @@ -97,9 +103,9 @@ const _: () = { let mut b = DeletedCardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "currency" => b.currency = FromValueOpt::from_value(v), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/deleted_coupon.rs b/generated/async-stripe-shared/src/deleted_coupon.rs index 12e41af96..873517101 100644 --- a/generated/async-stripe-shared/src/deleted_coupon.rs +++ b/generated/async-stripe-shared/src/deleted_coupon.rs @@ -12,7 +12,12 @@ pub struct DeletedCouponBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedCouponBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/deleted_customer.rs b/generated/async-stripe-shared/src/deleted_customer.rs index e03c93ceb..b75c4c164 100644 --- a/generated/async-stripe-shared/src/deleted_customer.rs +++ b/generated/async-stripe-shared/src/deleted_customer.rs @@ -12,7 +12,12 @@ pub struct DeletedCustomerBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedCustomerBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/deleted_discount.rs b/generated/async-stripe-shared/src/deleted_discount.rs index c8de0d016..0480e5c2e 100644 --- a/generated/async-stripe-shared/src/deleted_discount.rs +++ b/generated/async-stripe-shared/src/deleted_discount.rs @@ -41,7 +41,12 @@ pub struct DeletedDiscountBuilder { subscription_item: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -108,18 +113,46 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(checkout_session), + Some(coupon), + Some(customer), + Some(deleted), + Some(id), + Some(invoice), + Some(invoice_item), + Some(promotion_code), + Some(start), + Some(subscription), + Some(subscription_item), + ) = ( + self.checkout_session.take(), + self.coupon.take(), + self.customer.take(), + self.deleted, + self.id.take(), + self.invoice.take(), + self.invoice_item.take(), + self.promotion_code.take(), + self.start, + self.subscription.take(), + self.subscription_item.take(), + ) + else { + return None; + }; Some(Self::Out { - checkout_session: self.checkout_session.take()?, - coupon: self.coupon.take()?, - customer: self.customer.take()?, - deleted: self.deleted?, - id: self.id.take()?, - invoice: self.invoice.take()?, - invoice_item: self.invoice_item.take()?, - promotion_code: self.promotion_code.take()?, - start: self.start?, - subscription: self.subscription.take()?, - subscription_item: self.subscription_item.take()?, + checkout_session, + coupon, + customer, + deleted, + id, + invoice, + invoice_item, + promotion_code, + start, + subscription, + subscription_item, }) } } @@ -147,17 +180,17 @@ const _: () = { let mut b = DeletedDiscountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "checkout_session" => b.checkout_session = Some(FromValueOpt::from_value(v)?), - "coupon" => b.coupon = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "invoice" => b.invoice = Some(FromValueOpt::from_value(v)?), - "invoice_item" => b.invoice_item = Some(FromValueOpt::from_value(v)?), - "promotion_code" => b.promotion_code = Some(FromValueOpt::from_value(v)?), - "start" => b.start = Some(FromValueOpt::from_value(v)?), - "subscription" => b.subscription = Some(FromValueOpt::from_value(v)?), - "subscription_item" => b.subscription_item = Some(FromValueOpt::from_value(v)?), + "checkout_session" => b.checkout_session = FromValueOpt::from_value(v), + "coupon" => b.coupon = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "invoice" => b.invoice = FromValueOpt::from_value(v), + "invoice_item" => b.invoice_item = FromValueOpt::from_value(v), + "promotion_code" => b.promotion_code = FromValueOpt::from_value(v), + "start" => b.start = FromValueOpt::from_value(v), + "subscription" => b.subscription = FromValueOpt::from_value(v), + "subscription_item" => b.subscription_item = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/deleted_invoice.rs b/generated/async-stripe-shared/src/deleted_invoice.rs index 4aa059252..c2f7294c5 100644 --- a/generated/async-stripe-shared/src/deleted_invoice.rs +++ b/generated/async-stripe-shared/src/deleted_invoice.rs @@ -12,7 +12,12 @@ pub struct DeletedInvoiceBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedInvoiceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/deleted_invoiceitem.rs b/generated/async-stripe-shared/src/deleted_invoiceitem.rs index 0bc8c3050..9b1e12e59 100644 --- a/generated/async-stripe-shared/src/deleted_invoiceitem.rs +++ b/generated/async-stripe-shared/src/deleted_invoiceitem.rs @@ -12,7 +12,12 @@ pub struct DeletedInvoiceitemBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedInvoiceitemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/deleted_person.rs b/generated/async-stripe-shared/src/deleted_person.rs index 5775355f5..1048d1afd 100644 --- a/generated/async-stripe-shared/src/deleted_person.rs +++ b/generated/async-stripe-shared/src/deleted_person.rs @@ -12,7 +12,12 @@ pub struct DeletedPersonBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedPersonBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/deleted_plan.rs b/generated/async-stripe-shared/src/deleted_plan.rs index f4413efcd..978f5bb4d 100644 --- a/generated/async-stripe-shared/src/deleted_plan.rs +++ b/generated/async-stripe-shared/src/deleted_plan.rs @@ -12,7 +12,12 @@ pub struct DeletedPlanBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedPlanBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/deleted_product.rs b/generated/async-stripe-shared/src/deleted_product.rs index 5109d6f90..4239c320b 100644 --- a/generated/async-stripe-shared/src/deleted_product.rs +++ b/generated/async-stripe-shared/src/deleted_product.rs @@ -12,7 +12,12 @@ pub struct DeletedProductBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedProductBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/deleted_subscription_item.rs b/generated/async-stripe-shared/src/deleted_subscription_item.rs index a6613e7fb..3073434f1 100644 --- a/generated/async-stripe-shared/src/deleted_subscription_item.rs +++ b/generated/async-stripe-shared/src/deleted_subscription_item.rs @@ -12,7 +12,12 @@ pub struct DeletedSubscriptionItemBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedSubscriptionItemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/deleted_tax_id.rs b/generated/async-stripe-shared/src/deleted_tax_id.rs index ac5919de2..56269c76e 100644 --- a/generated/async-stripe-shared/src/deleted_tax_id.rs +++ b/generated/async-stripe-shared/src/deleted_tax_id.rs @@ -12,7 +12,12 @@ pub struct DeletedTaxIdBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedTaxIdBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } 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..ced80967a 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 @@ -12,7 +12,12 @@ pub struct DeletedTestHelpersTestClockBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedTestHelpersTestClockBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/destination_details_unimplemented.rs b/generated/async-stripe-shared/src/destination_details_unimplemented.rs index f6956a8f7..342d5d69e 100644 --- a/generated/async-stripe-shared/src/destination_details_unimplemented.rs +++ b/generated/async-stripe-shared/src/destination_details_unimplemented.rs @@ -5,7 +5,12 @@ pub struct DestinationDetailsUnimplemented {} #[doc(hidden)] pub struct DestinationDetailsUnimplementedBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/discount.rs b/generated/async-stripe-shared/src/discount.rs index 8f5c8bd3d..13ed029fb 100644 --- a/generated/async-stripe-shared/src/discount.rs +++ b/generated/async-stripe-shared/src/discount.rs @@ -48,7 +48,12 @@ pub struct DiscountBuilder { subscription_item: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -112,18 +117,46 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(checkout_session), + Some(coupon), + Some(customer), + Some(end), + Some(id), + Some(invoice), + Some(invoice_item), + Some(promotion_code), + Some(start), + Some(subscription), + Some(subscription_item), + ) = ( + self.checkout_session.take(), + self.coupon.take(), + self.customer.take(), + self.end, + self.id.take(), + self.invoice.take(), + self.invoice_item.take(), + self.promotion_code.take(), + self.start, + self.subscription.take(), + self.subscription_item.take(), + ) + else { + return None; + }; Some(Self::Out { - checkout_session: self.checkout_session.take()?, - coupon: self.coupon.take()?, - customer: self.customer.take()?, - end: self.end?, - id: self.id.take()?, - invoice: self.invoice.take()?, - invoice_item: self.invoice_item.take()?, - promotion_code: self.promotion_code.take()?, - start: self.start?, - subscription: self.subscription.take()?, - subscription_item: self.subscription_item.take()?, + checkout_session, + coupon, + customer, + end, + id, + invoice, + invoice_item, + promotion_code, + start, + subscription, + subscription_item, }) } } @@ -151,17 +184,17 @@ const _: () = { let mut b = DiscountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "checkout_session" => b.checkout_session = Some(FromValueOpt::from_value(v)?), - "coupon" => b.coupon = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "end" => b.end = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "invoice" => b.invoice = Some(FromValueOpt::from_value(v)?), - "invoice_item" => b.invoice_item = Some(FromValueOpt::from_value(v)?), - "promotion_code" => b.promotion_code = Some(FromValueOpt::from_value(v)?), - "start" => b.start = Some(FromValueOpt::from_value(v)?), - "subscription" => b.subscription = Some(FromValueOpt::from_value(v)?), - "subscription_item" => b.subscription_item = Some(FromValueOpt::from_value(v)?), + "checkout_session" => b.checkout_session = FromValueOpt::from_value(v), + "coupon" => b.coupon = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "end" => b.end = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "invoice" => b.invoice = FromValueOpt::from_value(v), + "invoice_item" => b.invoice_item = FromValueOpt::from_value(v), + "promotion_code" => b.promotion_code = FromValueOpt::from_value(v), + "start" => b.start = FromValueOpt::from_value(v), + "subscription" => b.subscription = FromValueOpt::from_value(v), + "subscription_item" => b.subscription_item = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/discounts_resource_discount_amount.rs b/generated/async-stripe-shared/src/discounts_resource_discount_amount.rs index c6ac90b4a..d17fce82e 100644 --- a/generated/async-stripe-shared/src/discounts_resource_discount_amount.rs +++ b/generated/async-stripe-shared/src/discounts_resource_discount_amount.rs @@ -13,7 +13,12 @@ pub struct DiscountsResourceDiscountAmountBuilder { discount: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { amount: self.amount?, discount: self.discount.take()? }) + let (Some(amount), Some(discount)) = (self.amount, self.discount.take()) else { + return None; + }; + Some(Self::Out { amount, discount }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = DiscountsResourceDiscountAmountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "discount" => b.discount = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "discount" => b.discount = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/discounts_resource_stackable_discount.rs b/generated/async-stripe-shared/src/discounts_resource_stackable_discount.rs index a05bed823..1899e2b00 100644 --- a/generated/async-stripe-shared/src/discounts_resource_stackable_discount.rs +++ b/generated/async-stripe-shared/src/discounts_resource_stackable_discount.rs @@ -16,7 +16,12 @@ pub struct DiscountsResourceStackableDiscountBuilder { promotion_code: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - coupon: self.coupon.take()?, - discount: self.discount.take()?, - promotion_code: self.promotion_code.take()?, - }) + let (Some(coupon), Some(discount), Some(promotion_code)) = + (self.coupon.take(), self.discount.take(), self.promotion_code.take()) + else { + return None; + }; + Some(Self::Out { coupon, discount, promotion_code }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = DiscountsResourceStackableDiscountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "coupon" => b.coupon = Some(FromValueOpt::from_value(v)?), - "discount" => b.discount = Some(FromValueOpt::from_value(v)?), - "promotion_code" => b.promotion_code = Some(FromValueOpt::from_value(v)?), + "coupon" => b.coupon = FromValueOpt::from_value(v), + "discount" => b.discount = FromValueOpt::from_value(v), + "promotion_code" => b.promotion_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/dispute.rs b/generated/async-stripe-shared/src/dispute.rs index bc5eb387e..e668f2bb4 100644 --- a/generated/async-stripe-shared/src/dispute.rs +++ b/generated/async-stripe-shared/src/dispute.rs @@ -65,7 +65,12 @@ pub struct DisputeBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -139,23 +144,61 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(balance_transactions), + Some(charge), + Some(created), + Some(currency), + Some(evidence), + Some(evidence_details), + Some(id), + Some(is_charge_refundable), + Some(livemode), + Some(metadata), + Some(network_reason_code), + Some(payment_intent), + Some(payment_method_details), + Some(reason), + Some(status), + ) = ( + self.amount, + self.balance_transactions.take(), + self.charge.take(), + self.created, + self.currency, + self.evidence.take(), + self.evidence_details, + self.id.take(), + self.is_charge_refundable, + self.livemode, + self.metadata.take(), + self.network_reason_code.take(), + self.payment_intent.take(), + self.payment_method_details.take(), + self.reason.take(), + self.status, + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - balance_transactions: self.balance_transactions.take()?, - charge: self.charge.take()?, - created: self.created?, - currency: self.currency?, - evidence: self.evidence.take()?, - evidence_details: self.evidence_details?, - id: self.id.take()?, - is_charge_refundable: self.is_charge_refundable?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - network_reason_code: self.network_reason_code.take()?, - payment_intent: self.payment_intent.take()?, - payment_method_details: self.payment_method_details.take()?, - reason: self.reason.take()?, - status: self.status?, + amount, + balance_transactions, + charge, + created, + currency, + evidence, + evidence_details, + id, + is_charge_refundable, + livemode, + metadata, + network_reason_code, + payment_intent, + payment_method_details, + reason, + status, }) } } @@ -183,30 +226,24 @@ const _: () = { let mut b = DisputeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "balance_transactions" => { - b.balance_transactions = Some(FromValueOpt::from_value(v)?) - } - "charge" => b.charge = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "evidence" => b.evidence = Some(FromValueOpt::from_value(v)?), - "evidence_details" => b.evidence_details = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "is_charge_refundable" => { - b.is_charge_refundable = Some(FromValueOpt::from_value(v)?) - } - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "network_reason_code" => { - b.network_reason_code = Some(FromValueOpt::from_value(v)?) - } - "payment_intent" => b.payment_intent = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "balance_transactions" => b.balance_transactions = FromValueOpt::from_value(v), + "charge" => b.charge = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "evidence" => b.evidence = FromValueOpt::from_value(v), + "evidence_details" => b.evidence_details = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "is_charge_refundable" => b.is_charge_refundable = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "network_reason_code" => b.network_reason_code = FromValueOpt::from_value(v), + "payment_intent" => b.payment_intent = FromValueOpt::from_value(v), "payment_method_details" => { - b.payment_method_details = Some(FromValueOpt::from_value(v)?) + b.payment_method_details = FromValueOpt::from_value(v) } - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "reason" => b.reason = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/dispute_evidence.rs b/generated/async-stripe-shared/src/dispute_evidence.rs index be55cf5c7..afdd9f8b4 100644 --- a/generated/async-stripe-shared/src/dispute_evidence.rs +++ b/generated/async-stripe-shared/src/dispute_evidence.rs @@ -98,7 +98,12 @@ pub struct DisputeEvidenceBuilder { uncategorized_text: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -209,34 +214,94 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(access_activity_log), + Some(billing_address), + Some(cancellation_policy), + Some(cancellation_policy_disclosure), + Some(cancellation_rebuttal), + Some(customer_communication), + Some(customer_email_address), + Some(customer_name), + Some(customer_purchase_ip), + Some(customer_signature), + Some(duplicate_charge_documentation), + Some(duplicate_charge_explanation), + Some(duplicate_charge_id), + Some(product_description), + Some(receipt), + Some(refund_policy), + Some(refund_policy_disclosure), + Some(refund_refusal_explanation), + Some(service_date), + Some(service_documentation), + Some(shipping_address), + Some(shipping_carrier), + Some(shipping_date), + Some(shipping_documentation), + Some(shipping_tracking_number), + Some(uncategorized_file), + Some(uncategorized_text), + ) = ( + self.access_activity_log.take(), + self.billing_address.take(), + self.cancellation_policy.take(), + self.cancellation_policy_disclosure.take(), + self.cancellation_rebuttal.take(), + self.customer_communication.take(), + self.customer_email_address.take(), + self.customer_name.take(), + self.customer_purchase_ip.take(), + self.customer_signature.take(), + self.duplicate_charge_documentation.take(), + self.duplicate_charge_explanation.take(), + self.duplicate_charge_id.take(), + self.product_description.take(), + self.receipt.take(), + self.refund_policy.take(), + self.refund_policy_disclosure.take(), + self.refund_refusal_explanation.take(), + self.service_date.take(), + self.service_documentation.take(), + self.shipping_address.take(), + self.shipping_carrier.take(), + self.shipping_date.take(), + self.shipping_documentation.take(), + self.shipping_tracking_number.take(), + self.uncategorized_file.take(), + self.uncategorized_text.take(), + ) + else { + return None; + }; Some(Self::Out { - access_activity_log: self.access_activity_log.take()?, - billing_address: self.billing_address.take()?, - cancellation_policy: self.cancellation_policy.take()?, - cancellation_policy_disclosure: self.cancellation_policy_disclosure.take()?, - cancellation_rebuttal: self.cancellation_rebuttal.take()?, - customer_communication: self.customer_communication.take()?, - customer_email_address: self.customer_email_address.take()?, - customer_name: self.customer_name.take()?, - customer_purchase_ip: self.customer_purchase_ip.take()?, - customer_signature: self.customer_signature.take()?, - duplicate_charge_documentation: self.duplicate_charge_documentation.take()?, - duplicate_charge_explanation: self.duplicate_charge_explanation.take()?, - duplicate_charge_id: self.duplicate_charge_id.take()?, - product_description: self.product_description.take()?, - receipt: self.receipt.take()?, - refund_policy: self.refund_policy.take()?, - refund_policy_disclosure: self.refund_policy_disclosure.take()?, - refund_refusal_explanation: self.refund_refusal_explanation.take()?, - service_date: self.service_date.take()?, - service_documentation: self.service_documentation.take()?, - shipping_address: self.shipping_address.take()?, - shipping_carrier: self.shipping_carrier.take()?, - shipping_date: self.shipping_date.take()?, - shipping_documentation: self.shipping_documentation.take()?, - shipping_tracking_number: self.shipping_tracking_number.take()?, - uncategorized_file: self.uncategorized_file.take()?, - uncategorized_text: self.uncategorized_text.take()?, + access_activity_log, + billing_address, + cancellation_policy, + cancellation_policy_disclosure, + cancellation_rebuttal, + customer_communication, + customer_email_address, + customer_name, + customer_purchase_ip, + customer_signature, + duplicate_charge_documentation, + duplicate_charge_explanation, + duplicate_charge_id, + product_description, + receipt, + refund_policy, + refund_policy_disclosure, + refund_refusal_explanation, + service_date, + service_documentation, + shipping_address, + shipping_carrier, + shipping_date, + shipping_documentation, + shipping_tracking_number, + uncategorized_file, + uncategorized_text, }) } } @@ -264,71 +329,55 @@ const _: () = { let mut b = DisputeEvidenceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "access_activity_log" => { - b.access_activity_log = Some(FromValueOpt::from_value(v)?) - } - "billing_address" => b.billing_address = Some(FromValueOpt::from_value(v)?), - "cancellation_policy" => { - b.cancellation_policy = Some(FromValueOpt::from_value(v)?) - } + "access_activity_log" => b.access_activity_log = FromValueOpt::from_value(v), + "billing_address" => b.billing_address = FromValueOpt::from_value(v), + "cancellation_policy" => b.cancellation_policy = FromValueOpt::from_value(v), "cancellation_policy_disclosure" => { - b.cancellation_policy_disclosure = Some(FromValueOpt::from_value(v)?) + b.cancellation_policy_disclosure = FromValueOpt::from_value(v) } "cancellation_rebuttal" => { - b.cancellation_rebuttal = Some(FromValueOpt::from_value(v)?) + b.cancellation_rebuttal = FromValueOpt::from_value(v) } "customer_communication" => { - b.customer_communication = Some(FromValueOpt::from_value(v)?) + b.customer_communication = FromValueOpt::from_value(v) } "customer_email_address" => { - b.customer_email_address = Some(FromValueOpt::from_value(v)?) - } - "customer_name" => b.customer_name = Some(FromValueOpt::from_value(v)?), - "customer_purchase_ip" => { - b.customer_purchase_ip = Some(FromValueOpt::from_value(v)?) - } - "customer_signature" => { - b.customer_signature = Some(FromValueOpt::from_value(v)?) + b.customer_email_address = FromValueOpt::from_value(v) } + "customer_name" => b.customer_name = FromValueOpt::from_value(v), + "customer_purchase_ip" => b.customer_purchase_ip = FromValueOpt::from_value(v), + "customer_signature" => b.customer_signature = FromValueOpt::from_value(v), "duplicate_charge_documentation" => { - b.duplicate_charge_documentation = Some(FromValueOpt::from_value(v)?) + b.duplicate_charge_documentation = FromValueOpt::from_value(v) } "duplicate_charge_explanation" => { - b.duplicate_charge_explanation = Some(FromValueOpt::from_value(v)?) - } - "duplicate_charge_id" => { - b.duplicate_charge_id = Some(FromValueOpt::from_value(v)?) - } - "product_description" => { - b.product_description = Some(FromValueOpt::from_value(v)?) + b.duplicate_charge_explanation = FromValueOpt::from_value(v) } - "receipt" => b.receipt = Some(FromValueOpt::from_value(v)?), - "refund_policy" => b.refund_policy = Some(FromValueOpt::from_value(v)?), + "duplicate_charge_id" => b.duplicate_charge_id = FromValueOpt::from_value(v), + "product_description" => b.product_description = FromValueOpt::from_value(v), + "receipt" => b.receipt = FromValueOpt::from_value(v), + "refund_policy" => b.refund_policy = FromValueOpt::from_value(v), "refund_policy_disclosure" => { - b.refund_policy_disclosure = Some(FromValueOpt::from_value(v)?) + b.refund_policy_disclosure = FromValueOpt::from_value(v) } "refund_refusal_explanation" => { - b.refund_refusal_explanation = Some(FromValueOpt::from_value(v)?) + b.refund_refusal_explanation = FromValueOpt::from_value(v) } - "service_date" => b.service_date = Some(FromValueOpt::from_value(v)?), + "service_date" => b.service_date = FromValueOpt::from_value(v), "service_documentation" => { - b.service_documentation = Some(FromValueOpt::from_value(v)?) + b.service_documentation = FromValueOpt::from_value(v) } - "shipping_address" => b.shipping_address = Some(FromValueOpt::from_value(v)?), - "shipping_carrier" => b.shipping_carrier = Some(FromValueOpt::from_value(v)?), - "shipping_date" => b.shipping_date = Some(FromValueOpt::from_value(v)?), + "shipping_address" => b.shipping_address = FromValueOpt::from_value(v), + "shipping_carrier" => b.shipping_carrier = FromValueOpt::from_value(v), + "shipping_date" => b.shipping_date = FromValueOpt::from_value(v), "shipping_documentation" => { - b.shipping_documentation = Some(FromValueOpt::from_value(v)?) + b.shipping_documentation = FromValueOpt::from_value(v) } "shipping_tracking_number" => { - b.shipping_tracking_number = Some(FromValueOpt::from_value(v)?) - } - "uncategorized_file" => { - b.uncategorized_file = Some(FromValueOpt::from_value(v)?) - } - "uncategorized_text" => { - b.uncategorized_text = Some(FromValueOpt::from_value(v)?) + b.shipping_tracking_number = FromValueOpt::from_value(v) } + "uncategorized_file" => b.uncategorized_file = FromValueOpt::from_value(v), + "uncategorized_text" => b.uncategorized_text = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/dispute_evidence_details.rs b/generated/async-stripe-shared/src/dispute_evidence_details.rs index ff4e8c395..d9c6c12d1 100644 --- a/generated/async-stripe-shared/src/dispute_evidence_details.rs +++ b/generated/async-stripe-shared/src/dispute_evidence_details.rs @@ -22,7 +22,12 @@ pub struct DisputeEvidenceDetailsBuilder { submission_count: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -75,12 +80,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - due_by: self.due_by?, - has_evidence: self.has_evidence?, - past_due: self.past_due?, - submission_count: self.submission_count?, - }) + let (Some(due_by), Some(has_evidence), Some(past_due), Some(submission_count)) = + (self.due_by, self.has_evidence, self.past_due, self.submission_count) + else { + return None; + }; + Some(Self::Out { due_by, has_evidence, past_due, submission_count }) } } @@ -107,10 +112,10 @@ const _: () = { let mut b = DisputeEvidenceDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "due_by" => b.due_by = Some(FromValueOpt::from_value(v)?), - "has_evidence" => b.has_evidence = Some(FromValueOpt::from_value(v)?), - "past_due" => b.past_due = Some(FromValueOpt::from_value(v)?), - "submission_count" => b.submission_count = Some(FromValueOpt::from_value(v)?), + "due_by" => b.due_by = FromValueOpt::from_value(v), + "has_evidence" => b.has_evidence = FromValueOpt::from_value(v), + "past_due" => b.past_due = FromValueOpt::from_value(v), + "submission_count" => b.submission_count = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/dispute_payment_method_details.rs b/generated/async-stripe-shared/src/dispute_payment_method_details.rs index 75c1569b3..180b54c3b 100644 --- a/generated/async-stripe-shared/src/dispute_payment_method_details.rs +++ b/generated/async-stripe-shared/src/dispute_payment_method_details.rs @@ -13,7 +13,12 @@ pub struct DisputePaymentMethodDetailsBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { card: self.card.take()?, type_: self.type_? }) + let (Some(card), Some(type_)) = (self.card.take(), self.type_) else { + return None; + }; + Some(Self::Out { card, type_ }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = DisputePaymentMethodDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "card" => b.card = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/dispute_payment_method_details_card.rs b/generated/async-stripe-shared/src/dispute_payment_method_details_card.rs index 4081a2725..d7b40aeca 100644 --- a/generated/async-stripe-shared/src/dispute_payment_method_details_card.rs +++ b/generated/async-stripe-shared/src/dispute_payment_method_details_card.rs @@ -15,7 +15,12 @@ pub struct DisputePaymentMethodDetailsCardBuilder { network_reason_code: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -61,10 +66,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - brand: self.brand.take()?, - network_reason_code: self.network_reason_code.take()?, - }) + let (Some(brand), Some(network_reason_code)) = + (self.brand.take(), self.network_reason_code.take()) + else { + return None; + }; + Some(Self::Out { brand, network_reason_code }) } } @@ -91,10 +98,8 @@ const _: () = { let mut b = DisputePaymentMethodDetailsCardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "brand" => b.brand = Some(FromValueOpt::from_value(v)?), - "network_reason_code" => { - b.network_reason_code = Some(FromValueOpt::from_value(v)?) - } + "brand" => b.brand = FromValueOpt::from_value(v), + "network_reason_code" => b.network_reason_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/email_sent.rs b/generated/async-stripe-shared/src/email_sent.rs index 80b8153c0..9cd0308e6 100644 --- a/generated/async-stripe-shared/src/email_sent.rs +++ b/generated/async-stripe-shared/src/email_sent.rs @@ -13,7 +13,12 @@ pub struct EmailSentBuilder { email_sent_to: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,10 +61,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - email_sent_at: self.email_sent_at?, - email_sent_to: self.email_sent_to.take()?, - }) + let (Some(email_sent_at), Some(email_sent_to)) = + (self.email_sent_at, self.email_sent_to.take()) + else { + return None; + }; + Some(Self::Out { email_sent_at, email_sent_to }) } } @@ -86,8 +93,8 @@ const _: () = { let mut b = EmailSentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "email_sent_at" => b.email_sent_at = Some(FromValueOpt::from_value(v)?), - "email_sent_to" => b.email_sent_to = Some(FromValueOpt::from_value(v)?), + "email_sent_at" => b.email_sent_at = FromValueOpt::from_value(v), + "email_sent_to" => b.email_sent_to = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/entitlements_feature.rs b/generated/async-stripe-shared/src/entitlements_feature.rs index 343062a92..669c60c71 100644 --- a/generated/async-stripe-shared/src/entitlements_feature.rs +++ b/generated/async-stripe-shared/src/entitlements_feature.rs @@ -27,7 +27,12 @@ pub struct EntitlementsFeatureBuilder { name: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -84,14 +89,25 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - active: self.active?, - id: self.id.take()?, - livemode: self.livemode?, - lookup_key: self.lookup_key.take()?, - metadata: self.metadata.take()?, - name: self.name.take()?, - }) + let ( + Some(active), + Some(id), + Some(livemode), + Some(lookup_key), + Some(metadata), + Some(name), + ) = ( + self.active, + self.id.take(), + self.livemode, + self.lookup_key.take(), + self.metadata.take(), + self.name.take(), + ) + else { + return None; + }; + Some(Self::Out { active, id, livemode, lookup_key, metadata, name }) } } @@ -118,12 +134,12 @@ const _: () = { let mut b = EntitlementsFeatureBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "active" => b.active = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "lookup_key" => b.lookup_key = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), + "active" => b.active = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "lookup_key" => b.lookup_key = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/error.rs b/generated/async-stripe-shared/src/error.rs index b1e6764fa..a441c84b6 100644 --- a/generated/async-stripe-shared/src/error.rs +++ b/generated/async-stripe-shared/src/error.rs @@ -10,7 +10,12 @@ pub struct ErrorBuilder { error: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -52,7 +57,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { error: self.error.take()? }) + let (Some(error),) = (self.error.take(),) else { + return None; + }; + Some(Self::Out { error }) } } @@ -79,7 +87,7 @@ const _: () = { let mut b = ErrorBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "error" => b.error = Some(FromValueOpt::from_value(v)?), + "error" => b.error = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/event.rs b/generated/async-stripe-shared/src/event.rs index 780552162..593252bcb 100644 --- a/generated/async-stripe-shared/src/event.rs +++ b/generated/async-stripe-shared/src/event.rs @@ -66,7 +66,12 @@ pub struct EventBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -126,16 +131,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account), + Some(api_version), + Some(created), + Some(data), + Some(id), + Some(livemode), + Some(pending_webhooks), + Some(request), + Some(type_), + ) = ( + self.account.take(), + self.api_version.take(), + self.created, + self.data.take(), + self.id.take(), + self.livemode, + self.pending_webhooks, + self.request.take(), + self.type_, + ) + else { + return None; + }; Some(Self::Out { - account: self.account.take()?, - api_version: self.api_version.take()?, - created: self.created?, - data: self.data.take()?, - id: self.id.take()?, - livemode: self.livemode?, - pending_webhooks: self.pending_webhooks?, - request: self.request.take()?, - type_: self.type_?, + account, + api_version, + created, + data, + id, + livemode, + pending_webhooks, + request, + type_, }) } } @@ -163,15 +192,15 @@ const _: () = { let mut b = EventBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account" => b.account = Some(FromValueOpt::from_value(v)?), - "api_version" => b.api_version = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "data" => b.data = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "pending_webhooks" => b.pending_webhooks = Some(FromValueOpt::from_value(v)?), - "request" => b.request = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "account" => b.account = FromValueOpt::from_value(v), + "api_version" => b.api_version = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "data" => b.data = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "pending_webhooks" => b.pending_webhooks = FromValueOpt::from_value(v), + "request" => b.request = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/external_account_requirements.rs b/generated/async-stripe-shared/src/external_account_requirements.rs index 94d61f4bf..e519f206d 100644 --- a/generated/async-stripe-shared/src/external_account_requirements.rs +++ b/generated/async-stripe-shared/src/external_account_requirements.rs @@ -24,7 +24,12 @@ pub struct ExternalAccountRequirementsBuilder { pending_verification: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,12 +82,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - currently_due: self.currently_due.take()?, - errors: self.errors.take()?, - past_due: self.past_due.take()?, - pending_verification: self.pending_verification.take()?, - }) + let (Some(currently_due), Some(errors), Some(past_due), Some(pending_verification)) = ( + self.currently_due.take(), + self.errors.take(), + self.past_due.take(), + self.pending_verification.take(), + ) else { + return None; + }; + Some(Self::Out { currently_due, errors, past_due, pending_verification }) } } @@ -109,12 +117,10 @@ const _: () = { let mut b = ExternalAccountRequirementsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "currently_due" => b.currently_due = Some(FromValueOpt::from_value(v)?), - "errors" => b.errors = Some(FromValueOpt::from_value(v)?), - "past_due" => b.past_due = Some(FromValueOpt::from_value(v)?), - "pending_verification" => { - b.pending_verification = Some(FromValueOpt::from_value(v)?) - } + "currently_due" => b.currently_due = FromValueOpt::from_value(v), + "errors" => b.errors = FromValueOpt::from_value(v), + "past_due" => b.past_due = FromValueOpt::from_value(v), + "pending_verification" => b.pending_verification = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/fee.rs b/generated/async-stripe-shared/src/fee.rs index 183ae2c9c..89bbd9fe9 100644 --- a/generated/async-stripe-shared/src/fee.rs +++ b/generated/async-stripe-shared/src/fee.rs @@ -24,7 +24,12 @@ pub struct FeeBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -76,13 +81,16 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - application: self.application.take()?, - currency: self.currency?, - description: self.description.take()?, - type_: self.type_.take()?, - }) + let (Some(amount), Some(application), Some(currency), Some(description), Some(type_)) = ( + self.amount, + self.application.take(), + self.currency, + self.description.take(), + self.type_.take(), + ) else { + return None; + }; + Some(Self::Out { amount, application, currency, description, type_ }) } } @@ -109,11 +117,11 @@ const _: () = { let mut b = FeeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "application" => b.application = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "application" => b.application = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/file.rs b/generated/async-stripe-shared/src/file.rs index 1f949c683..17d9d2f0c 100644 --- a/generated/async-stripe-shared/src/file.rs +++ b/generated/async-stripe-shared/src/file.rs @@ -46,7 +46,12 @@ pub struct FileBuilder { url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -108,17 +113,43 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(created), + Some(expires_at), + Some(filename), + Some(id), + Some(links), + Some(purpose), + Some(size), + Some(title), + Some(type_), + Some(url), + ) = ( + self.created, + self.expires_at, + self.filename.take(), + self.id.take(), + self.links.take(), + self.purpose, + self.size, + self.title.take(), + self.type_.take(), + self.url.take(), + ) + else { + return None; + }; Some(Self::Out { - created: self.created?, - expires_at: self.expires_at?, - filename: self.filename.take()?, - id: self.id.take()?, - links: self.links.take()?, - purpose: self.purpose?, - size: self.size?, - title: self.title.take()?, - type_: self.type_.take()?, - url: self.url.take()?, + created, + expires_at, + filename, + id, + links, + purpose, + size, + title, + type_, + url, }) } } @@ -146,16 +177,16 @@ const _: () = { let mut b = FileBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "filename" => b.filename = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "links" => b.links = Some(FromValueOpt::from_value(v)?), - "purpose" => b.purpose = Some(FromValueOpt::from_value(v)?), - "size" => b.size = Some(FromValueOpt::from_value(v)?), - "title" => b.title = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "filename" => b.filename = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "links" => b.links = FromValueOpt::from_value(v), + "purpose" => b.purpose = FromValueOpt::from_value(v), + "size" => b.size = FromValueOpt::from_value(v), + "title" => b.title = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/file_link.rs b/generated/async-stripe-shared/src/file_link.rs index 4fc1d8136..5c9d7b8db 100644 --- a/generated/async-stripe-shared/src/file_link.rs +++ b/generated/async-stripe-shared/src/file_link.rs @@ -36,7 +36,12 @@ pub struct FileLinkBuilder { url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -94,16 +99,29 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - created: self.created?, - expired: self.expired?, - expires_at: self.expires_at?, - file: self.file.take()?, - id: self.id.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - url: self.url.take()?, - }) + let ( + Some(created), + Some(expired), + Some(expires_at), + Some(file), + Some(id), + Some(livemode), + Some(metadata), + Some(url), + ) = ( + self.created, + self.expired, + self.expires_at, + self.file.take(), + self.id.take(), + self.livemode, + self.metadata.take(), + self.url.take(), + ) + else { + return None; + }; + Some(Self::Out { created, expired, expires_at, file, id, livemode, metadata, url }) } } @@ -130,14 +148,14 @@ const _: () = { let mut b = FileLinkBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "expired" => b.expired = Some(FromValueOpt::from_value(v)?), - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "file" => b.file = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "expired" => b.expired = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "file" => b.file = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/funding_instructions.rs b/generated/async-stripe-shared/src/funding_instructions.rs index d13a6f06f..b663e0126 100644 --- a/generated/async-stripe-shared/src/funding_instructions.rs +++ b/generated/async-stripe-shared/src/funding_instructions.rs @@ -23,7 +23,12 @@ pub struct FundingInstructionsBuilder { livemode: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -76,12 +81,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank_transfer: self.bank_transfer.take()?, - currency: self.currency?, - funding_type: self.funding_type?, - livemode: self.livemode?, - }) + let (Some(bank_transfer), Some(currency), Some(funding_type), Some(livemode)) = + (self.bank_transfer.take(), self.currency, self.funding_type, self.livemode) + else { + return None; + }; + Some(Self::Out { bank_transfer, currency, funding_type, livemode }) } } @@ -108,10 +113,10 @@ const _: () = { let mut b = FundingInstructionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_transfer" => b.bank_transfer = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "funding_type" => b.funding_type = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), + "bank_transfer" => b.bank_transfer = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "funding_type" => b.funding_type = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/funding_instructions_bank_transfer.rs b/generated/async-stripe-shared/src/funding_instructions_bank_transfer.rs index 6397032ea..54f106dc0 100644 --- a/generated/async-stripe-shared/src/funding_instructions_bank_transfer.rs +++ b/generated/async-stripe-shared/src/funding_instructions_bank_transfer.rs @@ -18,7 +18,12 @@ pub struct FundingInstructionsBankTransferBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - country: self.country.take()?, - financial_addresses: self.financial_addresses.take()?, - type_: self.type_?, - }) + let (Some(country), Some(financial_addresses), Some(type_)) = + (self.country.take(), self.financial_addresses.take(), self.type_) + else { + return None; + }; + Some(Self::Out { country, financial_addresses, type_ }) } } @@ -100,11 +106,9 @@ const _: () = { let mut b = FundingInstructionsBankTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "financial_addresses" => { - b.financial_addresses = Some(FromValueOpt::from_value(v)?) - } - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "country" => b.country = FromValueOpt::from_value(v), + "financial_addresses" => b.financial_addresses = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/funding_instructions_bank_transfer_aba_record.rs b/generated/async-stripe-shared/src/funding_instructions_bank_transfer_aba_record.rs index 7902785f2..ec82513eb 100644 --- a/generated/async-stripe-shared/src/funding_instructions_bank_transfer_aba_record.rs +++ b/generated/async-stripe-shared/src/funding_instructions_bank_transfer_aba_record.rs @@ -17,7 +17,12 @@ pub struct FundingInstructionsBankTransferAbaRecordBuilder { routing_number: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - account_number: self.account_number.take()?, - bank_name: self.bank_name.take()?, - routing_number: self.routing_number.take()?, - }) + let (Some(account_number), Some(bank_name), Some(routing_number)) = + (self.account_number.take(), self.bank_name.take(), self.routing_number.take()) + else { + return None; + }; + Some(Self::Out { account_number, bank_name, routing_number }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = FundingInstructionsBankTransferAbaRecordBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_number" => b.account_number = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "routing_number" => b.routing_number = Some(FromValueOpt::from_value(v)?), + "account_number" => b.account_number = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "routing_number" => b.routing_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/funding_instructions_bank_transfer_financial_address.rs b/generated/async-stripe-shared/src/funding_instructions_bank_transfer_financial_address.rs index 7ae4ceb05..5bbe2afb7 100644 --- a/generated/async-stripe-shared/src/funding_instructions_bank_transfer_financial_address.rs +++ b/generated/async-stripe-shared/src/funding_instructions_bank_transfer_financial_address.rs @@ -29,7 +29,12 @@ pub struct FundingInstructionsBankTransferFinancialAddressBuilder { zengin: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -90,16 +95,29 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - aba: self.aba.take()?, - iban: self.iban.take()?, - sort_code: self.sort_code.take()?, - spei: self.spei.take()?, - supported_networks: self.supported_networks.take()?, - swift: self.swift.take()?, - type_: self.type_?, - zengin: self.zengin.take()?, - }) + let ( + Some(aba), + Some(iban), + Some(sort_code), + Some(spei), + Some(supported_networks), + Some(swift), + Some(type_), + Some(zengin), + ) = ( + self.aba.take(), + self.iban.take(), + self.sort_code.take(), + self.spei.take(), + self.supported_networks.take(), + self.swift.take(), + self.type_, + self.zengin.take(), + ) + else { + return None; + }; + Some(Self::Out { aba, iban, sort_code, spei, supported_networks, swift, type_, zengin }) } } @@ -126,16 +144,14 @@ const _: () = { let mut b = FundingInstructionsBankTransferFinancialAddressBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "aba" => b.aba = Some(FromValueOpt::from_value(v)?), - "iban" => b.iban = Some(FromValueOpt::from_value(v)?), - "sort_code" => b.sort_code = Some(FromValueOpt::from_value(v)?), - "spei" => b.spei = Some(FromValueOpt::from_value(v)?), - "supported_networks" => { - b.supported_networks = Some(FromValueOpt::from_value(v)?) - } - "swift" => b.swift = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "zengin" => b.zengin = Some(FromValueOpt::from_value(v)?), + "aba" => b.aba = FromValueOpt::from_value(v), + "iban" => b.iban = FromValueOpt::from_value(v), + "sort_code" => b.sort_code = FromValueOpt::from_value(v), + "spei" => b.spei = FromValueOpt::from_value(v), + "supported_networks" => b.supported_networks = FromValueOpt::from_value(v), + "swift" => b.swift = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "zengin" => b.zengin = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/funding_instructions_bank_transfer_iban_record.rs b/generated/async-stripe-shared/src/funding_instructions_bank_transfer_iban_record.rs index 192bb5c8c..18f266ef8 100644 --- a/generated/async-stripe-shared/src/funding_instructions_bank_transfer_iban_record.rs +++ b/generated/async-stripe-shared/src/funding_instructions_bank_transfer_iban_record.rs @@ -20,7 +20,12 @@ pub struct FundingInstructionsBankTransferIbanRecordBuilder { iban: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,12 +78,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - account_holder_name: self.account_holder_name.take()?, - bic: self.bic.take()?, - country: self.country.take()?, - iban: self.iban.take()?, - }) + let (Some(account_holder_name), Some(bic), Some(country), Some(iban)) = ( + self.account_holder_name.take(), + self.bic.take(), + self.country.take(), + self.iban.take(), + ) else { + return None; + }; + Some(Self::Out { account_holder_name, bic, country, iban }) } } @@ -105,12 +113,10 @@ const _: () = { let mut b = FundingInstructionsBankTransferIbanRecordBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_holder_name" => { - b.account_holder_name = Some(FromValueOpt::from_value(v)?) - } - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "iban" => b.iban = Some(FromValueOpt::from_value(v)?), + "account_holder_name" => b.account_holder_name = FromValueOpt::from_value(v), + "bic" => b.bic = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "iban" => b.iban = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/funding_instructions_bank_transfer_sort_code_record.rs b/generated/async-stripe-shared/src/funding_instructions_bank_transfer_sort_code_record.rs index 4185f8eb1..eb21b74aa 100644 --- a/generated/async-stripe-shared/src/funding_instructions_bank_transfer_sort_code_record.rs +++ b/generated/async-stripe-shared/src/funding_instructions_bank_transfer_sort_code_record.rs @@ -17,7 +17,12 @@ pub struct FundingInstructionsBankTransferSortCodeRecordBuilder { sort_code: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,14 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - account_holder_name: self.account_holder_name.take()?, - account_number: self.account_number.take()?, - sort_code: self.sort_code.take()?, - }) + let (Some(account_holder_name), Some(account_number), Some(sort_code)) = ( + self.account_holder_name.take(), + self.account_number.take(), + self.sort_code.take(), + ) else { + return None; + }; + Some(Self::Out { account_holder_name, account_number, sort_code }) } } @@ -99,11 +107,9 @@ const _: () = { let mut b = FundingInstructionsBankTransferSortCodeRecordBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_holder_name" => { - b.account_holder_name = Some(FromValueOpt::from_value(v)?) - } - "account_number" => b.account_number = Some(FromValueOpt::from_value(v)?), - "sort_code" => b.sort_code = Some(FromValueOpt::from_value(v)?), + "account_holder_name" => b.account_holder_name = FromValueOpt::from_value(v), + "account_number" => b.account_number = FromValueOpt::from_value(v), + "sort_code" => b.sort_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/funding_instructions_bank_transfer_spei_record.rs b/generated/async-stripe-shared/src/funding_instructions_bank_transfer_spei_record.rs index a14f1dcd2..cc6d70aa7 100644 --- a/generated/async-stripe-shared/src/funding_instructions_bank_transfer_spei_record.rs +++ b/generated/async-stripe-shared/src/funding_instructions_bank_transfer_spei_record.rs @@ -17,7 +17,12 @@ pub struct FundingInstructionsBankTransferSpeiRecordBuilder { clabe: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank_code: self.bank_code.take()?, - bank_name: self.bank_name.take()?, - clabe: self.clabe.take()?, - }) + let (Some(bank_code), Some(bank_name), Some(clabe)) = + (self.bank_code.take(), self.bank_name.take(), self.clabe.take()) + else { + return None; + }; + Some(Self::Out { bank_code, bank_name, clabe }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = FundingInstructionsBankTransferSpeiRecordBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_code" => b.bank_code = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "clabe" => b.clabe = Some(FromValueOpt::from_value(v)?), + "bank_code" => b.bank_code = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "clabe" => b.clabe = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/funding_instructions_bank_transfer_swift_record.rs b/generated/async-stripe-shared/src/funding_instructions_bank_transfer_swift_record.rs index 76b2f048e..a82ce4e24 100644 --- a/generated/async-stripe-shared/src/funding_instructions_bank_transfer_swift_record.rs +++ b/generated/async-stripe-shared/src/funding_instructions_bank_transfer_swift_record.rs @@ -17,7 +17,12 @@ pub struct FundingInstructionsBankTransferSwiftRecordBuilder { swift_code: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - account_number: self.account_number.take()?, - bank_name: self.bank_name.take()?, - swift_code: self.swift_code.take()?, - }) + let (Some(account_number), Some(bank_name), Some(swift_code)) = + (self.account_number.take(), self.bank_name.take(), self.swift_code.take()) + else { + return None; + }; + Some(Self::Out { account_number, bank_name, swift_code }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = FundingInstructionsBankTransferSwiftRecordBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_number" => b.account_number = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "swift_code" => b.swift_code = Some(FromValueOpt::from_value(v)?), + "account_number" => b.account_number = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "swift_code" => b.swift_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/funding_instructions_bank_transfer_zengin_record.rs b/generated/async-stripe-shared/src/funding_instructions_bank_transfer_zengin_record.rs index 1f8caa22b..149c24402 100644 --- a/generated/async-stripe-shared/src/funding_instructions_bank_transfer_zengin_record.rs +++ b/generated/async-stripe-shared/src/funding_instructions_bank_transfer_zengin_record.rs @@ -29,7 +29,12 @@ pub struct FundingInstructionsBankTransferZenginRecordBuilder { branch_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -88,14 +93,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_holder_name), + Some(account_number), + Some(account_type), + Some(bank_code), + Some(bank_name), + Some(branch_code), + Some(branch_name), + ) = ( + self.account_holder_name.take(), + self.account_number.take(), + self.account_type.take(), + self.bank_code.take(), + self.bank_name.take(), + self.branch_code.take(), + self.branch_name.take(), + ) + else { + return None; + }; Some(Self::Out { - account_holder_name: self.account_holder_name.take()?, - account_number: self.account_number.take()?, - account_type: self.account_type.take()?, - bank_code: self.bank_code.take()?, - bank_name: self.bank_name.take()?, - branch_code: self.branch_code.take()?, - branch_name: self.branch_name.take()?, + account_holder_name, + account_number, + account_type, + bank_code, + bank_name, + branch_code, + branch_name, }) } } @@ -123,15 +148,13 @@ const _: () = { let mut b = FundingInstructionsBankTransferZenginRecordBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_holder_name" => { - b.account_holder_name = Some(FromValueOpt::from_value(v)?) - } - "account_number" => b.account_number = Some(FromValueOpt::from_value(v)?), - "account_type" => b.account_type = Some(FromValueOpt::from_value(v)?), - "bank_code" => b.bank_code = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "branch_code" => b.branch_code = Some(FromValueOpt::from_value(v)?), - "branch_name" => b.branch_name = Some(FromValueOpt::from_value(v)?), + "account_holder_name" => b.account_holder_name = FromValueOpt::from_value(v), + "account_number" => b.account_number = FromValueOpt::from_value(v), + "account_type" => b.account_type = FromValueOpt::from_value(v), + "bank_code" => b.bank_code = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "branch_code" => b.branch_code = FromValueOpt::from_value(v), + "branch_name" => b.branch_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/internal_card.rs b/generated/async-stripe-shared/src/internal_card.rs index 272bc9468..f03a65904 100644 --- a/generated/async-stripe-shared/src/internal_card.rs +++ b/generated/async-stripe-shared/src/internal_card.rs @@ -22,7 +22,12 @@ pub struct InternalCardBuilder { last4: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,13 +82,16 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - brand: self.brand.take()?, - country: self.country.take()?, - exp_month: self.exp_month?, - exp_year: self.exp_year?, - last4: self.last4.take()?, - }) + let (Some(brand), Some(country), Some(exp_month), Some(exp_year), Some(last4)) = ( + self.brand.take(), + self.country.take(), + self.exp_month, + self.exp_year, + self.last4.take(), + ) else { + return None; + }; + Some(Self::Out { brand, country, exp_month, exp_year, last4 }) } } @@ -110,11 +118,11 @@ const _: () = { let mut b = InternalCardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "brand" => b.brand = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "exp_month" => b.exp_month = Some(FromValueOpt::from_value(v)?), - "exp_year" => b.exp_year = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), + "brand" => b.brand = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "exp_month" => b.exp_month = FromValueOpt::from_value(v), + "exp_year" => b.exp_year = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice.rs b/generated/async-stripe-shared/src/invoice.rs index 8ddc46d12..6dfdc6b0e 100644 --- a/generated/async-stripe-shared/src/invoice.rs +++ b/generated/async-stripe-shared/src/invoice.rs @@ -352,7 +352,12 @@ pub struct InvoiceBuilder { webhooks_delivered_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -562,88 +567,256 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_country), + Some(account_name), + Some(account_tax_ids), + Some(amount_due), + Some(amount_paid), + Some(amount_remaining), + Some(amount_shipping), + Some(application), + Some(application_fee_amount), + Some(attempt_count), + Some(attempted), + Some(auto_advance), + Some(automatic_tax), + Some(billing_reason), + Some(charge), + Some(collection_method), + Some(created), + Some(currency), + Some(custom_fields), + Some(customer), + Some(customer_address), + Some(customer_email), + Some(customer_name), + Some(customer_phone), + Some(customer_shipping), + Some(customer_tax_exempt), + Some(customer_tax_ids), + Some(default_payment_method), + Some(default_source), + Some(default_tax_rates), + Some(description), + Some(discount), + Some(discounts), + Some(due_date), + Some(effective_at), + Some(ending_balance), + Some(footer), + Some(from_invoice), + Some(hosted_invoice_url), + Some(id), + Some(invoice_pdf), + Some(issuer), + Some(last_finalization_error), + Some(latest_revision), + Some(lines), + Some(livemode), + Some(metadata), + Some(next_payment_attempt), + Some(number), + Some(on_behalf_of), + Some(paid), + Some(paid_out_of_band), + Some(payment_intent), + Some(payment_settings), + Some(period_end), + Some(period_start), + Some(post_payment_credit_notes_amount), + Some(pre_payment_credit_notes_amount), + Some(quote), + Some(receipt_number), + Some(rendering), + Some(shipping_cost), + Some(shipping_details), + Some(starting_balance), + Some(statement_descriptor), + Some(status), + Some(status_transitions), + Some(subscription), + Some(subscription_details), + Some(subscription_proration_date), + Some(subtotal), + Some(subtotal_excluding_tax), + Some(tax), + Some(test_clock), + Some(threshold_reason), + Some(total), + Some(total_discount_amounts), + Some(total_excluding_tax), + Some(total_tax_amounts), + Some(transfer_data), + Some(webhooks_delivered_at), + ) = ( + self.account_country.take(), + self.account_name.take(), + self.account_tax_ids.take(), + self.amount_due, + self.amount_paid, + self.amount_remaining, + self.amount_shipping, + self.application.take(), + self.application_fee_amount, + self.attempt_count, + self.attempted, + self.auto_advance, + self.automatic_tax.take(), + self.billing_reason, + self.charge.take(), + self.collection_method, + self.created, + self.currency, + self.custom_fields.take(), + self.customer.take(), + self.customer_address.take(), + self.customer_email.take(), + self.customer_name.take(), + self.customer_phone.take(), + self.customer_shipping.take(), + self.customer_tax_exempt, + self.customer_tax_ids.take(), + self.default_payment_method.take(), + self.default_source.take(), + self.default_tax_rates.take(), + self.description.take(), + self.discount.take(), + self.discounts.take(), + self.due_date, + self.effective_at, + self.ending_balance, + self.footer.take(), + self.from_invoice.take(), + self.hosted_invoice_url.take(), + self.id.take(), + self.invoice_pdf.take(), + self.issuer.take(), + self.last_finalization_error.take(), + self.latest_revision.take(), + self.lines.take(), + self.livemode, + self.metadata.take(), + self.next_payment_attempt, + self.number.take(), + self.on_behalf_of.take(), + self.paid, + self.paid_out_of_band, + self.payment_intent.take(), + self.payment_settings.take(), + self.period_end, + self.period_start, + self.post_payment_credit_notes_amount, + self.pre_payment_credit_notes_amount, + self.quote.take(), + self.receipt_number.take(), + self.rendering.take(), + self.shipping_cost.take(), + self.shipping_details.take(), + self.starting_balance, + self.statement_descriptor.take(), + self.status, + self.status_transitions, + self.subscription.take(), + self.subscription_details.take(), + self.subscription_proration_date, + self.subtotal, + self.subtotal_excluding_tax, + self.tax, + self.test_clock.take(), + self.threshold_reason.take(), + self.total, + self.total_discount_amounts.take(), + self.total_excluding_tax, + self.total_tax_amounts.take(), + self.transfer_data.take(), + self.webhooks_delivered_at, + ) + else { + return None; + }; Some(Self::Out { - account_country: self.account_country.take()?, - account_name: self.account_name.take()?, - account_tax_ids: self.account_tax_ids.take()?, - amount_due: self.amount_due?, - amount_paid: self.amount_paid?, - amount_remaining: self.amount_remaining?, - amount_shipping: self.amount_shipping?, - application: self.application.take()?, - application_fee_amount: self.application_fee_amount?, - attempt_count: self.attempt_count?, - attempted: self.attempted?, - auto_advance: self.auto_advance?, - automatic_tax: self.automatic_tax.take()?, - billing_reason: self.billing_reason?, - charge: self.charge.take()?, - collection_method: self.collection_method?, - created: self.created?, - currency: self.currency?, - custom_fields: self.custom_fields.take()?, - customer: self.customer.take()?, - customer_address: self.customer_address.take()?, - customer_email: self.customer_email.take()?, - customer_name: self.customer_name.take()?, - customer_phone: self.customer_phone.take()?, - customer_shipping: self.customer_shipping.take()?, - customer_tax_exempt: self.customer_tax_exempt?, - customer_tax_ids: self.customer_tax_ids.take()?, - default_payment_method: self.default_payment_method.take()?, - default_source: self.default_source.take()?, - default_tax_rates: self.default_tax_rates.take()?, - description: self.description.take()?, - discount: self.discount.take()?, - discounts: self.discounts.take()?, - due_date: self.due_date?, - effective_at: self.effective_at?, - ending_balance: self.ending_balance?, - footer: self.footer.take()?, - from_invoice: self.from_invoice.take()?, - hosted_invoice_url: self.hosted_invoice_url.take()?, - id: self.id.take()?, - invoice_pdf: self.invoice_pdf.take()?, - issuer: self.issuer.take()?, - last_finalization_error: self.last_finalization_error.take()?, - latest_revision: self.latest_revision.take()?, - lines: self.lines.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - next_payment_attempt: self.next_payment_attempt?, - number: self.number.take()?, - on_behalf_of: self.on_behalf_of.take()?, - paid: self.paid?, - paid_out_of_band: self.paid_out_of_band?, - payment_intent: self.payment_intent.take()?, - payment_settings: self.payment_settings.take()?, - period_end: self.period_end?, - period_start: self.period_start?, - post_payment_credit_notes_amount: self.post_payment_credit_notes_amount?, - pre_payment_credit_notes_amount: self.pre_payment_credit_notes_amount?, - quote: self.quote.take()?, - receipt_number: self.receipt_number.take()?, - rendering: self.rendering.take()?, - shipping_cost: self.shipping_cost.take()?, - shipping_details: self.shipping_details.take()?, - starting_balance: self.starting_balance?, - statement_descriptor: self.statement_descriptor.take()?, - status: self.status?, - status_transitions: self.status_transitions?, - subscription: self.subscription.take()?, - subscription_details: self.subscription_details.take()?, - subscription_proration_date: self.subscription_proration_date?, - subtotal: self.subtotal?, - subtotal_excluding_tax: self.subtotal_excluding_tax?, - tax: self.tax?, - test_clock: self.test_clock.take()?, - threshold_reason: self.threshold_reason.take()?, - total: self.total?, - total_discount_amounts: self.total_discount_amounts.take()?, - total_excluding_tax: self.total_excluding_tax?, - total_tax_amounts: self.total_tax_amounts.take()?, - transfer_data: self.transfer_data.take()?, - webhooks_delivered_at: self.webhooks_delivered_at?, + account_country, + account_name, + account_tax_ids, + amount_due, + amount_paid, + amount_remaining, + amount_shipping, + application, + application_fee_amount, + attempt_count, + attempted, + auto_advance, + automatic_tax, + billing_reason, + charge, + collection_method, + created, + currency, + custom_fields, + customer, + customer_address, + customer_email, + customer_name, + customer_phone, + customer_shipping, + customer_tax_exempt, + customer_tax_ids, + default_payment_method, + default_source, + default_tax_rates, + description, + discount, + discounts, + due_date, + effective_at, + ending_balance, + footer, + from_invoice, + hosted_invoice_url, + id, + invoice_pdf, + issuer, + last_finalization_error, + latest_revision, + lines, + livemode, + metadata, + next_payment_attempt, + number, + on_behalf_of, + paid, + paid_out_of_band, + payment_intent, + payment_settings, + period_end, + period_start, + post_payment_credit_notes_amount, + pre_payment_credit_notes_amount, + quote, + receipt_number, + rendering, + shipping_cost, + shipping_details, + starting_balance, + statement_descriptor, + status, + status_transitions, + subscription, + subscription_details, + subscription_proration_date, + subtotal, + subtotal_excluding_tax, + tax, + test_clock, + threshold_reason, + total, + total_discount_amounts, + total_excluding_tax, + total_tax_amounts, + transfer_data, + webhooks_delivered_at, }) } } @@ -671,118 +844,104 @@ const _: () = { let mut b = InvoiceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_country" => b.account_country = Some(FromValueOpt::from_value(v)?), - "account_name" => b.account_name = Some(FromValueOpt::from_value(v)?), - "account_tax_ids" => b.account_tax_ids = Some(FromValueOpt::from_value(v)?), - "amount_due" => b.amount_due = Some(FromValueOpt::from_value(v)?), - "amount_paid" => b.amount_paid = Some(FromValueOpt::from_value(v)?), - "amount_remaining" => b.amount_remaining = Some(FromValueOpt::from_value(v)?), - "amount_shipping" => b.amount_shipping = Some(FromValueOpt::from_value(v)?), - "application" => b.application = Some(FromValueOpt::from_value(v)?), + "account_country" => b.account_country = FromValueOpt::from_value(v), + "account_name" => b.account_name = FromValueOpt::from_value(v), + "account_tax_ids" => b.account_tax_ids = FromValueOpt::from_value(v), + "amount_due" => b.amount_due = FromValueOpt::from_value(v), + "amount_paid" => b.amount_paid = FromValueOpt::from_value(v), + "amount_remaining" => b.amount_remaining = FromValueOpt::from_value(v), + "amount_shipping" => b.amount_shipping = FromValueOpt::from_value(v), + "application" => b.application = FromValueOpt::from_value(v), "application_fee_amount" => { - b.application_fee_amount = Some(FromValueOpt::from_value(v)?) - } - "attempt_count" => b.attempt_count = Some(FromValueOpt::from_value(v)?), - "attempted" => b.attempted = Some(FromValueOpt::from_value(v)?), - "auto_advance" => b.auto_advance = Some(FromValueOpt::from_value(v)?), - "automatic_tax" => b.automatic_tax = Some(FromValueOpt::from_value(v)?), - "billing_reason" => b.billing_reason = Some(FromValueOpt::from_value(v)?), - "charge" => b.charge = Some(FromValueOpt::from_value(v)?), - "collection_method" => b.collection_method = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "custom_fields" => b.custom_fields = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "customer_address" => b.customer_address = Some(FromValueOpt::from_value(v)?), - "customer_email" => b.customer_email = Some(FromValueOpt::from_value(v)?), - "customer_name" => b.customer_name = Some(FromValueOpt::from_value(v)?), - "customer_phone" => b.customer_phone = Some(FromValueOpt::from_value(v)?), - "customer_shipping" => b.customer_shipping = Some(FromValueOpt::from_value(v)?), - "customer_tax_exempt" => { - b.customer_tax_exempt = Some(FromValueOpt::from_value(v)?) + b.application_fee_amount = FromValueOpt::from_value(v) } - "customer_tax_ids" => b.customer_tax_ids = Some(FromValueOpt::from_value(v)?), + "attempt_count" => b.attempt_count = FromValueOpt::from_value(v), + "attempted" => b.attempted = FromValueOpt::from_value(v), + "auto_advance" => b.auto_advance = FromValueOpt::from_value(v), + "automatic_tax" => b.automatic_tax = FromValueOpt::from_value(v), + "billing_reason" => b.billing_reason = FromValueOpt::from_value(v), + "charge" => b.charge = FromValueOpt::from_value(v), + "collection_method" => b.collection_method = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "custom_fields" => b.custom_fields = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "customer_address" => b.customer_address = FromValueOpt::from_value(v), + "customer_email" => b.customer_email = FromValueOpt::from_value(v), + "customer_name" => b.customer_name = FromValueOpt::from_value(v), + "customer_phone" => b.customer_phone = FromValueOpt::from_value(v), + "customer_shipping" => b.customer_shipping = FromValueOpt::from_value(v), + "customer_tax_exempt" => b.customer_tax_exempt = FromValueOpt::from_value(v), + "customer_tax_ids" => b.customer_tax_ids = FromValueOpt::from_value(v), "default_payment_method" => { - b.default_payment_method = Some(FromValueOpt::from_value(v)?) + b.default_payment_method = FromValueOpt::from_value(v) } - "default_source" => b.default_source = Some(FromValueOpt::from_value(v)?), - "default_tax_rates" => b.default_tax_rates = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "discount" => b.discount = Some(FromValueOpt::from_value(v)?), - "discounts" => b.discounts = Some(FromValueOpt::from_value(v)?), - "due_date" => b.due_date = Some(FromValueOpt::from_value(v)?), - "effective_at" => b.effective_at = Some(FromValueOpt::from_value(v)?), - "ending_balance" => b.ending_balance = Some(FromValueOpt::from_value(v)?), - "footer" => b.footer = Some(FromValueOpt::from_value(v)?), - "from_invoice" => b.from_invoice = Some(FromValueOpt::from_value(v)?), - "hosted_invoice_url" => { - b.hosted_invoice_url = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "invoice_pdf" => b.invoice_pdf = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), + "default_source" => b.default_source = FromValueOpt::from_value(v), + "default_tax_rates" => b.default_tax_rates = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "discount" => b.discount = FromValueOpt::from_value(v), + "discounts" => b.discounts = FromValueOpt::from_value(v), + "due_date" => b.due_date = FromValueOpt::from_value(v), + "effective_at" => b.effective_at = FromValueOpt::from_value(v), + "ending_balance" => b.ending_balance = FromValueOpt::from_value(v), + "footer" => b.footer = FromValueOpt::from_value(v), + "from_invoice" => b.from_invoice = FromValueOpt::from_value(v), + "hosted_invoice_url" => b.hosted_invoice_url = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "invoice_pdf" => b.invoice_pdf = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), "last_finalization_error" => { - b.last_finalization_error = Some(FromValueOpt::from_value(v)?) - } - "latest_revision" => b.latest_revision = Some(FromValueOpt::from_value(v)?), - "lines" => b.lines = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "next_payment_attempt" => { - b.next_payment_attempt = Some(FromValueOpt::from_value(v)?) + b.last_finalization_error = FromValueOpt::from_value(v) } - "number" => b.number = Some(FromValueOpt::from_value(v)?), - "on_behalf_of" => b.on_behalf_of = Some(FromValueOpt::from_value(v)?), - "paid" => b.paid = Some(FromValueOpt::from_value(v)?), - "paid_out_of_band" => b.paid_out_of_band = Some(FromValueOpt::from_value(v)?), - "payment_intent" => b.payment_intent = Some(FromValueOpt::from_value(v)?), - "payment_settings" => b.payment_settings = Some(FromValueOpt::from_value(v)?), - "period_end" => b.period_end = Some(FromValueOpt::from_value(v)?), - "period_start" => b.period_start = Some(FromValueOpt::from_value(v)?), + "latest_revision" => b.latest_revision = FromValueOpt::from_value(v), + "lines" => b.lines = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "next_payment_attempt" => b.next_payment_attempt = FromValueOpt::from_value(v), + "number" => b.number = FromValueOpt::from_value(v), + "on_behalf_of" => b.on_behalf_of = FromValueOpt::from_value(v), + "paid" => b.paid = FromValueOpt::from_value(v), + "paid_out_of_band" => b.paid_out_of_band = FromValueOpt::from_value(v), + "payment_intent" => b.payment_intent = FromValueOpt::from_value(v), + "payment_settings" => b.payment_settings = FromValueOpt::from_value(v), + "period_end" => b.period_end = FromValueOpt::from_value(v), + "period_start" => b.period_start = FromValueOpt::from_value(v), "post_payment_credit_notes_amount" => { - b.post_payment_credit_notes_amount = Some(FromValueOpt::from_value(v)?) + b.post_payment_credit_notes_amount = FromValueOpt::from_value(v) } "pre_payment_credit_notes_amount" => { - b.pre_payment_credit_notes_amount = Some(FromValueOpt::from_value(v)?) - } - "quote" => b.quote = Some(FromValueOpt::from_value(v)?), - "receipt_number" => b.receipt_number = Some(FromValueOpt::from_value(v)?), - "rendering" => b.rendering = Some(FromValueOpt::from_value(v)?), - "shipping_cost" => b.shipping_cost = Some(FromValueOpt::from_value(v)?), - "shipping_details" => b.shipping_details = Some(FromValueOpt::from_value(v)?), - "starting_balance" => b.starting_balance = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_transitions" => { - b.status_transitions = Some(FromValueOpt::from_value(v)?) - } - "subscription" => b.subscription = Some(FromValueOpt::from_value(v)?), - "subscription_details" => { - b.subscription_details = Some(FromValueOpt::from_value(v)?) + b.pre_payment_credit_notes_amount = FromValueOpt::from_value(v) } + "quote" => b.quote = FromValueOpt::from_value(v), + "receipt_number" => b.receipt_number = FromValueOpt::from_value(v), + "rendering" => b.rendering = FromValueOpt::from_value(v), + "shipping_cost" => b.shipping_cost = FromValueOpt::from_value(v), + "shipping_details" => b.shipping_details = FromValueOpt::from_value(v), + "starting_balance" => b.starting_balance = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "status_transitions" => b.status_transitions = FromValueOpt::from_value(v), + "subscription" => b.subscription = FromValueOpt::from_value(v), + "subscription_details" => b.subscription_details = FromValueOpt::from_value(v), "subscription_proration_date" => { - b.subscription_proration_date = Some(FromValueOpt::from_value(v)?) + b.subscription_proration_date = FromValueOpt::from_value(v) } - "subtotal" => b.subtotal = Some(FromValueOpt::from_value(v)?), + "subtotal" => b.subtotal = FromValueOpt::from_value(v), "subtotal_excluding_tax" => { - b.subtotal_excluding_tax = Some(FromValueOpt::from_value(v)?) + b.subtotal_excluding_tax = FromValueOpt::from_value(v) } - "tax" => b.tax = Some(FromValueOpt::from_value(v)?), - "test_clock" => b.test_clock = Some(FromValueOpt::from_value(v)?), - "threshold_reason" => b.threshold_reason = Some(FromValueOpt::from_value(v)?), - "total" => b.total = Some(FromValueOpt::from_value(v)?), + "tax" => b.tax = FromValueOpt::from_value(v), + "test_clock" => b.test_clock = FromValueOpt::from_value(v), + "threshold_reason" => b.threshold_reason = FromValueOpt::from_value(v), + "total" => b.total = FromValueOpt::from_value(v), "total_discount_amounts" => { - b.total_discount_amounts = Some(FromValueOpt::from_value(v)?) - } - "total_excluding_tax" => { - b.total_excluding_tax = Some(FromValueOpt::from_value(v)?) + b.total_discount_amounts = FromValueOpt::from_value(v) } - "total_tax_amounts" => b.total_tax_amounts = Some(FromValueOpt::from_value(v)?), - "transfer_data" => b.transfer_data = Some(FromValueOpt::from_value(v)?), + "total_excluding_tax" => b.total_excluding_tax = FromValueOpt::from_value(v), + "total_tax_amounts" => b.total_tax_amounts = FromValueOpt::from_value(v), + "transfer_data" => b.transfer_data = FromValueOpt::from_value(v), "webhooks_delivered_at" => { - b.webhooks_delivered_at = Some(FromValueOpt::from_value(v)?) + b.webhooks_delivered_at = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/invoice_installments_card.rs b/generated/async-stripe-shared/src/invoice_installments_card.rs index 5bdfabfc3..8f435988d 100644 --- a/generated/async-stripe-shared/src/invoice_installments_card.rs +++ b/generated/async-stripe-shared/src/invoice_installments_card.rs @@ -10,7 +10,12 @@ pub struct InvoiceInstallmentsCardBuilder { enabled: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled? }) + let (Some(enabled),) = (self.enabled,) else { + return None; + }; + Some(Self::Out { enabled }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = InvoiceInstallmentsCardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_item.rs b/generated/async-stripe-shared/src/invoice_item.rs index d2eb96f9e..b5904b0d6 100644 --- a/generated/async-stripe-shared/src/invoice_item.rs +++ b/generated/async-stripe-shared/src/invoice_item.rs @@ -95,7 +95,12 @@ pub struct InvoiceItemBuilder { unit_amount_decimal: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -184,29 +189,79 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(currency), + Some(customer), + Some(date), + Some(description), + Some(discountable), + Some(discounts), + Some(id), + Some(invoice), + Some(livemode), + Some(metadata), + Some(period), + Some(plan), + Some(price), + Some(proration), + Some(quantity), + Some(subscription), + Some(subscription_item), + Some(tax_rates), + Some(test_clock), + Some(unit_amount), + Some(unit_amount_decimal), + ) = ( + self.amount, + self.currency, + self.customer.take(), + self.date, + self.description.take(), + self.discountable, + self.discounts.take(), + self.id.take(), + self.invoice.take(), + self.livemode, + self.metadata.take(), + self.period, + self.plan.take(), + self.price.take(), + self.proration, + self.quantity, + self.subscription.take(), + self.subscription_item.take(), + self.tax_rates.take(), + self.test_clock.take(), + self.unit_amount, + self.unit_amount_decimal.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - currency: self.currency?, - customer: self.customer.take()?, - date: self.date?, - description: self.description.take()?, - discountable: self.discountable?, - discounts: self.discounts.take()?, - id: self.id.take()?, - invoice: self.invoice.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - period: self.period?, - plan: self.plan.take()?, - price: self.price.take()?, - proration: self.proration?, - quantity: self.quantity?, - subscription: self.subscription.take()?, - subscription_item: self.subscription_item.take()?, - tax_rates: self.tax_rates.take()?, - test_clock: self.test_clock.take()?, - unit_amount: self.unit_amount?, - unit_amount_decimal: self.unit_amount_decimal.take()?, + amount, + currency, + customer, + date, + description, + discountable, + discounts, + id, + invoice, + livemode, + metadata, + period, + plan, + price, + proration, + quantity, + subscription, + subscription_item, + tax_rates, + test_clock, + unit_amount, + unit_amount_decimal, }) } } @@ -234,30 +289,28 @@ const _: () = { let mut b = InvoiceItemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "date" => b.date = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "discountable" => b.discountable = Some(FromValueOpt::from_value(v)?), - "discounts" => b.discounts = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "invoice" => b.invoice = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "period" => b.period = Some(FromValueOpt::from_value(v)?), - "plan" => b.plan = Some(FromValueOpt::from_value(v)?), - "price" => b.price = Some(FromValueOpt::from_value(v)?), - "proration" => b.proration = Some(FromValueOpt::from_value(v)?), - "quantity" => b.quantity = Some(FromValueOpt::from_value(v)?), - "subscription" => b.subscription = Some(FromValueOpt::from_value(v)?), - "subscription_item" => b.subscription_item = Some(FromValueOpt::from_value(v)?), - "tax_rates" => b.tax_rates = Some(FromValueOpt::from_value(v)?), - "test_clock" => b.test_clock = Some(FromValueOpt::from_value(v)?), - "unit_amount" => b.unit_amount = Some(FromValueOpt::from_value(v)?), - "unit_amount_decimal" => { - b.unit_amount_decimal = Some(FromValueOpt::from_value(v)?) - } + "amount" => b.amount = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "date" => b.date = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "discountable" => b.discountable = FromValueOpt::from_value(v), + "discounts" => b.discounts = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "invoice" => b.invoice = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "period" => b.period = FromValueOpt::from_value(v), + "plan" => b.plan = FromValueOpt::from_value(v), + "price" => b.price = FromValueOpt::from_value(v), + "proration" => b.proration = FromValueOpt::from_value(v), + "quantity" => b.quantity = FromValueOpt::from_value(v), + "subscription" => b.subscription = FromValueOpt::from_value(v), + "subscription_item" => b.subscription_item = FromValueOpt::from_value(v), + "tax_rates" => b.tax_rates = FromValueOpt::from_value(v), + "test_clock" => b.test_clock = FromValueOpt::from_value(v), + "unit_amount" => b.unit_amount = FromValueOpt::from_value(v), + "unit_amount_decimal" => b.unit_amount_decimal = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_item_threshold_reason.rs b/generated/async-stripe-shared/src/invoice_item_threshold_reason.rs index 343b491fe..85c324f60 100644 --- a/generated/async-stripe-shared/src/invoice_item_threshold_reason.rs +++ b/generated/async-stripe-shared/src/invoice_item_threshold_reason.rs @@ -13,7 +13,12 @@ pub struct InvoiceItemThresholdReasonBuilder { usage_gte: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - line_item_ids: self.line_item_ids.take()?, - usage_gte: self.usage_gte?, - }) + let (Some(line_item_ids), Some(usage_gte)) = + (self.line_item_ids.take(), self.usage_gte) + else { + return None; + }; + Some(Self::Out { line_item_ids, usage_gte }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = InvoiceItemThresholdReasonBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "line_item_ids" => b.line_item_ids = Some(FromValueOpt::from_value(v)?), - "usage_gte" => b.usage_gte = Some(FromValueOpt::from_value(v)?), + "line_item_ids" => b.line_item_ids = FromValueOpt::from_value(v), + "usage_gte" => b.usage_gte = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_line_item.rs b/generated/async-stripe-shared/src/invoice_line_item.rs index 58be4f051..f80f1019c 100644 --- a/generated/async-stripe-shared/src/invoice_line_item.rs +++ b/generated/async-stripe-shared/src/invoice_line_item.rs @@ -84,7 +84,12 @@ pub struct InvoiceLineItemBuilder { unit_amount_excluding_tax: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -179,31 +184,85 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_excluding_tax), + Some(currency), + Some(description), + Some(discount_amounts), + Some(discountable), + Some(discounts), + Some(id), + Some(invoice), + Some(invoice_item), + Some(livemode), + Some(metadata), + Some(period), + Some(plan), + Some(price), + Some(proration), + Some(proration_details), + Some(quantity), + Some(subscription), + Some(subscription_item), + Some(tax_amounts), + Some(tax_rates), + Some(type_), + Some(unit_amount_excluding_tax), + ) = ( + self.amount, + self.amount_excluding_tax, + self.currency, + self.description.take(), + self.discount_amounts.take(), + self.discountable, + self.discounts.take(), + self.id.take(), + self.invoice.take(), + self.invoice_item.take(), + self.livemode, + self.metadata.take(), + self.period, + self.plan.take(), + self.price.take(), + self.proration, + self.proration_details.take(), + self.quantity, + self.subscription.take(), + self.subscription_item.take(), + self.tax_amounts.take(), + self.tax_rates.take(), + self.type_, + self.unit_amount_excluding_tax.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_excluding_tax: self.amount_excluding_tax?, - currency: self.currency?, - description: self.description.take()?, - discount_amounts: self.discount_amounts.take()?, - discountable: self.discountable?, - discounts: self.discounts.take()?, - id: self.id.take()?, - invoice: self.invoice.take()?, - invoice_item: self.invoice_item.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - period: self.period?, - plan: self.plan.take()?, - price: self.price.take()?, - proration: self.proration?, - proration_details: self.proration_details.take()?, - quantity: self.quantity?, - subscription: self.subscription.take()?, - subscription_item: self.subscription_item.take()?, - tax_amounts: self.tax_amounts.take()?, - tax_rates: self.tax_rates.take()?, - type_: self.type_?, - unit_amount_excluding_tax: self.unit_amount_excluding_tax.take()?, + amount, + amount_excluding_tax, + currency, + description, + discount_amounts, + discountable, + discounts, + id, + invoice, + invoice_item, + livemode, + metadata, + period, + plan, + price, + proration, + proration_details, + quantity, + subscription, + subscription_item, + tax_amounts, + tax_rates, + type_, + unit_amount_excluding_tax, }) } } @@ -231,33 +290,31 @@ const _: () = { let mut b = InvoiceLineItemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_excluding_tax" => { - b.amount_excluding_tax = Some(FromValueOpt::from_value(v)?) - } - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "discount_amounts" => b.discount_amounts = Some(FromValueOpt::from_value(v)?), - "discountable" => b.discountable = Some(FromValueOpt::from_value(v)?), - "discounts" => b.discounts = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "invoice" => b.invoice = Some(FromValueOpt::from_value(v)?), - "invoice_item" => b.invoice_item = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "period" => b.period = Some(FromValueOpt::from_value(v)?), - "plan" => b.plan = Some(FromValueOpt::from_value(v)?), - "price" => b.price = Some(FromValueOpt::from_value(v)?), - "proration" => b.proration = Some(FromValueOpt::from_value(v)?), - "proration_details" => b.proration_details = Some(FromValueOpt::from_value(v)?), - "quantity" => b.quantity = Some(FromValueOpt::from_value(v)?), - "subscription" => b.subscription = Some(FromValueOpt::from_value(v)?), - "subscription_item" => b.subscription_item = Some(FromValueOpt::from_value(v)?), - "tax_amounts" => b.tax_amounts = Some(FromValueOpt::from_value(v)?), - "tax_rates" => b.tax_rates = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_excluding_tax" => b.amount_excluding_tax = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "discount_amounts" => b.discount_amounts = FromValueOpt::from_value(v), + "discountable" => b.discountable = FromValueOpt::from_value(v), + "discounts" => b.discounts = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "invoice" => b.invoice = FromValueOpt::from_value(v), + "invoice_item" => b.invoice_item = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "period" => b.period = FromValueOpt::from_value(v), + "plan" => b.plan = FromValueOpt::from_value(v), + "price" => b.price = FromValueOpt::from_value(v), + "proration" => b.proration = FromValueOpt::from_value(v), + "proration_details" => b.proration_details = FromValueOpt::from_value(v), + "quantity" => b.quantity = FromValueOpt::from_value(v), + "subscription" => b.subscription = FromValueOpt::from_value(v), + "subscription_item" => b.subscription_item = FromValueOpt::from_value(v), + "tax_amounts" => b.tax_amounts = FromValueOpt::from_value(v), + "tax_rates" => b.tax_rates = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), "unit_amount_excluding_tax" => { - b.unit_amount_excluding_tax = Some(FromValueOpt::from_value(v)?) + b.unit_amount_excluding_tax = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/invoice_line_item_period.rs b/generated/async-stripe-shared/src/invoice_line_item_period.rs index 0f49c80db..05d2708b1 100644 --- a/generated/async-stripe-shared/src/invoice_line_item_period.rs +++ b/generated/async-stripe-shared/src/invoice_line_item_period.rs @@ -13,7 +13,12 @@ pub struct InvoiceLineItemPeriodBuilder { start: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { end: self.end?, start: self.start? }) + let (Some(end), Some(start)) = (self.end, self.start) else { + return None; + }; + Some(Self::Out { end, start }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = InvoiceLineItemPeriodBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "end" => b.end = Some(FromValueOpt::from_value(v)?), - "start" => b.start = Some(FromValueOpt::from_value(v)?), + "end" => b.end = FromValueOpt::from_value(v), + "start" => b.start = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_mandate_options_card.rs b/generated/async-stripe-shared/src/invoice_mandate_options_card.rs index b93984e53..66b3bf3a6 100644 --- a/generated/async-stripe-shared/src/invoice_mandate_options_card.rs +++ b/generated/async-stripe-shared/src/invoice_mandate_options_card.rs @@ -18,7 +18,12 @@ pub struct InvoiceMandateOptionsCardBuilder { description: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - amount_type: self.amount_type?, - description: self.description.take()?, - }) + let (Some(amount), Some(amount_type), Some(description)) = + (self.amount, self.amount_type, self.description.take()) + else { + return None; + }; + Some(Self::Out { amount, amount_type, description }) } } @@ -100,9 +106,9 @@ const _: () = { let mut b = InvoiceMandateOptionsCardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_type" => b.amount_type = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_type" => b.amount_type = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_payment_method_options_acss_debit.rs b/generated/async-stripe-shared/src/invoice_payment_method_options_acss_debit.rs index 8575ea9be..d141ddc6c 100644 --- a/generated/async-stripe-shared/src/invoice_payment_method_options_acss_debit.rs +++ b/generated/async-stripe-shared/src/invoice_payment_method_options_acss_debit.rs @@ -13,7 +13,12 @@ pub struct InvoicePaymentMethodOptionsAcssDebitBuilder { verification_method: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,10 +67,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - mandate_options: self.mandate_options?, - verification_method: self.verification_method?, - }) + let (Some(mandate_options), Some(verification_method)) = + (self.mandate_options, self.verification_method) + else { + return None; + }; + Some(Self::Out { mandate_options, verification_method }) } } @@ -92,10 +99,8 @@ const _: () = { let mut b = InvoicePaymentMethodOptionsAcssDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "mandate_options" => b.mandate_options = Some(FromValueOpt::from_value(v)?), - "verification_method" => { - b.verification_method = Some(FromValueOpt::from_value(v)?) - } + "mandate_options" => b.mandate_options = FromValueOpt::from_value(v), + "verification_method" => b.verification_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_payment_method_options_acss_debit_mandate_options.rs b/generated/async-stripe-shared/src/invoice_payment_method_options_acss_debit_mandate_options.rs index 42c0870b6..7e6db15a7 100644 --- a/generated/async-stripe-shared/src/invoice_payment_method_options_acss_debit_mandate_options.rs +++ b/generated/async-stripe-shared/src/invoice_payment_method_options_acss_debit_mandate_options.rs @@ -11,7 +11,12 @@ pub struct InvoicePaymentMethodOptionsAcssDebitMandateOptionsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { transaction_type: self.transaction_type? }) + let (Some(transaction_type),) = (self.transaction_type,) else { + return None; + }; + Some(Self::Out { transaction_type }) } } @@ -83,7 +91,7 @@ const _: () = { let mut b = InvoicePaymentMethodOptionsAcssDebitMandateOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "transaction_type" => b.transaction_type = Some(FromValueOpt::from_value(v)?), + "transaction_type" => b.transaction_type = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_payment_method_options_bancontact.rs b/generated/async-stripe-shared/src/invoice_payment_method_options_bancontact.rs index 394057ae6..5b10b9557 100644 --- a/generated/async-stripe-shared/src/invoice_payment_method_options_bancontact.rs +++ b/generated/async-stripe-shared/src/invoice_payment_method_options_bancontact.rs @@ -10,7 +10,12 @@ pub struct InvoicePaymentMethodOptionsBancontactBuilder { preferred_language: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { preferred_language: self.preferred_language? }) + let (Some(preferred_language),) = (self.preferred_language,) else { + return None; + }; + Some(Self::Out { preferred_language }) } } @@ -82,9 +90,7 @@ const _: () = { let mut b = InvoicePaymentMethodOptionsBancontactBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "preferred_language" => { - b.preferred_language = Some(FromValueOpt::from_value(v)?) - } + "preferred_language" => b.preferred_language = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_payment_method_options_card.rs b/generated/async-stripe-shared/src/invoice_payment_method_options_card.rs index b22b8650e..689a27a88 100644 --- a/generated/async-stripe-shared/src/invoice_payment_method_options_card.rs +++ b/generated/async-stripe-shared/src/invoice_payment_method_options_card.rs @@ -14,7 +14,12 @@ pub struct InvoicePaymentMethodOptionsCardBuilder { request_three_d_secure: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -63,10 +68,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - installments: self.installments?, - request_three_d_secure: self.request_three_d_secure?, - }) + let (Some(installments), Some(request_three_d_secure)) = + (self.installments, self.request_three_d_secure) + else { + return None; + }; + Some(Self::Out { installments, request_three_d_secure }) } } @@ -93,9 +100,9 @@ const _: () = { let mut b = InvoicePaymentMethodOptionsCardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "installments" => b.installments = Some(FromValueOpt::from_value(v)?), + "installments" => b.installments = FromValueOpt::from_value(v), "request_three_d_secure" => { - b.request_three_d_secure = Some(FromValueOpt::from_value(v)?) + b.request_three_d_secure = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/invoice_payment_method_options_customer_balance.rs b/generated/async-stripe-shared/src/invoice_payment_method_options_customer_balance.rs index 2fe1fd6ac..690ae958d 100644 --- a/generated/async-stripe-shared/src/invoice_payment_method_options_customer_balance.rs +++ b/generated/async-stripe-shared/src/invoice_payment_method_options_customer_balance.rs @@ -15,7 +15,12 @@ pub struct InvoicePaymentMethodOptionsCustomerBalanceBuilder { funding_type: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -61,10 +66,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank_transfer: self.bank_transfer.take()?, - funding_type: self.funding_type?, - }) + let (Some(bank_transfer), Some(funding_type)) = + (self.bank_transfer.take(), self.funding_type) + else { + return None; + }; + Some(Self::Out { bank_transfer, funding_type }) } } @@ -91,8 +98,8 @@ const _: () = { let mut b = InvoicePaymentMethodOptionsCustomerBalanceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_transfer" => b.bank_transfer = Some(FromValueOpt::from_value(v)?), - "funding_type" => b.funding_type = Some(FromValueOpt::from_value(v)?), + "bank_transfer" => b.bank_transfer = FromValueOpt::from_value(v), + "funding_type" => b.funding_type = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_payment_method_options_customer_balance_bank_transfer.rs b/generated/async-stripe-shared/src/invoice_payment_method_options_customer_balance_bank_transfer.rs index 9d1426686..048a92d3a 100644 --- a/generated/async-stripe-shared/src/invoice_payment_method_options_customer_balance_bank_transfer.rs +++ b/generated/async-stripe-shared/src/invoice_payment_method_options_customer_balance_bank_transfer.rs @@ -17,7 +17,12 @@ pub struct InvoicePaymentMethodOptionsCustomerBalanceBankTransferBuilder { type_: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -64,7 +69,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { eu_bank_transfer: self.eu_bank_transfer?, type_: self.type_.take()? }) + let (Some(eu_bank_transfer), Some(type_)) = (self.eu_bank_transfer, self.type_.take()) + else { + return None; + }; + Some(Self::Out { eu_bank_transfer, type_ }) } } @@ -92,8 +101,8 @@ const _: () = { InvoicePaymentMethodOptionsCustomerBalanceBankTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "eu_bank_transfer" => b.eu_bank_transfer = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "eu_bank_transfer" => b.eu_bank_transfer = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer.rs b/generated/async-stripe-shared/src/invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer.rs index 0f882d5ca..bf6242857 100644 --- a/generated/async-stripe-shared/src/invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer.rs +++ b/generated/async-stripe-shared/src/invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer.rs @@ -11,7 +11,12 @@ pub struct InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferB country: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { country: self.country? }) + let (Some(country),) = (self.country,) else { + return None; + }; + Some(Self::Out { country }) } } @@ -83,7 +91,7 @@ const _: () = { let mut b = InvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "country" => b.country = Some(FromValueOpt::from_value(v)?), + "country" => b.country = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_payment_method_options_konbini.rs b/generated/async-stripe-shared/src/invoice_payment_method_options_konbini.rs index 6ef13be41..4e8c5fdbe 100644 --- a/generated/async-stripe-shared/src/invoice_payment_method_options_konbini.rs +++ b/generated/async-stripe-shared/src/invoice_payment_method_options_konbini.rs @@ -5,7 +5,12 @@ pub struct InvoicePaymentMethodOptionsKonbini {} #[doc(hidden)] pub struct InvoicePaymentMethodOptionsKonbiniBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/invoice_payment_method_options_sepa_debit.rs b/generated/async-stripe-shared/src/invoice_payment_method_options_sepa_debit.rs index 008d39018..2a3578abd 100644 --- a/generated/async-stripe-shared/src/invoice_payment_method_options_sepa_debit.rs +++ b/generated/async-stripe-shared/src/invoice_payment_method_options_sepa_debit.rs @@ -5,7 +5,12 @@ pub struct InvoicePaymentMethodOptionsSepaDebit {} #[doc(hidden)] pub struct InvoicePaymentMethodOptionsSepaDebitBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/invoice_payment_method_options_us_bank_account.rs b/generated/async-stripe-shared/src/invoice_payment_method_options_us_bank_account.rs index 1c48b1a3f..e349fd8e7 100644 --- a/generated/async-stripe-shared/src/invoice_payment_method_options_us_bank_account.rs +++ b/generated/async-stripe-shared/src/invoice_payment_method_options_us_bank_account.rs @@ -14,7 +14,12 @@ pub struct InvoicePaymentMethodOptionsUsBankAccountBuilder { verification_method: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -63,10 +68,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - financial_connections: self.financial_connections.take()?, - verification_method: self.verification_method?, - }) + let (Some(financial_connections), Some(verification_method)) = + (self.financial_connections.take(), self.verification_method) + else { + return None; + }; + Some(Self::Out { financial_connections, verification_method }) } } @@ -94,11 +101,9 @@ const _: () = { for (k, v) in obj { match k.as_str() { "financial_connections" => { - b.financial_connections = Some(FromValueOpt::from_value(v)?) - } - "verification_method" => { - b.verification_method = Some(FromValueOpt::from_value(v)?) + b.financial_connections = FromValueOpt::from_value(v) } + "verification_method" => b.verification_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_payment_method_options_us_bank_account_linked_account_options.rs b/generated/async-stripe-shared/src/invoice_payment_method_options_us_bank_account_linked_account_options.rs index 5fdfe9603..6f051818e 100644 --- a/generated/async-stripe-shared/src/invoice_payment_method_options_us_bank_account_linked_account_options.rs +++ b/generated/async-stripe-shared/src/invoice_payment_method_options_us_bank_account_linked_account_options.rs @@ -17,7 +17,12 @@ pub struct InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsBuilder { Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -63,10 +68,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - permissions: self.permissions.take()?, - prefetch: self.prefetch.take()?, - }) + let (Some(permissions), Some(prefetch)) = + (self.permissions.take(), self.prefetch.take()) + else { + return None; + }; + Some(Self::Out { permissions, prefetch }) } } @@ -95,8 +102,8 @@ const _: () = { ); for (k, v) in obj { match k.as_str() { - "permissions" => b.permissions = Some(FromValueOpt::from_value(v)?), - "prefetch" => b.prefetch = Some(FromValueOpt::from_value(v)?), + "permissions" => b.permissions = FromValueOpt::from_value(v), + "prefetch" => b.prefetch = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_rendering_pdf.rs b/generated/async-stripe-shared/src/invoice_rendering_pdf.rs index 33ad99c75..370217948 100644 --- a/generated/async-stripe-shared/src/invoice_rendering_pdf.rs +++ b/generated/async-stripe-shared/src/invoice_rendering_pdf.rs @@ -12,7 +12,12 @@ pub struct InvoiceRenderingPdfBuilder { page_size: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -57,7 +62,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { page_size: self.page_size? }) + let (Some(page_size),) = (self.page_size,) else { + return None; + }; + Some(Self::Out { page_size }) } } @@ -84,7 +92,7 @@ const _: () = { let mut b = InvoiceRenderingPdfBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "page_size" => b.page_size = Some(FromValueOpt::from_value(v)?), + "page_size" => b.page_size = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_setting_custom_field.rs b/generated/async-stripe-shared/src/invoice_setting_custom_field.rs index c4358c534..b938e3258 100644 --- a/generated/async-stripe-shared/src/invoice_setting_custom_field.rs +++ b/generated/async-stripe-shared/src/invoice_setting_custom_field.rs @@ -13,7 +13,12 @@ pub struct InvoiceSettingCustomFieldBuilder { value: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { name: self.name.take()?, value: self.value.take()? }) + let (Some(name), Some(value)) = (self.name.take(), self.value.take()) else { + return None; + }; + Some(Self::Out { name, value }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = InvoiceSettingCustomFieldBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "value" => b.value = Some(FromValueOpt::from_value(v)?), + "name" => b.name = FromValueOpt::from_value(v), + "value" => b.value = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_setting_customer_rendering_options.rs b/generated/async-stripe-shared/src/invoice_setting_customer_rendering_options.rs index f6c336eb4..243fc1f36 100644 --- a/generated/async-stripe-shared/src/invoice_setting_customer_rendering_options.rs +++ b/generated/async-stripe-shared/src/invoice_setting_customer_rendering_options.rs @@ -10,7 +10,12 @@ pub struct InvoiceSettingCustomerRenderingOptionsBuilder { amount_tax_display: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { amount_tax_display: self.amount_tax_display.take()? }) + let (Some(amount_tax_display),) = (self.amount_tax_display.take(),) else { + return None; + }; + Some(Self::Out { amount_tax_display }) } } @@ -82,9 +90,7 @@ const _: () = { let mut b = InvoiceSettingCustomerRenderingOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_tax_display" => { - b.amount_tax_display = Some(FromValueOpt::from_value(v)?) - } + "amount_tax_display" => b.amount_tax_display = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_setting_customer_setting.rs b/generated/async-stripe-shared/src/invoice_setting_customer_setting.rs index a43893af0..508f1804a 100644 --- a/generated/async-stripe-shared/src/invoice_setting_customer_setting.rs +++ b/generated/async-stripe-shared/src/invoice_setting_customer_setting.rs @@ -19,7 +19,12 @@ pub struct InvoiceSettingCustomerSettingBuilder { rendering_options: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,21 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - custom_fields: self.custom_fields.take()?, - default_payment_method: self.default_payment_method.take()?, - footer: self.footer.take()?, - rendering_options: self.rendering_options.take()?, - }) + let ( + Some(custom_fields), + Some(default_payment_method), + Some(footer), + Some(rendering_options), + ) = ( + self.custom_fields.take(), + self.default_payment_method.take(), + self.footer.take(), + self.rendering_options.take(), + ) + else { + return None; + }; + Some(Self::Out { custom_fields, default_payment_method, footer, rendering_options }) } } @@ -104,12 +118,12 @@ const _: () = { let mut b = InvoiceSettingCustomerSettingBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "custom_fields" => b.custom_fields = Some(FromValueOpt::from_value(v)?), + "custom_fields" => b.custom_fields = FromValueOpt::from_value(v), "default_payment_method" => { - b.default_payment_method = Some(FromValueOpt::from_value(v)?) + b.default_payment_method = FromValueOpt::from_value(v) } - "footer" => b.footer = Some(FromValueOpt::from_value(v)?), - "rendering_options" => b.rendering_options = Some(FromValueOpt::from_value(v)?), + "footer" => b.footer = FromValueOpt::from_value(v), + "rendering_options" => b.rendering_options = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_setting_quote_setting.rs b/generated/async-stripe-shared/src/invoice_setting_quote_setting.rs index 1d8b244cc..0c2458d4b 100644 --- a/generated/async-stripe-shared/src/invoice_setting_quote_setting.rs +++ b/generated/async-stripe-shared/src/invoice_setting_quote_setting.rs @@ -13,7 +13,12 @@ pub struct InvoiceSettingQuoteSettingBuilder { issuer: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { days_until_due: self.days_until_due?, issuer: self.issuer.take()? }) + let (Some(days_until_due), Some(issuer)) = (self.days_until_due, self.issuer.take()) + else { + return None; + }; + Some(Self::Out { days_until_due, issuer }) } } @@ -86,8 +95,8 @@ const _: () = { let mut b = InvoiceSettingQuoteSettingBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "days_until_due" => b.days_until_due = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), + "days_until_due" => b.days_until_due = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_setting_rendering_options.rs b/generated/async-stripe-shared/src/invoice_setting_rendering_options.rs index 9eacca3e8..21c3db8e1 100644 --- a/generated/async-stripe-shared/src/invoice_setting_rendering_options.rs +++ b/generated/async-stripe-shared/src/invoice_setting_rendering_options.rs @@ -10,7 +10,12 @@ pub struct InvoiceSettingRenderingOptionsBuilder { amount_tax_display: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { amount_tax_display: self.amount_tax_display.take()? }) + let (Some(amount_tax_display),) = (self.amount_tax_display.take(),) else { + return None; + }; + Some(Self::Out { amount_tax_display }) } } @@ -82,9 +90,7 @@ const _: () = { let mut b = InvoiceSettingRenderingOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_tax_display" => { - b.amount_tax_display = Some(FromValueOpt::from_value(v)?) - } + "amount_tax_display" => b.amount_tax_display = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_setting_subscription_schedule_phase_setting.rs b/generated/async-stripe-shared/src/invoice_setting_subscription_schedule_phase_setting.rs index 65bf7e917..694081aa1 100644 --- a/generated/async-stripe-shared/src/invoice_setting_subscription_schedule_phase_setting.rs +++ b/generated/async-stripe-shared/src/invoice_setting_subscription_schedule_phase_setting.rs @@ -19,7 +19,12 @@ pub struct InvoiceSettingSubscriptionSchedulePhaseSettingBuilder { issuer: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,11 +75,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - account_tax_ids: self.account_tax_ids.take()?, - days_until_due: self.days_until_due?, - issuer: self.issuer.take()?, - }) + let (Some(account_tax_ids), Some(days_until_due), Some(issuer)) = + (self.account_tax_ids.take(), self.days_until_due, self.issuer.take()) + else { + return None; + }; + Some(Self::Out { account_tax_ids, days_until_due, issuer }) } } @@ -101,9 +107,9 @@ const _: () = { let mut b = InvoiceSettingSubscriptionSchedulePhaseSettingBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_tax_ids" => b.account_tax_ids = Some(FromValueOpt::from_value(v)?), - "days_until_due" => b.days_until_due = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), + "account_tax_ids" => b.account_tax_ids = FromValueOpt::from_value(v), + "days_until_due" => b.days_until_due = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_setting_subscription_schedule_setting.rs b/generated/async-stripe-shared/src/invoice_setting_subscription_schedule_setting.rs index 835a29460..150174f7c 100644 --- a/generated/async-stripe-shared/src/invoice_setting_subscription_schedule_setting.rs +++ b/generated/async-stripe-shared/src/invoice_setting_subscription_schedule_setting.rs @@ -17,7 +17,12 @@ pub struct InvoiceSettingSubscriptionScheduleSettingBuilder { issuer: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - account_tax_ids: self.account_tax_ids.take()?, - days_until_due: self.days_until_due?, - issuer: self.issuer.take()?, - }) + let (Some(account_tax_ids), Some(days_until_due), Some(issuer)) = + (self.account_tax_ids.take(), self.days_until_due, self.issuer.take()) + else { + return None; + }; + Some(Self::Out { account_tax_ids, days_until_due, issuer }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = InvoiceSettingSubscriptionScheduleSettingBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_tax_ids" => b.account_tax_ids = Some(FromValueOpt::from_value(v)?), - "days_until_due" => b.days_until_due = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), + "account_tax_ids" => b.account_tax_ids = FromValueOpt::from_value(v), + "days_until_due" => b.days_until_due = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_tax_amount.rs b/generated/async-stripe-shared/src/invoice_tax_amount.rs index c64d848b6..0918995e0 100644 --- a/generated/async-stripe-shared/src/invoice_tax_amount.rs +++ b/generated/async-stripe-shared/src/invoice_tax_amount.rs @@ -23,7 +23,12 @@ pub struct InvoiceTaxAmountBuilder { taxable_amount: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -78,13 +83,23 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - inclusive: self.inclusive?, - tax_rate: self.tax_rate.take()?, - taxability_reason: self.taxability_reason?, - taxable_amount: self.taxable_amount?, - }) + let ( + Some(amount), + Some(inclusive), + Some(tax_rate), + Some(taxability_reason), + Some(taxable_amount), + ) = ( + self.amount, + self.inclusive, + self.tax_rate.take(), + self.taxability_reason, + self.taxable_amount, + ) + else { + return None; + }; + Some(Self::Out { amount, inclusive, tax_rate, taxability_reason, taxable_amount }) } } @@ -111,11 +126,11 @@ const _: () = { let mut b = InvoiceTaxAmountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "inclusive" => b.inclusive = Some(FromValueOpt::from_value(v)?), - "tax_rate" => b.tax_rate = Some(FromValueOpt::from_value(v)?), - "taxability_reason" => b.taxability_reason = Some(FromValueOpt::from_value(v)?), - "taxable_amount" => b.taxable_amount = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "inclusive" => b.inclusive = FromValueOpt::from_value(v), + "tax_rate" => b.tax_rate = FromValueOpt::from_value(v), + "taxability_reason" => b.taxability_reason = FromValueOpt::from_value(v), + "taxable_amount" => b.taxable_amount = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_threshold_reason.rs b/generated/async-stripe-shared/src/invoice_threshold_reason.rs index 1ddcb65a8..398466a19 100644 --- a/generated/async-stripe-shared/src/invoice_threshold_reason.rs +++ b/generated/async-stripe-shared/src/invoice_threshold_reason.rs @@ -13,7 +13,12 @@ pub struct InvoiceThresholdReasonBuilder { item_reasons: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount_gte: self.amount_gte?, - item_reasons: self.item_reasons.take()?, - }) + let (Some(amount_gte), Some(item_reasons)) = + (self.amount_gte, self.item_reasons.take()) + else { + return None; + }; + Some(Self::Out { amount_gte, item_reasons }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = InvoiceThresholdReasonBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_gte" => b.amount_gte = Some(FromValueOpt::from_value(v)?), - "item_reasons" => b.item_reasons = Some(FromValueOpt::from_value(v)?), + "amount_gte" => b.amount_gte = FromValueOpt::from_value(v), + "item_reasons" => b.item_reasons = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoice_transfer_data.rs b/generated/async-stripe-shared/src/invoice_transfer_data.rs index c7525459f..aba17f290 100644 --- a/generated/async-stripe-shared/src/invoice_transfer_data.rs +++ b/generated/async-stripe-shared/src/invoice_transfer_data.rs @@ -14,7 +14,12 @@ pub struct InvoiceTransferDataBuilder { destination: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { amount: self.amount?, destination: self.destination.take()? }) + let (Some(amount), Some(destination)) = (self.amount, self.destination.take()) else { + return None; + }; + Some(Self::Out { amount, destination }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = InvoiceTransferDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "destination" => b.destination = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "destination" => b.destination = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoices_payment_method_options.rs b/generated/async-stripe-shared/src/invoices_payment_method_options.rs index 8b9c2d384..af15c9706 100644 --- a/generated/async-stripe-shared/src/invoices_payment_method_options.rs +++ b/generated/async-stripe-shared/src/invoices_payment_method_options.rs @@ -28,7 +28,12 @@ pub struct InvoicesPaymentMethodOptionsBuilder { us_bank_account: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -87,14 +92,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(acss_debit), + Some(bancontact), + Some(card), + Some(customer_balance), + Some(konbini), + Some(sepa_debit), + Some(us_bank_account), + ) = ( + self.acss_debit, + self.bancontact, + self.card, + self.customer_balance.take(), + self.konbini, + self.sepa_debit, + self.us_bank_account.take(), + ) + else { + return None; + }; Some(Self::Out { - acss_debit: self.acss_debit?, - bancontact: self.bancontact?, - card: self.card?, - customer_balance: self.customer_balance.take()?, - konbini: self.konbini?, - sepa_debit: self.sepa_debit?, - us_bank_account: self.us_bank_account.take()?, + acss_debit, + bancontact, + card, + customer_balance, + konbini, + sepa_debit, + us_bank_account, }) } } @@ -122,13 +147,13 @@ const _: () = { let mut b = InvoicesPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "acss_debit" => b.acss_debit = Some(FromValueOpt::from_value(v)?), - "bancontact" => b.bancontact = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "customer_balance" => b.customer_balance = Some(FromValueOpt::from_value(v)?), - "konbini" => b.konbini = Some(FromValueOpt::from_value(v)?), - "sepa_debit" => b.sepa_debit = Some(FromValueOpt::from_value(v)?), - "us_bank_account" => b.us_bank_account = Some(FromValueOpt::from_value(v)?), + "acss_debit" => b.acss_debit = FromValueOpt::from_value(v), + "bancontact" => b.bancontact = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "customer_balance" => b.customer_balance = FromValueOpt::from_value(v), + "konbini" => b.konbini = FromValueOpt::from_value(v), + "sepa_debit" => b.sepa_debit = FromValueOpt::from_value(v), + "us_bank_account" => b.us_bank_account = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoices_payment_settings.rs b/generated/async-stripe-shared/src/invoices_payment_settings.rs index 55e317858..77ba92be1 100644 --- a/generated/async-stripe-shared/src/invoices_payment_settings.rs +++ b/generated/async-stripe-shared/src/invoices_payment_settings.rs @@ -19,7 +19,12 @@ pub struct InvoicesPaymentSettingsBuilder { payment_method_types: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,11 +75,14 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - default_mandate: self.default_mandate.take()?, - payment_method_options: self.payment_method_options.take()?, - payment_method_types: self.payment_method_types.take()?, - }) + let (Some(default_mandate), Some(payment_method_options), Some(payment_method_types)) = ( + self.default_mandate.take(), + self.payment_method_options.take(), + self.payment_method_types.take(), + ) else { + return None; + }; + Some(Self::Out { default_mandate, payment_method_options, payment_method_types }) } } @@ -101,13 +109,11 @@ const _: () = { let mut b = InvoicesPaymentSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "default_mandate" => b.default_mandate = Some(FromValueOpt::from_value(v)?), + "default_mandate" => b.default_mandate = FromValueOpt::from_value(v), "payment_method_options" => { - b.payment_method_options = Some(FromValueOpt::from_value(v)?) - } - "payment_method_types" => { - b.payment_method_types = Some(FromValueOpt::from_value(v)?) + b.payment_method_options = FromValueOpt::from_value(v) } + "payment_method_types" => b.payment_method_types = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoices_resource_from_invoice.rs b/generated/async-stripe-shared/src/invoices_resource_from_invoice.rs index 434b6cdb7..1ecd098e6 100644 --- a/generated/async-stripe-shared/src/invoices_resource_from_invoice.rs +++ b/generated/async-stripe-shared/src/invoices_resource_from_invoice.rs @@ -13,7 +13,12 @@ pub struct InvoicesResourceFromInvoiceBuilder { invoice: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { action: self.action.take()?, invoice: self.invoice.take()? }) + let (Some(action), Some(invoice)) = (self.action.take(), self.invoice.take()) else { + return None; + }; + Some(Self::Out { action, invoice }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = InvoicesResourceFromInvoiceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "action" => b.action = Some(FromValueOpt::from_value(v)?), - "invoice" => b.invoice = Some(FromValueOpt::from_value(v)?), + "action" => b.action = FromValueOpt::from_value(v), + "invoice" => b.invoice = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoices_resource_invoice_rendering.rs b/generated/async-stripe-shared/src/invoices_resource_invoice_rendering.rs index d5a2bcb19..33e06ab7a 100644 --- a/generated/async-stripe-shared/src/invoices_resource_invoice_rendering.rs +++ b/generated/async-stripe-shared/src/invoices_resource_invoice_rendering.rs @@ -13,7 +13,12 @@ pub struct InvoicesResourceInvoiceRenderingBuilder { pdf: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { amount_tax_display: self.amount_tax_display.take()?, pdf: self.pdf? }) + let (Some(amount_tax_display), Some(pdf)) = (self.amount_tax_display.take(), self.pdf) + else { + return None; + }; + Some(Self::Out { amount_tax_display, pdf }) } } @@ -86,10 +95,8 @@ const _: () = { let mut b = InvoicesResourceInvoiceRenderingBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_tax_display" => { - b.amount_tax_display = Some(FromValueOpt::from_value(v)?) - } - "pdf" => b.pdf = Some(FromValueOpt::from_value(v)?), + "amount_tax_display" => b.amount_tax_display = FromValueOpt::from_value(v), + "pdf" => b.pdf = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoices_resource_invoice_tax_id.rs b/generated/async-stripe-shared/src/invoices_resource_invoice_tax_id.rs index 909c989ef..91e61106f 100644 --- a/generated/async-stripe-shared/src/invoices_resource_invoice_tax_id.rs +++ b/generated/async-stripe-shared/src/invoices_resource_invoice_tax_id.rs @@ -14,7 +14,12 @@ pub struct InvoicesResourceInvoiceTaxIdBuilder { value: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { type_: self.type_?, value: self.value.take()? }) + let (Some(type_), Some(value)) = (self.type_, self.value.take()) else { + return None; + }; + Some(Self::Out { type_, value }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = InvoicesResourceInvoiceTaxIdBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "value" => b.value = Some(FromValueOpt::from_value(v)?), + "type" => b.type_ = FromValueOpt::from_value(v), + "value" => b.value = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoices_resource_line_items_credited_items.rs b/generated/async-stripe-shared/src/invoices_resource_line_items_credited_items.rs index 1e0f73011..4b11df1ee 100644 --- a/generated/async-stripe-shared/src/invoices_resource_line_items_credited_items.rs +++ b/generated/async-stripe-shared/src/invoices_resource_line_items_credited_items.rs @@ -13,7 +13,12 @@ pub struct InvoicesResourceLineItemsCreditedItemsBuilder { invoice_line_items: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - invoice: self.invoice.take()?, - invoice_line_items: self.invoice_line_items.take()?, - }) + let (Some(invoice), Some(invoice_line_items)) = + (self.invoice.take(), self.invoice_line_items.take()) + else { + return None; + }; + Some(Self::Out { invoice, invoice_line_items }) } } @@ -89,10 +96,8 @@ const _: () = { let mut b = InvoicesResourceLineItemsCreditedItemsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "invoice" => b.invoice = Some(FromValueOpt::from_value(v)?), - "invoice_line_items" => { - b.invoice_line_items = Some(FromValueOpt::from_value(v)?) - } + "invoice" => b.invoice = FromValueOpt::from_value(v), + "invoice_line_items" => b.invoice_line_items = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoices_resource_line_items_proration_details.rs b/generated/async-stripe-shared/src/invoices_resource_line_items_proration_details.rs index 8cf179dd5..0afe702e7 100644 --- a/generated/async-stripe-shared/src/invoices_resource_line_items_proration_details.rs +++ b/generated/async-stripe-shared/src/invoices_resource_line_items_proration_details.rs @@ -10,7 +10,12 @@ pub struct InvoicesResourceLineItemsProrationDetailsBuilder { credited_items: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { credited_items: self.credited_items.take()? }) + let (Some(credited_items),) = (self.credited_items.take(),) else { + return None; + }; + Some(Self::Out { credited_items }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = InvoicesResourceLineItemsProrationDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "credited_items" => b.credited_items = Some(FromValueOpt::from_value(v)?), + "credited_items" => b.credited_items = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoices_resource_shipping_cost.rs b/generated/async-stripe-shared/src/invoices_resource_shipping_cost.rs index 388023005..756dce8c6 100644 --- a/generated/async-stripe-shared/src/invoices_resource_shipping_cost.rs +++ b/generated/async-stripe-shared/src/invoices_resource_shipping_cost.rs @@ -22,7 +22,12 @@ pub struct InvoicesResourceShippingCostBuilder { taxes: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,13 +82,23 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount_subtotal: self.amount_subtotal?, - amount_tax: self.amount_tax?, - amount_total: self.amount_total?, - shipping_rate: self.shipping_rate.take()?, - taxes: self.taxes.take()?, - }) + let ( + Some(amount_subtotal), + Some(amount_tax), + Some(amount_total), + Some(shipping_rate), + Some(taxes), + ) = ( + self.amount_subtotal, + self.amount_tax, + self.amount_total, + self.shipping_rate.take(), + self.taxes.take(), + ) + else { + return None; + }; + Some(Self::Out { amount_subtotal, amount_tax, amount_total, shipping_rate, taxes }) } } @@ -110,11 +125,11 @@ const _: () = { let mut b = InvoicesResourceShippingCostBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_subtotal" => b.amount_subtotal = Some(FromValueOpt::from_value(v)?), - "amount_tax" => b.amount_tax = Some(FromValueOpt::from_value(v)?), - "amount_total" => b.amount_total = Some(FromValueOpt::from_value(v)?), - "shipping_rate" => b.shipping_rate = Some(FromValueOpt::from_value(v)?), - "taxes" => b.taxes = Some(FromValueOpt::from_value(v)?), + "amount_subtotal" => b.amount_subtotal = FromValueOpt::from_value(v), + "amount_tax" => b.amount_tax = FromValueOpt::from_value(v), + "amount_total" => b.amount_total = FromValueOpt::from_value(v), + "shipping_rate" => b.shipping_rate = FromValueOpt::from_value(v), + "taxes" => b.taxes = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/invoices_resource_status_transitions.rs b/generated/async-stripe-shared/src/invoices_resource_status_transitions.rs index eaf20af2c..782e78f10 100644 --- a/generated/async-stripe-shared/src/invoices_resource_status_transitions.rs +++ b/generated/async-stripe-shared/src/invoices_resource_status_transitions.rs @@ -19,7 +19,12 @@ pub struct InvoicesResourceStatusTransitionsBuilder { voided_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - finalized_at: self.finalized_at?, - marked_uncollectible_at: self.marked_uncollectible_at?, - paid_at: self.paid_at?, - voided_at: self.voided_at?, - }) + let (Some(finalized_at), Some(marked_uncollectible_at), Some(paid_at), Some(voided_at)) = + (self.finalized_at, self.marked_uncollectible_at, self.paid_at, self.voided_at) + else { + return None; + }; + Some(Self::Out { finalized_at, marked_uncollectible_at, paid_at, voided_at }) } } @@ -104,12 +109,12 @@ const _: () = { let mut b = InvoicesResourceStatusTransitionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "finalized_at" => b.finalized_at = Some(FromValueOpt::from_value(v)?), + "finalized_at" => b.finalized_at = FromValueOpt::from_value(v), "marked_uncollectible_at" => { - b.marked_uncollectible_at = Some(FromValueOpt::from_value(v)?) + b.marked_uncollectible_at = FromValueOpt::from_value(v) } - "paid_at" => b.paid_at = Some(FromValueOpt::from_value(v)?), - "voided_at" => b.voided_at = Some(FromValueOpt::from_value(v)?), + "paid_at" => b.paid_at = FromValueOpt::from_value(v), + "voided_at" => b.voided_at = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_authorization.rs b/generated/async-stripe-shared/src/issuing_authorization.rs index 08d3bb74f..45854b809 100644 --- a/generated/async-stripe-shared/src/issuing_authorization.rs +++ b/generated/async-stripe-shared/src/issuing_authorization.rs @@ -102,7 +102,12 @@ pub struct IssuingAuthorizationBuilder { wallet: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -195,31 +200,85 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_details), + Some(approved), + Some(authorization_method), + Some(balance_transactions), + Some(card), + Some(cardholder), + Some(created), + Some(currency), + Some(id), + Some(livemode), + Some(merchant_amount), + Some(merchant_currency), + Some(merchant_data), + Some(metadata), + Some(network_data), + Some(pending_request), + Some(request_history), + Some(status), + Some(token), + Some(transactions), + Some(treasury), + Some(verification_data), + Some(wallet), + ) = ( + self.amount, + self.amount_details, + self.approved, + self.authorization_method, + self.balance_transactions.take(), + self.card.take(), + self.cardholder.take(), + self.created, + self.currency, + self.id.take(), + self.livemode, + self.merchant_amount, + self.merchant_currency, + self.merchant_data.take(), + self.metadata.take(), + self.network_data.take(), + self.pending_request, + self.request_history.take(), + self.status, + self.token.take(), + self.transactions.take(), + self.treasury.take(), + self.verification_data.take(), + self.wallet.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_details: self.amount_details?, - approved: self.approved?, - authorization_method: self.authorization_method?, - balance_transactions: self.balance_transactions.take()?, - card: self.card.take()?, - cardholder: self.cardholder.take()?, - created: self.created?, - currency: self.currency?, - id: self.id.take()?, - livemode: self.livemode?, - merchant_amount: self.merchant_amount?, - merchant_currency: self.merchant_currency?, - merchant_data: self.merchant_data.take()?, - metadata: self.metadata.take()?, - network_data: self.network_data.take()?, - pending_request: self.pending_request?, - request_history: self.request_history.take()?, - status: self.status?, - token: self.token.take()?, - transactions: self.transactions.take()?, - treasury: self.treasury.take()?, - verification_data: self.verification_data.take()?, - wallet: self.wallet.take()?, + amount, + amount_details, + approved, + authorization_method, + balance_transactions, + card, + cardholder, + created, + currency, + id, + livemode, + merchant_amount, + merchant_currency, + merchant_data, + metadata, + network_data, + pending_request, + request_history, + status, + token, + transactions, + treasury, + verification_data, + wallet, }) } } @@ -247,34 +306,30 @@ const _: () = { let mut b = IssuingAuthorizationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_details" => b.amount_details = Some(FromValueOpt::from_value(v)?), - "approved" => b.approved = Some(FromValueOpt::from_value(v)?), - "authorization_method" => { - b.authorization_method = Some(FromValueOpt::from_value(v)?) - } - "balance_transactions" => { - b.balance_transactions = Some(FromValueOpt::from_value(v)?) - } - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "cardholder" => b.cardholder = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "merchant_amount" => b.merchant_amount = Some(FromValueOpt::from_value(v)?), - "merchant_currency" => b.merchant_currency = Some(FromValueOpt::from_value(v)?), - "merchant_data" => b.merchant_data = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "network_data" => b.network_data = Some(FromValueOpt::from_value(v)?), - "pending_request" => b.pending_request = Some(FromValueOpt::from_value(v)?), - "request_history" => b.request_history = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "token" => b.token = Some(FromValueOpt::from_value(v)?), - "transactions" => b.transactions = Some(FromValueOpt::from_value(v)?), - "treasury" => b.treasury = Some(FromValueOpt::from_value(v)?), - "verification_data" => b.verification_data = Some(FromValueOpt::from_value(v)?), - "wallet" => b.wallet = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_details" => b.amount_details = FromValueOpt::from_value(v), + "approved" => b.approved = FromValueOpt::from_value(v), + "authorization_method" => b.authorization_method = FromValueOpt::from_value(v), + "balance_transactions" => b.balance_transactions = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "cardholder" => b.cardholder = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "merchant_amount" => b.merchant_amount = FromValueOpt::from_value(v), + "merchant_currency" => b.merchant_currency = FromValueOpt::from_value(v), + "merchant_data" => b.merchant_data = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "network_data" => b.network_data = FromValueOpt::from_value(v), + "pending_request" => b.pending_request = FromValueOpt::from_value(v), + "request_history" => b.request_history = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "token" => b.token = FromValueOpt::from_value(v), + "transactions" => b.transactions = FromValueOpt::from_value(v), + "treasury" => b.treasury = FromValueOpt::from_value(v), + "verification_data" => b.verification_data = FromValueOpt::from_value(v), + "wallet" => b.wallet = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_authorization_amount_details.rs b/generated/async-stripe-shared/src/issuing_authorization_amount_details.rs index 346a077ed..48438640c 100644 --- a/generated/async-stripe-shared/src/issuing_authorization_amount_details.rs +++ b/generated/async-stripe-shared/src/issuing_authorization_amount_details.rs @@ -13,7 +13,12 @@ pub struct IssuingAuthorizationAmountDetailsBuilder { cashback_amount: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { atm_fee: self.atm_fee?, cashback_amount: self.cashback_amount? }) + let (Some(atm_fee), Some(cashback_amount)) = (self.atm_fee, self.cashback_amount) + else { + return None; + }; + Some(Self::Out { atm_fee, cashback_amount }) } } @@ -86,8 +95,8 @@ const _: () = { let mut b = IssuingAuthorizationAmountDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "atm_fee" => b.atm_fee = Some(FromValueOpt::from_value(v)?), - "cashback_amount" => b.cashback_amount = Some(FromValueOpt::from_value(v)?), + "atm_fee" => b.atm_fee = FromValueOpt::from_value(v), + "cashback_amount" => b.cashback_amount = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_authorization_authentication_exemption.rs b/generated/async-stripe-shared/src/issuing_authorization_authentication_exemption.rs index 5939708d5..bcf65cdb1 100644 --- a/generated/async-stripe-shared/src/issuing_authorization_authentication_exemption.rs +++ b/generated/async-stripe-shared/src/issuing_authorization_authentication_exemption.rs @@ -14,7 +14,12 @@ pub struct IssuingAuthorizationAuthenticationExemptionBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { claimed_by: self.claimed_by?, type_: self.type_? }) + let (Some(claimed_by), Some(type_)) = (self.claimed_by, self.type_) else { + return None; + }; + Some(Self::Out { claimed_by, type_ }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = IssuingAuthorizationAuthenticationExemptionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "claimed_by" => b.claimed_by = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "claimed_by" => b.claimed_by = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_authorization_merchant_data.rs b/generated/async-stripe-shared/src/issuing_authorization_merchant_data.rs index bf8d1e8d3..c2849b914 100644 --- a/generated/async-stripe-shared/src/issuing_authorization_merchant_data.rs +++ b/generated/async-stripe-shared/src/issuing_authorization_merchant_data.rs @@ -39,7 +39,12 @@ pub struct IssuingAuthorizationMerchantDataBuilder { url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -104,17 +109,43 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(category), + Some(category_code), + Some(city), + Some(country), + Some(name), + Some(network_id), + Some(postal_code), + Some(state), + Some(terminal_id), + Some(url), + ) = ( + self.category.take(), + self.category_code.take(), + self.city.take(), + self.country.take(), + self.name.take(), + self.network_id.take(), + self.postal_code.take(), + self.state.take(), + self.terminal_id.take(), + self.url.take(), + ) + else { + return None; + }; Some(Self::Out { - category: self.category.take()?, - category_code: self.category_code.take()?, - city: self.city.take()?, - country: self.country.take()?, - name: self.name.take()?, - network_id: self.network_id.take()?, - postal_code: self.postal_code.take()?, - state: self.state.take()?, - terminal_id: self.terminal_id.take()?, - url: self.url.take()?, + category, + category_code, + city, + country, + name, + network_id, + postal_code, + state, + terminal_id, + url, }) } } @@ -142,16 +173,16 @@ const _: () = { let mut b = IssuingAuthorizationMerchantDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "category" => b.category = Some(FromValueOpt::from_value(v)?), - "category_code" => b.category_code = Some(FromValueOpt::from_value(v)?), - "city" => b.city = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "network_id" => b.network_id = Some(FromValueOpt::from_value(v)?), - "postal_code" => b.postal_code = Some(FromValueOpt::from_value(v)?), - "state" => b.state = Some(FromValueOpt::from_value(v)?), - "terminal_id" => b.terminal_id = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "category" => b.category = FromValueOpt::from_value(v), + "category_code" => b.category_code = FromValueOpt::from_value(v), + "city" => b.city = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "network_id" => b.network_id = FromValueOpt::from_value(v), + "postal_code" => b.postal_code = FromValueOpt::from_value(v), + "state" => b.state = FromValueOpt::from_value(v), + "terminal_id" => b.terminal_id = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_authorization_network_data.rs b/generated/async-stripe-shared/src/issuing_authorization_network_data.rs index 95decf814..3a8a5b18a 100644 --- a/generated/async-stripe-shared/src/issuing_authorization_network_data.rs +++ b/generated/async-stripe-shared/src/issuing_authorization_network_data.rs @@ -18,7 +18,12 @@ pub struct IssuingAuthorizationNetworkDataBuilder { transaction_id: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,11 +78,19 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - acquiring_institution_id: self.acquiring_institution_id.take()?, - system_trace_audit_number: self.system_trace_audit_number.take()?, - transaction_id: self.transaction_id.take()?, - }) + let ( + Some(acquiring_institution_id), + Some(system_trace_audit_number), + Some(transaction_id), + ) = ( + self.acquiring_institution_id.take(), + self.system_trace_audit_number.take(), + self.transaction_id.take(), + ) + else { + return None; + }; + Some(Self::Out { acquiring_institution_id, system_trace_audit_number, transaction_id }) } } @@ -105,12 +118,12 @@ const _: () = { for (k, v) in obj { match k.as_str() { "acquiring_institution_id" => { - b.acquiring_institution_id = Some(FromValueOpt::from_value(v)?) + b.acquiring_institution_id = FromValueOpt::from_value(v) } "system_trace_audit_number" => { - b.system_trace_audit_number = Some(FromValueOpt::from_value(v)?) + b.system_trace_audit_number = FromValueOpt::from_value(v) } - "transaction_id" => b.transaction_id = Some(FromValueOpt::from_value(v)?), + "transaction_id" => b.transaction_id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_authorization_pending_request.rs b/generated/async-stripe-shared/src/issuing_authorization_pending_request.rs index 35790aa70..2e2e43e4a 100644 --- a/generated/async-stripe-shared/src/issuing_authorization_pending_request.rs +++ b/generated/async-stripe-shared/src/issuing_authorization_pending_request.rs @@ -32,7 +32,12 @@ pub struct IssuingAuthorizationPendingRequestBuilder { network_risk_score: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -91,14 +96,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_details), + Some(currency), + Some(is_amount_controllable), + Some(merchant_amount), + Some(merchant_currency), + Some(network_risk_score), + ) = ( + self.amount, + self.amount_details, + self.currency, + self.is_amount_controllable, + self.merchant_amount, + self.merchant_currency, + self.network_risk_score, + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_details: self.amount_details?, - currency: self.currency?, - is_amount_controllable: self.is_amount_controllable?, - merchant_amount: self.merchant_amount?, - merchant_currency: self.merchant_currency?, - network_risk_score: self.network_risk_score?, + amount, + amount_details, + currency, + is_amount_controllable, + merchant_amount, + merchant_currency, + network_risk_score, }) } } @@ -126,17 +151,15 @@ const _: () = { let mut b = IssuingAuthorizationPendingRequestBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_details" => b.amount_details = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_details" => b.amount_details = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), "is_amount_controllable" => { - b.is_amount_controllable = Some(FromValueOpt::from_value(v)?) - } - "merchant_amount" => b.merchant_amount = Some(FromValueOpt::from_value(v)?), - "merchant_currency" => b.merchant_currency = Some(FromValueOpt::from_value(v)?), - "network_risk_score" => { - b.network_risk_score = Some(FromValueOpt::from_value(v)?) + b.is_amount_controllable = FromValueOpt::from_value(v) } + "merchant_amount" => b.merchant_amount = FromValueOpt::from_value(v), + "merchant_currency" => b.merchant_currency = FromValueOpt::from_value(v), + "network_risk_score" => b.network_risk_score = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_authorization_request.rs b/generated/async-stripe-shared/src/issuing_authorization_request.rs index b0d71e1c5..66fe2b6c1 100644 --- a/generated/async-stripe-shared/src/issuing_authorization_request.rs +++ b/generated/async-stripe-shared/src/issuing_authorization_request.rs @@ -54,7 +54,12 @@ pub struct IssuingAuthorizationRequestBuilder { requested_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -123,19 +128,49 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_details), + Some(approved), + Some(authorization_code), + Some(created), + Some(currency), + Some(merchant_amount), + Some(merchant_currency), + Some(network_risk_score), + Some(reason), + Some(reason_message), + Some(requested_at), + ) = ( + self.amount, + self.amount_details, + self.approved, + self.authorization_code.take(), + self.created, + self.currency, + self.merchant_amount, + self.merchant_currency, + self.network_risk_score, + self.reason, + self.reason_message.take(), + self.requested_at, + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_details: self.amount_details?, - approved: self.approved?, - authorization_code: self.authorization_code.take()?, - created: self.created?, - currency: self.currency?, - merchant_amount: self.merchant_amount?, - merchant_currency: self.merchant_currency?, - network_risk_score: self.network_risk_score?, - reason: self.reason?, - reason_message: self.reason_message.take()?, - requested_at: self.requested_at?, + amount, + amount_details, + approved, + authorization_code, + created, + currency, + merchant_amount, + merchant_currency, + network_risk_score, + reason, + reason_message, + requested_at, }) } } @@ -163,22 +198,18 @@ const _: () = { let mut b = IssuingAuthorizationRequestBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_details" => b.amount_details = Some(FromValueOpt::from_value(v)?), - "approved" => b.approved = Some(FromValueOpt::from_value(v)?), - "authorization_code" => { - b.authorization_code = Some(FromValueOpt::from_value(v)?) - } - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "merchant_amount" => b.merchant_amount = Some(FromValueOpt::from_value(v)?), - "merchant_currency" => b.merchant_currency = Some(FromValueOpt::from_value(v)?), - "network_risk_score" => { - b.network_risk_score = Some(FromValueOpt::from_value(v)?) - } - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), - "reason_message" => b.reason_message = Some(FromValueOpt::from_value(v)?), - "requested_at" => b.requested_at = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_details" => b.amount_details = FromValueOpt::from_value(v), + "approved" => b.approved = FromValueOpt::from_value(v), + "authorization_code" => b.authorization_code = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "merchant_amount" => b.merchant_amount = FromValueOpt::from_value(v), + "merchant_currency" => b.merchant_currency = FromValueOpt::from_value(v), + "network_risk_score" => b.network_risk_score = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), + "reason_message" => b.reason_message = FromValueOpt::from_value(v), + "requested_at" => b.requested_at = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_authorization_three_d_secure.rs b/generated/async-stripe-shared/src/issuing_authorization_three_d_secure.rs index 8d0a96c9a..0ec4164d2 100644 --- a/generated/async-stripe-shared/src/issuing_authorization_three_d_secure.rs +++ b/generated/async-stripe-shared/src/issuing_authorization_three_d_secure.rs @@ -10,7 +10,12 @@ pub struct IssuingAuthorizationThreeDSecureBuilder { result: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { result: self.result? }) + let (Some(result),) = (self.result,) else { + return None; + }; + Some(Self::Out { result }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = IssuingAuthorizationThreeDSecureBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "result" => b.result = Some(FromValueOpt::from_value(v)?), + "result" => b.result = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_authorization_treasury.rs b/generated/async-stripe-shared/src/issuing_authorization_treasury.rs index 7396d3a06..ea5e54e1e 100644 --- a/generated/async-stripe-shared/src/issuing_authorization_treasury.rs +++ b/generated/async-stripe-shared/src/issuing_authorization_treasury.rs @@ -16,7 +16,12 @@ pub struct IssuingAuthorizationTreasuryBuilder { transaction: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,14 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - received_credits: self.received_credits.take()?, - received_debits: self.received_debits.take()?, - transaction: self.transaction.take()?, - }) + let (Some(received_credits), Some(received_debits), Some(transaction)) = ( + self.received_credits.take(), + self.received_debits.take(), + self.transaction.take(), + ) else { + return None; + }; + Some(Self::Out { received_credits, received_debits, transaction }) } } @@ -98,9 +106,9 @@ const _: () = { let mut b = IssuingAuthorizationTreasuryBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "received_credits" => b.received_credits = Some(FromValueOpt::from_value(v)?), - "received_debits" => b.received_debits = Some(FromValueOpt::from_value(v)?), - "transaction" => b.transaction = Some(FromValueOpt::from_value(v)?), + "received_credits" => b.received_credits = FromValueOpt::from_value(v), + "received_debits" => b.received_debits = FromValueOpt::from_value(v), + "transaction" => b.transaction = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_authorization_verification_data.rs b/generated/async-stripe-shared/src/issuing_authorization_verification_data.rs index 429303fdb..0ad573700 100644 --- a/generated/async-stripe-shared/src/issuing_authorization_verification_data.rs +++ b/generated/async-stripe-shared/src/issuing_authorization_verification_data.rs @@ -30,7 +30,12 @@ pub struct IssuingAuthorizationVerificationDataBuilder { three_d_secure: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -93,14 +98,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(address_line1_check), + Some(address_postal_code_check), + Some(authentication_exemption), + Some(cvc_check), + Some(expiry_check), + Some(postal_code), + Some(three_d_secure), + ) = ( + self.address_line1_check, + self.address_postal_code_check, + self.authentication_exemption, + self.cvc_check, + self.expiry_check, + self.postal_code.take(), + self.three_d_secure, + ) + else { + return None; + }; Some(Self::Out { - address_line1_check: self.address_line1_check?, - address_postal_code_check: self.address_postal_code_check?, - authentication_exemption: self.authentication_exemption?, - cvc_check: self.cvc_check?, - expiry_check: self.expiry_check?, - postal_code: self.postal_code.take()?, - three_d_secure: self.three_d_secure?, + address_line1_check, + address_postal_code_check, + authentication_exemption, + cvc_check, + expiry_check, + postal_code, + three_d_secure, }) } } @@ -128,19 +153,17 @@ const _: () = { let mut b = IssuingAuthorizationVerificationDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address_line1_check" => { - b.address_line1_check = Some(FromValueOpt::from_value(v)?) - } + "address_line1_check" => b.address_line1_check = FromValueOpt::from_value(v), "address_postal_code_check" => { - b.address_postal_code_check = Some(FromValueOpt::from_value(v)?) + b.address_postal_code_check = FromValueOpt::from_value(v) } "authentication_exemption" => { - b.authentication_exemption = Some(FromValueOpt::from_value(v)?) + b.authentication_exemption = FromValueOpt::from_value(v) } - "cvc_check" => b.cvc_check = Some(FromValueOpt::from_value(v)?), - "expiry_check" => b.expiry_check = Some(FromValueOpt::from_value(v)?), - "postal_code" => b.postal_code = Some(FromValueOpt::from_value(v)?), - "three_d_secure" => b.three_d_secure = Some(FromValueOpt::from_value(v)?), + "cvc_check" => b.cvc_check = FromValueOpt::from_value(v), + "expiry_check" => b.expiry_check = FromValueOpt::from_value(v), + "postal_code" => b.postal_code = FromValueOpt::from_value(v), + "three_d_secure" => b.three_d_secure = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_card.rs b/generated/async-stripe-shared/src/issuing_card.rs index dc66c880e..047e515bf 100644 --- a/generated/async-stripe-shared/src/issuing_card.rs +++ b/generated/async-stripe-shared/src/issuing_card.rs @@ -87,7 +87,12 @@ pub struct IssuingCardBuilder { wallets: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -178,30 +183,82 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(brand), + Some(cancellation_reason), + Some(cardholder), + Some(created), + Some(currency), + Some(cvc), + Some(exp_month), + Some(exp_year), + Some(financial_account), + Some(id), + Some(last4), + Some(livemode), + Some(metadata), + Some(number), + Some(personalization_design), + Some(replaced_by), + Some(replacement_for), + Some(replacement_reason), + Some(shipping), + Some(spending_controls), + Some(status), + Some(type_), + Some(wallets), + ) = ( + self.brand.take(), + self.cancellation_reason, + self.cardholder.take(), + self.created, + self.currency, + self.cvc.take(), + self.exp_month, + self.exp_year, + self.financial_account.take(), + self.id.take(), + self.last4.take(), + self.livemode, + self.metadata.take(), + self.number.take(), + self.personalization_design.take(), + self.replaced_by.take(), + self.replacement_for.take(), + self.replacement_reason, + self.shipping.take(), + self.spending_controls.take(), + self.status, + self.type_, + self.wallets.take(), + ) + else { + return None; + }; Some(Self::Out { - brand: self.brand.take()?, - cancellation_reason: self.cancellation_reason?, - cardholder: self.cardholder.take()?, - created: self.created?, - currency: self.currency?, - cvc: self.cvc.take()?, - exp_month: self.exp_month?, - exp_year: self.exp_year?, - financial_account: self.financial_account.take()?, - id: self.id.take()?, - last4: self.last4.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - number: self.number.take()?, - personalization_design: self.personalization_design.take()?, - replaced_by: self.replaced_by.take()?, - replacement_for: self.replacement_for.take()?, - replacement_reason: self.replacement_reason?, - shipping: self.shipping.take()?, - spending_controls: self.spending_controls.take()?, - status: self.status?, - type_: self.type_?, - wallets: self.wallets.take()?, + brand, + cancellation_reason, + cardholder, + created, + currency, + cvc, + exp_month, + exp_year, + financial_account, + id, + last4, + livemode, + metadata, + number, + personalization_design, + replaced_by, + replacement_for, + replacement_reason, + shipping, + spending_controls, + status, + type_, + wallets, }) } } @@ -229,35 +286,31 @@ const _: () = { let mut b = IssuingCardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "brand" => b.brand = Some(FromValueOpt::from_value(v)?), - "cancellation_reason" => { - b.cancellation_reason = Some(FromValueOpt::from_value(v)?) - } - "cardholder" => b.cardholder = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "cvc" => b.cvc = Some(FromValueOpt::from_value(v)?), - "exp_month" => b.exp_month = Some(FromValueOpt::from_value(v)?), - "exp_year" => b.exp_year = Some(FromValueOpt::from_value(v)?), - "financial_account" => b.financial_account = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "number" => b.number = Some(FromValueOpt::from_value(v)?), + "brand" => b.brand = FromValueOpt::from_value(v), + "cancellation_reason" => b.cancellation_reason = FromValueOpt::from_value(v), + "cardholder" => b.cardholder = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "cvc" => b.cvc = FromValueOpt::from_value(v), + "exp_month" => b.exp_month = FromValueOpt::from_value(v), + "exp_year" => b.exp_year = FromValueOpt::from_value(v), + "financial_account" => b.financial_account = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "number" => b.number = FromValueOpt::from_value(v), "personalization_design" => { - b.personalization_design = Some(FromValueOpt::from_value(v)?) - } - "replaced_by" => b.replaced_by = Some(FromValueOpt::from_value(v)?), - "replacement_for" => b.replacement_for = Some(FromValueOpt::from_value(v)?), - "replacement_reason" => { - b.replacement_reason = Some(FromValueOpt::from_value(v)?) + b.personalization_design = FromValueOpt::from_value(v) } - "shipping" => b.shipping = Some(FromValueOpt::from_value(v)?), - "spending_controls" => b.spending_controls = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "wallets" => b.wallets = Some(FromValueOpt::from_value(v)?), + "replaced_by" => b.replaced_by = FromValueOpt::from_value(v), + "replacement_for" => b.replacement_for = FromValueOpt::from_value(v), + "replacement_reason" => b.replacement_reason = FromValueOpt::from_value(v), + "shipping" => b.shipping = FromValueOpt::from_value(v), + "spending_controls" => b.spending_controls = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "wallets" => b.wallets = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_card_apple_pay.rs b/generated/async-stripe-shared/src/issuing_card_apple_pay.rs index c257ef9c1..3cb7aecfb 100644 --- a/generated/async-stripe-shared/src/issuing_card_apple_pay.rs +++ b/generated/async-stripe-shared/src/issuing_card_apple_pay.rs @@ -13,7 +13,12 @@ pub struct IssuingCardApplePayBuilder { ineligible_reason: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { eligible: self.eligible?, ineligible_reason: self.ineligible_reason? }) + let (Some(eligible), Some(ineligible_reason)) = (self.eligible, self.ineligible_reason) + else { + return None; + }; + Some(Self::Out { eligible, ineligible_reason }) } } @@ -86,8 +95,8 @@ const _: () = { let mut b = IssuingCardApplePayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "eligible" => b.eligible = Some(FromValueOpt::from_value(v)?), - "ineligible_reason" => b.ineligible_reason = Some(FromValueOpt::from_value(v)?), + "eligible" => b.eligible = FromValueOpt::from_value(v), + "ineligible_reason" => b.ineligible_reason = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_card_authorization_controls.rs b/generated/async-stripe-shared/src/issuing_card_authorization_controls.rs index 41278637d..83c4befaf 100644 --- a/generated/async-stripe-shared/src/issuing_card_authorization_controls.rs +++ b/generated/async-stripe-shared/src/issuing_card_authorization_controls.rs @@ -38,7 +38,12 @@ pub struct IssuingCardAuthorizationControlsBuilder { spending_limits_currency: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -101,13 +106,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(allowed_categories), + Some(allowed_merchant_countries), + Some(blocked_categories), + Some(blocked_merchant_countries), + Some(spending_limits), + Some(spending_limits_currency), + ) = ( + self.allowed_categories.take(), + self.allowed_merchant_countries.take(), + self.blocked_categories.take(), + self.blocked_merchant_countries.take(), + self.spending_limits.take(), + self.spending_limits_currency, + ) + else { + return None; + }; Some(Self::Out { - allowed_categories: self.allowed_categories.take()?, - allowed_merchant_countries: self.allowed_merchant_countries.take()?, - blocked_categories: self.blocked_categories.take()?, - blocked_merchant_countries: self.blocked_merchant_countries.take()?, - spending_limits: self.spending_limits.take()?, - spending_limits_currency: self.spending_limits_currency?, + allowed_categories, + allowed_merchant_countries, + blocked_categories, + blocked_merchant_countries, + spending_limits, + spending_limits_currency, }) } } @@ -135,21 +158,17 @@ const _: () = { let mut b = IssuingCardAuthorizationControlsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "allowed_categories" => { - b.allowed_categories = Some(FromValueOpt::from_value(v)?) - } + "allowed_categories" => b.allowed_categories = FromValueOpt::from_value(v), "allowed_merchant_countries" => { - b.allowed_merchant_countries = Some(FromValueOpt::from_value(v)?) - } - "blocked_categories" => { - b.blocked_categories = Some(FromValueOpt::from_value(v)?) + b.allowed_merchant_countries = FromValueOpt::from_value(v) } + "blocked_categories" => b.blocked_categories = FromValueOpt::from_value(v), "blocked_merchant_countries" => { - b.blocked_merchant_countries = Some(FromValueOpt::from_value(v)?) + b.blocked_merchant_countries = FromValueOpt::from_value(v) } - "spending_limits" => b.spending_limits = Some(FromValueOpt::from_value(v)?), + "spending_limits" => b.spending_limits = FromValueOpt::from_value(v), "spending_limits_currency" => { - b.spending_limits_currency = Some(FromValueOpt::from_value(v)?) + b.spending_limits_currency = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/issuing_card_google_pay.rs b/generated/async-stripe-shared/src/issuing_card_google_pay.rs index 5258255a7..e02161b4c 100644 --- a/generated/async-stripe-shared/src/issuing_card_google_pay.rs +++ b/generated/async-stripe-shared/src/issuing_card_google_pay.rs @@ -13,7 +13,12 @@ pub struct IssuingCardGooglePayBuilder { ineligible_reason: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { eligible: self.eligible?, ineligible_reason: self.ineligible_reason? }) + let (Some(eligible), Some(ineligible_reason)) = (self.eligible, self.ineligible_reason) + else { + return None; + }; + Some(Self::Out { eligible, ineligible_reason }) } } @@ -86,8 +95,8 @@ const _: () = { let mut b = IssuingCardGooglePayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "eligible" => b.eligible = Some(FromValueOpt::from_value(v)?), - "ineligible_reason" => b.ineligible_reason = Some(FromValueOpt::from_value(v)?), + "eligible" => b.eligible = FromValueOpt::from_value(v), + "ineligible_reason" => b.ineligible_reason = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_card_shipping.rs b/generated/async-stripe-shared/src/issuing_card_shipping.rs index edc8532d7..8ec0a11b6 100644 --- a/generated/async-stripe-shared/src/issuing_card_shipping.rs +++ b/generated/async-stripe-shared/src/issuing_card_shipping.rs @@ -48,7 +48,12 @@ pub struct IssuingCardShippingBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -117,19 +122,49 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(address), + Some(carrier), + Some(customs), + Some(eta), + Some(name), + Some(phone_number), + Some(require_signature), + Some(service), + Some(status), + Some(tracking_number), + Some(tracking_url), + Some(type_), + ) = ( + self.address.take(), + self.carrier, + self.customs.take(), + self.eta, + self.name.take(), + self.phone_number.take(), + self.require_signature, + self.service, + self.status, + self.tracking_number.take(), + self.tracking_url.take(), + self.type_, + ) + else { + return None; + }; Some(Self::Out { - address: self.address.take()?, - carrier: self.carrier?, - customs: self.customs.take()?, - eta: self.eta?, - name: self.name.take()?, - phone_number: self.phone_number.take()?, - require_signature: self.require_signature?, - service: self.service?, - status: self.status?, - tracking_number: self.tracking_number.take()?, - tracking_url: self.tracking_url.take()?, - type_: self.type_?, + address, + carrier, + customs, + eta, + name, + phone_number, + require_signature, + service, + status, + tracking_number, + tracking_url, + type_, }) } } @@ -157,18 +192,18 @@ const _: () = { let mut b = IssuingCardShippingBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), - "carrier" => b.carrier = Some(FromValueOpt::from_value(v)?), - "customs" => b.customs = Some(FromValueOpt::from_value(v)?), - "eta" => b.eta = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "phone_number" => b.phone_number = Some(FromValueOpt::from_value(v)?), - "require_signature" => b.require_signature = Some(FromValueOpt::from_value(v)?), - "service" => b.service = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "tracking_number" => b.tracking_number = Some(FromValueOpt::from_value(v)?), - "tracking_url" => b.tracking_url = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), + "carrier" => b.carrier = FromValueOpt::from_value(v), + "customs" => b.customs = FromValueOpt::from_value(v), + "eta" => b.eta = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "phone_number" => b.phone_number = FromValueOpt::from_value(v), + "require_signature" => b.require_signature = FromValueOpt::from_value(v), + "service" => b.service = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "tracking_number" => b.tracking_number = FromValueOpt::from_value(v), + "tracking_url" => b.tracking_url = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_card_shipping_customs.rs b/generated/async-stripe-shared/src/issuing_card_shipping_customs.rs index 2850ebf95..a813916fc 100644 --- a/generated/async-stripe-shared/src/issuing_card_shipping_customs.rs +++ b/generated/async-stripe-shared/src/issuing_card_shipping_customs.rs @@ -11,7 +11,12 @@ pub struct IssuingCardShippingCustomsBuilder { eori_number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { eori_number: self.eori_number.take()? }) + let (Some(eori_number),) = (self.eori_number.take(),) else { + return None; + }; + Some(Self::Out { eori_number }) } } @@ -83,7 +91,7 @@ const _: () = { let mut b = IssuingCardShippingCustomsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "eori_number" => b.eori_number = Some(FromValueOpt::from_value(v)?), + "eori_number" => b.eori_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_card_spending_limit.rs b/generated/async-stripe-shared/src/issuing_card_spending_limit.rs index ec8dc607e..601bfddde 100644 --- a/generated/async-stripe-shared/src/issuing_card_spending_limit.rs +++ b/generated/async-stripe-shared/src/issuing_card_spending_limit.rs @@ -18,7 +18,12 @@ pub struct IssuingCardSpendingLimitBuilder { interval: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - categories: self.categories.take()?, - interval: self.interval?, - }) + let (Some(amount), Some(categories), Some(interval)) = + (self.amount, self.categories.take(), self.interval) + else { + return None; + }; + Some(Self::Out { amount, categories, interval }) } } @@ -100,9 +106,9 @@ const _: () = { let mut b = IssuingCardSpendingLimitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "categories" => b.categories = Some(FromValueOpt::from_value(v)?), - "interval" => b.interval = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "categories" => b.categories = FromValueOpt::from_value(v), + "interval" => b.interval = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_card_wallets.rs b/generated/async-stripe-shared/src/issuing_card_wallets.rs index 226ee6a2a..73e0b96f9 100644 --- a/generated/async-stripe-shared/src/issuing_card_wallets.rs +++ b/generated/async-stripe-shared/src/issuing_card_wallets.rs @@ -14,7 +14,12 @@ pub struct IssuingCardWalletsBuilder { primary_account_identifier: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - apple_pay: self.apple_pay?, - google_pay: self.google_pay?, - primary_account_identifier: self.primary_account_identifier.take()?, - }) + let (Some(apple_pay), Some(google_pay), Some(primary_account_identifier)) = + (self.apple_pay, self.google_pay, self.primary_account_identifier.take()) + else { + return None; + }; + Some(Self::Out { apple_pay, google_pay, primary_account_identifier }) } } @@ -98,10 +104,10 @@ const _: () = { let mut b = IssuingCardWalletsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "apple_pay" => b.apple_pay = Some(FromValueOpt::from_value(v)?), - "google_pay" => b.google_pay = Some(FromValueOpt::from_value(v)?), + "apple_pay" => b.apple_pay = FromValueOpt::from_value(v), + "google_pay" => b.google_pay = FromValueOpt::from_value(v), "primary_account_identifier" => { - b.primary_account_identifier = Some(FromValueOpt::from_value(v)?) + b.primary_account_identifier = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/issuing_cardholder.rs b/generated/async-stripe-shared/src/issuing_cardholder.rs index 84325f3a8..90db048a1 100644 --- a/generated/async-stripe-shared/src/issuing_cardholder.rs +++ b/generated/async-stripe-shared/src/issuing_cardholder.rs @@ -62,7 +62,12 @@ pub struct IssuingCardholderBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -137,22 +142,58 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(billing), + Some(company), + Some(created), + Some(email), + Some(id), + Some(individual), + Some(livemode), + Some(metadata), + Some(name), + Some(phone_number), + Some(preferred_locales), + Some(requirements), + Some(spending_controls), + Some(status), + Some(type_), + ) = ( + self.billing.take(), + self.company, + self.created, + self.email.take(), + self.id.take(), + self.individual.take(), + self.livemode, + self.metadata.take(), + self.name.take(), + self.phone_number.take(), + self.preferred_locales.take(), + self.requirements.take(), + self.spending_controls.take(), + self.status, + self.type_, + ) + else { + return None; + }; Some(Self::Out { - billing: self.billing.take()?, - company: self.company?, - created: self.created?, - email: self.email.take()?, - id: self.id.take()?, - individual: self.individual.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - name: self.name.take()?, - phone_number: self.phone_number.take()?, - preferred_locales: self.preferred_locales.take()?, - requirements: self.requirements.take()?, - spending_controls: self.spending_controls.take()?, - status: self.status?, - type_: self.type_?, + billing, + company, + created, + email, + id, + individual, + livemode, + metadata, + name, + phone_number, + preferred_locales, + requirements, + spending_controls, + status, + type_, }) } } @@ -180,21 +221,21 @@ const _: () = { let mut b = IssuingCardholderBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "billing" => b.billing = Some(FromValueOpt::from_value(v)?), - "company" => b.company = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "individual" => b.individual = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "phone_number" => b.phone_number = Some(FromValueOpt::from_value(v)?), - "preferred_locales" => b.preferred_locales = Some(FromValueOpt::from_value(v)?), - "requirements" => b.requirements = Some(FromValueOpt::from_value(v)?), - "spending_controls" => b.spending_controls = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "billing" => b.billing = FromValueOpt::from_value(v), + "company" => b.company = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "individual" => b.individual = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "phone_number" => b.phone_number = FromValueOpt::from_value(v), + "preferred_locales" => b.preferred_locales = FromValueOpt::from_value(v), + "requirements" => b.requirements = FromValueOpt::from_value(v), + "spending_controls" => b.spending_controls = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_cardholder_address.rs b/generated/async-stripe-shared/src/issuing_cardholder_address.rs index aebe93c4f..1d40e2f9e 100644 --- a/generated/async-stripe-shared/src/issuing_cardholder_address.rs +++ b/generated/async-stripe-shared/src/issuing_cardholder_address.rs @@ -9,7 +9,12 @@ pub struct IssuingCardholderAddressBuilder { address: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -54,7 +59,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { address: self.address.take()? }) + let (Some(address),) = (self.address.take(),) else { + return None; + }; + Some(Self::Out { address }) } } @@ -81,7 +89,7 @@ const _: () = { let mut b = IssuingCardholderAddressBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_cardholder_authorization_controls.rs b/generated/async-stripe-shared/src/issuing_cardholder_authorization_controls.rs index 4f85f8a8d..029525040 100644 --- a/generated/async-stripe-shared/src/issuing_cardholder_authorization_controls.rs +++ b/generated/async-stripe-shared/src/issuing_cardholder_authorization_controls.rs @@ -40,7 +40,12 @@ pub struct IssuingCardholderAuthorizationControlsBuilder { spending_limits_currency: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -103,13 +108,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(allowed_categories), + Some(allowed_merchant_countries), + Some(blocked_categories), + Some(blocked_merchant_countries), + Some(spending_limits), + Some(spending_limits_currency), + ) = ( + self.allowed_categories.take(), + self.allowed_merchant_countries.take(), + self.blocked_categories.take(), + self.blocked_merchant_countries.take(), + self.spending_limits.take(), + self.spending_limits_currency, + ) + else { + return None; + }; Some(Self::Out { - allowed_categories: self.allowed_categories.take()?, - allowed_merchant_countries: self.allowed_merchant_countries.take()?, - blocked_categories: self.blocked_categories.take()?, - blocked_merchant_countries: self.blocked_merchant_countries.take()?, - spending_limits: self.spending_limits.take()?, - spending_limits_currency: self.spending_limits_currency?, + allowed_categories, + allowed_merchant_countries, + blocked_categories, + blocked_merchant_countries, + spending_limits, + spending_limits_currency, }) } } @@ -137,21 +160,17 @@ const _: () = { let mut b = IssuingCardholderAuthorizationControlsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "allowed_categories" => { - b.allowed_categories = Some(FromValueOpt::from_value(v)?) - } + "allowed_categories" => b.allowed_categories = FromValueOpt::from_value(v), "allowed_merchant_countries" => { - b.allowed_merchant_countries = Some(FromValueOpt::from_value(v)?) - } - "blocked_categories" => { - b.blocked_categories = Some(FromValueOpt::from_value(v)?) + b.allowed_merchant_countries = FromValueOpt::from_value(v) } + "blocked_categories" => b.blocked_categories = FromValueOpt::from_value(v), "blocked_merchant_countries" => { - b.blocked_merchant_countries = Some(FromValueOpt::from_value(v)?) + b.blocked_merchant_countries = FromValueOpt::from_value(v) } - "spending_limits" => b.spending_limits = Some(FromValueOpt::from_value(v)?), + "spending_limits" => b.spending_limits = FromValueOpt::from_value(v), "spending_limits_currency" => { - b.spending_limits_currency = Some(FromValueOpt::from_value(v)?) + b.spending_limits_currency = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/issuing_cardholder_card_issuing.rs b/generated/async-stripe-shared/src/issuing_cardholder_card_issuing.rs index 5a79aeec7..a52dd46d5 100644 --- a/generated/async-stripe-shared/src/issuing_cardholder_card_issuing.rs +++ b/generated/async-stripe-shared/src/issuing_cardholder_card_issuing.rs @@ -11,7 +11,12 @@ pub struct IssuingCardholderCardIssuingBuilder { user_terms_acceptance: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { user_terms_acceptance: self.user_terms_acceptance.take()? }) + let (Some(user_terms_acceptance),) = (self.user_terms_acceptance.take(),) else { + return None; + }; + Some(Self::Out { user_terms_acceptance }) } } @@ -84,7 +92,7 @@ const _: () = { for (k, v) in obj { match k.as_str() { "user_terms_acceptance" => { - b.user_terms_acceptance = Some(FromValueOpt::from_value(v)?) + b.user_terms_acceptance = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/issuing_cardholder_company.rs b/generated/async-stripe-shared/src/issuing_cardholder_company.rs index 0c34e687c..055b727e8 100644 --- a/generated/async-stripe-shared/src/issuing_cardholder_company.rs +++ b/generated/async-stripe-shared/src/issuing_cardholder_company.rs @@ -10,7 +10,12 @@ pub struct IssuingCardholderCompanyBuilder { tax_id_provided: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { tax_id_provided: self.tax_id_provided? }) + let (Some(tax_id_provided),) = (self.tax_id_provided,) else { + return None; + }; + Some(Self::Out { tax_id_provided }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = IssuingCardholderCompanyBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "tax_id_provided" => b.tax_id_provided = Some(FromValueOpt::from_value(v)?), + "tax_id_provided" => b.tax_id_provided = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_cardholder_id_document.rs b/generated/async-stripe-shared/src/issuing_cardholder_id_document.rs index d9cecb856..f15ed8eab 100644 --- a/generated/async-stripe-shared/src/issuing_cardholder_id_document.rs +++ b/generated/async-stripe-shared/src/issuing_cardholder_id_document.rs @@ -13,7 +13,12 @@ pub struct IssuingCardholderIdDocumentBuilder { front: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { back: self.back.take()?, front: self.front.take()? }) + let (Some(back), Some(front)) = (self.back.take(), self.front.take()) else { + return None; + }; + Some(Self::Out { back, front }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = IssuingCardholderIdDocumentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "back" => b.back = Some(FromValueOpt::from_value(v)?), - "front" => b.front = Some(FromValueOpt::from_value(v)?), + "back" => b.back = FromValueOpt::from_value(v), + "front" => b.front = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_cardholder_individual.rs b/generated/async-stripe-shared/src/issuing_cardholder_individual.rs index 4653b89ef..686aced21 100644 --- a/generated/async-stripe-shared/src/issuing_cardholder_individual.rs +++ b/generated/async-stripe-shared/src/issuing_cardholder_individual.rs @@ -26,7 +26,12 @@ pub struct IssuingCardholderIndividualBuilder { verification: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -81,13 +86,23 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - card_issuing: self.card_issuing.take()?, - dob: self.dob?, - first_name: self.first_name.take()?, - last_name: self.last_name.take()?, - verification: self.verification.take()?, - }) + let ( + Some(card_issuing), + Some(dob), + Some(first_name), + Some(last_name), + Some(verification), + ) = ( + self.card_issuing.take(), + self.dob, + self.first_name.take(), + self.last_name.take(), + self.verification.take(), + ) + else { + return None; + }; + Some(Self::Out { card_issuing, dob, first_name, last_name, verification }) } } @@ -114,11 +129,11 @@ const _: () = { let mut b = IssuingCardholderIndividualBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "card_issuing" => b.card_issuing = Some(FromValueOpt::from_value(v)?), - "dob" => b.dob = Some(FromValueOpt::from_value(v)?), - "first_name" => b.first_name = Some(FromValueOpt::from_value(v)?), - "last_name" => b.last_name = Some(FromValueOpt::from_value(v)?), - "verification" => b.verification = Some(FromValueOpt::from_value(v)?), + "card_issuing" => b.card_issuing = FromValueOpt::from_value(v), + "dob" => b.dob = FromValueOpt::from_value(v), + "first_name" => b.first_name = FromValueOpt::from_value(v), + "last_name" => b.last_name = FromValueOpt::from_value(v), + "verification" => b.verification = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_cardholder_individual_dob.rs b/generated/async-stripe-shared/src/issuing_cardholder_individual_dob.rs index a7ef5dd04..eb33e4114 100644 --- a/generated/async-stripe-shared/src/issuing_cardholder_individual_dob.rs +++ b/generated/async-stripe-shared/src/issuing_cardholder_individual_dob.rs @@ -16,7 +16,12 @@ pub struct IssuingCardholderIndividualDobBuilder { year: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,7 +72,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { day: self.day?, month: self.month?, year: self.year? }) + let (Some(day), Some(month), Some(year)) = (self.day, self.month, self.year) else { + return None; + }; + Some(Self::Out { day, month, year }) } } @@ -94,9 +102,9 @@ const _: () = { let mut b = IssuingCardholderIndividualDobBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "day" => b.day = Some(FromValueOpt::from_value(v)?), - "month" => b.month = Some(FromValueOpt::from_value(v)?), - "year" => b.year = Some(FromValueOpt::from_value(v)?), + "day" => b.day = FromValueOpt::from_value(v), + "month" => b.month = FromValueOpt::from_value(v), + "year" => b.year = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_cardholder_requirements.rs b/generated/async-stripe-shared/src/issuing_cardholder_requirements.rs index 7bffac024..f280908e9 100644 --- a/generated/async-stripe-shared/src/issuing_cardholder_requirements.rs +++ b/generated/async-stripe-shared/src/issuing_cardholder_requirements.rs @@ -13,7 +13,12 @@ pub struct IssuingCardholderRequirementsBuilder { past_due: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - disabled_reason: self.disabled_reason?, - past_due: self.past_due.take()?, - }) + let (Some(disabled_reason), Some(past_due)) = + (self.disabled_reason, self.past_due.take()) + else { + return None; + }; + Some(Self::Out { disabled_reason, past_due }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = IssuingCardholderRequirementsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "disabled_reason" => b.disabled_reason = Some(FromValueOpt::from_value(v)?), - "past_due" => b.past_due = Some(FromValueOpt::from_value(v)?), + "disabled_reason" => b.disabled_reason = FromValueOpt::from_value(v), + "past_due" => b.past_due = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_cardholder_spending_limit.rs b/generated/async-stripe-shared/src/issuing_cardholder_spending_limit.rs index 40e1d2270..d41dbc842 100644 --- a/generated/async-stripe-shared/src/issuing_cardholder_spending_limit.rs +++ b/generated/async-stripe-shared/src/issuing_cardholder_spending_limit.rs @@ -18,7 +18,12 @@ pub struct IssuingCardholderSpendingLimitBuilder { interval: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - categories: self.categories.take()?, - interval: self.interval?, - }) + let (Some(amount), Some(categories), Some(interval)) = + (self.amount, self.categories.take(), self.interval) + else { + return None; + }; + Some(Self::Out { amount, categories, interval }) } } @@ -100,9 +106,9 @@ const _: () = { let mut b = IssuingCardholderSpendingLimitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "categories" => b.categories = Some(FromValueOpt::from_value(v)?), - "interval" => b.interval = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "categories" => b.categories = FromValueOpt::from_value(v), + "interval" => b.interval = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_cardholder_user_terms_acceptance.rs b/generated/async-stripe-shared/src/issuing_cardholder_user_terms_acceptance.rs index 1db5ce0bc..9464aec3a 100644 --- a/generated/async-stripe-shared/src/issuing_cardholder_user_terms_acceptance.rs +++ b/generated/async-stripe-shared/src/issuing_cardholder_user_terms_acceptance.rs @@ -16,7 +16,12 @@ pub struct IssuingCardholderUserTermsAcceptanceBuilder { user_agent: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - date: self.date?, - ip: self.ip.take()?, - user_agent: self.user_agent.take()?, - }) + let (Some(date), Some(ip), Some(user_agent)) = + (self.date, self.ip.take(), self.user_agent.take()) + else { + return None; + }; + Some(Self::Out { date, ip, user_agent }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = IssuingCardholderUserTermsAcceptanceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "date" => b.date = Some(FromValueOpt::from_value(v)?), - "ip" => b.ip = Some(FromValueOpt::from_value(v)?), - "user_agent" => b.user_agent = Some(FromValueOpt::from_value(v)?), + "date" => b.date = FromValueOpt::from_value(v), + "ip" => b.ip = FromValueOpt::from_value(v), + "user_agent" => b.user_agent = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_cardholder_verification.rs b/generated/async-stripe-shared/src/issuing_cardholder_verification.rs index 11c3c04fa..957b48082 100644 --- a/generated/async-stripe-shared/src/issuing_cardholder_verification.rs +++ b/generated/async-stripe-shared/src/issuing_cardholder_verification.rs @@ -10,7 +10,12 @@ pub struct IssuingCardholderVerificationBuilder { document: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { document: self.document.take()? }) + let (Some(document),) = (self.document.take(),) else { + return None; + }; + Some(Self::Out { document }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = IssuingCardholderVerificationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "document" => b.document = Some(FromValueOpt::from_value(v)?), + "document" => b.document = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_dispute.rs b/generated/async-stripe-shared/src/issuing_dispute.rs index 71718424d..955aee5a0 100644 --- a/generated/async-stripe-shared/src/issuing_dispute.rs +++ b/generated/async-stripe-shared/src/issuing_dispute.rs @@ -45,7 +45,12 @@ pub struct IssuingDisputeBuilder { treasury: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -112,18 +117,46 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(balance_transactions), + Some(created), + Some(currency), + Some(evidence), + Some(id), + Some(livemode), + Some(metadata), + Some(status), + Some(transaction), + Some(treasury), + ) = ( + self.amount, + self.balance_transactions.take(), + self.created, + self.currency, + self.evidence.take(), + self.id.take(), + self.livemode, + self.metadata.take(), + self.status, + self.transaction.take(), + self.treasury.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - balance_transactions: self.balance_transactions.take()?, - created: self.created?, - currency: self.currency?, - evidence: self.evidence.take()?, - id: self.id.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - status: self.status?, - transaction: self.transaction.take()?, - treasury: self.treasury.take()?, + amount, + balance_transactions, + created, + currency, + evidence, + id, + livemode, + metadata, + status, + transaction, + treasury, }) } } @@ -151,19 +184,17 @@ const _: () = { let mut b = IssuingDisputeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "balance_transactions" => { - b.balance_transactions = Some(FromValueOpt::from_value(v)?) - } - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "evidence" => b.evidence = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "transaction" => b.transaction = Some(FromValueOpt::from_value(v)?), - "treasury" => b.treasury = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "balance_transactions" => b.balance_transactions = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "evidence" => b.evidence = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "transaction" => b.transaction = FromValueOpt::from_value(v), + "treasury" => b.treasury = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_dispute_canceled_evidence.rs b/generated/async-stripe-shared/src/issuing_dispute_canceled_evidence.rs index 45f70d574..61bc4edb3 100644 --- a/generated/async-stripe-shared/src/issuing_dispute_canceled_evidence.rs +++ b/generated/async-stripe-shared/src/issuing_dispute_canceled_evidence.rs @@ -37,7 +37,12 @@ pub struct IssuingDisputeCanceledEvidenceBuilder { returned_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -106,17 +111,43 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(additional_documentation), + Some(canceled_at), + Some(cancellation_policy_provided), + Some(cancellation_reason), + Some(expected_at), + Some(explanation), + Some(product_description), + Some(product_type), + Some(return_status), + Some(returned_at), + ) = ( + self.additional_documentation.take(), + self.canceled_at, + self.cancellation_policy_provided, + self.cancellation_reason.take(), + self.expected_at, + self.explanation.take(), + self.product_description.take(), + self.product_type, + self.return_status, + self.returned_at, + ) + else { + return None; + }; Some(Self::Out { - additional_documentation: self.additional_documentation.take()?, - canceled_at: self.canceled_at?, - cancellation_policy_provided: self.cancellation_policy_provided?, - cancellation_reason: self.cancellation_reason.take()?, - expected_at: self.expected_at?, - explanation: self.explanation.take()?, - product_description: self.product_description.take()?, - product_type: self.product_type?, - return_status: self.return_status?, - returned_at: self.returned_at?, + additional_documentation, + canceled_at, + cancellation_policy_provided, + cancellation_reason, + expected_at, + explanation, + product_description, + product_type, + return_status, + returned_at, }) } } @@ -145,23 +176,19 @@ const _: () = { for (k, v) in obj { match k.as_str() { "additional_documentation" => { - b.additional_documentation = Some(FromValueOpt::from_value(v)?) + b.additional_documentation = FromValueOpt::from_value(v) } - "canceled_at" => b.canceled_at = Some(FromValueOpt::from_value(v)?), + "canceled_at" => b.canceled_at = FromValueOpt::from_value(v), "cancellation_policy_provided" => { - b.cancellation_policy_provided = Some(FromValueOpt::from_value(v)?) - } - "cancellation_reason" => { - b.cancellation_reason = Some(FromValueOpt::from_value(v)?) - } - "expected_at" => b.expected_at = Some(FromValueOpt::from_value(v)?), - "explanation" => b.explanation = Some(FromValueOpt::from_value(v)?), - "product_description" => { - b.product_description = Some(FromValueOpt::from_value(v)?) + b.cancellation_policy_provided = FromValueOpt::from_value(v) } - "product_type" => b.product_type = Some(FromValueOpt::from_value(v)?), - "return_status" => b.return_status = Some(FromValueOpt::from_value(v)?), - "returned_at" => b.returned_at = Some(FromValueOpt::from_value(v)?), + "cancellation_reason" => b.cancellation_reason = FromValueOpt::from_value(v), + "expected_at" => b.expected_at = FromValueOpt::from_value(v), + "explanation" => b.explanation = FromValueOpt::from_value(v), + "product_description" => b.product_description = FromValueOpt::from_value(v), + "product_type" => b.product_type = FromValueOpt::from_value(v), + "return_status" => b.return_status = FromValueOpt::from_value(v), + "returned_at" => b.returned_at = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_dispute_duplicate_evidence.rs b/generated/async-stripe-shared/src/issuing_dispute_duplicate_evidence.rs index 1de54ec2a..79de7dbd7 100644 --- a/generated/async-stripe-shared/src/issuing_dispute_duplicate_evidence.rs +++ b/generated/async-stripe-shared/src/issuing_dispute_duplicate_evidence.rs @@ -26,7 +26,12 @@ pub struct IssuingDisputeDuplicateEvidenceBuilder { original_transaction: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -85,13 +90,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(additional_documentation), + Some(card_statement), + Some(cash_receipt), + Some(check_image), + Some(explanation), + Some(original_transaction), + ) = ( + self.additional_documentation.take(), + self.card_statement.take(), + self.cash_receipt.take(), + self.check_image.take(), + self.explanation.take(), + self.original_transaction.take(), + ) + else { + return None; + }; Some(Self::Out { - additional_documentation: self.additional_documentation.take()?, - card_statement: self.card_statement.take()?, - cash_receipt: self.cash_receipt.take()?, - check_image: self.check_image.take()?, - explanation: self.explanation.take()?, - original_transaction: self.original_transaction.take()?, + additional_documentation, + card_statement, + cash_receipt, + check_image, + explanation, + original_transaction, }) } } @@ -120,15 +143,13 @@ const _: () = { for (k, v) in obj { match k.as_str() { "additional_documentation" => { - b.additional_documentation = Some(FromValueOpt::from_value(v)?) - } - "card_statement" => b.card_statement = Some(FromValueOpt::from_value(v)?), - "cash_receipt" => b.cash_receipt = Some(FromValueOpt::from_value(v)?), - "check_image" => b.check_image = Some(FromValueOpt::from_value(v)?), - "explanation" => b.explanation = Some(FromValueOpt::from_value(v)?), - "original_transaction" => { - b.original_transaction = Some(FromValueOpt::from_value(v)?) + b.additional_documentation = FromValueOpt::from_value(v) } + "card_statement" => b.card_statement = FromValueOpt::from_value(v), + "cash_receipt" => b.cash_receipt = FromValueOpt::from_value(v), + "check_image" => b.check_image = FromValueOpt::from_value(v), + "explanation" => b.explanation = FromValueOpt::from_value(v), + "original_transaction" => b.original_transaction = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_dispute_evidence.rs b/generated/async-stripe-shared/src/issuing_dispute_evidence.rs index 838671383..17c349f85 100644 --- a/generated/async-stripe-shared/src/issuing_dispute_evidence.rs +++ b/generated/async-stripe-shared/src/issuing_dispute_evidence.rs @@ -28,7 +28,12 @@ pub struct IssuingDisputeEvidenceBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -93,15 +98,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(canceled), + Some(duplicate), + Some(fraudulent), + Some(merchandise_not_as_described), + Some(not_received), + Some(other), + Some(reason), + Some(service_not_as_described), + ) = ( + self.canceled.take(), + self.duplicate.take(), + self.fraudulent.take(), + self.merchandise_not_as_described.take(), + self.not_received.take(), + self.other.take(), + self.reason, + self.service_not_as_described.take(), + ) + else { + return None; + }; Some(Self::Out { - canceled: self.canceled.take()?, - duplicate: self.duplicate.take()?, - fraudulent: self.fraudulent.take()?, - merchandise_not_as_described: self.merchandise_not_as_described.take()?, - not_received: self.not_received.take()?, - other: self.other.take()?, - reason: self.reason?, - service_not_as_described: self.service_not_as_described.take()?, + canceled, + duplicate, + fraudulent, + merchandise_not_as_described, + not_received, + other, + reason, + service_not_as_described, }) } } @@ -129,17 +156,17 @@ const _: () = { let mut b = IssuingDisputeEvidenceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "canceled" => b.canceled = Some(FromValueOpt::from_value(v)?), - "duplicate" => b.duplicate = Some(FromValueOpt::from_value(v)?), - "fraudulent" => b.fraudulent = Some(FromValueOpt::from_value(v)?), + "canceled" => b.canceled = FromValueOpt::from_value(v), + "duplicate" => b.duplicate = FromValueOpt::from_value(v), + "fraudulent" => b.fraudulent = FromValueOpt::from_value(v), "merchandise_not_as_described" => { - b.merchandise_not_as_described = Some(FromValueOpt::from_value(v)?) + b.merchandise_not_as_described = FromValueOpt::from_value(v) } - "not_received" => b.not_received = Some(FromValueOpt::from_value(v)?), - "other" => b.other = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), + "not_received" => b.not_received = FromValueOpt::from_value(v), + "other" => b.other = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), "service_not_as_described" => { - b.service_not_as_described = Some(FromValueOpt::from_value(v)?) + b.service_not_as_described = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/issuing_dispute_fraudulent_evidence.rs b/generated/async-stripe-shared/src/issuing_dispute_fraudulent_evidence.rs index 25f097ce9..7e6885434 100644 --- a/generated/async-stripe-shared/src/issuing_dispute_fraudulent_evidence.rs +++ b/generated/async-stripe-shared/src/issuing_dispute_fraudulent_evidence.rs @@ -13,7 +13,12 @@ pub struct IssuingDisputeFraudulentEvidenceBuilder { explanation: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -64,10 +69,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - additional_documentation: self.additional_documentation.take()?, - explanation: self.explanation.take()?, - }) + let (Some(additional_documentation), Some(explanation)) = + (self.additional_documentation.take(), self.explanation.take()) + else { + return None; + }; + Some(Self::Out { additional_documentation, explanation }) } } @@ -95,9 +102,9 @@ const _: () = { for (k, v) in obj { match k.as_str() { "additional_documentation" => { - b.additional_documentation = Some(FromValueOpt::from_value(v)?) + b.additional_documentation = FromValueOpt::from_value(v) } - "explanation" => b.explanation = Some(FromValueOpt::from_value(v)?), + "explanation" => b.explanation = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_dispute_merchandise_not_as_described_evidence.rs b/generated/async-stripe-shared/src/issuing_dispute_merchandise_not_as_described_evidence.rs index 1b684c101..4d04cce82 100644 --- a/generated/async-stripe-shared/src/issuing_dispute_merchandise_not_as_described_evidence.rs +++ b/generated/async-stripe-shared/src/issuing_dispute_merchandise_not_as_described_evidence.rs @@ -25,7 +25,12 @@ pub struct IssuingDisputeMerchandiseNotAsDescribedEvidenceBuilder { returned_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -84,13 +89,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(additional_documentation), + Some(explanation), + Some(received_at), + Some(return_description), + Some(return_status), + Some(returned_at), + ) = ( + self.additional_documentation.take(), + self.explanation.take(), + self.received_at, + self.return_description.take(), + self.return_status, + self.returned_at, + ) + else { + return None; + }; Some(Self::Out { - additional_documentation: self.additional_documentation.take()?, - explanation: self.explanation.take()?, - received_at: self.received_at?, - return_description: self.return_description.take()?, - return_status: self.return_status?, - returned_at: self.returned_at?, + additional_documentation, + explanation, + received_at, + return_description, + return_status, + returned_at, }) } } @@ -119,15 +142,13 @@ const _: () = { for (k, v) in obj { match k.as_str() { "additional_documentation" => { - b.additional_documentation = Some(FromValueOpt::from_value(v)?) - } - "explanation" => b.explanation = Some(FromValueOpt::from_value(v)?), - "received_at" => b.received_at = Some(FromValueOpt::from_value(v)?), - "return_description" => { - b.return_description = Some(FromValueOpt::from_value(v)?) + b.additional_documentation = FromValueOpt::from_value(v) } - "return_status" => b.return_status = Some(FromValueOpt::from_value(v)?), - "returned_at" => b.returned_at = Some(FromValueOpt::from_value(v)?), + "explanation" => b.explanation = FromValueOpt::from_value(v), + "received_at" => b.received_at = FromValueOpt::from_value(v), + "return_description" => b.return_description = FromValueOpt::from_value(v), + "return_status" => b.return_status = FromValueOpt::from_value(v), + "returned_at" => b.returned_at = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_dispute_not_received_evidence.rs b/generated/async-stripe-shared/src/issuing_dispute_not_received_evidence.rs index ae2bc063c..62db48aa5 100644 --- a/generated/async-stripe-shared/src/issuing_dispute_not_received_evidence.rs +++ b/generated/async-stripe-shared/src/issuing_dispute_not_received_evidence.rs @@ -22,7 +22,12 @@ pub struct IssuingDisputeNotReceivedEvidenceBuilder { product_type: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -79,12 +84,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(additional_documentation), + Some(expected_at), + Some(explanation), + Some(product_description), + Some(product_type), + ) = ( + self.additional_documentation.take(), + self.expected_at, + self.explanation.take(), + self.product_description.take(), + self.product_type, + ) + else { + return None; + }; Some(Self::Out { - additional_documentation: self.additional_documentation.take()?, - expected_at: self.expected_at?, - explanation: self.explanation.take()?, - product_description: self.product_description.take()?, - product_type: self.product_type?, + additional_documentation, + expected_at, + explanation, + product_description, + product_type, }) } } @@ -113,14 +134,12 @@ const _: () = { for (k, v) in obj { match k.as_str() { "additional_documentation" => { - b.additional_documentation = Some(FromValueOpt::from_value(v)?) - } - "expected_at" => b.expected_at = Some(FromValueOpt::from_value(v)?), - "explanation" => b.explanation = Some(FromValueOpt::from_value(v)?), - "product_description" => { - b.product_description = Some(FromValueOpt::from_value(v)?) + b.additional_documentation = FromValueOpt::from_value(v) } - "product_type" => b.product_type = Some(FromValueOpt::from_value(v)?), + "expected_at" => b.expected_at = FromValueOpt::from_value(v), + "explanation" => b.explanation = FromValueOpt::from_value(v), + "product_description" => b.product_description = FromValueOpt::from_value(v), + "product_type" => b.product_type = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_dispute_other_evidence.rs b/generated/async-stripe-shared/src/issuing_dispute_other_evidence.rs index a488f8ca4..15ba70557 100644 --- a/generated/async-stripe-shared/src/issuing_dispute_other_evidence.rs +++ b/generated/async-stripe-shared/src/issuing_dispute_other_evidence.rs @@ -19,7 +19,12 @@ pub struct IssuingDisputeOtherEvidenceBuilder { product_type: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -74,11 +79,25 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(additional_documentation), + Some(explanation), + Some(product_description), + Some(product_type), + ) = ( + self.additional_documentation.take(), + self.explanation.take(), + self.product_description.take(), + self.product_type, + ) + else { + return None; + }; Some(Self::Out { - additional_documentation: self.additional_documentation.take()?, - explanation: self.explanation.take()?, - product_description: self.product_description.take()?, - product_type: self.product_type?, + additional_documentation, + explanation, + product_description, + product_type, }) } } @@ -107,13 +126,11 @@ const _: () = { for (k, v) in obj { match k.as_str() { "additional_documentation" => { - b.additional_documentation = Some(FromValueOpt::from_value(v)?) - } - "explanation" => b.explanation = Some(FromValueOpt::from_value(v)?), - "product_description" => { - b.product_description = Some(FromValueOpt::from_value(v)?) + b.additional_documentation = FromValueOpt::from_value(v) } - "product_type" => b.product_type = Some(FromValueOpt::from_value(v)?), + "explanation" => b.explanation = FromValueOpt::from_value(v), + "product_description" => b.product_description = FromValueOpt::from_value(v), + "product_type" => b.product_type = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_dispute_service_not_as_described_evidence.rs b/generated/async-stripe-shared/src/issuing_dispute_service_not_as_described_evidence.rs index 04c72d549..27e20462a 100644 --- a/generated/async-stripe-shared/src/issuing_dispute_service_not_as_described_evidence.rs +++ b/generated/async-stripe-shared/src/issuing_dispute_service_not_as_described_evidence.rs @@ -22,7 +22,12 @@ pub struct IssuingDisputeServiceNotAsDescribedEvidenceBuilder { received_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -79,12 +84,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(additional_documentation), + Some(canceled_at), + Some(cancellation_reason), + Some(explanation), + Some(received_at), + ) = ( + self.additional_documentation.take(), + self.canceled_at, + self.cancellation_reason.take(), + self.explanation.take(), + self.received_at, + ) + else { + return None; + }; Some(Self::Out { - additional_documentation: self.additional_documentation.take()?, - canceled_at: self.canceled_at?, - cancellation_reason: self.cancellation_reason.take()?, - explanation: self.explanation.take()?, - received_at: self.received_at?, + additional_documentation, + canceled_at, + cancellation_reason, + explanation, + received_at, }) } } @@ -113,14 +134,12 @@ const _: () = { for (k, v) in obj { match k.as_str() { "additional_documentation" => { - b.additional_documentation = Some(FromValueOpt::from_value(v)?) - } - "canceled_at" => b.canceled_at = Some(FromValueOpt::from_value(v)?), - "cancellation_reason" => { - b.cancellation_reason = Some(FromValueOpt::from_value(v)?) + b.additional_documentation = FromValueOpt::from_value(v) } - "explanation" => b.explanation = Some(FromValueOpt::from_value(v)?), - "received_at" => b.received_at = Some(FromValueOpt::from_value(v)?), + "canceled_at" => b.canceled_at = FromValueOpt::from_value(v), + "cancellation_reason" => b.cancellation_reason = FromValueOpt::from_value(v), + "explanation" => b.explanation = FromValueOpt::from_value(v), + "received_at" => b.received_at = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_dispute_treasury.rs b/generated/async-stripe-shared/src/issuing_dispute_treasury.rs index df33f064a..32dd1aeb6 100644 --- a/generated/async-stripe-shared/src/issuing_dispute_treasury.rs +++ b/generated/async-stripe-shared/src/issuing_dispute_treasury.rs @@ -13,7 +13,12 @@ pub struct IssuingDisputeTreasuryBuilder { received_debit: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - debit_reversal: self.debit_reversal.take()?, - received_debit: self.received_debit.take()?, - }) + let (Some(debit_reversal), Some(received_debit)) = + (self.debit_reversal.take(), self.received_debit.take()) + else { + return None; + }; + Some(Self::Out { debit_reversal, received_debit }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = IssuingDisputeTreasuryBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "debit_reversal" => b.debit_reversal = Some(FromValueOpt::from_value(v)?), - "received_debit" => b.received_debit = Some(FromValueOpt::from_value(v)?), + "debit_reversal" => b.debit_reversal = FromValueOpt::from_value(v), + "received_debit" => b.received_debit = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_network_token_address.rs b/generated/async-stripe-shared/src/issuing_network_token_address.rs index c99afc0ce..f39747b78 100644 --- a/generated/async-stripe-shared/src/issuing_network_token_address.rs +++ b/generated/async-stripe-shared/src/issuing_network_token_address.rs @@ -13,7 +13,12 @@ pub struct IssuingNetworkTokenAddressBuilder { postal_code: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { line1: self.line1.take()?, postal_code: self.postal_code.take()? }) + let (Some(line1), Some(postal_code)) = (self.line1.take(), self.postal_code.take()) + else { + return None; + }; + Some(Self::Out { line1, postal_code }) } } @@ -86,8 +95,8 @@ const _: () = { let mut b = IssuingNetworkTokenAddressBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "line1" => b.line1 = Some(FromValueOpt::from_value(v)?), - "postal_code" => b.postal_code = Some(FromValueOpt::from_value(v)?), + "line1" => b.line1 = FromValueOpt::from_value(v), + "postal_code" => b.postal_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_network_token_device.rs b/generated/async-stripe-shared/src/issuing_network_token_device.rs index 5967ba62a..f9c1846b9 100644 --- a/generated/async-stripe-shared/src/issuing_network_token_device.rs +++ b/generated/async-stripe-shared/src/issuing_network_token_device.rs @@ -27,7 +27,12 @@ pub struct IssuingNetworkTokenDeviceBuilder { type_: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -84,14 +89,25 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - device_fingerprint: self.device_fingerprint.take()?, - ip_address: self.ip_address.take()?, - location: self.location.take()?, - name: self.name.take()?, - phone_number: self.phone_number.take()?, - type_: self.type_?, - }) + let ( + Some(device_fingerprint), + Some(ip_address), + Some(location), + Some(name), + Some(phone_number), + Some(type_), + ) = ( + self.device_fingerprint.take(), + self.ip_address.take(), + self.location.take(), + self.name.take(), + self.phone_number.take(), + self.type_, + ) + else { + return None; + }; + Some(Self::Out { device_fingerprint, ip_address, location, name, phone_number, type_ }) } } @@ -118,14 +134,12 @@ const _: () = { let mut b = IssuingNetworkTokenDeviceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "device_fingerprint" => { - b.device_fingerprint = Some(FromValueOpt::from_value(v)?) - } - "ip_address" => b.ip_address = Some(FromValueOpt::from_value(v)?), - "location" => b.location = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "phone_number" => b.phone_number = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "device_fingerprint" => b.device_fingerprint = FromValueOpt::from_value(v), + "ip_address" => b.ip_address = FromValueOpt::from_value(v), + "location" => b.location = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "phone_number" => b.phone_number = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_network_token_mastercard.rs b/generated/async-stripe-shared/src/issuing_network_token_mastercard.rs index 2c3aca35d..27f087131 100644 --- a/generated/async-stripe-shared/src/issuing_network_token_mastercard.rs +++ b/generated/async-stripe-shared/src/issuing_network_token_mastercard.rs @@ -20,7 +20,12 @@ pub struct IssuingNetworkTokenMastercardBuilder { token_requestor_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,11 +78,25 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(card_reference_id), + Some(token_reference_id), + Some(token_requestor_id), + Some(token_requestor_name), + ) = ( + self.card_reference_id.take(), + self.token_reference_id.take(), + self.token_requestor_id.take(), + self.token_requestor_name.take(), + ) + else { + return None; + }; Some(Self::Out { - card_reference_id: self.card_reference_id.take()?, - token_reference_id: self.token_reference_id.take()?, - token_requestor_id: self.token_requestor_id.take()?, - token_requestor_name: self.token_requestor_name.take()?, + card_reference_id, + token_reference_id, + token_requestor_id, + token_requestor_name, }) } } @@ -105,16 +124,10 @@ const _: () = { let mut b = IssuingNetworkTokenMastercardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "card_reference_id" => b.card_reference_id = Some(FromValueOpt::from_value(v)?), - "token_reference_id" => { - b.token_reference_id = Some(FromValueOpt::from_value(v)?) - } - "token_requestor_id" => { - b.token_requestor_id = Some(FromValueOpt::from_value(v)?) - } - "token_requestor_name" => { - b.token_requestor_name = Some(FromValueOpt::from_value(v)?) - } + "card_reference_id" => b.card_reference_id = FromValueOpt::from_value(v), + "token_reference_id" => b.token_reference_id = FromValueOpt::from_value(v), + "token_requestor_id" => b.token_requestor_id = FromValueOpt::from_value(v), + "token_requestor_name" => b.token_requestor_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_network_token_network_data.rs b/generated/async-stripe-shared/src/issuing_network_token_network_data.rs index 110b46e3a..a387ee05c 100644 --- a/generated/async-stripe-shared/src/issuing_network_token_network_data.rs +++ b/generated/async-stripe-shared/src/issuing_network_token_network_data.rs @@ -20,7 +20,12 @@ pub struct IssuingNetworkTokenNetworkDataBuilder { wallet_provider: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -75,13 +80,16 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - device: self.device.take()?, - mastercard: self.mastercard.take()?, - type_: self.type_?, - visa: self.visa.take()?, - wallet_provider: self.wallet_provider.take()?, - }) + let (Some(device), Some(mastercard), Some(type_), Some(visa), Some(wallet_provider)) = ( + self.device.take(), + self.mastercard.take(), + self.type_, + self.visa.take(), + self.wallet_provider.take(), + ) else { + return None; + }; + Some(Self::Out { device, mastercard, type_, visa, wallet_provider }) } } @@ -108,11 +116,11 @@ const _: () = { let mut b = IssuingNetworkTokenNetworkDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "device" => b.device = Some(FromValueOpt::from_value(v)?), - "mastercard" => b.mastercard = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "visa" => b.visa = Some(FromValueOpt::from_value(v)?), - "wallet_provider" => b.wallet_provider = Some(FromValueOpt::from_value(v)?), + "device" => b.device = FromValueOpt::from_value(v), + "mastercard" => b.mastercard = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "visa" => b.visa = FromValueOpt::from_value(v), + "wallet_provider" => b.wallet_provider = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_network_token_visa.rs b/generated/async-stripe-shared/src/issuing_network_token_visa.rs index 36335deff..44b62c7a2 100644 --- a/generated/async-stripe-shared/src/issuing_network_token_visa.rs +++ b/generated/async-stripe-shared/src/issuing_network_token_visa.rs @@ -20,7 +20,12 @@ pub struct IssuingNetworkTokenVisaBuilder { token_risk_score: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,11 +78,25 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(card_reference_id), + Some(token_reference_id), + Some(token_requestor_id), + Some(token_risk_score), + ) = ( + self.card_reference_id.take(), + self.token_reference_id.take(), + self.token_requestor_id.take(), + self.token_risk_score.take(), + ) + else { + return None; + }; Some(Self::Out { - card_reference_id: self.card_reference_id.take()?, - token_reference_id: self.token_reference_id.take()?, - token_requestor_id: self.token_requestor_id.take()?, - token_risk_score: self.token_risk_score.take()?, + card_reference_id, + token_reference_id, + token_requestor_id, + token_risk_score, }) } } @@ -105,14 +124,10 @@ const _: () = { let mut b = IssuingNetworkTokenVisaBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "card_reference_id" => b.card_reference_id = Some(FromValueOpt::from_value(v)?), - "token_reference_id" => { - b.token_reference_id = Some(FromValueOpt::from_value(v)?) - } - "token_requestor_id" => { - b.token_requestor_id = Some(FromValueOpt::from_value(v)?) - } - "token_risk_score" => b.token_risk_score = Some(FromValueOpt::from_value(v)?), + "card_reference_id" => b.card_reference_id = FromValueOpt::from_value(v), + "token_reference_id" => b.token_reference_id = FromValueOpt::from_value(v), + "token_requestor_id" => b.token_requestor_id = FromValueOpt::from_value(v), + "token_risk_score" => b.token_risk_score = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_network_token_wallet_provider.rs b/generated/async-stripe-shared/src/issuing_network_token_wallet_provider.rs index 619673f8c..c7e426a0b 100644 --- a/generated/async-stripe-shared/src/issuing_network_token_wallet_provider.rs +++ b/generated/async-stripe-shared/src/issuing_network_token_wallet_provider.rs @@ -37,7 +37,12 @@ pub struct IssuingNetworkTokenWalletProviderBuilder { suggested_decision_version: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -106,17 +111,43 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_id), + Some(account_trust_score), + Some(card_number_source), + Some(cardholder_address), + Some(cardholder_name), + Some(device_trust_score), + Some(hashed_account_email_address), + Some(reason_codes), + Some(suggested_decision), + Some(suggested_decision_version), + ) = ( + self.account_id.take(), + self.account_trust_score, + self.card_number_source, + self.cardholder_address.take(), + self.cardholder_name.take(), + self.device_trust_score, + self.hashed_account_email_address.take(), + self.reason_codes.take(), + self.suggested_decision, + self.suggested_decision_version.take(), + ) + else { + return None; + }; Some(Self::Out { - account_id: self.account_id.take()?, - account_trust_score: self.account_trust_score?, - card_number_source: self.card_number_source?, - cardholder_address: self.cardholder_address.take()?, - cardholder_name: self.cardholder_name.take()?, - device_trust_score: self.device_trust_score?, - hashed_account_email_address: self.hashed_account_email_address.take()?, - reason_codes: self.reason_codes.take()?, - suggested_decision: self.suggested_decision?, - suggested_decision_version: self.suggested_decision_version.take()?, + account_id, + account_trust_score, + card_number_source, + cardholder_address, + cardholder_name, + device_trust_score, + hashed_account_email_address, + reason_codes, + suggested_decision, + suggested_decision_version, }) } } @@ -144,29 +175,19 @@ const _: () = { let mut b = IssuingNetworkTokenWalletProviderBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_id" => b.account_id = Some(FromValueOpt::from_value(v)?), - "account_trust_score" => { - b.account_trust_score = Some(FromValueOpt::from_value(v)?) - } - "card_number_source" => { - b.card_number_source = Some(FromValueOpt::from_value(v)?) - } - "cardholder_address" => { - b.cardholder_address = Some(FromValueOpt::from_value(v)?) - } - "cardholder_name" => b.cardholder_name = Some(FromValueOpt::from_value(v)?), - "device_trust_score" => { - b.device_trust_score = Some(FromValueOpt::from_value(v)?) - } + "account_id" => b.account_id = FromValueOpt::from_value(v), + "account_trust_score" => b.account_trust_score = FromValueOpt::from_value(v), + "card_number_source" => b.card_number_source = FromValueOpt::from_value(v), + "cardholder_address" => b.cardholder_address = FromValueOpt::from_value(v), + "cardholder_name" => b.cardholder_name = FromValueOpt::from_value(v), + "device_trust_score" => b.device_trust_score = FromValueOpt::from_value(v), "hashed_account_email_address" => { - b.hashed_account_email_address = Some(FromValueOpt::from_value(v)?) - } - "reason_codes" => b.reason_codes = Some(FromValueOpt::from_value(v)?), - "suggested_decision" => { - b.suggested_decision = Some(FromValueOpt::from_value(v)?) + b.hashed_account_email_address = FromValueOpt::from_value(v) } + "reason_codes" => b.reason_codes = FromValueOpt::from_value(v), + "suggested_decision" => b.suggested_decision = FromValueOpt::from_value(v), "suggested_decision_version" => { - b.suggested_decision_version = Some(FromValueOpt::from_value(v)?) + b.suggested_decision_version = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/issuing_personalization_design.rs b/generated/async-stripe-shared/src/issuing_personalization_design.rs index 385f7151a..4b33fb859 100644 --- a/generated/async-stripe-shared/src/issuing_personalization_design.rs +++ b/generated/async-stripe-shared/src/issuing_personalization_design.rs @@ -44,7 +44,12 @@ pub struct IssuingPersonalizationDesignBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -113,19 +118,49 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(card_logo), + Some(carrier_text), + Some(created), + Some(id), + Some(livemode), + Some(lookup_key), + Some(metadata), + Some(name), + Some(physical_bundle), + Some(preferences), + Some(rejection_reasons), + Some(status), + ) = ( + self.card_logo.take(), + self.carrier_text.take(), + self.created, + self.id.take(), + self.livemode, + self.lookup_key.take(), + self.metadata.take(), + self.name.take(), + self.physical_bundle.take(), + self.preferences, + self.rejection_reasons.take(), + self.status, + ) + else { + return None; + }; Some(Self::Out { - card_logo: self.card_logo.take()?, - carrier_text: self.carrier_text.take()?, - created: self.created?, - id: self.id.take()?, - livemode: self.livemode?, - lookup_key: self.lookup_key.take()?, - metadata: self.metadata.take()?, - name: self.name.take()?, - physical_bundle: self.physical_bundle.take()?, - preferences: self.preferences?, - rejection_reasons: self.rejection_reasons.take()?, - status: self.status?, + card_logo, + carrier_text, + created, + id, + livemode, + lookup_key, + metadata, + name, + physical_bundle, + preferences, + rejection_reasons, + status, }) } } @@ -153,18 +188,18 @@ const _: () = { let mut b = IssuingPersonalizationDesignBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "card_logo" => b.card_logo = Some(FromValueOpt::from_value(v)?), - "carrier_text" => b.carrier_text = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "lookup_key" => b.lookup_key = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "physical_bundle" => b.physical_bundle = Some(FromValueOpt::from_value(v)?), - "preferences" => b.preferences = Some(FromValueOpt::from_value(v)?), - "rejection_reasons" => b.rejection_reasons = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "card_logo" => b.card_logo = FromValueOpt::from_value(v), + "carrier_text" => b.carrier_text = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "lookup_key" => b.lookup_key = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "physical_bundle" => b.physical_bundle = FromValueOpt::from_value(v), + "preferences" => b.preferences = FromValueOpt::from_value(v), + "rejection_reasons" => b.rejection_reasons = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_personalization_design_carrier_text.rs b/generated/async-stripe-shared/src/issuing_personalization_design_carrier_text.rs index e9d2ea48d..8a97315cb 100644 --- a/generated/async-stripe-shared/src/issuing_personalization_design_carrier_text.rs +++ b/generated/async-stripe-shared/src/issuing_personalization_design_carrier_text.rs @@ -19,7 +19,12 @@ pub struct IssuingPersonalizationDesignCarrierTextBuilder { header_title: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - footer_body: self.footer_body.take()?, - footer_title: self.footer_title.take()?, - header_body: self.header_body.take()?, - header_title: self.header_title.take()?, - }) + let (Some(footer_body), Some(footer_title), Some(header_body), Some(header_title)) = ( + self.footer_body.take(), + self.footer_title.take(), + self.header_body.take(), + self.header_title.take(), + ) else { + return None; + }; + Some(Self::Out { footer_body, footer_title, header_body, header_title }) } } @@ -104,10 +112,10 @@ const _: () = { let mut b = IssuingPersonalizationDesignCarrierTextBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "footer_body" => b.footer_body = Some(FromValueOpt::from_value(v)?), - "footer_title" => b.footer_title = Some(FromValueOpt::from_value(v)?), - "header_body" => b.header_body = Some(FromValueOpt::from_value(v)?), - "header_title" => b.header_title = Some(FromValueOpt::from_value(v)?), + "footer_body" => b.footer_body = FromValueOpt::from_value(v), + "footer_title" => b.footer_title = FromValueOpt::from_value(v), + "header_body" => b.header_body = FromValueOpt::from_value(v), + "header_title" => b.header_title = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_personalization_design_preferences.rs b/generated/async-stripe-shared/src/issuing_personalization_design_preferences.rs index 8dfe406cd..141e1f690 100644 --- a/generated/async-stripe-shared/src/issuing_personalization_design_preferences.rs +++ b/generated/async-stripe-shared/src/issuing_personalization_design_preferences.rs @@ -14,7 +14,12 @@ pub struct IssuingPersonalizationDesignPreferencesBuilder { is_platform_default: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,10 +65,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - is_default: self.is_default?, - is_platform_default: self.is_platform_default?, - }) + let (Some(is_default), Some(is_platform_default)) = + (self.is_default, self.is_platform_default) + else { + return None; + }; + Some(Self::Out { is_default, is_platform_default }) } } @@ -90,10 +97,8 @@ const _: () = { let mut b = IssuingPersonalizationDesignPreferencesBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "is_default" => b.is_default = Some(FromValueOpt::from_value(v)?), - "is_platform_default" => { - b.is_platform_default = Some(FromValueOpt::from_value(v)?) - } + "is_default" => b.is_default = FromValueOpt::from_value(v), + "is_platform_default" => b.is_platform_default = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_personalization_design_rejection_reasons.rs b/generated/async-stripe-shared/src/issuing_personalization_design_rejection_reasons.rs index 04af2bdfd..105980b29 100644 --- a/generated/async-stripe-shared/src/issuing_personalization_design_rejection_reasons.rs +++ b/generated/async-stripe-shared/src/issuing_personalization_design_rejection_reasons.rs @@ -13,7 +13,12 @@ pub struct IssuingPersonalizationDesignRejectionReasonsBuilder { carrier_text: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - card_logo: self.card_logo.take()?, - carrier_text: self.carrier_text.take()?, - }) + let (Some(card_logo), Some(carrier_text)) = + (self.card_logo.take(), self.carrier_text.take()) + else { + return None; + }; + Some(Self::Out { card_logo, carrier_text }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = IssuingPersonalizationDesignRejectionReasonsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "card_logo" => b.card_logo = Some(FromValueOpt::from_value(v)?), - "carrier_text" => b.carrier_text = Some(FromValueOpt::from_value(v)?), + "card_logo" => b.card_logo = FromValueOpt::from_value(v), + "carrier_text" => b.carrier_text = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_physical_bundle.rs b/generated/async-stripe-shared/src/issuing_physical_bundle.rs index 3d7146ba0..3ae82434f 100644 --- a/generated/async-stripe-shared/src/issuing_physical_bundle.rs +++ b/generated/async-stripe-shared/src/issuing_physical_bundle.rs @@ -25,7 +25,12 @@ pub struct IssuingPhysicalBundleBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -82,14 +87,17 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - features: self.features?, - id: self.id.take()?, - livemode: self.livemode?, - name: self.name.take()?, - status: self.status?, - type_: self.type_?, - }) + let (Some(features), Some(id), Some(livemode), Some(name), Some(status), Some(type_)) = ( + self.features, + self.id.take(), + self.livemode, + self.name.take(), + self.status, + self.type_, + ) else { + return None; + }; + Some(Self::Out { features, id, livemode, name, status, type_ }) } } @@ -116,12 +124,12 @@ const _: () = { let mut b = IssuingPhysicalBundleBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "features" => b.features = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "features" => b.features = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_physical_bundle_features.rs b/generated/async-stripe-shared/src/issuing_physical_bundle_features.rs index d133a33d5..c74dec220 100644 --- a/generated/async-stripe-shared/src/issuing_physical_bundle_features.rs +++ b/generated/async-stripe-shared/src/issuing_physical_bundle_features.rs @@ -16,7 +16,12 @@ pub struct IssuingPhysicalBundleFeaturesBuilder { second_line: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - card_logo: self.card_logo?, - carrier_text: self.carrier_text?, - second_line: self.second_line?, - }) + let (Some(card_logo), Some(carrier_text), Some(second_line)) = + (self.card_logo, self.carrier_text, self.second_line) + else { + return None; + }; + Some(Self::Out { card_logo, carrier_text, second_line }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = IssuingPhysicalBundleFeaturesBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "card_logo" => b.card_logo = Some(FromValueOpt::from_value(v)?), - "carrier_text" => b.carrier_text = Some(FromValueOpt::from_value(v)?), - "second_line" => b.second_line = Some(FromValueOpt::from_value(v)?), + "card_logo" => b.card_logo = FromValueOpt::from_value(v), + "carrier_text" => b.carrier_text = FromValueOpt::from_value(v), + "second_line" => b.second_line = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_token.rs b/generated/async-stripe-shared/src/issuing_token.rs index f3ce614a6..54d7e2088 100644 --- a/generated/async-stripe-shared/src/issuing_token.rs +++ b/generated/async-stripe-shared/src/issuing_token.rs @@ -43,7 +43,12 @@ pub struct IssuingTokenBuilder { wallet_provider: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -110,18 +115,46 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(card), + Some(created), + Some(device_fingerprint), + Some(id), + Some(last4), + Some(livemode), + Some(network), + Some(network_data), + Some(network_updated_at), + Some(status), + Some(wallet_provider), + ) = ( + self.card.take(), + self.created, + self.device_fingerprint.take(), + self.id.take(), + self.last4.take(), + self.livemode, + self.network, + self.network_data.take(), + self.network_updated_at, + self.status, + self.wallet_provider, + ) + else { + return None; + }; Some(Self::Out { - card: self.card.take()?, - created: self.created?, - device_fingerprint: self.device_fingerprint.take()?, - id: self.id.take()?, - last4: self.last4.take()?, - livemode: self.livemode?, - network: self.network?, - network_data: self.network_data.take()?, - network_updated_at: self.network_updated_at?, - status: self.status?, - wallet_provider: self.wallet_provider?, + card, + created, + device_fingerprint, + id, + last4, + livemode, + network, + network_data, + network_updated_at, + status, + wallet_provider, }) } } @@ -149,21 +182,17 @@ const _: () = { let mut b = IssuingTokenBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "device_fingerprint" => { - b.device_fingerprint = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), - "network_data" => b.network_data = Some(FromValueOpt::from_value(v)?), - "network_updated_at" => { - b.network_updated_at = Some(FromValueOpt::from_value(v)?) - } - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "wallet_provider" => b.wallet_provider = Some(FromValueOpt::from_value(v)?), + "card" => b.card = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "device_fingerprint" => b.device_fingerprint = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), + "network_data" => b.network_data = FromValueOpt::from_value(v), + "network_updated_at" => b.network_updated_at = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "wallet_provider" => b.wallet_provider = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_transaction.rs b/generated/async-stripe-shared/src/issuing_transaction.rs index 6766a52cc..34edbe57d 100644 --- a/generated/async-stripe-shared/src/issuing_transaction.rs +++ b/generated/async-stripe-shared/src/issuing_transaction.rs @@ -83,7 +83,12 @@ pub struct IssuingTransactionBuilder { wallet: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -170,28 +175,76 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_details), + Some(authorization), + Some(balance_transaction), + Some(card), + Some(cardholder), + Some(created), + Some(currency), + Some(dispute), + Some(id), + Some(livemode), + Some(merchant_amount), + Some(merchant_currency), + Some(merchant_data), + Some(metadata), + Some(network_data), + Some(purchase_details), + Some(token), + Some(treasury), + Some(type_), + Some(wallet), + ) = ( + self.amount, + self.amount_details, + self.authorization.take(), + self.balance_transaction.take(), + self.card.take(), + self.cardholder.take(), + self.created, + self.currency, + self.dispute.take(), + self.id.take(), + self.livemode, + self.merchant_amount, + self.merchant_currency, + self.merchant_data.take(), + self.metadata.take(), + self.network_data.take(), + self.purchase_details.take(), + self.token.take(), + self.treasury.take(), + self.type_, + self.wallet, + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_details: self.amount_details?, - authorization: self.authorization.take()?, - balance_transaction: self.balance_transaction.take()?, - card: self.card.take()?, - cardholder: self.cardholder.take()?, - created: self.created?, - currency: self.currency?, - dispute: self.dispute.take()?, - id: self.id.take()?, - livemode: self.livemode?, - merchant_amount: self.merchant_amount?, - merchant_currency: self.merchant_currency?, - merchant_data: self.merchant_data.take()?, - metadata: self.metadata.take()?, - network_data: self.network_data.take()?, - purchase_details: self.purchase_details.take()?, - token: self.token.take()?, - treasury: self.treasury.take()?, - type_: self.type_?, - wallet: self.wallet?, + amount, + amount_details, + authorization, + balance_transaction, + card, + cardholder, + created, + currency, + dispute, + id, + livemode, + merchant_amount, + merchant_currency, + merchant_data, + metadata, + network_data, + purchase_details, + token, + treasury, + type_, + wallet, }) } } @@ -219,29 +272,27 @@ const _: () = { let mut b = IssuingTransactionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_details" => b.amount_details = Some(FromValueOpt::from_value(v)?), - "authorization" => b.authorization = Some(FromValueOpt::from_value(v)?), - "balance_transaction" => { - b.balance_transaction = Some(FromValueOpt::from_value(v)?) - } - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "cardholder" => b.cardholder = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "dispute" => b.dispute = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "merchant_amount" => b.merchant_amount = Some(FromValueOpt::from_value(v)?), - "merchant_currency" => b.merchant_currency = Some(FromValueOpt::from_value(v)?), - "merchant_data" => b.merchant_data = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "network_data" => b.network_data = Some(FromValueOpt::from_value(v)?), - "purchase_details" => b.purchase_details = Some(FromValueOpt::from_value(v)?), - "token" => b.token = Some(FromValueOpt::from_value(v)?), - "treasury" => b.treasury = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "wallet" => b.wallet = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_details" => b.amount_details = FromValueOpt::from_value(v), + "authorization" => b.authorization = FromValueOpt::from_value(v), + "balance_transaction" => b.balance_transaction = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "cardholder" => b.cardholder = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "dispute" => b.dispute = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "merchant_amount" => b.merchant_amount = FromValueOpt::from_value(v), + "merchant_currency" => b.merchant_currency = FromValueOpt::from_value(v), + "merchant_data" => b.merchant_data = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "network_data" => b.network_data = FromValueOpt::from_value(v), + "purchase_details" => b.purchase_details = FromValueOpt::from_value(v), + "token" => b.token = FromValueOpt::from_value(v), + "treasury" => b.treasury = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "wallet" => b.wallet = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_transaction_amount_details.rs b/generated/async-stripe-shared/src/issuing_transaction_amount_details.rs index 9d155b753..0b105658f 100644 --- a/generated/async-stripe-shared/src/issuing_transaction_amount_details.rs +++ b/generated/async-stripe-shared/src/issuing_transaction_amount_details.rs @@ -13,7 +13,12 @@ pub struct IssuingTransactionAmountDetailsBuilder { cashback_amount: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { atm_fee: self.atm_fee?, cashback_amount: self.cashback_amount? }) + let (Some(atm_fee), Some(cashback_amount)) = (self.atm_fee, self.cashback_amount) + else { + return None; + }; + Some(Self::Out { atm_fee, cashback_amount }) } } @@ -86,8 +95,8 @@ const _: () = { let mut b = IssuingTransactionAmountDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "atm_fee" => b.atm_fee = Some(FromValueOpt::from_value(v)?), - "cashback_amount" => b.cashback_amount = Some(FromValueOpt::from_value(v)?), + "atm_fee" => b.atm_fee = FromValueOpt::from_value(v), + "cashback_amount" => b.cashback_amount = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_transaction_flight_data.rs b/generated/async-stripe-shared/src/issuing_transaction_flight_data.rs index 569fcc478..100732753 100644 --- a/generated/async-stripe-shared/src/issuing_transaction_flight_data.rs +++ b/generated/async-stripe-shared/src/issuing_transaction_flight_data.rs @@ -22,7 +22,12 @@ pub struct IssuingTransactionFlightDataBuilder { travel_agency: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,13 +82,23 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - departure_at: self.departure_at?, - passenger_name: self.passenger_name.take()?, - refundable: self.refundable?, - segments: self.segments.take()?, - travel_agency: self.travel_agency.take()?, - }) + let ( + Some(departure_at), + Some(passenger_name), + Some(refundable), + Some(segments), + Some(travel_agency), + ) = ( + self.departure_at, + self.passenger_name.take(), + self.refundable, + self.segments.take(), + self.travel_agency.take(), + ) + else { + return None; + }; + Some(Self::Out { departure_at, passenger_name, refundable, segments, travel_agency }) } } @@ -110,11 +125,11 @@ const _: () = { let mut b = IssuingTransactionFlightDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "departure_at" => b.departure_at = Some(FromValueOpt::from_value(v)?), - "passenger_name" => b.passenger_name = Some(FromValueOpt::from_value(v)?), - "refundable" => b.refundable = Some(FromValueOpt::from_value(v)?), - "segments" => b.segments = Some(FromValueOpt::from_value(v)?), - "travel_agency" => b.travel_agency = Some(FromValueOpt::from_value(v)?), + "departure_at" => b.departure_at = FromValueOpt::from_value(v), + "passenger_name" => b.passenger_name = FromValueOpt::from_value(v), + "refundable" => b.refundable = FromValueOpt::from_value(v), + "segments" => b.segments = FromValueOpt::from_value(v), + "travel_agency" => b.travel_agency = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_transaction_flight_data_leg.rs b/generated/async-stripe-shared/src/issuing_transaction_flight_data_leg.rs index f493bf92c..f357b89d1 100644 --- a/generated/async-stripe-shared/src/issuing_transaction_flight_data_leg.rs +++ b/generated/async-stripe-shared/src/issuing_transaction_flight_data_leg.rs @@ -25,7 +25,12 @@ pub struct IssuingTransactionFlightDataLegBuilder { stopover_allowed: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -82,13 +87,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(arrival_airport_code), + Some(carrier), + Some(departure_airport_code), + Some(flight_number), + Some(service_class), + Some(stopover_allowed), + ) = ( + self.arrival_airport_code.take(), + self.carrier.take(), + self.departure_airport_code.take(), + self.flight_number.take(), + self.service_class.take(), + self.stopover_allowed, + ) + else { + return None; + }; Some(Self::Out { - arrival_airport_code: self.arrival_airport_code.take()?, - carrier: self.carrier.take()?, - departure_airport_code: self.departure_airport_code.take()?, - flight_number: self.flight_number.take()?, - service_class: self.service_class.take()?, - stopover_allowed: self.stopover_allowed?, + arrival_airport_code, + carrier, + departure_airport_code, + flight_number, + service_class, + stopover_allowed, }) } } @@ -116,16 +139,14 @@ const _: () = { let mut b = IssuingTransactionFlightDataLegBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "arrival_airport_code" => { - b.arrival_airport_code = Some(FromValueOpt::from_value(v)?) - } - "carrier" => b.carrier = Some(FromValueOpt::from_value(v)?), + "arrival_airport_code" => b.arrival_airport_code = FromValueOpt::from_value(v), + "carrier" => b.carrier = FromValueOpt::from_value(v), "departure_airport_code" => { - b.departure_airport_code = Some(FromValueOpt::from_value(v)?) + b.departure_airport_code = FromValueOpt::from_value(v) } - "flight_number" => b.flight_number = Some(FromValueOpt::from_value(v)?), - "service_class" => b.service_class = Some(FromValueOpt::from_value(v)?), - "stopover_allowed" => b.stopover_allowed = Some(FromValueOpt::from_value(v)?), + "flight_number" => b.flight_number = FromValueOpt::from_value(v), + "service_class" => b.service_class = FromValueOpt::from_value(v), + "stopover_allowed" => b.stopover_allowed = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_transaction_fuel_data.rs b/generated/async-stripe-shared/src/issuing_transaction_fuel_data.rs index 286b1d323..95e46ce75 100644 --- a/generated/async-stripe-shared/src/issuing_transaction_fuel_data.rs +++ b/generated/async-stripe-shared/src/issuing_transaction_fuel_data.rs @@ -21,7 +21,12 @@ pub struct IssuingTransactionFuelDataBuilder { volume_decimal: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -74,12 +79,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - type_: self.type_.take()?, - unit: self.unit.take()?, - unit_cost_decimal: self.unit_cost_decimal.take()?, - volume_decimal: self.volume_decimal.take()?, - }) + let (Some(type_), Some(unit), Some(unit_cost_decimal), Some(volume_decimal)) = ( + self.type_.take(), + self.unit.take(), + self.unit_cost_decimal.take(), + self.volume_decimal.take(), + ) else { + return None; + }; + Some(Self::Out { type_, unit, unit_cost_decimal, volume_decimal }) } } @@ -106,10 +114,10 @@ const _: () = { let mut b = IssuingTransactionFuelDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "unit" => b.unit = Some(FromValueOpt::from_value(v)?), - "unit_cost_decimal" => b.unit_cost_decimal = Some(FromValueOpt::from_value(v)?), - "volume_decimal" => b.volume_decimal = Some(FromValueOpt::from_value(v)?), + "type" => b.type_ = FromValueOpt::from_value(v), + "unit" => b.unit = FromValueOpt::from_value(v), + "unit_cost_decimal" => b.unit_cost_decimal = FromValueOpt::from_value(v), + "volume_decimal" => b.volume_decimal = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_transaction_lodging_data.rs b/generated/async-stripe-shared/src/issuing_transaction_lodging_data.rs index b0da128f3..cd9674e2f 100644 --- a/generated/async-stripe-shared/src/issuing_transaction_lodging_data.rs +++ b/generated/async-stripe-shared/src/issuing_transaction_lodging_data.rs @@ -13,7 +13,12 @@ pub struct IssuingTransactionLodgingDataBuilder { nights: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { check_in_at: self.check_in_at?, nights: self.nights? }) + let (Some(check_in_at), Some(nights)) = (self.check_in_at, self.nights) else { + return None; + }; + Some(Self::Out { check_in_at, nights }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = IssuingTransactionLodgingDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "check_in_at" => b.check_in_at = Some(FromValueOpt::from_value(v)?), - "nights" => b.nights = Some(FromValueOpt::from_value(v)?), + "check_in_at" => b.check_in_at = FromValueOpt::from_value(v), + "nights" => b.nights = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_transaction_network_data.rs b/generated/async-stripe-shared/src/issuing_transaction_network_data.rs index ba6ec130b..13519cee7 100644 --- a/generated/async-stripe-shared/src/issuing_transaction_network_data.rs +++ b/generated/async-stripe-shared/src/issuing_transaction_network_data.rs @@ -21,7 +21,12 @@ pub struct IssuingTransactionNetworkDataBuilder { transaction_id: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,11 +77,14 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - authorization_code: self.authorization_code.take()?, - processing_date: self.processing_date.take()?, - transaction_id: self.transaction_id.take()?, - }) + let (Some(authorization_code), Some(processing_date), Some(transaction_id)) = ( + self.authorization_code.take(), + self.processing_date.take(), + self.transaction_id.take(), + ) else { + return None; + }; + Some(Self::Out { authorization_code, processing_date, transaction_id }) } } @@ -103,11 +111,9 @@ const _: () = { let mut b = IssuingTransactionNetworkDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "authorization_code" => { - b.authorization_code = Some(FromValueOpt::from_value(v)?) - } - "processing_date" => b.processing_date = Some(FromValueOpt::from_value(v)?), - "transaction_id" => b.transaction_id = Some(FromValueOpt::from_value(v)?), + "authorization_code" => b.authorization_code = FromValueOpt::from_value(v), + "processing_date" => b.processing_date = FromValueOpt::from_value(v), + "transaction_id" => b.transaction_id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_transaction_purchase_details.rs b/generated/async-stripe-shared/src/issuing_transaction_purchase_details.rs index 8f79095ff..4a4c4c315 100644 --- a/generated/async-stripe-shared/src/issuing_transaction_purchase_details.rs +++ b/generated/async-stripe-shared/src/issuing_transaction_purchase_details.rs @@ -22,7 +22,12 @@ pub struct IssuingTransactionPurchaseDetailsBuilder { reference: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,13 +82,16 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - flight: self.flight.take()?, - fuel: self.fuel.take()?, - lodging: self.lodging?, - receipt: self.receipt.take()?, - reference: self.reference.take()?, - }) + let (Some(flight), Some(fuel), Some(lodging), Some(receipt), Some(reference)) = ( + self.flight.take(), + self.fuel.take(), + self.lodging, + self.receipt.take(), + self.reference.take(), + ) else { + return None; + }; + Some(Self::Out { flight, fuel, lodging, receipt, reference }) } } @@ -110,11 +118,11 @@ const _: () = { let mut b = IssuingTransactionPurchaseDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "flight" => b.flight = Some(FromValueOpt::from_value(v)?), - "fuel" => b.fuel = Some(FromValueOpt::from_value(v)?), - "lodging" => b.lodging = Some(FromValueOpt::from_value(v)?), - "receipt" => b.receipt = Some(FromValueOpt::from_value(v)?), - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), + "flight" => b.flight = FromValueOpt::from_value(v), + "fuel" => b.fuel = FromValueOpt::from_value(v), + "lodging" => b.lodging = FromValueOpt::from_value(v), + "receipt" => b.receipt = FromValueOpt::from_value(v), + "reference" => b.reference = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_transaction_receipt_data.rs b/generated/async-stripe-shared/src/issuing_transaction_receipt_data.rs index 70c609282..ffe7295fd 100644 --- a/generated/async-stripe-shared/src/issuing_transaction_receipt_data.rs +++ b/generated/async-stripe-shared/src/issuing_transaction_receipt_data.rs @@ -19,7 +19,12 @@ pub struct IssuingTransactionReceiptDataBuilder { unit_cost: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - description: self.description.take()?, - quantity: self.quantity?, - total: self.total?, - unit_cost: self.unit_cost?, - }) + let (Some(description), Some(quantity), Some(total), Some(unit_cost)) = + (self.description.take(), self.quantity, self.total, self.unit_cost) + else { + return None; + }; + Some(Self::Out { description, quantity, total, unit_cost }) } } @@ -104,10 +109,10 @@ const _: () = { let mut b = IssuingTransactionReceiptDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "quantity" => b.quantity = Some(FromValueOpt::from_value(v)?), - "total" => b.total = Some(FromValueOpt::from_value(v)?), - "unit_cost" => b.unit_cost = Some(FromValueOpt::from_value(v)?), + "description" => b.description = FromValueOpt::from_value(v), + "quantity" => b.quantity = FromValueOpt::from_value(v), + "total" => b.total = FromValueOpt::from_value(v), + "unit_cost" => b.unit_cost = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/issuing_transaction_treasury.rs b/generated/async-stripe-shared/src/issuing_transaction_treasury.rs index f7c60bd1e..110498c53 100644 --- a/generated/async-stripe-shared/src/issuing_transaction_treasury.rs +++ b/generated/async-stripe-shared/src/issuing_transaction_treasury.rs @@ -13,7 +13,12 @@ pub struct IssuingTransactionTreasuryBuilder { received_debit: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - received_credit: self.received_credit.take()?, - received_debit: self.received_debit.take()?, - }) + let (Some(received_credit), Some(received_debit)) = + (self.received_credit.take(), self.received_debit.take()) + else { + return None; + }; + Some(Self::Out { received_credit, received_debit }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = IssuingTransactionTreasuryBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "received_credit" => b.received_credit = Some(FromValueOpt::from_value(v)?), - "received_debit" => b.received_debit = Some(FromValueOpt::from_value(v)?), + "received_credit" => b.received_credit = FromValueOpt::from_value(v), + "received_debit" => b.received_debit = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/legal_entity_company.rs b/generated/async-stripe-shared/src/legal_entity_company.rs index 5efa7544b..d50247591 100644 --- a/generated/async-stripe-shared/src/legal_entity_company.rs +++ b/generated/async-stripe-shared/src/legal_entity_company.rs @@ -65,7 +65,12 @@ pub struct LegalEntityCompanyBuilder { verification: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -146,25 +151,67 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(address), + Some(address_kana), + Some(address_kanji), + Some(directors_provided), + Some(executives_provided), + Some(export_license_id), + Some(export_purpose_code), + Some(name), + Some(name_kana), + Some(name_kanji), + Some(owners_provided), + Some(ownership_declaration), + Some(phone), + Some(structure), + Some(tax_id_provided), + Some(tax_id_registrar), + Some(vat_id_provided), + Some(verification), + ) = ( + self.address.take(), + self.address_kana.take(), + self.address_kanji.take(), + self.directors_provided, + self.executives_provided, + self.export_license_id.take(), + self.export_purpose_code.take(), + self.name.take(), + self.name_kana.take(), + self.name_kanji.take(), + self.owners_provided, + self.ownership_declaration.take(), + self.phone.take(), + self.structure, + self.tax_id_provided, + self.tax_id_registrar.take(), + self.vat_id_provided, + self.verification.take(), + ) + else { + return None; + }; Some(Self::Out { - address: self.address.take()?, - address_kana: self.address_kana.take()?, - address_kanji: self.address_kanji.take()?, - directors_provided: self.directors_provided?, - executives_provided: self.executives_provided?, - export_license_id: self.export_license_id.take()?, - export_purpose_code: self.export_purpose_code.take()?, - name: self.name.take()?, - name_kana: self.name_kana.take()?, - name_kanji: self.name_kanji.take()?, - owners_provided: self.owners_provided?, - ownership_declaration: self.ownership_declaration.take()?, - phone: self.phone.take()?, - structure: self.structure?, - tax_id_provided: self.tax_id_provided?, - tax_id_registrar: self.tax_id_registrar.take()?, - vat_id_provided: self.vat_id_provided?, - verification: self.verification.take()?, + address, + address_kana, + address_kanji, + directors_provided, + executives_provided, + export_license_id, + export_purpose_code, + name, + name_kana, + name_kanji, + owners_provided, + ownership_declaration, + phone, + structure, + tax_id_provided, + tax_id_registrar, + vat_id_provided, + verification, }) } } @@ -192,32 +239,26 @@ const _: () = { let mut b = LegalEntityCompanyBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), - "address_kana" => b.address_kana = Some(FromValueOpt::from_value(v)?), - "address_kanji" => b.address_kanji = Some(FromValueOpt::from_value(v)?), - "directors_provided" => { - b.directors_provided = Some(FromValueOpt::from_value(v)?) - } - "executives_provided" => { - b.executives_provided = Some(FromValueOpt::from_value(v)?) - } - "export_license_id" => b.export_license_id = Some(FromValueOpt::from_value(v)?), - "export_purpose_code" => { - b.export_purpose_code = Some(FromValueOpt::from_value(v)?) - } - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "name_kana" => b.name_kana = Some(FromValueOpt::from_value(v)?), - "name_kanji" => b.name_kanji = Some(FromValueOpt::from_value(v)?), - "owners_provided" => b.owners_provided = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), + "address_kana" => b.address_kana = FromValueOpt::from_value(v), + "address_kanji" => b.address_kanji = FromValueOpt::from_value(v), + "directors_provided" => b.directors_provided = FromValueOpt::from_value(v), + "executives_provided" => b.executives_provided = FromValueOpt::from_value(v), + "export_license_id" => b.export_license_id = FromValueOpt::from_value(v), + "export_purpose_code" => b.export_purpose_code = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "name_kana" => b.name_kana = FromValueOpt::from_value(v), + "name_kanji" => b.name_kanji = FromValueOpt::from_value(v), + "owners_provided" => b.owners_provided = FromValueOpt::from_value(v), "ownership_declaration" => { - b.ownership_declaration = Some(FromValueOpt::from_value(v)?) + b.ownership_declaration = FromValueOpt::from_value(v) } - "phone" => b.phone = Some(FromValueOpt::from_value(v)?), - "structure" => b.structure = Some(FromValueOpt::from_value(v)?), - "tax_id_provided" => b.tax_id_provided = Some(FromValueOpt::from_value(v)?), - "tax_id_registrar" => b.tax_id_registrar = Some(FromValueOpt::from_value(v)?), - "vat_id_provided" => b.vat_id_provided = Some(FromValueOpt::from_value(v)?), - "verification" => b.verification = Some(FromValueOpt::from_value(v)?), + "phone" => b.phone = FromValueOpt::from_value(v), + "structure" => b.structure = FromValueOpt::from_value(v), + "tax_id_provided" => b.tax_id_provided = FromValueOpt::from_value(v), + "tax_id_registrar" => b.tax_id_registrar = FromValueOpt::from_value(v), + "vat_id_provided" => b.vat_id_provided = FromValueOpt::from_value(v), + "verification" => b.verification = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/legal_entity_company_verification.rs b/generated/async-stripe-shared/src/legal_entity_company_verification.rs index 8f03cfa99..8c926084f 100644 --- a/generated/async-stripe-shared/src/legal_entity_company_verification.rs +++ b/generated/async-stripe-shared/src/legal_entity_company_verification.rs @@ -9,7 +9,12 @@ pub struct LegalEntityCompanyVerificationBuilder { document: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -54,7 +59,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { document: self.document.take()? }) + let (Some(document),) = (self.document.take(),) else { + return None; + }; + Some(Self::Out { document }) } } @@ -81,7 +89,7 @@ const _: () = { let mut b = LegalEntityCompanyVerificationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "document" => b.document = Some(FromValueOpt::from_value(v)?), + "document" => b.document = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/legal_entity_company_verification_document.rs b/generated/async-stripe-shared/src/legal_entity_company_verification_document.rs index daaa636b1..e0c2a4e82 100644 --- a/generated/async-stripe-shared/src/legal_entity_company_verification_document.rs +++ b/generated/async-stripe-shared/src/legal_entity_company_verification_document.rs @@ -20,7 +20,12 @@ pub struct LegalEntityCompanyVerificationDocumentBuilder { front: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,12 +78,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - back: self.back.take()?, - details: self.details.take()?, - details_code: self.details_code.take()?, - front: self.front.take()?, - }) + let (Some(back), Some(details), Some(details_code), Some(front)) = ( + self.back.take(), + self.details.take(), + self.details_code.take(), + self.front.take(), + ) else { + return None; + }; + Some(Self::Out { back, details, details_code, front }) } } @@ -105,10 +113,10 @@ const _: () = { let mut b = LegalEntityCompanyVerificationDocumentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "back" => b.back = Some(FromValueOpt::from_value(v)?), - "details" => b.details = Some(FromValueOpt::from_value(v)?), - "details_code" => b.details_code = Some(FromValueOpt::from_value(v)?), - "front" => b.front = Some(FromValueOpt::from_value(v)?), + "back" => b.back = FromValueOpt::from_value(v), + "details" => b.details = FromValueOpt::from_value(v), + "details_code" => b.details_code = FromValueOpt::from_value(v), + "front" => b.front = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/legal_entity_dob.rs b/generated/async-stripe-shared/src/legal_entity_dob.rs index 6326b5cda..5598a4c65 100644 --- a/generated/async-stripe-shared/src/legal_entity_dob.rs +++ b/generated/async-stripe-shared/src/legal_entity_dob.rs @@ -16,7 +16,12 @@ pub struct LegalEntityDobBuilder { year: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,7 +72,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { day: self.day?, month: self.month?, year: self.year? }) + let (Some(day), Some(month), Some(year)) = (self.day, self.month, self.year) else { + return None; + }; + Some(Self::Out { day, month, year }) } } @@ -94,9 +102,9 @@ const _: () = { let mut b = LegalEntityDobBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "day" => b.day = Some(FromValueOpt::from_value(v)?), - "month" => b.month = Some(FromValueOpt::from_value(v)?), - "year" => b.year = Some(FromValueOpt::from_value(v)?), + "day" => b.day = FromValueOpt::from_value(v), + "month" => b.month = FromValueOpt::from_value(v), + "year" => b.year = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/legal_entity_japan_address.rs b/generated/async-stripe-shared/src/legal_entity_japan_address.rs index cb2180225..65380e7bf 100644 --- a/generated/async-stripe-shared/src/legal_entity_japan_address.rs +++ b/generated/async-stripe-shared/src/legal_entity_japan_address.rs @@ -28,7 +28,12 @@ pub struct LegalEntityJapanAddressBuilder { town: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -87,15 +92,27 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - city: self.city.take()?, - country: self.country.take()?, - line1: self.line1.take()?, - line2: self.line2.take()?, - postal_code: self.postal_code.take()?, - state: self.state.take()?, - town: self.town.take()?, - }) + let ( + Some(city), + Some(country), + Some(line1), + Some(line2), + Some(postal_code), + Some(state), + Some(town), + ) = ( + self.city.take(), + self.country.take(), + self.line1.take(), + self.line2.take(), + self.postal_code.take(), + self.state.take(), + self.town.take(), + ) + else { + return None; + }; + Some(Self::Out { city, country, line1, line2, postal_code, state, town }) } } @@ -122,13 +139,13 @@ const _: () = { let mut b = LegalEntityJapanAddressBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "city" => b.city = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "line1" => b.line1 = Some(FromValueOpt::from_value(v)?), - "line2" => b.line2 = Some(FromValueOpt::from_value(v)?), - "postal_code" => b.postal_code = Some(FromValueOpt::from_value(v)?), - "state" => b.state = Some(FromValueOpt::from_value(v)?), - "town" => b.town = Some(FromValueOpt::from_value(v)?), + "city" => b.city = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "line1" => b.line1 = FromValueOpt::from_value(v), + "line2" => b.line2 = FromValueOpt::from_value(v), + "postal_code" => b.postal_code = FromValueOpt::from_value(v), + "state" => b.state = FromValueOpt::from_value(v), + "town" => b.town = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/legal_entity_person_verification.rs b/generated/async-stripe-shared/src/legal_entity_person_verification.rs index 93b3dad90..c1f4042cd 100644 --- a/generated/async-stripe-shared/src/legal_entity_person_verification.rs +++ b/generated/async-stripe-shared/src/legal_entity_person_verification.rs @@ -24,7 +24,12 @@ pub struct LegalEntityPersonVerificationBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -79,13 +84,23 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - additional_document: self.additional_document.take()?, - details: self.details.take()?, - details_code: self.details_code.take()?, - document: self.document.take()?, - status: self.status.take()?, - }) + let ( + Some(additional_document), + Some(details), + Some(details_code), + Some(document), + Some(status), + ) = ( + self.additional_document.take(), + self.details.take(), + self.details_code.take(), + self.document.take(), + self.status.take(), + ) + else { + return None; + }; + Some(Self::Out { additional_document, details, details_code, document, status }) } } @@ -112,13 +127,11 @@ const _: () = { let mut b = LegalEntityPersonVerificationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "additional_document" => { - b.additional_document = Some(FromValueOpt::from_value(v)?) - } - "details" => b.details = Some(FromValueOpt::from_value(v)?), - "details_code" => b.details_code = Some(FromValueOpt::from_value(v)?), - "document" => b.document = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "additional_document" => b.additional_document = FromValueOpt::from_value(v), + "details" => b.details = FromValueOpt::from_value(v), + "details_code" => b.details_code = FromValueOpt::from_value(v), + "document" => b.document = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/legal_entity_person_verification_document.rs b/generated/async-stripe-shared/src/legal_entity_person_verification_document.rs index 2e457e0e8..7ee88a2c2 100644 --- a/generated/async-stripe-shared/src/legal_entity_person_verification_document.rs +++ b/generated/async-stripe-shared/src/legal_entity_person_verification_document.rs @@ -21,7 +21,12 @@ pub struct LegalEntityPersonVerificationDocumentBuilder { front: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -74,12 +79,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - back: self.back.take()?, - details: self.details.take()?, - details_code: self.details_code.take()?, - front: self.front.take()?, - }) + let (Some(back), Some(details), Some(details_code), Some(front)) = ( + self.back.take(), + self.details.take(), + self.details_code.take(), + self.front.take(), + ) else { + return None; + }; + Some(Self::Out { back, details, details_code, front }) } } @@ -106,10 +114,10 @@ const _: () = { let mut b = LegalEntityPersonVerificationDocumentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "back" => b.back = Some(FromValueOpt::from_value(v)?), - "details" => b.details = Some(FromValueOpt::from_value(v)?), - "details_code" => b.details_code = Some(FromValueOpt::from_value(v)?), - "front" => b.front = Some(FromValueOpt::from_value(v)?), + "back" => b.back = FromValueOpt::from_value(v), + "details" => b.details = FromValueOpt::from_value(v), + "details_code" => b.details_code = FromValueOpt::from_value(v), + "front" => b.front = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/legal_entity_ubo_declaration.rs b/generated/async-stripe-shared/src/legal_entity_ubo_declaration.rs index 3c2694509..79d186d9a 100644 --- a/generated/async-stripe-shared/src/legal_entity_ubo_declaration.rs +++ b/generated/async-stripe-shared/src/legal_entity_ubo_declaration.rs @@ -16,7 +16,12 @@ pub struct LegalEntityUboDeclarationBuilder { user_agent: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - date: self.date?, - ip: self.ip.take()?, - user_agent: self.user_agent.take()?, - }) + let (Some(date), Some(ip), Some(user_agent)) = + (self.date, self.ip.take(), self.user_agent.take()) + else { + return None; + }; + Some(Self::Out { date, ip, user_agent }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = LegalEntityUboDeclarationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "date" => b.date = Some(FromValueOpt::from_value(v)?), - "ip" => b.ip = Some(FromValueOpt::from_value(v)?), - "user_agent" => b.user_agent = Some(FromValueOpt::from_value(v)?), + "date" => b.date = FromValueOpt::from_value(v), + "ip" => b.ip = FromValueOpt::from_value(v), + "user_agent" => b.user_agent = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/level3.rs b/generated/async-stripe-shared/src/level3.rs index 8b1a82014..8568ed166 100644 --- a/generated/async-stripe-shared/src/level3.rs +++ b/generated/async-stripe-shared/src/level3.rs @@ -19,7 +19,12 @@ pub struct Level3Builder { shipping_from_zip: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,13 +78,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(customer_reference), + Some(line_items), + Some(merchant_reference), + Some(shipping_address_zip), + Some(shipping_amount), + Some(shipping_from_zip), + ) = ( + self.customer_reference.take(), + self.line_items.take(), + self.merchant_reference.take(), + self.shipping_address_zip.take(), + self.shipping_amount, + self.shipping_from_zip.take(), + ) + else { + return None; + }; Some(Self::Out { - customer_reference: self.customer_reference.take()?, - line_items: self.line_items.take()?, - merchant_reference: self.merchant_reference.take()?, - shipping_address_zip: self.shipping_address_zip.take()?, - shipping_amount: self.shipping_amount?, - shipping_from_zip: self.shipping_from_zip.take()?, + customer_reference, + line_items, + merchant_reference, + shipping_address_zip, + shipping_amount, + shipping_from_zip, }) } } @@ -107,18 +130,12 @@ const _: () = { let mut b = Level3Builder::deser_default(); for (k, v) in obj { match k.as_str() { - "customer_reference" => { - b.customer_reference = Some(FromValueOpt::from_value(v)?) - } - "line_items" => b.line_items = Some(FromValueOpt::from_value(v)?), - "merchant_reference" => { - b.merchant_reference = Some(FromValueOpt::from_value(v)?) - } - "shipping_address_zip" => { - b.shipping_address_zip = Some(FromValueOpt::from_value(v)?) - } - "shipping_amount" => b.shipping_amount = Some(FromValueOpt::from_value(v)?), - "shipping_from_zip" => b.shipping_from_zip = Some(FromValueOpt::from_value(v)?), + "customer_reference" => b.customer_reference = FromValueOpt::from_value(v), + "line_items" => b.line_items = FromValueOpt::from_value(v), + "merchant_reference" => b.merchant_reference = FromValueOpt::from_value(v), + "shipping_address_zip" => b.shipping_address_zip = FromValueOpt::from_value(v), + "shipping_amount" => b.shipping_amount = FromValueOpt::from_value(v), + "shipping_from_zip" => b.shipping_from_zip = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/level3_line_items.rs b/generated/async-stripe-shared/src/level3_line_items.rs index 364e7c8b4..44558421d 100644 --- a/generated/async-stripe-shared/src/level3_line_items.rs +++ b/generated/async-stripe-shared/src/level3_line_items.rs @@ -19,7 +19,12 @@ pub struct Level3LineItemsBuilder { unit_cost: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -76,13 +81,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(discount_amount), + Some(product_code), + Some(product_description), + Some(quantity), + Some(tax_amount), + Some(unit_cost), + ) = ( + self.discount_amount, + self.product_code.take(), + self.product_description.take(), + self.quantity, + self.tax_amount, + self.unit_cost, + ) + else { + return None; + }; Some(Self::Out { - discount_amount: self.discount_amount?, - product_code: self.product_code.take()?, - product_description: self.product_description.take()?, - quantity: self.quantity?, - tax_amount: self.tax_amount?, - unit_cost: self.unit_cost?, + discount_amount, + product_code, + product_description, + quantity, + tax_amount, + unit_cost, }) } } @@ -110,14 +133,12 @@ const _: () = { let mut b = Level3LineItemsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "discount_amount" => b.discount_amount = Some(FromValueOpt::from_value(v)?), - "product_code" => b.product_code = Some(FromValueOpt::from_value(v)?), - "product_description" => { - b.product_description = Some(FromValueOpt::from_value(v)?) - } - "quantity" => b.quantity = Some(FromValueOpt::from_value(v)?), - "tax_amount" => b.tax_amount = Some(FromValueOpt::from_value(v)?), - "unit_cost" => b.unit_cost = Some(FromValueOpt::from_value(v)?), + "discount_amount" => b.discount_amount = FromValueOpt::from_value(v), + "product_code" => b.product_code = FromValueOpt::from_value(v), + "product_description" => b.product_description = FromValueOpt::from_value(v), + "quantity" => b.quantity = FromValueOpt::from_value(v), + "tax_amount" => b.tax_amount = FromValueOpt::from_value(v), + "unit_cost" => b.unit_cost = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/line_items_discount_amount.rs b/generated/async-stripe-shared/src/line_items_discount_amount.rs index ce57b2f3f..03c67cdee 100644 --- a/generated/async-stripe-shared/src/line_items_discount_amount.rs +++ b/generated/async-stripe-shared/src/line_items_discount_amount.rs @@ -12,7 +12,12 @@ pub struct LineItemsDiscountAmountBuilder { discount: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { amount: self.amount?, discount: self.discount.take()? }) + let (Some(amount), Some(discount)) = (self.amount, self.discount.take()) else { + return None; + }; + Some(Self::Out { amount, discount }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = LineItemsDiscountAmountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "discount" => b.discount = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "discount" => b.discount = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/line_items_tax_amount.rs b/generated/async-stripe-shared/src/line_items_tax_amount.rs index b7c4f01f2..e9d48ec06 100644 --- a/generated/async-stripe-shared/src/line_items_tax_amount.rs +++ b/generated/async-stripe-shared/src/line_items_tax_amount.rs @@ -19,7 +19,12 @@ pub struct LineItemsTaxAmountBuilder { taxable_amount: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - rate: self.rate.take()?, - taxability_reason: self.taxability_reason?, - taxable_amount: self.taxable_amount?, - }) + let (Some(amount), Some(rate), Some(taxability_reason), Some(taxable_amount)) = + (self.amount, self.rate.take(), self.taxability_reason, self.taxable_amount) + else { + return None; + }; + Some(Self::Out { amount, rate, taxability_reason, taxable_amount }) } } @@ -104,10 +109,10 @@ const _: () = { let mut b = LineItemsTaxAmountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "rate" => b.rate = Some(FromValueOpt::from_value(v)?), - "taxability_reason" => b.taxability_reason = Some(FromValueOpt::from_value(v)?), - "taxable_amount" => b.taxable_amount = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "rate" => b.rate = FromValueOpt::from_value(v), + "taxability_reason" => b.taxability_reason = FromValueOpt::from_value(v), + "taxable_amount" => b.taxable_amount = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/linked_account_options_us_bank_account.rs b/generated/async-stripe-shared/src/linked_account_options_us_bank_account.rs index 4a59362a2..9b4158792 100644 --- a/generated/async-stripe-shared/src/linked_account_options_us_bank_account.rs +++ b/generated/async-stripe-shared/src/linked_account_options_us_bank_account.rs @@ -17,7 +17,12 @@ pub struct LinkedAccountOptionsUsBankAccountBuilder { return_url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - permissions: self.permissions.take()?, - prefetch: self.prefetch.take()?, - return_url: self.return_url.take()?, - }) + let (Some(permissions), Some(prefetch), Some(return_url)) = + (self.permissions.take(), self.prefetch.take(), self.return_url.take()) + else { + return None; + }; + Some(Self::Out { permissions, prefetch, return_url }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = LinkedAccountOptionsUsBankAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "permissions" => b.permissions = Some(FromValueOpt::from_value(v)?), - "prefetch" => b.prefetch = Some(FromValueOpt::from_value(v)?), - "return_url" => b.return_url = Some(FromValueOpt::from_value(v)?), + "permissions" => b.permissions = FromValueOpt::from_value(v), + "prefetch" => b.prefetch = FromValueOpt::from_value(v), + "return_url" => b.return_url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/mandate.rs b/generated/async-stripe-shared/src/mandate.rs index 2c93c2d79..9cb96a2ba 100644 --- a/generated/async-stripe-shared/src/mandate.rs +++ b/generated/async-stripe-shared/src/mandate.rs @@ -36,7 +36,12 @@ pub struct MandateBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -98,17 +103,43 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(customer_acceptance), + Some(id), + Some(livemode), + Some(multi_use), + Some(on_behalf_of), + Some(payment_method), + Some(payment_method_details), + Some(single_use), + Some(status), + Some(type_), + ) = ( + self.customer_acceptance.take(), + self.id.take(), + self.livemode, + self.multi_use, + self.on_behalf_of.take(), + self.payment_method.take(), + self.payment_method_details.take(), + self.single_use, + self.status, + self.type_, + ) + else { + return None; + }; Some(Self::Out { - customer_acceptance: self.customer_acceptance.take()?, - id: self.id.take()?, - livemode: self.livemode?, - multi_use: self.multi_use?, - on_behalf_of: self.on_behalf_of.take()?, - payment_method: self.payment_method.take()?, - payment_method_details: self.payment_method_details.take()?, - single_use: self.single_use?, - status: self.status?, - type_: self.type_?, + customer_acceptance, + id, + livemode, + multi_use, + on_behalf_of, + payment_method, + payment_method_details, + single_use, + status, + type_, }) } } @@ -136,20 +167,18 @@ const _: () = { let mut b = MandateBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "customer_acceptance" => { - b.customer_acceptance = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "multi_use" => b.multi_use = Some(FromValueOpt::from_value(v)?), - "on_behalf_of" => b.on_behalf_of = Some(FromValueOpt::from_value(v)?), - "payment_method" => b.payment_method = Some(FromValueOpt::from_value(v)?), + "customer_acceptance" => b.customer_acceptance = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "multi_use" => b.multi_use = FromValueOpt::from_value(v), + "on_behalf_of" => b.on_behalf_of = FromValueOpt::from_value(v), + "payment_method" => b.payment_method = FromValueOpt::from_value(v), "payment_method_details" => { - b.payment_method_details = Some(FromValueOpt::from_value(v)?) + b.payment_method_details = FromValueOpt::from_value(v) } - "single_use" => b.single_use = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "single_use" => b.single_use = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/mandate_acss_debit.rs b/generated/async-stripe-shared/src/mandate_acss_debit.rs index 35880a9ff..1e6ca2d92 100644 --- a/generated/async-stripe-shared/src/mandate_acss_debit.rs +++ b/generated/async-stripe-shared/src/mandate_acss_debit.rs @@ -20,7 +20,12 @@ pub struct MandateAcssDebitBuilder { transaction_type: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,11 +78,25 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(default_for), + Some(interval_description), + Some(payment_schedule), + Some(transaction_type), + ) = ( + self.default_for.take(), + self.interval_description.take(), + self.payment_schedule, + self.transaction_type, + ) + else { + return None; + }; Some(Self::Out { - default_for: self.default_for.take()?, - interval_description: self.interval_description.take()?, - payment_schedule: self.payment_schedule?, - transaction_type: self.transaction_type?, + default_for, + interval_description, + payment_schedule, + transaction_type, }) } } @@ -105,12 +124,10 @@ const _: () = { let mut b = MandateAcssDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "default_for" => b.default_for = Some(FromValueOpt::from_value(v)?), - "interval_description" => { - b.interval_description = Some(FromValueOpt::from_value(v)?) - } - "payment_schedule" => b.payment_schedule = Some(FromValueOpt::from_value(v)?), - "transaction_type" => b.transaction_type = Some(FromValueOpt::from_value(v)?), + "default_for" => b.default_for = FromValueOpt::from_value(v), + "interval_description" => b.interval_description = FromValueOpt::from_value(v), + "payment_schedule" => b.payment_schedule = FromValueOpt::from_value(v), + "transaction_type" => b.transaction_type = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/mandate_amazon_pay.rs b/generated/async-stripe-shared/src/mandate_amazon_pay.rs index f3fa08ea6..72510da82 100644 --- a/generated/async-stripe-shared/src/mandate_amazon_pay.rs +++ b/generated/async-stripe-shared/src/mandate_amazon_pay.rs @@ -5,7 +5,12 @@ pub struct MandateAmazonPay {} #[doc(hidden)] pub struct MandateAmazonPayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/mandate_au_becs_debit.rs b/generated/async-stripe-shared/src/mandate_au_becs_debit.rs index 6c0449b8e..0016d2fb9 100644 --- a/generated/async-stripe-shared/src/mandate_au_becs_debit.rs +++ b/generated/async-stripe-shared/src/mandate_au_becs_debit.rs @@ -11,7 +11,12 @@ pub struct MandateAuBecsDebitBuilder { url: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { url: self.url.take()? }) + let (Some(url),) = (self.url.take(),) else { + return None; + }; + Some(Self::Out { url }) } } @@ -83,7 +91,7 @@ const _: () = { let mut b = MandateAuBecsDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/mandate_bacs_debit.rs b/generated/async-stripe-shared/src/mandate_bacs_debit.rs index 94df77abf..f13fe8e21 100644 --- a/generated/async-stripe-shared/src/mandate_bacs_debit.rs +++ b/generated/async-stripe-shared/src/mandate_bacs_debit.rs @@ -20,7 +20,12 @@ pub struct MandateBacsDebitBuilder { url: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,12 +78,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - network_status: self.network_status?, - reference: self.reference.take()?, - revocation_reason: self.revocation_reason?, - url: self.url.take()?, - }) + let (Some(network_status), Some(reference), Some(revocation_reason), Some(url)) = ( + self.network_status, + self.reference.take(), + self.revocation_reason, + self.url.take(), + ) else { + return None; + }; + Some(Self::Out { network_status, reference, revocation_reason, url }) } } @@ -105,10 +113,10 @@ const _: () = { let mut b = MandateBacsDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "network_status" => b.network_status = Some(FromValueOpt::from_value(v)?), - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "revocation_reason" => b.revocation_reason = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "network_status" => b.network_status = FromValueOpt::from_value(v), + "reference" => b.reference = FromValueOpt::from_value(v), + "revocation_reason" => b.revocation_reason = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/mandate_cashapp.rs b/generated/async-stripe-shared/src/mandate_cashapp.rs index 5a8895d30..901259e83 100644 --- a/generated/async-stripe-shared/src/mandate_cashapp.rs +++ b/generated/async-stripe-shared/src/mandate_cashapp.rs @@ -5,7 +5,12 @@ pub struct MandateCashapp {} #[doc(hidden)] pub struct MandateCashappBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/mandate_link.rs b/generated/async-stripe-shared/src/mandate_link.rs index 6f744ca68..e6faecd66 100644 --- a/generated/async-stripe-shared/src/mandate_link.rs +++ b/generated/async-stripe-shared/src/mandate_link.rs @@ -5,7 +5,12 @@ pub struct MandateLink {} #[doc(hidden)] pub struct MandateLinkBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/mandate_multi_use.rs b/generated/async-stripe-shared/src/mandate_multi_use.rs index 8491f2393..4a64eaf1a 100644 --- a/generated/async-stripe-shared/src/mandate_multi_use.rs +++ b/generated/async-stripe-shared/src/mandate_multi_use.rs @@ -5,7 +5,12 @@ pub struct MandateMultiUse {} #[doc(hidden)] pub struct MandateMultiUseBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/mandate_payment_method_details.rs b/generated/async-stripe-shared/src/mandate_payment_method_details.rs index 206a3dff2..c31cb96d2 100644 --- a/generated/async-stripe-shared/src/mandate_payment_method_details.rs +++ b/generated/async-stripe-shared/src/mandate_payment_method_details.rs @@ -34,7 +34,12 @@ pub struct MandatePaymentMethodDetailsBuilder { us_bank_account: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -103,19 +108,49 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(acss_debit), + Some(amazon_pay), + Some(au_becs_debit), + Some(bacs_debit), + Some(card), + Some(cashapp), + Some(link), + Some(paypal), + Some(revolut_pay), + Some(sepa_debit), + Some(type_), + Some(us_bank_account), + ) = ( + self.acss_debit.take(), + self.amazon_pay, + self.au_becs_debit.take(), + self.bacs_debit.take(), + self.card, + self.cashapp, + self.link, + self.paypal.take(), + self.revolut_pay, + self.sepa_debit.take(), + self.type_.take(), + self.us_bank_account, + ) + else { + return None; + }; Some(Self::Out { - acss_debit: self.acss_debit.take()?, - amazon_pay: self.amazon_pay?, - au_becs_debit: self.au_becs_debit.take()?, - bacs_debit: self.bacs_debit.take()?, - card: self.card?, - cashapp: self.cashapp?, - link: self.link?, - paypal: self.paypal.take()?, - revolut_pay: self.revolut_pay?, - sepa_debit: self.sepa_debit.take()?, - type_: self.type_.take()?, - us_bank_account: self.us_bank_account?, + acss_debit, + amazon_pay, + au_becs_debit, + bacs_debit, + card, + cashapp, + link, + paypal, + revolut_pay, + sepa_debit, + type_, + us_bank_account, }) } } @@ -143,18 +178,18 @@ const _: () = { let mut b = MandatePaymentMethodDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "acss_debit" => b.acss_debit = Some(FromValueOpt::from_value(v)?), - "amazon_pay" => b.amazon_pay = Some(FromValueOpt::from_value(v)?), - "au_becs_debit" => b.au_becs_debit = Some(FromValueOpt::from_value(v)?), - "bacs_debit" => b.bacs_debit = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "cashapp" => b.cashapp = Some(FromValueOpt::from_value(v)?), - "link" => b.link = Some(FromValueOpt::from_value(v)?), - "paypal" => b.paypal = Some(FromValueOpt::from_value(v)?), - "revolut_pay" => b.revolut_pay = Some(FromValueOpt::from_value(v)?), - "sepa_debit" => b.sepa_debit = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "us_bank_account" => b.us_bank_account = Some(FromValueOpt::from_value(v)?), + "acss_debit" => b.acss_debit = FromValueOpt::from_value(v), + "amazon_pay" => b.amazon_pay = FromValueOpt::from_value(v), + "au_becs_debit" => b.au_becs_debit = FromValueOpt::from_value(v), + "bacs_debit" => b.bacs_debit = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "cashapp" => b.cashapp = FromValueOpt::from_value(v), + "link" => b.link = FromValueOpt::from_value(v), + "paypal" => b.paypal = FromValueOpt::from_value(v), + "revolut_pay" => b.revolut_pay = FromValueOpt::from_value(v), + "sepa_debit" => b.sepa_debit = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "us_bank_account" => b.us_bank_account = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/mandate_paypal.rs b/generated/async-stripe-shared/src/mandate_paypal.rs index 51f30ee92..e502ae6de 100644 --- a/generated/async-stripe-shared/src/mandate_paypal.rs +++ b/generated/async-stripe-shared/src/mandate_paypal.rs @@ -14,7 +14,12 @@ pub struct MandatePaypalBuilder { payer_id: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,10 +65,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - billing_agreement_id: self.billing_agreement_id.take()?, - payer_id: self.payer_id.take()?, - }) + let (Some(billing_agreement_id), Some(payer_id)) = + (self.billing_agreement_id.take(), self.payer_id.take()) + else { + return None; + }; + Some(Self::Out { billing_agreement_id, payer_id }) } } @@ -90,10 +97,8 @@ const _: () = { let mut b = MandatePaypalBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "billing_agreement_id" => { - b.billing_agreement_id = Some(FromValueOpt::from_value(v)?) - } - "payer_id" => b.payer_id = Some(FromValueOpt::from_value(v)?), + "billing_agreement_id" => b.billing_agreement_id = FromValueOpt::from_value(v), + "payer_id" => b.payer_id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/mandate_revolut_pay.rs b/generated/async-stripe-shared/src/mandate_revolut_pay.rs index d4b8a2c25..99e33954b 100644 --- a/generated/async-stripe-shared/src/mandate_revolut_pay.rs +++ b/generated/async-stripe-shared/src/mandate_revolut_pay.rs @@ -5,7 +5,12 @@ pub struct MandateRevolutPay {} #[doc(hidden)] pub struct MandateRevolutPayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/mandate_sepa_debit.rs b/generated/async-stripe-shared/src/mandate_sepa_debit.rs index 035f852fc..8d7f215a0 100644 --- a/generated/async-stripe-shared/src/mandate_sepa_debit.rs +++ b/generated/async-stripe-shared/src/mandate_sepa_debit.rs @@ -14,7 +14,12 @@ pub struct MandateSepaDebitBuilder { url: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { reference: self.reference.take()?, url: self.url.take()? }) + let (Some(reference), Some(url)) = (self.reference.take(), self.url.take()) else { + return None; + }; + Some(Self::Out { reference, url }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = MandateSepaDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "reference" => b.reference = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/mandate_single_use.rs b/generated/async-stripe-shared/src/mandate_single_use.rs index 631956731..3bdf28caa 100644 --- a/generated/async-stripe-shared/src/mandate_single_use.rs +++ b/generated/async-stripe-shared/src/mandate_single_use.rs @@ -13,7 +13,12 @@ pub struct MandateSingleUseBuilder { currency: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { amount: self.amount?, currency: self.currency? }) + let (Some(amount), Some(currency)) = (self.amount, self.currency) else { + return None; + }; + Some(Self::Out { amount, currency }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = MandateSingleUseBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/mandate_us_bank_account.rs b/generated/async-stripe-shared/src/mandate_us_bank_account.rs index ec1aba1eb..82ef90fc1 100644 --- a/generated/async-stripe-shared/src/mandate_us_bank_account.rs +++ b/generated/async-stripe-shared/src/mandate_us_bank_account.rs @@ -10,7 +10,12 @@ pub struct MandateUsBankAccountBuilder { collection_method: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { collection_method: self.collection_method? }) + let (Some(collection_method),) = (self.collection_method,) else { + return None; + }; + Some(Self::Out { collection_method }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = MandateUsBankAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "collection_method" => b.collection_method = Some(FromValueOpt::from_value(v)?), + "collection_method" => b.collection_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/networks.rs b/generated/async-stripe-shared/src/networks.rs index 9a49911df..6847f76a1 100644 --- a/generated/async-stripe-shared/src/networks.rs +++ b/generated/async-stripe-shared/src/networks.rs @@ -14,7 +14,12 @@ pub struct NetworksBuilder { preferred: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -57,7 +62,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { available: self.available.take()?, preferred: self.preferred.take()? }) + let (Some(available), Some(preferred)) = (self.available.take(), self.preferred.take()) + else { + return None; + }; + Some(Self::Out { available, preferred }) } } @@ -84,8 +93,8 @@ const _: () = { let mut b = NetworksBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "available" => b.available = Some(FromValueOpt::from_value(v)?), - "preferred" => b.preferred = Some(FromValueOpt::from_value(v)?), + "available" => b.available = FromValueOpt::from_value(v), + "preferred" => b.preferred = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/notification_event_data.rs b/generated/async-stripe-shared/src/notification_event_data.rs index 4eae60bb3..80b5d0cf6 100644 --- a/generated/async-stripe-shared/src/notification_event_data.rs +++ b/generated/async-stripe-shared/src/notification_event_data.rs @@ -24,7 +24,12 @@ pub struct NotificationEventDataBuilder { previous_attributes: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,10 +75,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - object: self.object.take()?, - previous_attributes: self.previous_attributes.take()?, - }) + let (Some(object), Some(previous_attributes)) = + (self.object.take(), self.previous_attributes.take()) + else { + return None; + }; + Some(Self::Out { object, previous_attributes }) } } @@ -100,10 +107,8 @@ const _: () = { let mut b = NotificationEventDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "object" => b.object = Some(FromValueOpt::from_value(v)?), - "previous_attributes" => { - b.previous_attributes = Some(FromValueOpt::from_value(v)?) - } + "object" => b.object = FromValueOpt::from_value(v), + "previous_attributes" => b.previous_attributes = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/notification_event_request.rs b/generated/async-stripe-shared/src/notification_event_request.rs index 1e0ecd160..dbc795fe7 100644 --- a/generated/async-stripe-shared/src/notification_event_request.rs +++ b/generated/async-stripe-shared/src/notification_event_request.rs @@ -16,7 +16,12 @@ pub struct NotificationEventRequestBuilder { idempotency_key: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,7 +67,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { id: self.id.take()?, idempotency_key: self.idempotency_key.take()? }) + let (Some(id), Some(idempotency_key)) = (self.id.take(), self.idempotency_key.take()) + else { + return None; + }; + Some(Self::Out { id, idempotency_key }) } } @@ -89,8 +98,8 @@ const _: () = { let mut b = NotificationEventRequestBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "idempotency_key" => b.idempotency_key = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "idempotency_key" => b.idempotency_key = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/offline_acceptance.rs b/generated/async-stripe-shared/src/offline_acceptance.rs index e03091efa..91a3ac963 100644 --- a/generated/async-stripe-shared/src/offline_acceptance.rs +++ b/generated/async-stripe-shared/src/offline_acceptance.rs @@ -5,7 +5,12 @@ pub struct OfflineAcceptance {} #[doc(hidden)] pub struct OfflineAcceptanceBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/online_acceptance.rs b/generated/async-stripe-shared/src/online_acceptance.rs index d2a4afe89..460e442c3 100644 --- a/generated/async-stripe-shared/src/online_acceptance.rs +++ b/generated/async-stripe-shared/src/online_acceptance.rs @@ -13,7 +13,12 @@ pub struct OnlineAcceptanceBuilder { user_agent: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - ip_address: self.ip_address.take()?, - user_agent: self.user_agent.take()?, - }) + let (Some(ip_address), Some(user_agent)) = + (self.ip_address.take(), self.user_agent.take()) + else { + return None; + }; + Some(Self::Out { ip_address, user_agent }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = OnlineAcceptanceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "ip_address" => b.ip_address = Some(FromValueOpt::from_value(v)?), - "user_agent" => b.user_agent = Some(FromValueOpt::from_value(v)?), + "ip_address" => b.ip_address = FromValueOpt::from_value(v), + "user_agent" => b.user_agent = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/package_dimensions.rs b/generated/async-stripe-shared/src/package_dimensions.rs index c2e9167e0..4f73b5749 100644 --- a/generated/async-stripe-shared/src/package_dimensions.rs +++ b/generated/async-stripe-shared/src/package_dimensions.rs @@ -19,7 +19,12 @@ pub struct PackageDimensionsBuilder { width: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - height: self.height?, - length: self.length?, - weight: self.weight?, - width: self.width?, - }) + let (Some(height), Some(length), Some(weight), Some(width)) = + (self.height, self.length, self.weight, self.width) + else { + return None; + }; + Some(Self::Out { height, length, weight, width }) } } @@ -104,10 +109,10 @@ const _: () = { let mut b = PackageDimensionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "height" => b.height = Some(FromValueOpt::from_value(v)?), - "length" => b.length = Some(FromValueOpt::from_value(v)?), - "weight" => b.weight = Some(FromValueOpt::from_value(v)?), - "width" => b.width = Some(FromValueOpt::from_value(v)?), + "height" => b.height = FromValueOpt::from_value(v), + "length" => b.length = FromValueOpt::from_value(v), + "weight" => b.weight = FromValueOpt::from_value(v), + "width" => b.width = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_flows_amount_details.rs b/generated/async-stripe-shared/src/payment_flows_amount_details.rs index fed4d8080..089687eb9 100644 --- a/generated/async-stripe-shared/src/payment_flows_amount_details.rs +++ b/generated/async-stripe-shared/src/payment_flows_amount_details.rs @@ -9,7 +9,12 @@ pub struct PaymentFlowsAmountDetailsBuilder { tip: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -54,7 +59,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { tip: self.tip? }) + let (Some(tip),) = (self.tip,) else { + return None; + }; + Some(Self::Out { tip }) } } @@ -81,7 +89,7 @@ const _: () = { let mut b = PaymentFlowsAmountDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "tip" => b.tip = Some(FromValueOpt::from_value(v)?), + "tip" => b.tip = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_flows_amount_details_resource_tip.rs b/generated/async-stripe-shared/src/payment_flows_amount_details_resource_tip.rs index e7725d177..478008ede 100644 --- a/generated/async-stripe-shared/src/payment_flows_amount_details_resource_tip.rs +++ b/generated/async-stripe-shared/src/payment_flows_amount_details_resource_tip.rs @@ -10,7 +10,12 @@ pub struct PaymentFlowsAmountDetailsResourceTipBuilder { amount: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { amount: self.amount? }) + let (Some(amount),) = (self.amount,) else { + return None; + }; + Some(Self::Out { amount }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentFlowsAmountDetailsResourceTipBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_flows_automatic_payment_methods_payment_intent.rs b/generated/async-stripe-shared/src/payment_flows_automatic_payment_methods_payment_intent.rs index 1d438732e..83a29e3c5 100644 --- a/generated/async-stripe-shared/src/payment_flows_automatic_payment_methods_payment_intent.rs +++ b/generated/async-stripe-shared/src/payment_flows_automatic_payment_methods_payment_intent.rs @@ -16,7 +16,12 @@ pub struct PaymentFlowsAutomaticPaymentMethodsPaymentIntentBuilder { enabled: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,7 +67,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { allow_redirects: self.allow_redirects?, enabled: self.enabled? }) + let (Some(allow_redirects), Some(enabled)) = (self.allow_redirects, self.enabled) + else { + return None; + }; + Some(Self::Out { allow_redirects, enabled }) } } @@ -89,8 +98,8 @@ const _: () = { let mut b = PaymentFlowsAutomaticPaymentMethodsPaymentIntentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "allow_redirects" => b.allow_redirects = Some(FromValueOpt::from_value(v)?), - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), + "allow_redirects" => b.allow_redirects = FromValueOpt::from_value(v), + "enabled" => b.enabled = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_flows_automatic_payment_methods_setup_intent.rs b/generated/async-stripe-shared/src/payment_flows_automatic_payment_methods_setup_intent.rs index 202ce172f..dbbca01af 100644 --- a/generated/async-stripe-shared/src/payment_flows_automatic_payment_methods_setup_intent.rs +++ b/generated/async-stripe-shared/src/payment_flows_automatic_payment_methods_setup_intent.rs @@ -16,7 +16,12 @@ pub struct PaymentFlowsAutomaticPaymentMethodsSetupIntentBuilder { enabled: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,7 +67,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { allow_redirects: self.allow_redirects?, enabled: self.enabled? }) + let (Some(allow_redirects), Some(enabled)) = (self.allow_redirects, self.enabled) + else { + return None; + }; + Some(Self::Out { allow_redirects, enabled }) } } @@ -89,8 +98,8 @@ const _: () = { let mut b = PaymentFlowsAutomaticPaymentMethodsSetupIntentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "allow_redirects" => b.allow_redirects = Some(FromValueOpt::from_value(v)?), - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), + "allow_redirects" => b.allow_redirects = FromValueOpt::from_value(v), + "enabled" => b.enabled = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_flows_private_payment_methods_alipay.rs b/generated/async-stripe-shared/src/payment_flows_private_payment_methods_alipay.rs index 31e84f439..3281c7274 100644 --- a/generated/async-stripe-shared/src/payment_flows_private_payment_methods_alipay.rs +++ b/generated/async-stripe-shared/src/payment_flows_private_payment_methods_alipay.rs @@ -5,7 +5,12 @@ pub struct PaymentFlowsPrivatePaymentMethodsAlipay {} #[doc(hidden)] pub struct PaymentFlowsPrivatePaymentMethodsAlipayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_flows_private_payment_methods_alipay_details.rs b/generated/async-stripe-shared/src/payment_flows_private_payment_methods_alipay_details.rs index ec1656b0f..e93b71298 100644 --- a/generated/async-stripe-shared/src/payment_flows_private_payment_methods_alipay_details.rs +++ b/generated/async-stripe-shared/src/payment_flows_private_payment_methods_alipay_details.rs @@ -18,7 +18,12 @@ pub struct PaymentFlowsPrivatePaymentMethodsAlipayDetailsBuilder { transaction_id: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - buyer_id: self.buyer_id.take()?, - fingerprint: self.fingerprint.take()?, - transaction_id: self.transaction_id.take()?, - }) + let (Some(buyer_id), Some(fingerprint), Some(transaction_id)) = + (self.buyer_id.take(), self.fingerprint.take(), self.transaction_id.take()) + else { + return None; + }; + Some(Self::Out { buyer_id, fingerprint, transaction_id }) } } @@ -100,9 +106,9 @@ const _: () = { let mut b = PaymentFlowsPrivatePaymentMethodsAlipayDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "buyer_id" => b.buyer_id = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "transaction_id" => b.transaction_id = Some(FromValueOpt::from_value(v)?), + "buyer_id" => b.buyer_id = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "transaction_id" => b.transaction_id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization.rs b/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization.rs index 66ccf78a1..9fe369baa 100644 --- a/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization.rs +++ b/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_extended_authorization_extended_authorization.rs @@ -12,7 +12,12 @@ pub struct PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeat } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,8 +65,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { status: self.status?, - }) + let (Some(status), +) = (self.status, +) else { + return None; + }; + Some(Self::Out { status }) } } @@ -88,7 +97,7 @@ const _: () = { let mut b = PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorizationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization.rs b/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization.rs index 98b831dfd..a9e09a528 100644 --- a/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization.rs +++ b/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_incremental_authorization_incremental_authorization.rs @@ -12,7 +12,12 @@ pub struct PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeat } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,8 +65,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { status: self.status?, - }) + let (Some(status), +) = (self.status, +) else { + return None; + }; + Some(Self::Out { status }) } } @@ -88,7 +97,7 @@ const _: () = { let mut b = PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorizationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture.rs b/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture.rs index 43f6591e5..6802528d3 100644 --- a/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture.rs +++ b/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_enterprise_features_overcapture_overcapture.rs @@ -15,7 +15,12 @@ status: Option Option { - Some(Self::Out { maximum_amount_capturable: self.maximum_amount_capturable?, -status: self.status?, - }) + let (Some(maximum_amount_capturable), +Some(status), +) = (self.maximum_amount_capturable, +self.status, +) else { + return None; + }; + Some(Self::Out { maximum_amount_capturable,status }) } } @@ -94,8 +104,8 @@ status: self.status?, let mut b = PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercaptureBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "maximum_amount_capturable" => b.maximum_amount_capturable = Some(FromValueOpt::from_value(v)?), -"status" => b.status = Some(FromValueOpt::from_value(v)?), + "maximum_amount_capturable" => b.maximum_amount_capturable = FromValueOpt::from_value(v), +"status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_multicapture.rs b/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_multicapture.rs index 95726e0e6..a2f404de0 100644 --- a/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_multicapture.rs +++ b/generated/async-stripe-shared/src/payment_flows_private_payment_methods_card_details_api_resource_multicapture.rs @@ -10,7 +10,12 @@ pub struct PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureBu status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { status: self.status? }) + let (Some(status),) = (self.status,) else { + return None; + }; + Some(Self::Out { status }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticaptureBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_flows_private_payment_methods_klarna_dob.rs b/generated/async-stripe-shared/src/payment_flows_private_payment_methods_klarna_dob.rs index 5e777b06f..1f2f07826 100644 --- a/generated/async-stripe-shared/src/payment_flows_private_payment_methods_klarna_dob.rs +++ b/generated/async-stripe-shared/src/payment_flows_private_payment_methods_klarna_dob.rs @@ -16,7 +16,12 @@ pub struct PaymentFlowsPrivatePaymentMethodsKlarnaDobBuilder { year: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,7 +72,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { day: self.day?, month: self.month?, year: self.year? }) + let (Some(day), Some(month), Some(year)) = (self.day, self.month, self.year) else { + return None; + }; + Some(Self::Out { day, month, year }) } } @@ -94,9 +102,9 @@ const _: () = { let mut b = PaymentFlowsPrivatePaymentMethodsKlarnaDobBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "day" => b.day = Some(FromValueOpt::from_value(v)?), - "month" => b.month = Some(FromValueOpt::from_value(v)?), - "year" => b.year = Some(FromValueOpt::from_value(v)?), + "day" => b.day = FromValueOpt::from_value(v), + "month" => b.month = FromValueOpt::from_value(v), + "year" => b.year = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent.rs b/generated/async-stripe-shared/src/payment_intent.rs index 92f242156..3dfd722f7 100644 --- a/generated/async-stripe-shared/src/payment_intent.rs +++ b/generated/async-stripe-shared/src/payment_intent.rs @@ -174,7 +174,12 @@ pub struct PaymentIntentBuilder { transfer_group: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -303,48 +308,130 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_capturable), + Some(amount_details), + Some(amount_received), + Some(application), + Some(application_fee_amount), + Some(automatic_payment_methods), + Some(canceled_at), + Some(cancellation_reason), + Some(capture_method), + Some(client_secret), + Some(confirmation_method), + Some(created), + Some(currency), + Some(customer), + Some(description), + Some(id), + Some(invoice), + Some(last_payment_error), + Some(latest_charge), + Some(livemode), + Some(metadata), + Some(next_action), + Some(on_behalf_of), + Some(payment_method), + Some(payment_method_configuration_details), + Some(payment_method_options), + Some(payment_method_types), + Some(processing), + Some(receipt_email), + Some(review), + Some(setup_future_usage), + Some(shipping), + Some(source), + Some(statement_descriptor), + Some(statement_descriptor_suffix), + Some(status), + Some(transfer_data), + Some(transfer_group), + ) = ( + self.amount, + self.amount_capturable, + self.amount_details, + self.amount_received, + self.application.take(), + self.application_fee_amount, + self.automatic_payment_methods, + self.canceled_at, + self.cancellation_reason, + self.capture_method, + self.client_secret.take(), + self.confirmation_method, + self.created, + self.currency, + self.customer.take(), + self.description.take(), + self.id.take(), + self.invoice.take(), + self.last_payment_error.take(), + self.latest_charge.take(), + self.livemode, + self.metadata.take(), + self.next_action.take(), + self.on_behalf_of.take(), + self.payment_method.take(), + self.payment_method_configuration_details.take(), + self.payment_method_options.take(), + self.payment_method_types.take(), + self.processing, + self.receipt_email.take(), + self.review.take(), + self.setup_future_usage, + self.shipping.take(), + self.source.take(), + self.statement_descriptor.take(), + self.statement_descriptor_suffix.take(), + self.status, + self.transfer_data.take(), + self.transfer_group.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_capturable: self.amount_capturable?, - amount_details: self.amount_details?, - amount_received: self.amount_received?, - application: self.application.take()?, - application_fee_amount: self.application_fee_amount?, - automatic_payment_methods: self.automatic_payment_methods?, - canceled_at: self.canceled_at?, - cancellation_reason: self.cancellation_reason?, - capture_method: self.capture_method?, - client_secret: self.client_secret.take()?, - confirmation_method: self.confirmation_method?, - created: self.created?, - currency: self.currency?, - customer: self.customer.take()?, - description: self.description.take()?, - id: self.id.take()?, - invoice: self.invoice.take()?, - last_payment_error: self.last_payment_error.take()?, - latest_charge: self.latest_charge.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - next_action: self.next_action.take()?, - on_behalf_of: self.on_behalf_of.take()?, - payment_method: self.payment_method.take()?, - payment_method_configuration_details: self - .payment_method_configuration_details - .take()?, - payment_method_options: self.payment_method_options.take()?, - payment_method_types: self.payment_method_types.take()?, - processing: self.processing?, - receipt_email: self.receipt_email.take()?, - review: self.review.take()?, - setup_future_usage: self.setup_future_usage?, - shipping: self.shipping.take()?, - source: self.source.take()?, - statement_descriptor: self.statement_descriptor.take()?, - statement_descriptor_suffix: self.statement_descriptor_suffix.take()?, - status: self.status?, - transfer_data: self.transfer_data.take()?, - transfer_group: self.transfer_group.take()?, + amount, + amount_capturable, + amount_details, + amount_received, + application, + application_fee_amount, + automatic_payment_methods, + canceled_at, + cancellation_reason, + capture_method, + client_secret, + confirmation_method, + created, + currency, + customer, + description, + id, + invoice, + last_payment_error, + latest_charge, + livemode, + metadata, + next_action, + on_behalf_of, + payment_method, + payment_method_configuration_details, + payment_method_options, + payment_method_types, + processing, + receipt_email, + review, + setup_future_usage, + shipping, + source, + statement_descriptor, + statement_descriptor_suffix, + status, + transfer_data, + transfer_group, }) } } @@ -372,67 +459,55 @@ const _: () = { let mut b = PaymentIntentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_capturable" => b.amount_capturable = Some(FromValueOpt::from_value(v)?), - "amount_details" => b.amount_details = Some(FromValueOpt::from_value(v)?), - "amount_received" => b.amount_received = Some(FromValueOpt::from_value(v)?), - "application" => b.application = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_capturable" => b.amount_capturable = FromValueOpt::from_value(v), + "amount_details" => b.amount_details = FromValueOpt::from_value(v), + "amount_received" => b.amount_received = FromValueOpt::from_value(v), + "application" => b.application = FromValueOpt::from_value(v), "application_fee_amount" => { - b.application_fee_amount = Some(FromValueOpt::from_value(v)?) + b.application_fee_amount = FromValueOpt::from_value(v) } "automatic_payment_methods" => { - b.automatic_payment_methods = Some(FromValueOpt::from_value(v)?) - } - "canceled_at" => b.canceled_at = Some(FromValueOpt::from_value(v)?), - "cancellation_reason" => { - b.cancellation_reason = Some(FromValueOpt::from_value(v)?) - } - "capture_method" => b.capture_method = Some(FromValueOpt::from_value(v)?), - "client_secret" => b.client_secret = Some(FromValueOpt::from_value(v)?), - "confirmation_method" => { - b.confirmation_method = Some(FromValueOpt::from_value(v)?) + b.automatic_payment_methods = FromValueOpt::from_value(v) } - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "invoice" => b.invoice = Some(FromValueOpt::from_value(v)?), - "last_payment_error" => { - b.last_payment_error = Some(FromValueOpt::from_value(v)?) - } - "latest_charge" => b.latest_charge = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "next_action" => b.next_action = Some(FromValueOpt::from_value(v)?), - "on_behalf_of" => b.on_behalf_of = Some(FromValueOpt::from_value(v)?), - "payment_method" => b.payment_method = Some(FromValueOpt::from_value(v)?), + "canceled_at" => b.canceled_at = FromValueOpt::from_value(v), + "cancellation_reason" => b.cancellation_reason = FromValueOpt::from_value(v), + "capture_method" => b.capture_method = FromValueOpt::from_value(v), + "client_secret" => b.client_secret = FromValueOpt::from_value(v), + "confirmation_method" => b.confirmation_method = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "invoice" => b.invoice = FromValueOpt::from_value(v), + "last_payment_error" => b.last_payment_error = FromValueOpt::from_value(v), + "latest_charge" => b.latest_charge = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "next_action" => b.next_action = FromValueOpt::from_value(v), + "on_behalf_of" => b.on_behalf_of = FromValueOpt::from_value(v), + "payment_method" => b.payment_method = FromValueOpt::from_value(v), "payment_method_configuration_details" => { - b.payment_method_configuration_details = Some(FromValueOpt::from_value(v)?) + b.payment_method_configuration_details = FromValueOpt::from_value(v) } "payment_method_options" => { - b.payment_method_options = Some(FromValueOpt::from_value(v)?) - } - "payment_method_types" => { - b.payment_method_types = Some(FromValueOpt::from_value(v)?) - } - "processing" => b.processing = Some(FromValueOpt::from_value(v)?), - "receipt_email" => b.receipt_email = Some(FromValueOpt::from_value(v)?), - "review" => b.review = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } - "shipping" => b.shipping = Some(FromValueOpt::from_value(v)?), - "source" => b.source = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) + b.payment_method_options = FromValueOpt::from_value(v) } + "payment_method_types" => b.payment_method_types = FromValueOpt::from_value(v), + "processing" => b.processing = FromValueOpt::from_value(v), + "receipt_email" => b.receipt_email = FromValueOpt::from_value(v), + "review" => b.review = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), + "shipping" => b.shipping = FromValueOpt::from_value(v), + "source" => b.source = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), "statement_descriptor_suffix" => { - b.statement_descriptor_suffix = Some(FromValueOpt::from_value(v)?) + b.statement_descriptor_suffix = FromValueOpt::from_value(v) } - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "transfer_data" => b.transfer_data = Some(FromValueOpt::from_value(v)?), - "transfer_group" => b.transfer_group = Some(FromValueOpt::from_value(v)?), + "status" => b.status = FromValueOpt::from_value(v), + "transfer_data" => b.transfer_data = FromValueOpt::from_value(v), + "transfer_group" => b.transfer_group = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_card_processing.rs b/generated/async-stripe-shared/src/payment_intent_card_processing.rs index f3faab6a4..1242e35ab 100644 --- a/generated/async-stripe-shared/src/payment_intent_card_processing.rs +++ b/generated/async-stripe-shared/src/payment_intent_card_processing.rs @@ -10,7 +10,12 @@ pub struct PaymentIntentCardProcessingBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { customer_notification: self.customer_notification? }) + let (Some(customer_notification),) = (self.customer_notification,) else { + return None; + }; + Some(Self::Out { customer_notification }) } } @@ -83,7 +91,7 @@ const _: () = { for (k, v) in obj { match k.as_str() { "customer_notification" => { - b.customer_notification = Some(FromValueOpt::from_value(v)?) + b.customer_notification = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/payment_intent_next_action.rs b/generated/async-stripe-shared/src/payment_intent_next_action.rs index c3c966e72..355339c20 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action.rs @@ -71,7 +71,12 @@ pub struct PaymentIntentNextActionBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -168,33 +173,67 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(alipay_handle_redirect), + Some(boleto_display_details), + Some(card_await_notification), + Some(cashapp_handle_redirect_or_display_qr_code), + Some(display_bank_transfer_instructions), + Some(konbini_display_details), + Some(oxxo_display_details), + Some(paynow_display_qr_code), + Some(pix_display_qr_code), + Some(promptpay_display_qr_code), + Some(redirect_to_url), + Some(swish_handle_redirect_or_display_qr_code), + Some(type_), + Some(use_stripe_sdk), + Some(verify_with_microdeposits), + Some(wechat_pay_display_qr_code), + Some(wechat_pay_redirect_to_android_app), + Some(wechat_pay_redirect_to_ios_app), + ) = ( + self.alipay_handle_redirect.take(), + self.boleto_display_details.take(), + self.card_await_notification, + self.cashapp_handle_redirect_or_display_qr_code.take(), + self.display_bank_transfer_instructions.take(), + self.konbini_display_details.take(), + self.oxxo_display_details.take(), + self.paynow_display_qr_code.take(), + self.pix_display_qr_code.take(), + self.promptpay_display_qr_code.take(), + self.redirect_to_url.take(), + self.swish_handle_redirect_or_display_qr_code.take(), + self.type_.take(), + self.use_stripe_sdk.take(), + self.verify_with_microdeposits.take(), + self.wechat_pay_display_qr_code.take(), + self.wechat_pay_redirect_to_android_app.take(), + self.wechat_pay_redirect_to_ios_app.take(), + ) + else { + return None; + }; Some(Self::Out { - alipay_handle_redirect: self.alipay_handle_redirect.take()?, - boleto_display_details: self.boleto_display_details.take()?, - card_await_notification: self.card_await_notification?, - cashapp_handle_redirect_or_display_qr_code: self - .cashapp_handle_redirect_or_display_qr_code - .take()?, - display_bank_transfer_instructions: self - .display_bank_transfer_instructions - .take()?, - konbini_display_details: self.konbini_display_details.take()?, - oxxo_display_details: self.oxxo_display_details.take()?, - paynow_display_qr_code: self.paynow_display_qr_code.take()?, - pix_display_qr_code: self.pix_display_qr_code.take()?, - promptpay_display_qr_code: self.promptpay_display_qr_code.take()?, - redirect_to_url: self.redirect_to_url.take()?, - swish_handle_redirect_or_display_qr_code: self - .swish_handle_redirect_or_display_qr_code - .take()?, - type_: self.type_.take()?, - use_stripe_sdk: self.use_stripe_sdk.take()?, - verify_with_microdeposits: self.verify_with_microdeposits.take()?, - wechat_pay_display_qr_code: self.wechat_pay_display_qr_code.take()?, - wechat_pay_redirect_to_android_app: self - .wechat_pay_redirect_to_android_app - .take()?, - wechat_pay_redirect_to_ios_app: self.wechat_pay_redirect_to_ios_app.take()?, + alipay_handle_redirect, + boleto_display_details, + card_await_notification, + cashapp_handle_redirect_or_display_qr_code, + display_bank_transfer_instructions, + konbini_display_details, + oxxo_display_details, + paynow_display_qr_code, + pix_display_qr_code, + promptpay_display_qr_code, + redirect_to_url, + swish_handle_redirect_or_display_qr_code, + type_, + use_stripe_sdk, + verify_with_microdeposits, + wechat_pay_display_qr_code, + wechat_pay_redirect_to_android_app, + wechat_pay_redirect_to_ios_app, }) } } @@ -223,54 +262,48 @@ const _: () = { for (k, v) in obj { match k.as_str() { "alipay_handle_redirect" => { - b.alipay_handle_redirect = Some(FromValueOpt::from_value(v)?) + b.alipay_handle_redirect = FromValueOpt::from_value(v) } "boleto_display_details" => { - b.boleto_display_details = Some(FromValueOpt::from_value(v)?) + b.boleto_display_details = FromValueOpt::from_value(v) } "card_await_notification" => { - b.card_await_notification = Some(FromValueOpt::from_value(v)?) + b.card_await_notification = FromValueOpt::from_value(v) } "cashapp_handle_redirect_or_display_qr_code" => { - b.cashapp_handle_redirect_or_display_qr_code = - Some(FromValueOpt::from_value(v)?) + b.cashapp_handle_redirect_or_display_qr_code = FromValueOpt::from_value(v) } "display_bank_transfer_instructions" => { - b.display_bank_transfer_instructions = Some(FromValueOpt::from_value(v)?) + b.display_bank_transfer_instructions = FromValueOpt::from_value(v) } "konbini_display_details" => { - b.konbini_display_details = Some(FromValueOpt::from_value(v)?) - } - "oxxo_display_details" => { - b.oxxo_display_details = Some(FromValueOpt::from_value(v)?) + b.konbini_display_details = FromValueOpt::from_value(v) } + "oxxo_display_details" => b.oxxo_display_details = FromValueOpt::from_value(v), "paynow_display_qr_code" => { - b.paynow_display_qr_code = Some(FromValueOpt::from_value(v)?) - } - "pix_display_qr_code" => { - b.pix_display_qr_code = Some(FromValueOpt::from_value(v)?) + b.paynow_display_qr_code = FromValueOpt::from_value(v) } + "pix_display_qr_code" => b.pix_display_qr_code = FromValueOpt::from_value(v), "promptpay_display_qr_code" => { - b.promptpay_display_qr_code = Some(FromValueOpt::from_value(v)?) + b.promptpay_display_qr_code = FromValueOpt::from_value(v) } - "redirect_to_url" => b.redirect_to_url = Some(FromValueOpt::from_value(v)?), + "redirect_to_url" => b.redirect_to_url = FromValueOpt::from_value(v), "swish_handle_redirect_or_display_qr_code" => { - b.swish_handle_redirect_or_display_qr_code = - Some(FromValueOpt::from_value(v)?) + b.swish_handle_redirect_or_display_qr_code = FromValueOpt::from_value(v) } - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "use_stripe_sdk" => b.use_stripe_sdk = Some(FromValueOpt::from_value(v)?), + "type" => b.type_ = FromValueOpt::from_value(v), + "use_stripe_sdk" => b.use_stripe_sdk = FromValueOpt::from_value(v), "verify_with_microdeposits" => { - b.verify_with_microdeposits = Some(FromValueOpt::from_value(v)?) + b.verify_with_microdeposits = FromValueOpt::from_value(v) } "wechat_pay_display_qr_code" => { - b.wechat_pay_display_qr_code = Some(FromValueOpt::from_value(v)?) + b.wechat_pay_display_qr_code = FromValueOpt::from_value(v) } "wechat_pay_redirect_to_android_app" => { - b.wechat_pay_redirect_to_android_app = Some(FromValueOpt::from_value(v)?) + b.wechat_pay_redirect_to_android_app = FromValueOpt::from_value(v) } "wechat_pay_redirect_to_ios_app" => { - b.wechat_pay_redirect_to_ios_app = Some(FromValueOpt::from_value(v)?) + b.wechat_pay_redirect_to_ios_app = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_alipay_handle_redirect.rs b/generated/async-stripe-shared/src/payment_intent_next_action_alipay_handle_redirect.rs index 675267c9a..0f9f6c234 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_alipay_handle_redirect.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_alipay_handle_redirect.rs @@ -19,7 +19,12 @@ pub struct PaymentIntentNextActionAlipayHandleRedirectBuilder { url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - native_data: self.native_data.take()?, - native_url: self.native_url.take()?, - return_url: self.return_url.take()?, - url: self.url.take()?, - }) + let (Some(native_data), Some(native_url), Some(return_url), Some(url)) = ( + self.native_data.take(), + self.native_url.take(), + self.return_url.take(), + self.url.take(), + ) else { + return None; + }; + Some(Self::Out { native_data, native_url, return_url, url }) } } @@ -104,10 +112,10 @@ const _: () = { let mut b = PaymentIntentNextActionAlipayHandleRedirectBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "native_data" => b.native_data = Some(FromValueOpt::from_value(v)?), - "native_url" => b.native_url = Some(FromValueOpt::from_value(v)?), - "return_url" => b.return_url = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "native_data" => b.native_data = FromValueOpt::from_value(v), + "native_url" => b.native_url = FromValueOpt::from_value(v), + "return_url" => b.return_url = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_boleto.rs b/generated/async-stripe-shared/src/payment_intent_next_action_boleto.rs index dc5de8c79..1153d3bd1 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_boleto.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_boleto.rs @@ -19,7 +19,12 @@ pub struct PaymentIntentNextActionBoletoBuilder { pdf: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - expires_at: self.expires_at?, - hosted_voucher_url: self.hosted_voucher_url.take()?, - number: self.number.take()?, - pdf: self.pdf.take()?, - }) + let (Some(expires_at), Some(hosted_voucher_url), Some(number), Some(pdf)) = ( + self.expires_at, + self.hosted_voucher_url.take(), + self.number.take(), + self.pdf.take(), + ) else { + return None; + }; + Some(Self::Out { expires_at, hosted_voucher_url, number, pdf }) } } @@ -104,12 +112,10 @@ const _: () = { let mut b = PaymentIntentNextActionBoletoBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "hosted_voucher_url" => { - b.hosted_voucher_url = Some(FromValueOpt::from_value(v)?) - } - "number" => b.number = Some(FromValueOpt::from_value(v)?), - "pdf" => b.pdf = Some(FromValueOpt::from_value(v)?), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "hosted_voucher_url" => b.hosted_voucher_url = FromValueOpt::from_value(v), + "number" => b.number = FromValueOpt::from_value(v), + "pdf" => b.pdf = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_card_await_notification.rs b/generated/async-stripe-shared/src/payment_intent_next_action_card_await_notification.rs index 79c7bd017..25775ecb6 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_card_await_notification.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_card_await_notification.rs @@ -15,7 +15,12 @@ pub struct PaymentIntentNextActionCardAwaitNotificationBuilder { customer_approval_required: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -66,10 +71,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - charge_attempt_at: self.charge_attempt_at?, - customer_approval_required: self.customer_approval_required?, - }) + let (Some(charge_attempt_at), Some(customer_approval_required)) = + (self.charge_attempt_at, self.customer_approval_required) + else { + return None; + }; + Some(Self::Out { charge_attempt_at, customer_approval_required }) } } @@ -96,9 +103,9 @@ const _: () = { let mut b = PaymentIntentNextActionCardAwaitNotificationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "charge_attempt_at" => b.charge_attempt_at = Some(FromValueOpt::from_value(v)?), + "charge_attempt_at" => b.charge_attempt_at = FromValueOpt::from_value(v), "customer_approval_required" => { - b.customer_approval_required = Some(FromValueOpt::from_value(v)?) + b.customer_approval_required = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code.rs b/generated/async-stripe-shared/src/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code.rs index 55995543e..60758158d 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_cashapp_handle_redirect_or_display_qr_code.rs @@ -15,7 +15,12 @@ pub struct PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeBuilder { qr_code: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -66,11 +71,14 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - hosted_instructions_url: self.hosted_instructions_url.take()?, - mobile_auth_url: self.mobile_auth_url.take()?, - qr_code: self.qr_code.take()?, - }) + let (Some(hosted_instructions_url), Some(mobile_auth_url), Some(qr_code)) = ( + self.hosted_instructions_url.take(), + self.mobile_auth_url.take(), + self.qr_code.take(), + ) else { + return None; + }; + Some(Self::Out { hosted_instructions_url, mobile_auth_url, qr_code }) } } @@ -99,10 +107,10 @@ const _: () = { for (k, v) in obj { match k.as_str() { "hosted_instructions_url" => { - b.hosted_instructions_url = Some(FromValueOpt::from_value(v)?) + b.hosted_instructions_url = FromValueOpt::from_value(v) } - "mobile_auth_url" => b.mobile_auth_url = Some(FromValueOpt::from_value(v)?), - "qr_code" => b.qr_code = Some(FromValueOpt::from_value(v)?), + "mobile_auth_url" => b.mobile_auth_url = FromValueOpt::from_value(v), + "qr_code" => b.qr_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_cashapp_qr_code.rs b/generated/async-stripe-shared/src/payment_intent_next_action_cashapp_qr_code.rs index 4252855e7..3d35860e1 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_cashapp_qr_code.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_cashapp_qr_code.rs @@ -16,7 +16,12 @@ pub struct PaymentIntentNextActionCashappQrCodeBuilder { image_url_svg: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - expires_at: self.expires_at?, - image_url_png: self.image_url_png.take()?, - image_url_svg: self.image_url_svg.take()?, - }) + let (Some(expires_at), Some(image_url_png), Some(image_url_svg)) = + (self.expires_at, self.image_url_png.take(), self.image_url_svg.take()) + else { + return None; + }; + Some(Self::Out { expires_at, image_url_png, image_url_svg }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = PaymentIntentNextActionCashappQrCodeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "image_url_png" => b.image_url_png = Some(FromValueOpt::from_value(v)?), - "image_url_svg" => b.image_url_svg = Some(FromValueOpt::from_value(v)?), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "image_url_png" => b.image_url_png = FromValueOpt::from_value(v), + "image_url_svg" => b.image_url_svg = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_display_bank_transfer_instructions.rs b/generated/async-stripe-shared/src/payment_intent_next_action_display_bank_transfer_instructions.rs index 91c1798b3..b426bf4eb 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_display_bank_transfer_instructions.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_display_bank_transfer_instructions.rs @@ -30,7 +30,12 @@ pub struct PaymentIntentNextActionDisplayBankTransferInstructionsBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -88,13 +93,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount_remaining), + Some(currency), + Some(financial_addresses), + Some(hosted_instructions_url), + Some(reference), + Some(type_), + ) = ( + self.amount_remaining, + self.currency, + self.financial_addresses.take(), + self.hosted_instructions_url.take(), + self.reference.take(), + self.type_, + ) + else { + return None; + }; Some(Self::Out { - amount_remaining: self.amount_remaining?, - currency: self.currency?, - financial_addresses: self.financial_addresses.take()?, - hosted_instructions_url: self.hosted_instructions_url.take()?, - reference: self.reference.take()?, - type_: self.type_?, + amount_remaining, + currency, + financial_addresses, + hosted_instructions_url, + reference, + type_, }) } } @@ -123,16 +146,14 @@ const _: () = { PaymentIntentNextActionDisplayBankTransferInstructionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_remaining" => b.amount_remaining = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "financial_addresses" => { - b.financial_addresses = Some(FromValueOpt::from_value(v)?) - } + "amount_remaining" => b.amount_remaining = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "financial_addresses" => b.financial_addresses = FromValueOpt::from_value(v), "hosted_instructions_url" => { - b.hosted_instructions_url = Some(FromValueOpt::from_value(v)?) + b.hosted_instructions_url = FromValueOpt::from_value(v) } - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "reference" => b.reference = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_display_oxxo_details.rs b/generated/async-stripe-shared/src/payment_intent_next_action_display_oxxo_details.rs index e8c5b8924..9bfe9df3f 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_display_oxxo_details.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_display_oxxo_details.rs @@ -16,7 +16,12 @@ pub struct PaymentIntentNextActionDisplayOxxoDetailsBuilder { number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - expires_after: self.expires_after?, - hosted_voucher_url: self.hosted_voucher_url.take()?, - number: self.number.take()?, - }) + let (Some(expires_after), Some(hosted_voucher_url), Some(number)) = + (self.expires_after, self.hosted_voucher_url.take(), self.number.take()) + else { + return None; + }; + Some(Self::Out { expires_after, hosted_voucher_url, number }) } } @@ -98,11 +104,9 @@ const _: () = { let mut b = PaymentIntentNextActionDisplayOxxoDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "expires_after" => b.expires_after = Some(FromValueOpt::from_value(v)?), - "hosted_voucher_url" => { - b.hosted_voucher_url = Some(FromValueOpt::from_value(v)?) - } - "number" => b.number = Some(FromValueOpt::from_value(v)?), + "expires_after" => b.expires_after = FromValueOpt::from_value(v), + "hosted_voucher_url" => b.hosted_voucher_url = FromValueOpt::from_value(v), + "number" => b.number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_konbini.rs b/generated/async-stripe-shared/src/payment_intent_next_action_konbini.rs index 5109038e7..b16016205 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_konbini.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_konbini.rs @@ -15,7 +15,12 @@ pub struct PaymentIntentNextActionKonbiniBuilder { stores: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -66,11 +71,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - expires_at: self.expires_at?, - hosted_voucher_url: self.hosted_voucher_url.take()?, - stores: self.stores.take()?, - }) + let (Some(expires_at), Some(hosted_voucher_url), Some(stores)) = + (self.expires_at, self.hosted_voucher_url.take(), self.stores.take()) + else { + return None; + }; + Some(Self::Out { expires_at, hosted_voucher_url, stores }) } } @@ -97,11 +103,9 @@ const _: () = { let mut b = PaymentIntentNextActionKonbiniBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "hosted_voucher_url" => { - b.hosted_voucher_url = Some(FromValueOpt::from_value(v)?) - } - "stores" => b.stores = Some(FromValueOpt::from_value(v)?), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "hosted_voucher_url" => b.hosted_voucher_url = FromValueOpt::from_value(v), + "stores" => b.stores = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_konbini_familymart.rs b/generated/async-stripe-shared/src/payment_intent_next_action_konbini_familymart.rs index d4f904927..57814d9b4 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_konbini_familymart.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_konbini_familymart.rs @@ -13,7 +13,12 @@ pub struct PaymentIntentNextActionKonbiniFamilymartBuilder { payment_code: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,10 +67,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - confirmation_number: self.confirmation_number.take()?, - payment_code: self.payment_code.take()?, - }) + let (Some(confirmation_number), Some(payment_code)) = + (self.confirmation_number.take(), self.payment_code.take()) + else { + return None; + }; + Some(Self::Out { confirmation_number, payment_code }) } } @@ -92,10 +99,8 @@ const _: () = { let mut b = PaymentIntentNextActionKonbiniFamilymartBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "confirmation_number" => { - b.confirmation_number = Some(FromValueOpt::from_value(v)?) - } - "payment_code" => b.payment_code = Some(FromValueOpt::from_value(v)?), + "confirmation_number" => b.confirmation_number = FromValueOpt::from_value(v), + "payment_code" => b.payment_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_konbini_lawson.rs b/generated/async-stripe-shared/src/payment_intent_next_action_konbini_lawson.rs index b1b277d92..780cf03ac 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_konbini_lawson.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_konbini_lawson.rs @@ -13,7 +13,12 @@ pub struct PaymentIntentNextActionKonbiniLawsonBuilder { payment_code: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,10 +67,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - confirmation_number: self.confirmation_number.take()?, - payment_code: self.payment_code.take()?, - }) + let (Some(confirmation_number), Some(payment_code)) = + (self.confirmation_number.take(), self.payment_code.take()) + else { + return None; + }; + Some(Self::Out { confirmation_number, payment_code }) } } @@ -92,10 +99,8 @@ const _: () = { let mut b = PaymentIntentNextActionKonbiniLawsonBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "confirmation_number" => { - b.confirmation_number = Some(FromValueOpt::from_value(v)?) - } - "payment_code" => b.payment_code = Some(FromValueOpt::from_value(v)?), + "confirmation_number" => b.confirmation_number = FromValueOpt::from_value(v), + "payment_code" => b.payment_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_konbini_ministop.rs b/generated/async-stripe-shared/src/payment_intent_next_action_konbini_ministop.rs index c1d6e1bf8..386eda1a7 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_konbini_ministop.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_konbini_ministop.rs @@ -13,7 +13,12 @@ pub struct PaymentIntentNextActionKonbiniMinistopBuilder { payment_code: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,10 +67,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - confirmation_number: self.confirmation_number.take()?, - payment_code: self.payment_code.take()?, - }) + let (Some(confirmation_number), Some(payment_code)) = + (self.confirmation_number.take(), self.payment_code.take()) + else { + return None; + }; + Some(Self::Out { confirmation_number, payment_code }) } } @@ -92,10 +99,8 @@ const _: () = { let mut b = PaymentIntentNextActionKonbiniMinistopBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "confirmation_number" => { - b.confirmation_number = Some(FromValueOpt::from_value(v)?) - } - "payment_code" => b.payment_code = Some(FromValueOpt::from_value(v)?), + "confirmation_number" => b.confirmation_number = FromValueOpt::from_value(v), + "payment_code" => b.payment_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_konbini_seicomart.rs b/generated/async-stripe-shared/src/payment_intent_next_action_konbini_seicomart.rs index 8a0f5d1f4..09637c4e5 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_konbini_seicomart.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_konbini_seicomart.rs @@ -13,7 +13,12 @@ pub struct PaymentIntentNextActionKonbiniSeicomartBuilder { payment_code: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,10 +67,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - confirmation_number: self.confirmation_number.take()?, - payment_code: self.payment_code.take()?, - }) + let (Some(confirmation_number), Some(payment_code)) = + (self.confirmation_number.take(), self.payment_code.take()) + else { + return None; + }; + Some(Self::Out { confirmation_number, payment_code }) } } @@ -92,10 +99,8 @@ const _: () = { let mut b = PaymentIntentNextActionKonbiniSeicomartBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "confirmation_number" => { - b.confirmation_number = Some(FromValueOpt::from_value(v)?) - } - "payment_code" => b.payment_code = Some(FromValueOpt::from_value(v)?), + "confirmation_number" => b.confirmation_number = FromValueOpt::from_value(v), + "payment_code" => b.payment_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_konbini_stores.rs b/generated/async-stripe-shared/src/payment_intent_next_action_konbini_stores.rs index b02add84b..19254e312 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_konbini_stores.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_konbini_stores.rs @@ -19,7 +19,12 @@ pub struct PaymentIntentNextActionKonbiniStoresBuilder { seicomart: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - familymart: self.familymart.take()?, - lawson: self.lawson.take()?, - ministop: self.ministop.take()?, - seicomart: self.seicomart.take()?, - }) + let (Some(familymart), Some(lawson), Some(ministop), Some(seicomart)) = ( + self.familymart.take(), + self.lawson.take(), + self.ministop.take(), + self.seicomart.take(), + ) else { + return None; + }; + Some(Self::Out { familymart, lawson, ministop, seicomart }) } } @@ -104,10 +112,10 @@ const _: () = { let mut b = PaymentIntentNextActionKonbiniStoresBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "familymart" => b.familymart = Some(FromValueOpt::from_value(v)?), - "lawson" => b.lawson = Some(FromValueOpt::from_value(v)?), - "ministop" => b.ministop = Some(FromValueOpt::from_value(v)?), - "seicomart" => b.seicomart = Some(FromValueOpt::from_value(v)?), + "familymart" => b.familymart = FromValueOpt::from_value(v), + "lawson" => b.lawson = FromValueOpt::from_value(v), + "ministop" => b.ministop = FromValueOpt::from_value(v), + "seicomart" => b.seicomart = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_paynow_display_qr_code.rs b/generated/async-stripe-shared/src/payment_intent_next_action_paynow_display_qr_code.rs index 2d29359a4..519ed260e 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_paynow_display_qr_code.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_paynow_display_qr_code.rs @@ -19,7 +19,12 @@ pub struct PaymentIntentNextActionPaynowDisplayQrCodeBuilder { image_url_svg: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,21 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - data: self.data.take()?, - hosted_instructions_url: self.hosted_instructions_url.take()?, - image_url_png: self.image_url_png.take()?, - image_url_svg: self.image_url_svg.take()?, - }) + let ( + Some(data), + Some(hosted_instructions_url), + Some(image_url_png), + Some(image_url_svg), + ) = ( + self.data.take(), + self.hosted_instructions_url.take(), + self.image_url_png.take(), + self.image_url_svg.take(), + ) + else { + return None; + }; + Some(Self::Out { data, hosted_instructions_url, image_url_png, image_url_svg }) } } @@ -104,12 +118,12 @@ const _: () = { let mut b = PaymentIntentNextActionPaynowDisplayQrCodeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "data" => b.data = Some(FromValueOpt::from_value(v)?), + "data" => b.data = FromValueOpt::from_value(v), "hosted_instructions_url" => { - b.hosted_instructions_url = Some(FromValueOpt::from_value(v)?) + b.hosted_instructions_url = FromValueOpt::from_value(v) } - "image_url_png" => b.image_url_png = Some(FromValueOpt::from_value(v)?), - "image_url_svg" => b.image_url_svg = Some(FromValueOpt::from_value(v)?), + "image_url_png" => b.image_url_png = FromValueOpt::from_value(v), + "image_url_svg" => b.image_url_svg = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_pix_display_qr_code.rs b/generated/async-stripe-shared/src/payment_intent_next_action_pix_display_qr_code.rs index 293c35627..f2fb55054 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_pix_display_qr_code.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_pix_display_qr_code.rs @@ -22,7 +22,12 @@ pub struct PaymentIntentNextActionPixDisplayQrCodeBuilder { image_url_svg: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,12 +82,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(data), + Some(expires_at), + Some(hosted_instructions_url), + Some(image_url_png), + Some(image_url_svg), + ) = ( + self.data.take(), + self.expires_at, + self.hosted_instructions_url.take(), + self.image_url_png.take(), + self.image_url_svg.take(), + ) + else { + return None; + }; Some(Self::Out { - data: self.data.take()?, - expires_at: self.expires_at?, - hosted_instructions_url: self.hosted_instructions_url.take()?, - image_url_png: self.image_url_png.take()?, - image_url_svg: self.image_url_svg.take()?, + data, + expires_at, + hosted_instructions_url, + image_url_png, + image_url_svg, }) } } @@ -110,13 +131,13 @@ const _: () = { let mut b = PaymentIntentNextActionPixDisplayQrCodeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "data" => b.data = Some(FromValueOpt::from_value(v)?), - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), + "data" => b.data = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), "hosted_instructions_url" => { - b.hosted_instructions_url = Some(FromValueOpt::from_value(v)?) + b.hosted_instructions_url = FromValueOpt::from_value(v) } - "image_url_png" => b.image_url_png = Some(FromValueOpt::from_value(v)?), - "image_url_svg" => b.image_url_svg = Some(FromValueOpt::from_value(v)?), + "image_url_png" => b.image_url_png = FromValueOpt::from_value(v), + "image_url_svg" => b.image_url_svg = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_promptpay_display_qr_code.rs b/generated/async-stripe-shared/src/payment_intent_next_action_promptpay_display_qr_code.rs index 2c02e53e4..6ba027aca 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_promptpay_display_qr_code.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_promptpay_display_qr_code.rs @@ -19,7 +19,12 @@ pub struct PaymentIntentNextActionPromptpayDisplayQrCodeBuilder { image_url_svg: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,21 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - data: self.data.take()?, - hosted_instructions_url: self.hosted_instructions_url.take()?, - image_url_png: self.image_url_png.take()?, - image_url_svg: self.image_url_svg.take()?, - }) + let ( + Some(data), + Some(hosted_instructions_url), + Some(image_url_png), + Some(image_url_svg), + ) = ( + self.data.take(), + self.hosted_instructions_url.take(), + self.image_url_png.take(), + self.image_url_svg.take(), + ) + else { + return None; + }; + Some(Self::Out { data, hosted_instructions_url, image_url_png, image_url_svg }) } } @@ -104,12 +118,12 @@ const _: () = { let mut b = PaymentIntentNextActionPromptpayDisplayQrCodeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "data" => b.data = Some(FromValueOpt::from_value(v)?), + "data" => b.data = FromValueOpt::from_value(v), "hosted_instructions_url" => { - b.hosted_instructions_url = Some(FromValueOpt::from_value(v)?) + b.hosted_instructions_url = FromValueOpt::from_value(v) } - "image_url_png" => b.image_url_png = Some(FromValueOpt::from_value(v)?), - "image_url_svg" => b.image_url_svg = Some(FromValueOpt::from_value(v)?), + "image_url_png" => b.image_url_png = FromValueOpt::from_value(v), + "image_url_svg" => b.image_url_svg = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_redirect_to_url.rs b/generated/async-stripe-shared/src/payment_intent_next_action_redirect_to_url.rs index fd640ed88..6724ba9b9 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_redirect_to_url.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_redirect_to_url.rs @@ -13,7 +13,12 @@ pub struct PaymentIntentNextActionRedirectToUrlBuilder { url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { return_url: self.return_url.take()?, url: self.url.take()? }) + let (Some(return_url), Some(url)) = (self.return_url.take(), self.url.take()) else { + return None; + }; + Some(Self::Out { return_url, url }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = PaymentIntentNextActionRedirectToUrlBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "return_url" => b.return_url = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "return_url" => b.return_url = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_swish_handle_redirect_or_display_qr_code.rs b/generated/async-stripe-shared/src/payment_intent_next_action_swish_handle_redirect_or_display_qr_code.rs index 33d99e5ff..78d248c13 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_swish_handle_redirect_or_display_qr_code.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_swish_handle_redirect_or_display_qr_code.rs @@ -15,7 +15,12 @@ pub struct PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeBuilder { qr_code: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,14 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - hosted_instructions_url: self.hosted_instructions_url.take()?, - mobile_auth_url: self.mobile_auth_url.take()?, - qr_code: self.qr_code.take()?, - }) + let (Some(hosted_instructions_url), Some(mobile_auth_url), Some(qr_code)) = ( + self.hosted_instructions_url.take(), + self.mobile_auth_url.take(), + self.qr_code.take(), + ) else { + return None; + }; + Some(Self::Out { hosted_instructions_url, mobile_auth_url, qr_code }) } } @@ -101,10 +109,10 @@ const _: () = { for (k, v) in obj { match k.as_str() { "hosted_instructions_url" => { - b.hosted_instructions_url = Some(FromValueOpt::from_value(v)?) + b.hosted_instructions_url = FromValueOpt::from_value(v) } - "mobile_auth_url" => b.mobile_auth_url = Some(FromValueOpt::from_value(v)?), - "qr_code" => b.qr_code = Some(FromValueOpt::from_value(v)?), + "mobile_auth_url" => b.mobile_auth_url = FromValueOpt::from_value(v), + "qr_code" => b.qr_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_swish_qr_code.rs b/generated/async-stripe-shared/src/payment_intent_next_action_swish_qr_code.rs index dad804bf3..c782abf63 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_swish_qr_code.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_swish_qr_code.rs @@ -16,7 +16,12 @@ pub struct PaymentIntentNextActionSwishQrCodeBuilder { image_url_svg: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - data: self.data.take()?, - image_url_png: self.image_url_png.take()?, - image_url_svg: self.image_url_svg.take()?, - }) + let (Some(data), Some(image_url_png), Some(image_url_svg)) = + (self.data.take(), self.image_url_png.take(), self.image_url_svg.take()) + else { + return None; + }; + Some(Self::Out { data, image_url_png, image_url_svg }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = PaymentIntentNextActionSwishQrCodeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "data" => b.data = Some(FromValueOpt::from_value(v)?), - "image_url_png" => b.image_url_png = Some(FromValueOpt::from_value(v)?), - "image_url_svg" => b.image_url_svg = Some(FromValueOpt::from_value(v)?), + "data" => b.data = FromValueOpt::from_value(v), + "image_url_png" => b.image_url_png = FromValueOpt::from_value(v), + "image_url_svg" => b.image_url_svg = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_verify_with_microdeposits.rs b/generated/async-stripe-shared/src/payment_intent_next_action_verify_with_microdeposits.rs index 4bb8e9935..6c85e9c4e 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_verify_with_microdeposits.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_verify_with_microdeposits.rs @@ -18,7 +18,12 @@ pub struct PaymentIntentNextActionVerifyWithMicrodepositsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - arrival_date: self.arrival_date?, - hosted_verification_url: self.hosted_verification_url.take()?, - microdeposit_type: self.microdeposit_type?, - }) + let (Some(arrival_date), Some(hosted_verification_url), Some(microdeposit_type)) = + (self.arrival_date, self.hosted_verification_url.take(), self.microdeposit_type) + else { + return None; + }; + Some(Self::Out { arrival_date, hosted_verification_url, microdeposit_type }) } } @@ -100,11 +106,11 @@ const _: () = { let mut b = PaymentIntentNextActionVerifyWithMicrodepositsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "arrival_date" => b.arrival_date = Some(FromValueOpt::from_value(v)?), + "arrival_date" => b.arrival_date = FromValueOpt::from_value(v), "hosted_verification_url" => { - b.hosted_verification_url = Some(FromValueOpt::from_value(v)?) + b.hosted_verification_url = FromValueOpt::from_value(v) } - "microdeposit_type" => b.microdeposit_type = Some(FromValueOpt::from_value(v)?), + "microdeposit_type" => b.microdeposit_type = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_wechat_pay_display_qr_code.rs b/generated/async-stripe-shared/src/payment_intent_next_action_wechat_pay_display_qr_code.rs index a55aa1534..a5dda7656 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_wechat_pay_display_qr_code.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_wechat_pay_display_qr_code.rs @@ -22,7 +22,12 @@ pub struct PaymentIntentNextActionWechatPayDisplayQrCodeBuilder { image_url_svg: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,12 +82,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(data), + Some(hosted_instructions_url), + Some(image_data_url), + Some(image_url_png), + Some(image_url_svg), + ) = ( + self.data.take(), + self.hosted_instructions_url.take(), + self.image_data_url.take(), + self.image_url_png.take(), + self.image_url_svg.take(), + ) + else { + return None; + }; Some(Self::Out { - data: self.data.take()?, - hosted_instructions_url: self.hosted_instructions_url.take()?, - image_data_url: self.image_data_url.take()?, - image_url_png: self.image_url_png.take()?, - image_url_svg: self.image_url_svg.take()?, + data, + hosted_instructions_url, + image_data_url, + image_url_png, + image_url_svg, }) } } @@ -110,13 +131,13 @@ const _: () = { let mut b = PaymentIntentNextActionWechatPayDisplayQrCodeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "data" => b.data = Some(FromValueOpt::from_value(v)?), + "data" => b.data = FromValueOpt::from_value(v), "hosted_instructions_url" => { - b.hosted_instructions_url = Some(FromValueOpt::from_value(v)?) + b.hosted_instructions_url = FromValueOpt::from_value(v) } - "image_data_url" => b.image_data_url = Some(FromValueOpt::from_value(v)?), - "image_url_png" => b.image_url_png = Some(FromValueOpt::from_value(v)?), - "image_url_svg" => b.image_url_svg = Some(FromValueOpt::from_value(v)?), + "image_data_url" => b.image_data_url = FromValueOpt::from_value(v), + "image_url_png" => b.image_url_png = FromValueOpt::from_value(v), + "image_url_svg" => b.image_url_svg = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_wechat_pay_redirect_to_android_app.rs b/generated/async-stripe-shared/src/payment_intent_next_action_wechat_pay_redirect_to_android_app.rs index 97822f2b2..43a3ce4c7 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_wechat_pay_redirect_to_android_app.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_wechat_pay_redirect_to_android_app.rs @@ -28,7 +28,12 @@ pub struct PaymentIntentNextActionWechatPayRedirectToAndroidAppBuilder { timestamp: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -88,15 +93,27 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - app_id: self.app_id.take()?, - nonce_str: self.nonce_str.take()?, - package: self.package.take()?, - partner_id: self.partner_id.take()?, - prepay_id: self.prepay_id.take()?, - sign: self.sign.take()?, - timestamp: self.timestamp.take()?, - }) + let ( + Some(app_id), + Some(nonce_str), + Some(package), + Some(partner_id), + Some(prepay_id), + Some(sign), + Some(timestamp), + ) = ( + self.app_id.take(), + self.nonce_str.take(), + self.package.take(), + self.partner_id.take(), + self.prepay_id.take(), + self.sign.take(), + self.timestamp.take(), + ) + else { + return None; + }; + Some(Self::Out { app_id, nonce_str, package, partner_id, prepay_id, sign, timestamp }) } } @@ -124,13 +141,13 @@ const _: () = { PaymentIntentNextActionWechatPayRedirectToAndroidAppBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "app_id" => b.app_id = Some(FromValueOpt::from_value(v)?), - "nonce_str" => b.nonce_str = Some(FromValueOpt::from_value(v)?), - "package" => b.package = Some(FromValueOpt::from_value(v)?), - "partner_id" => b.partner_id = Some(FromValueOpt::from_value(v)?), - "prepay_id" => b.prepay_id = Some(FromValueOpt::from_value(v)?), - "sign" => b.sign = Some(FromValueOpt::from_value(v)?), - "timestamp" => b.timestamp = Some(FromValueOpt::from_value(v)?), + "app_id" => b.app_id = FromValueOpt::from_value(v), + "nonce_str" => b.nonce_str = FromValueOpt::from_value(v), + "package" => b.package = FromValueOpt::from_value(v), + "partner_id" => b.partner_id = FromValueOpt::from_value(v), + "prepay_id" => b.prepay_id = FromValueOpt::from_value(v), + "sign" => b.sign = FromValueOpt::from_value(v), + "timestamp" => b.timestamp = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_next_action_wechat_pay_redirect_to_ios_app.rs b/generated/async-stripe-shared/src/payment_intent_next_action_wechat_pay_redirect_to_ios_app.rs index 41c3575fe..ef58c9db5 100644 --- a/generated/async-stripe-shared/src/payment_intent_next_action_wechat_pay_redirect_to_ios_app.rs +++ b/generated/async-stripe-shared/src/payment_intent_next_action_wechat_pay_redirect_to_ios_app.rs @@ -10,7 +10,12 @@ pub struct PaymentIntentNextActionWechatPayRedirectToIosAppBuilder { native_url: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { native_url: self.native_url.take()? }) + let (Some(native_url),) = (self.native_url.take(),) else { + return None; + }; + Some(Self::Out { native_url }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentIntentNextActionWechatPayRedirectToIosAppBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "native_url" => b.native_url = Some(FromValueOpt::from_value(v)?), + "native_url" => b.native_url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_payment_method_options.rs b/generated/async-stripe-shared/src/payment_intent_payment_method_options.rs index 0b4c9e4cb..f1f1a618d 100644 --- a/generated/async-stripe-shared/src/payment_intent_payment_method_options.rs +++ b/generated/async-stripe-shared/src/payment_intent_payment_method_options.rs @@ -81,7 +81,12 @@ pub struct PaymentIntentPaymentMethodOptionsBuilder { zip: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -200,44 +205,124 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(acss_debit), + Some(affirm), + Some(afterpay_clearpay), + Some(alipay), + Some(amazon_pay), + Some(au_becs_debit), + Some(bacs_debit), + Some(bancontact), + Some(blik), + Some(boleto), + Some(card), + Some(card_present), + Some(cashapp), + Some(customer_balance), + Some(eps), + Some(fpx), + Some(giropay), + Some(grabpay), + Some(ideal), + Some(interac_present), + Some(klarna), + Some(konbini), + Some(link), + Some(mobilepay), + Some(oxxo), + Some(p24), + Some(paynow), + Some(paypal), + Some(pix), + Some(promptpay), + Some(revolut_pay), + Some(sepa_debit), + Some(sofort), + Some(swish), + Some(us_bank_account), + Some(wechat_pay), + Some(zip), + ) = ( + self.acss_debit.take(), + self.affirm.take(), + self.afterpay_clearpay.take(), + self.alipay, + self.amazon_pay, + self.au_becs_debit, + self.bacs_debit, + self.bancontact, + self.blik, + self.boleto, + self.card.take(), + self.card_present, + self.cashapp, + self.customer_balance.take(), + self.eps, + self.fpx, + self.giropay, + self.grabpay, + self.ideal, + self.interac_present, + self.klarna.take(), + self.konbini.take(), + self.link.take(), + self.mobilepay, + self.oxxo, + self.p24, + self.paynow, + self.paypal.take(), + self.pix, + self.promptpay, + self.revolut_pay, + self.sepa_debit, + self.sofort, + self.swish.take(), + self.us_bank_account.take(), + self.wechat_pay.take(), + self.zip, + ) + else { + return None; + }; Some(Self::Out { - acss_debit: self.acss_debit.take()?, - affirm: self.affirm.take()?, - afterpay_clearpay: self.afterpay_clearpay.take()?, - alipay: self.alipay?, - amazon_pay: self.amazon_pay?, - au_becs_debit: self.au_becs_debit?, - bacs_debit: self.bacs_debit?, - bancontact: self.bancontact?, - blik: self.blik?, - boleto: self.boleto?, - card: self.card.take()?, - card_present: self.card_present?, - cashapp: self.cashapp?, - customer_balance: self.customer_balance.take()?, - eps: self.eps?, - fpx: self.fpx?, - giropay: self.giropay?, - grabpay: self.grabpay?, - ideal: self.ideal?, - interac_present: self.interac_present?, - klarna: self.klarna.take()?, - konbini: self.konbini.take()?, - link: self.link.take()?, - mobilepay: self.mobilepay?, - oxxo: self.oxxo?, - p24: self.p24?, - paynow: self.paynow?, - paypal: self.paypal.take()?, - pix: self.pix?, - promptpay: self.promptpay?, - revolut_pay: self.revolut_pay?, - sepa_debit: self.sepa_debit?, - sofort: self.sofort?, - swish: self.swish.take()?, - us_bank_account: self.us_bank_account.take()?, - wechat_pay: self.wechat_pay.take()?, - zip: self.zip?, + acss_debit, + affirm, + afterpay_clearpay, + alipay, + amazon_pay, + au_becs_debit, + bacs_debit, + bancontact, + blik, + boleto, + card, + card_present, + cashapp, + customer_balance, + eps, + fpx, + giropay, + grabpay, + ideal, + interac_present, + klarna, + konbini, + link, + mobilepay, + oxxo, + p24, + paynow, + paypal, + pix, + promptpay, + revolut_pay, + sepa_debit, + sofort, + swish, + us_bank_account, + wechat_pay, + zip, }) } } @@ -265,43 +350,43 @@ const _: () = { let mut b = PaymentIntentPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "acss_debit" => b.acss_debit = Some(FromValueOpt::from_value(v)?), - "affirm" => b.affirm = Some(FromValueOpt::from_value(v)?), - "afterpay_clearpay" => b.afterpay_clearpay = Some(FromValueOpt::from_value(v)?), - "alipay" => b.alipay = Some(FromValueOpt::from_value(v)?), - "amazon_pay" => b.amazon_pay = Some(FromValueOpt::from_value(v)?), - "au_becs_debit" => b.au_becs_debit = Some(FromValueOpt::from_value(v)?), - "bacs_debit" => b.bacs_debit = Some(FromValueOpt::from_value(v)?), - "bancontact" => b.bancontact = Some(FromValueOpt::from_value(v)?), - "blik" => b.blik = Some(FromValueOpt::from_value(v)?), - "boleto" => b.boleto = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "card_present" => b.card_present = Some(FromValueOpt::from_value(v)?), - "cashapp" => b.cashapp = Some(FromValueOpt::from_value(v)?), - "customer_balance" => b.customer_balance = Some(FromValueOpt::from_value(v)?), - "eps" => b.eps = Some(FromValueOpt::from_value(v)?), - "fpx" => b.fpx = Some(FromValueOpt::from_value(v)?), - "giropay" => b.giropay = Some(FromValueOpt::from_value(v)?), - "grabpay" => b.grabpay = Some(FromValueOpt::from_value(v)?), - "ideal" => b.ideal = Some(FromValueOpt::from_value(v)?), - "interac_present" => b.interac_present = Some(FromValueOpt::from_value(v)?), - "klarna" => b.klarna = Some(FromValueOpt::from_value(v)?), - "konbini" => b.konbini = Some(FromValueOpt::from_value(v)?), - "link" => b.link = Some(FromValueOpt::from_value(v)?), - "mobilepay" => b.mobilepay = Some(FromValueOpt::from_value(v)?), - "oxxo" => b.oxxo = Some(FromValueOpt::from_value(v)?), - "p24" => b.p24 = Some(FromValueOpt::from_value(v)?), - "paynow" => b.paynow = Some(FromValueOpt::from_value(v)?), - "paypal" => b.paypal = Some(FromValueOpt::from_value(v)?), - "pix" => b.pix = Some(FromValueOpt::from_value(v)?), - "promptpay" => b.promptpay = Some(FromValueOpt::from_value(v)?), - "revolut_pay" => b.revolut_pay = Some(FromValueOpt::from_value(v)?), - "sepa_debit" => b.sepa_debit = Some(FromValueOpt::from_value(v)?), - "sofort" => b.sofort = Some(FromValueOpt::from_value(v)?), - "swish" => b.swish = Some(FromValueOpt::from_value(v)?), - "us_bank_account" => b.us_bank_account = Some(FromValueOpt::from_value(v)?), - "wechat_pay" => b.wechat_pay = Some(FromValueOpt::from_value(v)?), - "zip" => b.zip = Some(FromValueOpt::from_value(v)?), + "acss_debit" => b.acss_debit = FromValueOpt::from_value(v), + "affirm" => b.affirm = FromValueOpt::from_value(v), + "afterpay_clearpay" => b.afterpay_clearpay = FromValueOpt::from_value(v), + "alipay" => b.alipay = FromValueOpt::from_value(v), + "amazon_pay" => b.amazon_pay = FromValueOpt::from_value(v), + "au_becs_debit" => b.au_becs_debit = FromValueOpt::from_value(v), + "bacs_debit" => b.bacs_debit = FromValueOpt::from_value(v), + "bancontact" => b.bancontact = FromValueOpt::from_value(v), + "blik" => b.blik = FromValueOpt::from_value(v), + "boleto" => b.boleto = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "card_present" => b.card_present = FromValueOpt::from_value(v), + "cashapp" => b.cashapp = FromValueOpt::from_value(v), + "customer_balance" => b.customer_balance = FromValueOpt::from_value(v), + "eps" => b.eps = FromValueOpt::from_value(v), + "fpx" => b.fpx = FromValueOpt::from_value(v), + "giropay" => b.giropay = FromValueOpt::from_value(v), + "grabpay" => b.grabpay = FromValueOpt::from_value(v), + "ideal" => b.ideal = FromValueOpt::from_value(v), + "interac_present" => b.interac_present = FromValueOpt::from_value(v), + "klarna" => b.klarna = FromValueOpt::from_value(v), + "konbini" => b.konbini = FromValueOpt::from_value(v), + "link" => b.link = FromValueOpt::from_value(v), + "mobilepay" => b.mobilepay = FromValueOpt::from_value(v), + "oxxo" => b.oxxo = FromValueOpt::from_value(v), + "p24" => b.p24 = FromValueOpt::from_value(v), + "paynow" => b.paynow = FromValueOpt::from_value(v), + "paypal" => b.paypal = FromValueOpt::from_value(v), + "pix" => b.pix = FromValueOpt::from_value(v), + "promptpay" => b.promptpay = FromValueOpt::from_value(v), + "revolut_pay" => b.revolut_pay = FromValueOpt::from_value(v), + "sepa_debit" => b.sepa_debit = FromValueOpt::from_value(v), + "sofort" => b.sofort = FromValueOpt::from_value(v), + "swish" => b.swish = FromValueOpt::from_value(v), + "us_bank_account" => b.us_bank_account = FromValueOpt::from_value(v), + "wechat_pay" => b.wechat_pay = FromValueOpt::from_value(v), + "zip" => b.zip = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_payment_method_options_acss_debit.rs b/generated/async-stripe-shared/src/payment_intent_payment_method_options_acss_debit.rs index 0526c097e..90098d8f8 100644 --- a/generated/async-stripe-shared/src/payment_intent_payment_method_options_acss_debit.rs +++ b/generated/async-stripe-shared/src/payment_intent_payment_method_options_acss_debit.rs @@ -23,7 +23,12 @@ pub struct PaymentIntentPaymentMethodOptionsAcssDebitBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -74,11 +79,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - mandate_options: self.mandate_options.take()?, - setup_future_usage: self.setup_future_usage?, - verification_method: self.verification_method?, - }) + let (Some(mandate_options), Some(setup_future_usage), Some(verification_method)) = + (self.mandate_options.take(), self.setup_future_usage, self.verification_method) + else { + return None; + }; + Some(Self::Out { mandate_options, setup_future_usage, verification_method }) } } @@ -105,13 +111,9 @@ const _: () = { let mut b = PaymentIntentPaymentMethodOptionsAcssDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "mandate_options" => b.mandate_options = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } - "verification_method" => { - b.verification_method = Some(FromValueOpt::from_value(v)?) - } + "mandate_options" => b.mandate_options = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), + "verification_method" => b.verification_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_payment_method_options_au_becs_debit.rs b/generated/async-stripe-shared/src/payment_intent_payment_method_options_au_becs_debit.rs index 147b09f0f..62ad167a9 100644 --- a/generated/async-stripe-shared/src/payment_intent_payment_method_options_au_becs_debit.rs +++ b/generated/async-stripe-shared/src/payment_intent_payment_method_options_au_becs_debit.rs @@ -16,7 +16,12 @@ pub struct PaymentIntentPaymentMethodOptionsAuBecsDebitBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -61,7 +66,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -88,9 +96,7 @@ const _: () = { let mut b = PaymentIntentPaymentMethodOptionsAuBecsDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_payment_method_options_blik.rs b/generated/async-stripe-shared/src/payment_intent_payment_method_options_blik.rs index bded86d50..d9d12aa2d 100644 --- a/generated/async-stripe-shared/src/payment_intent_payment_method_options_blik.rs +++ b/generated/async-stripe-shared/src/payment_intent_payment_method_options_blik.rs @@ -15,7 +15,12 @@ pub struct PaymentIntentPaymentMethodOptionsBlikBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = PaymentIntentPaymentMethodOptionsBlikBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_payment_method_options_card.rs b/generated/async-stripe-shared/src/payment_intent_payment_method_options_card.rs index aa0768019..0a1b14fc4 100644 --- a/generated/async-stripe-shared/src/payment_intent_payment_method_options_card.rs +++ b/generated/async-stripe-shared/src/payment_intent_payment_method_options_card.rs @@ -70,7 +70,12 @@ pub struct PaymentIntentPaymentMethodOptionsCardBuilder { statement_descriptor_suffix_kanji: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -151,20 +156,52 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(capture_method), + Some(installments), + Some(mandate_options), + Some(network), + Some(request_extended_authorization), + Some(request_incremental_authorization), + Some(request_multicapture), + Some(request_overcapture), + Some(request_three_d_secure), + Some(require_cvc_recollection), + Some(setup_future_usage), + Some(statement_descriptor_suffix_kana), + Some(statement_descriptor_suffix_kanji), + ) = ( + self.capture_method, + self.installments.take(), + self.mandate_options.take(), + self.network, + self.request_extended_authorization, + self.request_incremental_authorization, + self.request_multicapture, + self.request_overcapture, + self.request_three_d_secure, + self.require_cvc_recollection, + self.setup_future_usage, + self.statement_descriptor_suffix_kana.take(), + self.statement_descriptor_suffix_kanji.take(), + ) + else { + return None; + }; Some(Self::Out { - capture_method: self.capture_method?, - installments: self.installments.take()?, - mandate_options: self.mandate_options.take()?, - network: self.network?, - request_extended_authorization: self.request_extended_authorization?, - request_incremental_authorization: self.request_incremental_authorization?, - request_multicapture: self.request_multicapture?, - request_overcapture: self.request_overcapture?, - request_three_d_secure: self.request_three_d_secure?, - require_cvc_recollection: self.require_cvc_recollection?, - setup_future_usage: self.setup_future_usage?, - statement_descriptor_suffix_kana: self.statement_descriptor_suffix_kana.take()?, - statement_descriptor_suffix_kanji: self.statement_descriptor_suffix_kanji.take()?, + capture_method, + installments, + mandate_options, + network, + request_extended_authorization, + request_incremental_authorization, + request_multicapture, + request_overcapture, + request_three_d_secure, + require_cvc_recollection, + setup_future_usage, + statement_descriptor_suffix_kana, + statement_descriptor_suffix_kanji, }) } } @@ -192,36 +229,30 @@ const _: () = { let mut b = PaymentIntentPaymentMethodOptionsCardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "capture_method" => b.capture_method = Some(FromValueOpt::from_value(v)?), - "installments" => b.installments = Some(FromValueOpt::from_value(v)?), - "mandate_options" => b.mandate_options = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), + "capture_method" => b.capture_method = FromValueOpt::from_value(v), + "installments" => b.installments = FromValueOpt::from_value(v), + "mandate_options" => b.mandate_options = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), "request_extended_authorization" => { - b.request_extended_authorization = Some(FromValueOpt::from_value(v)?) + b.request_extended_authorization = FromValueOpt::from_value(v) } "request_incremental_authorization" => { - b.request_incremental_authorization = Some(FromValueOpt::from_value(v)?) - } - "request_multicapture" => { - b.request_multicapture = Some(FromValueOpt::from_value(v)?) - } - "request_overcapture" => { - b.request_overcapture = Some(FromValueOpt::from_value(v)?) + b.request_incremental_authorization = FromValueOpt::from_value(v) } + "request_multicapture" => b.request_multicapture = FromValueOpt::from_value(v), + "request_overcapture" => b.request_overcapture = FromValueOpt::from_value(v), "request_three_d_secure" => { - b.request_three_d_secure = Some(FromValueOpt::from_value(v)?) + b.request_three_d_secure = FromValueOpt::from_value(v) } "require_cvc_recollection" => { - b.require_cvc_recollection = Some(FromValueOpt::from_value(v)?) - } - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) + b.require_cvc_recollection = FromValueOpt::from_value(v) } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), "statement_descriptor_suffix_kana" => { - b.statement_descriptor_suffix_kana = Some(FromValueOpt::from_value(v)?) + b.statement_descriptor_suffix_kana = FromValueOpt::from_value(v) } "statement_descriptor_suffix_kanji" => { - b.statement_descriptor_suffix_kanji = Some(FromValueOpt::from_value(v)?) + b.statement_descriptor_suffix_kanji = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/payment_intent_payment_method_options_eps.rs b/generated/async-stripe-shared/src/payment_intent_payment_method_options_eps.rs index b1dbceac0..8e9f620af 100644 --- a/generated/async-stripe-shared/src/payment_intent_payment_method_options_eps.rs +++ b/generated/async-stripe-shared/src/payment_intent_payment_method_options_eps.rs @@ -15,7 +15,12 @@ pub struct PaymentIntentPaymentMethodOptionsEpsBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = PaymentIntentPaymentMethodOptionsEpsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_payment_method_options_link.rs b/generated/async-stripe-shared/src/payment_intent_payment_method_options_link.rs index 87c35bcf2..2d52adc7e 100644 --- a/generated/async-stripe-shared/src/payment_intent_payment_method_options_link.rs +++ b/generated/async-stripe-shared/src/payment_intent_payment_method_options_link.rs @@ -21,7 +21,12 @@ pub struct PaymentIntentPaymentMethodOptionsLinkBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,11 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - capture_method: self.capture_method?, - persistent_token: self.persistent_token.take()?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(capture_method), Some(persistent_token), Some(setup_future_usage)) = + (self.capture_method, self.persistent_token.take(), self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { capture_method, persistent_token, setup_future_usage }) } } @@ -103,11 +109,9 @@ const _: () = { let mut b = PaymentIntentPaymentMethodOptionsLinkBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "capture_method" => b.capture_method = Some(FromValueOpt::from_value(v)?), - "persistent_token" => b.persistent_token = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "capture_method" => b.capture_method = FromValueOpt::from_value(v), + "persistent_token" => b.persistent_token = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_payment_method_options_mandate_options_acss_debit.rs b/generated/async-stripe-shared/src/payment_intent_payment_method_options_mandate_options_acss_debit.rs index f9acac061..66479d711 100644 --- a/generated/async-stripe-shared/src/payment_intent_payment_method_options_mandate_options_acss_debit.rs +++ b/generated/async-stripe-shared/src/payment_intent_payment_method_options_mandate_options_acss_debit.rs @@ -24,7 +24,12 @@ pub struct PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -78,11 +83,25 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(custom_mandate_url), + Some(interval_description), + Some(payment_schedule), + Some(transaction_type), + ) = ( + self.custom_mandate_url.take(), + self.interval_description.take(), + self.payment_schedule, + self.transaction_type, + ) + else { + return None; + }; Some(Self::Out { - custom_mandate_url: self.custom_mandate_url.take()?, - interval_description: self.interval_description.take()?, - payment_schedule: self.payment_schedule?, - transaction_type: self.transaction_type?, + custom_mandate_url, + interval_description, + payment_schedule, + transaction_type, }) } } @@ -111,14 +130,10 @@ const _: () = { PaymentIntentPaymentMethodOptionsMandateOptionsAcssDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "custom_mandate_url" => { - b.custom_mandate_url = Some(FromValueOpt::from_value(v)?) - } - "interval_description" => { - b.interval_description = Some(FromValueOpt::from_value(v)?) - } - "payment_schedule" => b.payment_schedule = Some(FromValueOpt::from_value(v)?), - "transaction_type" => b.transaction_type = Some(FromValueOpt::from_value(v)?), + "custom_mandate_url" => b.custom_mandate_url = FromValueOpt::from_value(v), + "interval_description" => b.interval_description = FromValueOpt::from_value(v), + "payment_schedule" => b.payment_schedule = FromValueOpt::from_value(v), + "transaction_type" => b.transaction_type = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_payment_method_options_mandate_options_sepa_debit.rs b/generated/async-stripe-shared/src/payment_intent_payment_method_options_mandate_options_sepa_debit.rs index ee467d84b..c0b8e2c98 100644 --- a/generated/async-stripe-shared/src/payment_intent_payment_method_options_mandate_options_sepa_debit.rs +++ b/generated/async-stripe-shared/src/payment_intent_payment_method_options_mandate_options_sepa_debit.rs @@ -5,7 +5,12 @@ pub struct PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebit {} #[doc(hidden)] pub struct PaymentIntentPaymentMethodOptionsMandateOptionsSepaDebitBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -49,6 +54,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_intent_payment_method_options_mobilepay.rs b/generated/async-stripe-shared/src/payment_intent_payment_method_options_mobilepay.rs index f82284f68..8547119ad 100644 --- a/generated/async-stripe-shared/src/payment_intent_payment_method_options_mobilepay.rs +++ b/generated/async-stripe-shared/src/payment_intent_payment_method_options_mobilepay.rs @@ -18,7 +18,12 @@ pub struct PaymentIntentPaymentMethodOptionsMobilepayBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,10 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - capture_method: self.capture_method?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(capture_method), Some(setup_future_usage)) = + (self.capture_method, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { capture_method, setup_future_usage }) } } @@ -97,10 +104,8 @@ const _: () = { let mut b = PaymentIntentPaymentMethodOptionsMobilepayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "capture_method" => b.capture_method = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "capture_method" => b.capture_method = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_payment_method_options_sepa_debit.rs b/generated/async-stripe-shared/src/payment_intent_payment_method_options_sepa_debit.rs index 004f3c486..fae63f9a7 100644 --- a/generated/async-stripe-shared/src/payment_intent_payment_method_options_sepa_debit.rs +++ b/generated/async-stripe-shared/src/payment_intent_payment_method_options_sepa_debit.rs @@ -19,7 +19,12 @@ pub struct PaymentIntentPaymentMethodOptionsSepaDebitBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,10 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - mandate_options: self.mandate_options?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(mandate_options), Some(setup_future_usage)) = + (self.mandate_options, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { mandate_options, setup_future_usage }) } } @@ -98,10 +105,8 @@ const _: () = { let mut b = PaymentIntentPaymentMethodOptionsSepaDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "mandate_options" => b.mandate_options = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "mandate_options" => b.mandate_options = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_payment_method_options_swish.rs b/generated/async-stripe-shared/src/payment_intent_payment_method_options_swish.rs index 8900767be..b3c9a8ff9 100644 --- a/generated/async-stripe-shared/src/payment_intent_payment_method_options_swish.rs +++ b/generated/async-stripe-shared/src/payment_intent_payment_method_options_swish.rs @@ -18,7 +18,12 @@ pub struct PaymentIntentPaymentMethodOptionsSwishBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -64,10 +69,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - reference: self.reference.take()?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(reference), Some(setup_future_usage)) = + (self.reference.take(), self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { reference, setup_future_usage }) } } @@ -94,10 +101,8 @@ const _: () = { let mut b = PaymentIntentPaymentMethodOptionsSwishBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "reference" => b.reference = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_payment_method_options_us_bank_account.rs b/generated/async-stripe-shared/src/payment_intent_payment_method_options_us_bank_account.rs index fa2fd9c38..62898c24d 100644 --- a/generated/async-stripe-shared/src/payment_intent_payment_method_options_us_bank_account.rs +++ b/generated/async-stripe-shared/src/payment_intent_payment_method_options_us_bank_account.rs @@ -30,7 +30,12 @@ pub struct PaymentIntentPaymentMethodOptionsUsBankAccountBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -87,12 +92,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(financial_connections), + Some(mandate_options), + Some(preferred_settlement_speed), + Some(setup_future_usage), + Some(verification_method), + ) = ( + self.financial_connections.take(), + self.mandate_options, + self.preferred_settlement_speed, + self.setup_future_usage, + self.verification_method, + ) + else { + return None; + }; Some(Self::Out { - financial_connections: self.financial_connections.take()?, - mandate_options: self.mandate_options?, - preferred_settlement_speed: self.preferred_settlement_speed?, - setup_future_usage: self.setup_future_usage?, - verification_method: self.verification_method?, + financial_connections, + mandate_options, + preferred_settlement_speed, + setup_future_usage, + verification_method, }) } } @@ -121,18 +142,14 @@ const _: () = { for (k, v) in obj { match k.as_str() { "financial_connections" => { - b.financial_connections = Some(FromValueOpt::from_value(v)?) + b.financial_connections = FromValueOpt::from_value(v) } - "mandate_options" => b.mandate_options = Some(FromValueOpt::from_value(v)?), + "mandate_options" => b.mandate_options = FromValueOpt::from_value(v), "preferred_settlement_speed" => { - b.preferred_settlement_speed = Some(FromValueOpt::from_value(v)?) - } - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } - "verification_method" => { - b.verification_method = Some(FromValueOpt::from_value(v)?) + b.preferred_settlement_speed = FromValueOpt::from_value(v) } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), + "verification_method" => b.verification_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_processing.rs b/generated/async-stripe-shared/src/payment_intent_processing.rs index 2a8db74a5..cbff1d5a8 100644 --- a/generated/async-stripe-shared/src/payment_intent_processing.rs +++ b/generated/async-stripe-shared/src/payment_intent_processing.rs @@ -13,7 +13,12 @@ pub struct PaymentIntentProcessingBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { card: self.card?, type_: self.type_? }) + let (Some(card), Some(type_)) = (self.card, self.type_) else { + return None; + }; + Some(Self::Out { card, type_ }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = PaymentIntentProcessingBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "card" => b.card = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_intent_processing_customer_notification.rs b/generated/async-stripe-shared/src/payment_intent_processing_customer_notification.rs index f25bad196..ace43a400 100644 --- a/generated/async-stripe-shared/src/payment_intent_processing_customer_notification.rs +++ b/generated/async-stripe-shared/src/payment_intent_processing_customer_notification.rs @@ -14,7 +14,12 @@ pub struct PaymentIntentProcessingCustomerNotificationBuilder { completes_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -63,10 +68,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - approval_requested: self.approval_requested?, - completes_at: self.completes_at?, - }) + let (Some(approval_requested), Some(completes_at)) = + (self.approval_requested, self.completes_at) + else { + return None; + }; + Some(Self::Out { approval_requested, completes_at }) } } @@ -93,10 +100,8 @@ const _: () = { let mut b = PaymentIntentProcessingCustomerNotificationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "approval_requested" => { - b.approval_requested = Some(FromValueOpt::from_value(v)?) - } - "completes_at" => b.completes_at = Some(FromValueOpt::from_value(v)?), + "approval_requested" => b.approval_requested = FromValueOpt::from_value(v), + "completes_at" => b.completes_at = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_link.rs b/generated/async-stripe-shared/src/payment_link.rs index 547f556b2..c7fcc5a25 100644 --- a/generated/async-stripe-shared/src/payment_link.rs +++ b/generated/async-stripe-shared/src/payment_link.rs @@ -115,7 +115,12 @@ pub struct PaymentLinkBuilder { url: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -230,39 +235,109 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(active), + Some(after_completion), + Some(allow_promotion_codes), + Some(application), + Some(application_fee_amount), + Some(application_fee_percent), + Some(automatic_tax), + Some(billing_address_collection), + Some(consent_collection), + Some(currency), + Some(custom_fields), + Some(custom_text), + Some(customer_creation), + Some(id), + Some(inactive_message), + Some(invoice_creation), + Some(line_items), + Some(livemode), + Some(metadata), + Some(on_behalf_of), + Some(payment_intent_data), + Some(payment_method_collection), + Some(payment_method_types), + Some(phone_number_collection), + Some(restrictions), + Some(shipping_address_collection), + Some(shipping_options), + Some(submit_type), + Some(subscription_data), + Some(tax_id_collection), + Some(transfer_data), + Some(url), + ) = ( + self.active, + self.after_completion.take(), + self.allow_promotion_codes, + self.application.take(), + self.application_fee_amount, + self.application_fee_percent, + self.automatic_tax.take(), + self.billing_address_collection, + self.consent_collection, + self.currency, + self.custom_fields.take(), + self.custom_text.take(), + self.customer_creation, + self.id.take(), + self.inactive_message.take(), + self.invoice_creation.take(), + self.line_items.take(), + self.livemode, + self.metadata.take(), + self.on_behalf_of.take(), + self.payment_intent_data.take(), + self.payment_method_collection, + self.payment_method_types.take(), + self.phone_number_collection, + self.restrictions, + self.shipping_address_collection.take(), + self.shipping_options.take(), + self.submit_type, + self.subscription_data.take(), + self.tax_id_collection, + self.transfer_data.take(), + self.url.take(), + ) + else { + return None; + }; Some(Self::Out { - active: self.active?, - after_completion: self.after_completion.take()?, - allow_promotion_codes: self.allow_promotion_codes?, - application: self.application.take()?, - application_fee_amount: self.application_fee_amount?, - application_fee_percent: self.application_fee_percent?, - automatic_tax: self.automatic_tax.take()?, - billing_address_collection: self.billing_address_collection?, - consent_collection: self.consent_collection?, - currency: self.currency?, - custom_fields: self.custom_fields.take()?, - custom_text: self.custom_text.take()?, - customer_creation: self.customer_creation?, - id: self.id.take()?, - inactive_message: self.inactive_message.take()?, - invoice_creation: self.invoice_creation.take()?, - line_items: self.line_items.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - on_behalf_of: self.on_behalf_of.take()?, - payment_intent_data: self.payment_intent_data.take()?, - payment_method_collection: self.payment_method_collection?, - payment_method_types: self.payment_method_types.take()?, - phone_number_collection: self.phone_number_collection?, - restrictions: self.restrictions?, - shipping_address_collection: self.shipping_address_collection.take()?, - shipping_options: self.shipping_options.take()?, - submit_type: self.submit_type?, - subscription_data: self.subscription_data.take()?, - tax_id_collection: self.tax_id_collection?, - transfer_data: self.transfer_data.take()?, - url: self.url.take()?, + active, + after_completion, + allow_promotion_codes, + application, + application_fee_amount, + application_fee_percent, + automatic_tax, + billing_address_collection, + consent_collection, + currency, + custom_fields, + custom_text, + customer_creation, + id, + inactive_message, + invoice_creation, + line_items, + livemode, + metadata, + on_behalf_of, + payment_intent_data, + payment_method_collection, + payment_method_types, + phone_number_collection, + restrictions, + shipping_address_collection, + shipping_options, + submit_type, + subscription_data, + tax_id_collection, + transfer_data, + url, }) } } @@ -290,58 +365,52 @@ const _: () = { let mut b = PaymentLinkBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "active" => b.active = Some(FromValueOpt::from_value(v)?), - "after_completion" => b.after_completion = Some(FromValueOpt::from_value(v)?), + "active" => b.active = FromValueOpt::from_value(v), + "after_completion" => b.after_completion = FromValueOpt::from_value(v), "allow_promotion_codes" => { - b.allow_promotion_codes = Some(FromValueOpt::from_value(v)?) + b.allow_promotion_codes = FromValueOpt::from_value(v) } - "application" => b.application = Some(FromValueOpt::from_value(v)?), + "application" => b.application = FromValueOpt::from_value(v), "application_fee_amount" => { - b.application_fee_amount = Some(FromValueOpt::from_value(v)?) + b.application_fee_amount = FromValueOpt::from_value(v) } "application_fee_percent" => { - b.application_fee_percent = Some(FromValueOpt::from_value(v)?) + b.application_fee_percent = FromValueOpt::from_value(v) } - "automatic_tax" => b.automatic_tax = Some(FromValueOpt::from_value(v)?), + "automatic_tax" => b.automatic_tax = FromValueOpt::from_value(v), "billing_address_collection" => { - b.billing_address_collection = Some(FromValueOpt::from_value(v)?) - } - "consent_collection" => { - b.consent_collection = Some(FromValueOpt::from_value(v)?) - } - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "custom_fields" => b.custom_fields = Some(FromValueOpt::from_value(v)?), - "custom_text" => b.custom_text = Some(FromValueOpt::from_value(v)?), - "customer_creation" => b.customer_creation = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "inactive_message" => b.inactive_message = Some(FromValueOpt::from_value(v)?), - "invoice_creation" => b.invoice_creation = Some(FromValueOpt::from_value(v)?), - "line_items" => b.line_items = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "on_behalf_of" => b.on_behalf_of = Some(FromValueOpt::from_value(v)?), - "payment_intent_data" => { - b.payment_intent_data = Some(FromValueOpt::from_value(v)?) + b.billing_address_collection = FromValueOpt::from_value(v) } + "consent_collection" => b.consent_collection = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "custom_fields" => b.custom_fields = FromValueOpt::from_value(v), + "custom_text" => b.custom_text = FromValueOpt::from_value(v), + "customer_creation" => b.customer_creation = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "inactive_message" => b.inactive_message = FromValueOpt::from_value(v), + "invoice_creation" => b.invoice_creation = FromValueOpt::from_value(v), + "line_items" => b.line_items = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "on_behalf_of" => b.on_behalf_of = FromValueOpt::from_value(v), + "payment_intent_data" => b.payment_intent_data = FromValueOpt::from_value(v), "payment_method_collection" => { - b.payment_method_collection = Some(FromValueOpt::from_value(v)?) - } - "payment_method_types" => { - b.payment_method_types = Some(FromValueOpt::from_value(v)?) + b.payment_method_collection = FromValueOpt::from_value(v) } + "payment_method_types" => b.payment_method_types = FromValueOpt::from_value(v), "phone_number_collection" => { - b.phone_number_collection = Some(FromValueOpt::from_value(v)?) + b.phone_number_collection = FromValueOpt::from_value(v) } - "restrictions" => b.restrictions = Some(FromValueOpt::from_value(v)?), + "restrictions" => b.restrictions = FromValueOpt::from_value(v), "shipping_address_collection" => { - b.shipping_address_collection = Some(FromValueOpt::from_value(v)?) + b.shipping_address_collection = FromValueOpt::from_value(v) } - "shipping_options" => b.shipping_options = Some(FromValueOpt::from_value(v)?), - "submit_type" => b.submit_type = Some(FromValueOpt::from_value(v)?), - "subscription_data" => b.subscription_data = Some(FromValueOpt::from_value(v)?), - "tax_id_collection" => b.tax_id_collection = Some(FromValueOpt::from_value(v)?), - "transfer_data" => b.transfer_data = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "shipping_options" => b.shipping_options = FromValueOpt::from_value(v), + "submit_type" => b.submit_type = FromValueOpt::from_value(v), + "subscription_data" => b.subscription_data = FromValueOpt::from_value(v), + "tax_id_collection" => b.tax_id_collection = FromValueOpt::from_value(v), + "transfer_data" => b.transfer_data = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_after_completion.rs b/generated/async-stripe-shared/src/payment_links_resource_after_completion.rs index f50105c35..efbe7ec12 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_after_completion.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_after_completion.rs @@ -17,7 +17,12 @@ pub struct PaymentLinksResourceAfterCompletionBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - hosted_confirmation: self.hosted_confirmation.take()?, - redirect: self.redirect.take()?, - type_: self.type_?, - }) + let (Some(hosted_confirmation), Some(redirect), Some(type_)) = + (self.hosted_confirmation.take(), self.redirect.take(), self.type_) + else { + return None; + }; + Some(Self::Out { hosted_confirmation, redirect, type_ }) } } @@ -99,11 +105,9 @@ const _: () = { let mut b = PaymentLinksResourceAfterCompletionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "hosted_confirmation" => { - b.hosted_confirmation = Some(FromValueOpt::from_value(v)?) - } - "redirect" => b.redirect = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "hosted_confirmation" => b.hosted_confirmation = FromValueOpt::from_value(v), + "redirect" => b.redirect = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_automatic_tax.rs b/generated/async-stripe-shared/src/payment_links_resource_automatic_tax.rs index 007b12401..f73e439f4 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_automatic_tax.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_automatic_tax.rs @@ -15,7 +15,12 @@ pub struct PaymentLinksResourceAutomaticTaxBuilder { liability: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -61,7 +66,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled?, liability: self.liability.take()? }) + let (Some(enabled), Some(liability)) = (self.enabled, self.liability.take()) else { + return None; + }; + Some(Self::Out { enabled, liability }) } } @@ -88,8 +96,8 @@ const _: () = { let mut b = PaymentLinksResourceAutomaticTaxBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "liability" => b.liability = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "liability" => b.liability = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_completed_sessions.rs b/generated/async-stripe-shared/src/payment_links_resource_completed_sessions.rs index 3a3e2237e..94f8bae95 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_completed_sessions.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_completed_sessions.rs @@ -13,7 +13,12 @@ pub struct PaymentLinksResourceCompletedSessionsBuilder { limit: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { count: self.count?, limit: self.limit? }) + let (Some(count), Some(limit)) = (self.count, self.limit) else { + return None; + }; + Some(Self::Out { count, limit }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = PaymentLinksResourceCompletedSessionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "count" => b.count = Some(FromValueOpt::from_value(v)?), - "limit" => b.limit = Some(FromValueOpt::from_value(v)?), + "count" => b.count = FromValueOpt::from_value(v), + "limit" => b.limit = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_completion_behavior_confirmation_page.rs b/generated/async-stripe-shared/src/payment_links_resource_completion_behavior_confirmation_page.rs index ddbe54422..632487e55 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_completion_behavior_confirmation_page.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_completion_behavior_confirmation_page.rs @@ -10,7 +10,12 @@ pub struct PaymentLinksResourceCompletionBehaviorConfirmationPageBuilder { custom_message: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { custom_message: self.custom_message.take()? }) + let (Some(custom_message),) = (self.custom_message.take(),) else { + return None; + }; + Some(Self::Out { custom_message }) } } @@ -84,7 +92,7 @@ const _: () = { PaymentLinksResourceCompletionBehaviorConfirmationPageBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "custom_message" => b.custom_message = Some(FromValueOpt::from_value(v)?), + "custom_message" => b.custom_message = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_completion_behavior_redirect.rs b/generated/async-stripe-shared/src/payment_links_resource_completion_behavior_redirect.rs index 80ad6f37a..a215d8222 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_completion_behavior_redirect.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_completion_behavior_redirect.rs @@ -10,7 +10,12 @@ pub struct PaymentLinksResourceCompletionBehaviorRedirectBuilder { url: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { url: self.url.take()? }) + let (Some(url),) = (self.url.take(),) else { + return None; + }; + Some(Self::Out { url }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentLinksResourceCompletionBehaviorRedirectBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_consent_collection.rs b/generated/async-stripe-shared/src/payment_links_resource_consent_collection.rs index c284bc23c..2f985bbc5 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_consent_collection.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_consent_collection.rs @@ -19,7 +19,12 @@ pub struct PaymentLinksResourceConsentCollectionBuilder { terms_of_service: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,11 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - payment_method_reuse_agreement: self.payment_method_reuse_agreement?, - promotions: self.promotions?, - terms_of_service: self.terms_of_service?, - }) + let (Some(payment_method_reuse_agreement), Some(promotions), Some(terms_of_service)) = + (self.payment_method_reuse_agreement, self.promotions, self.terms_of_service) + else { + return None; + }; + Some(Self::Out { payment_method_reuse_agreement, promotions, terms_of_service }) } } @@ -104,10 +110,10 @@ const _: () = { for (k, v) in obj { match k.as_str() { "payment_method_reuse_agreement" => { - b.payment_method_reuse_agreement = Some(FromValueOpt::from_value(v)?) + b.payment_method_reuse_agreement = FromValueOpt::from_value(v) } - "promotions" => b.promotions = Some(FromValueOpt::from_value(v)?), - "terms_of_service" => b.terms_of_service = Some(FromValueOpt::from_value(v)?), + "promotions" => b.promotions = FromValueOpt::from_value(v), + "terms_of_service" => b.terms_of_service = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_custom_fields.rs b/generated/async-stripe-shared/src/payment_links_resource_custom_fields.rs index bea85fcf0..1b8cbe2a6 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_custom_fields.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_custom_fields.rs @@ -27,7 +27,12 @@ pub struct PaymentLinksResourceCustomFieldsBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -86,15 +91,27 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - dropdown: self.dropdown.take()?, - key: self.key.take()?, - label: self.label.take()?, - numeric: self.numeric?, - optional: self.optional?, - text: self.text?, - type_: self.type_?, - }) + let ( + Some(dropdown), + Some(key), + Some(label), + Some(numeric), + Some(optional), + Some(text), + Some(type_), + ) = ( + self.dropdown.take(), + self.key.take(), + self.label.take(), + self.numeric, + self.optional, + self.text, + self.type_, + ) + else { + return None; + }; + Some(Self::Out { dropdown, key, label, numeric, optional, text, type_ }) } } @@ -121,13 +138,13 @@ const _: () = { let mut b = PaymentLinksResourceCustomFieldsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "dropdown" => b.dropdown = Some(FromValueOpt::from_value(v)?), - "key" => b.key = Some(FromValueOpt::from_value(v)?), - "label" => b.label = Some(FromValueOpt::from_value(v)?), - "numeric" => b.numeric = Some(FromValueOpt::from_value(v)?), - "optional" => b.optional = Some(FromValueOpt::from_value(v)?), - "text" => b.text = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "dropdown" => b.dropdown = FromValueOpt::from_value(v), + "key" => b.key = FromValueOpt::from_value(v), + "label" => b.label = FromValueOpt::from_value(v), + "numeric" => b.numeric = FromValueOpt::from_value(v), + "optional" => b.optional = FromValueOpt::from_value(v), + "text" => b.text = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_custom_fields_dropdown.rs b/generated/async-stripe-shared/src/payment_links_resource_custom_fields_dropdown.rs index 4a7636c56..01ab6d402 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_custom_fields_dropdown.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_custom_fields_dropdown.rs @@ -10,7 +10,12 @@ pub struct PaymentLinksResourceCustomFieldsDropdownBuilder { options: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { options: self.options.take()? }) + let (Some(options),) = (self.options.take(),) else { + return None; + }; + Some(Self::Out { options }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentLinksResourceCustomFieldsDropdownBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "options" => b.options = Some(FromValueOpt::from_value(v)?), + "options" => b.options = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_custom_fields_dropdown_option.rs b/generated/async-stripe-shared/src/payment_links_resource_custom_fields_dropdown_option.rs index 80a5228ed..675a9f121 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_custom_fields_dropdown_option.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_custom_fields_dropdown_option.rs @@ -14,7 +14,12 @@ pub struct PaymentLinksResourceCustomFieldsDropdownOptionBuilder { value: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { label: self.label.take()?, value: self.value.take()? }) + let (Some(label), Some(value)) = (self.label.take(), self.value.take()) else { + return None; + }; + Some(Self::Out { label, value }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = PaymentLinksResourceCustomFieldsDropdownOptionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "label" => b.label = Some(FromValueOpt::from_value(v)?), - "value" => b.value = Some(FromValueOpt::from_value(v)?), + "label" => b.label = FromValueOpt::from_value(v), + "value" => b.value = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_custom_fields_label.rs b/generated/async-stripe-shared/src/payment_links_resource_custom_fields_label.rs index 46ac8db11..96f1e4126 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_custom_fields_label.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_custom_fields_label.rs @@ -14,7 +14,12 @@ pub struct PaymentLinksResourceCustomFieldsLabelBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { custom: self.custom.take()?, type_: self.type_? }) + let (Some(custom), Some(type_)) = (self.custom.take(), self.type_) else { + return None; + }; + Some(Self::Out { custom, type_ }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = PaymentLinksResourceCustomFieldsLabelBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "custom" => b.custom = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "custom" => b.custom = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_custom_fields_numeric.rs b/generated/async-stripe-shared/src/payment_links_resource_custom_fields_numeric.rs index f35ad864f..533ecd2a3 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_custom_fields_numeric.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_custom_fields_numeric.rs @@ -13,7 +13,12 @@ pub struct PaymentLinksResourceCustomFieldsNumericBuilder { minimum_length: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - maximum_length: self.maximum_length?, - minimum_length: self.minimum_length?, - }) + let (Some(maximum_length), Some(minimum_length)) = + (self.maximum_length, self.minimum_length) + else { + return None; + }; + Some(Self::Out { maximum_length, minimum_length }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = PaymentLinksResourceCustomFieldsNumericBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "maximum_length" => b.maximum_length = Some(FromValueOpt::from_value(v)?), - "minimum_length" => b.minimum_length = Some(FromValueOpt::from_value(v)?), + "maximum_length" => b.maximum_length = FromValueOpt::from_value(v), + "minimum_length" => b.minimum_length = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_custom_fields_text.rs b/generated/async-stripe-shared/src/payment_links_resource_custom_fields_text.rs index 2effebe67..12502138b 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_custom_fields_text.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_custom_fields_text.rs @@ -13,7 +13,12 @@ pub struct PaymentLinksResourceCustomFieldsTextBuilder { minimum_length: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - maximum_length: self.maximum_length?, - minimum_length: self.minimum_length?, - }) + let (Some(maximum_length), Some(minimum_length)) = + (self.maximum_length, self.minimum_length) + else { + return None; + }; + Some(Self::Out { maximum_length, minimum_length }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = PaymentLinksResourceCustomFieldsTextBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "maximum_length" => b.maximum_length = Some(FromValueOpt::from_value(v)?), - "minimum_length" => b.minimum_length = Some(FromValueOpt::from_value(v)?), + "maximum_length" => b.maximum_length = FromValueOpt::from_value(v), + "minimum_length" => b.minimum_length = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_custom_text.rs b/generated/async-stripe-shared/src/payment_links_resource_custom_text.rs index 7492c43dd..0c74c6a97 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_custom_text.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_custom_text.rs @@ -20,7 +20,12 @@ pub struct PaymentLinksResourceCustomTextBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -75,12 +80,21 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - after_submit: self.after_submit.take()?, - shipping_address: self.shipping_address.take()?, - submit: self.submit.take()?, - terms_of_service_acceptance: self.terms_of_service_acceptance.take()?, - }) + let ( + Some(after_submit), + Some(shipping_address), + Some(submit), + Some(terms_of_service_acceptance), + ) = ( + self.after_submit.take(), + self.shipping_address.take(), + self.submit.take(), + self.terms_of_service_acceptance.take(), + ) + else { + return None; + }; + Some(Self::Out { after_submit, shipping_address, submit, terms_of_service_acceptance }) } } @@ -107,11 +121,11 @@ const _: () = { let mut b = PaymentLinksResourceCustomTextBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "after_submit" => b.after_submit = Some(FromValueOpt::from_value(v)?), - "shipping_address" => b.shipping_address = Some(FromValueOpt::from_value(v)?), - "submit" => b.submit = Some(FromValueOpt::from_value(v)?), + "after_submit" => b.after_submit = FromValueOpt::from_value(v), + "shipping_address" => b.shipping_address = FromValueOpt::from_value(v), + "submit" => b.submit = FromValueOpt::from_value(v), "terms_of_service_acceptance" => { - b.terms_of_service_acceptance = Some(FromValueOpt::from_value(v)?) + b.terms_of_service_acceptance = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/payment_links_resource_custom_text_position.rs b/generated/async-stripe-shared/src/payment_links_resource_custom_text_position.rs index 3217a11e3..e2e042b91 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_custom_text_position.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_custom_text_position.rs @@ -10,7 +10,12 @@ pub struct PaymentLinksResourceCustomTextPositionBuilder { message: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { message: self.message.take()? }) + let (Some(message),) = (self.message.take(),) else { + return None; + }; + Some(Self::Out { message }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentLinksResourceCustomTextPositionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "message" => b.message = Some(FromValueOpt::from_value(v)?), + "message" => b.message = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_invoice_creation.rs b/generated/async-stripe-shared/src/payment_links_resource_invoice_creation.rs index 87653854d..60e0b9a80 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_invoice_creation.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_invoice_creation.rs @@ -13,7 +13,12 @@ pub struct PaymentLinksResourceInvoiceCreationBuilder { invoice_data: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled?, invoice_data: self.invoice_data.take()? }) + let (Some(enabled), Some(invoice_data)) = (self.enabled, self.invoice_data.take()) + else { + return None; + }; + Some(Self::Out { enabled, invoice_data }) } } @@ -86,8 +95,8 @@ const _: () = { let mut b = PaymentLinksResourceInvoiceCreationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "invoice_data" => b.invoice_data = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "invoice_data" => b.invoice_data = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_invoice_settings.rs b/generated/async-stripe-shared/src/payment_links_resource_invoice_settings.rs index f68e7c044..6041b67d2 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_invoice_settings.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_invoice_settings.rs @@ -30,7 +30,12 @@ pub struct PaymentLinksResourceInvoiceSettingsBuilder { rendering_options: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -89,14 +94,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_tax_ids), + Some(custom_fields), + Some(description), + Some(footer), + Some(issuer), + Some(metadata), + Some(rendering_options), + ) = ( + self.account_tax_ids.take(), + self.custom_fields.take(), + self.description.take(), + self.footer.take(), + self.issuer.take(), + self.metadata.take(), + self.rendering_options.take(), + ) + else { + return None; + }; Some(Self::Out { - account_tax_ids: self.account_tax_ids.take()?, - custom_fields: self.custom_fields.take()?, - description: self.description.take()?, - footer: self.footer.take()?, - issuer: self.issuer.take()?, - metadata: self.metadata.take()?, - rendering_options: self.rendering_options.take()?, + account_tax_ids, + custom_fields, + description, + footer, + issuer, + metadata, + rendering_options, }) } } @@ -124,13 +149,13 @@ const _: () = { let mut b = PaymentLinksResourceInvoiceSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_tax_ids" => b.account_tax_ids = Some(FromValueOpt::from_value(v)?), - "custom_fields" => b.custom_fields = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "footer" => b.footer = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "rendering_options" => b.rendering_options = Some(FromValueOpt::from_value(v)?), + "account_tax_ids" => b.account_tax_ids = FromValueOpt::from_value(v), + "custom_fields" => b.custom_fields = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "footer" => b.footer = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "rendering_options" => b.rendering_options = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_payment_intent_data.rs b/generated/async-stripe-shared/src/payment_links_resource_payment_intent_data.rs index 2ba44b665..95200aca2 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_payment_intent_data.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_payment_intent_data.rs @@ -32,7 +32,12 @@ pub struct PaymentLinksResourcePaymentIntentDataBuilder { transfer_group: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -93,14 +98,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(capture_method), + Some(description), + Some(metadata), + Some(setup_future_usage), + Some(statement_descriptor), + Some(statement_descriptor_suffix), + Some(transfer_group), + ) = ( + self.capture_method, + self.description.take(), + self.metadata.take(), + self.setup_future_usage, + self.statement_descriptor.take(), + self.statement_descriptor_suffix.take(), + self.transfer_group.take(), + ) + else { + return None; + }; Some(Self::Out { - capture_method: self.capture_method?, - description: self.description.take()?, - metadata: self.metadata.take()?, - setup_future_usage: self.setup_future_usage?, - statement_descriptor: self.statement_descriptor.take()?, - statement_descriptor_suffix: self.statement_descriptor_suffix.take()?, - transfer_group: self.transfer_group.take()?, + capture_method, + description, + metadata, + setup_future_usage, + statement_descriptor, + statement_descriptor_suffix, + transfer_group, }) } } @@ -128,19 +153,15 @@ const _: () = { let mut b = PaymentLinksResourcePaymentIntentDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "capture_method" => b.capture_method = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } + "capture_method" => b.capture_method = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), "statement_descriptor_suffix" => { - b.statement_descriptor_suffix = Some(FromValueOpt::from_value(v)?) + b.statement_descriptor_suffix = FromValueOpt::from_value(v) } - "transfer_group" => b.transfer_group = Some(FromValueOpt::from_value(v)?), + "transfer_group" => b.transfer_group = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_payment_method_reuse_agreement.rs b/generated/async-stripe-shared/src/payment_links_resource_payment_method_reuse_agreement.rs index c0d0307e3..f9a2235db 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_payment_method_reuse_agreement.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_payment_method_reuse_agreement.rs @@ -13,7 +13,12 @@ pub struct PaymentLinksResourcePaymentMethodReuseAgreementBuilder { position: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { position: self.position? }) + let (Some(position),) = (self.position,) else { + return None; + }; + Some(Self::Out { position }) } } @@ -85,7 +93,7 @@ const _: () = { let mut b = PaymentLinksResourcePaymentMethodReuseAgreementBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "position" => b.position = Some(FromValueOpt::from_value(v)?), + "position" => b.position = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_phone_number_collection.rs b/generated/async-stripe-shared/src/payment_links_resource_phone_number_collection.rs index f34be70d6..3d6e7a907 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_phone_number_collection.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_phone_number_collection.rs @@ -10,7 +10,12 @@ pub struct PaymentLinksResourcePhoneNumberCollectionBuilder { enabled: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled? }) + let (Some(enabled),) = (self.enabled,) else { + return None; + }; + Some(Self::Out { enabled }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentLinksResourcePhoneNumberCollectionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_restrictions.rs b/generated/async-stripe-shared/src/payment_links_resource_restrictions.rs index a8d615732..f002d3f65 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_restrictions.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_restrictions.rs @@ -9,7 +9,12 @@ pub struct PaymentLinksResourceRestrictionsBuilder { completed_sessions: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -54,7 +59,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { completed_sessions: self.completed_sessions? }) + let (Some(completed_sessions),) = (self.completed_sessions,) else { + return None; + }; + Some(Self::Out { completed_sessions }) } } @@ -81,9 +89,7 @@ const _: () = { let mut b = PaymentLinksResourceRestrictionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "completed_sessions" => { - b.completed_sessions = Some(FromValueOpt::from_value(v)?) - } + "completed_sessions" => b.completed_sessions = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_shipping_address_collection.rs b/generated/async-stripe-shared/src/payment_links_resource_shipping_address_collection.rs index 71b7c1e69..9a74fcdc8 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_shipping_address_collection.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_shipping_address_collection.rs @@ -11,7 +11,12 @@ pub struct PaymentLinksResourceShippingAddressCollectionBuilder { allowed_countries: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { allowed_countries: self.allowed_countries.take()? }) + let (Some(allowed_countries),) = (self.allowed_countries.take(),) else { + return None; + }; + Some(Self::Out { allowed_countries }) } } @@ -83,7 +91,7 @@ const _: () = { let mut b = PaymentLinksResourceShippingAddressCollectionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "allowed_countries" => b.allowed_countries = Some(FromValueOpt::from_value(v)?), + "allowed_countries" => b.allowed_countries = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_shipping_option.rs b/generated/async-stripe-shared/src/payment_links_resource_shipping_option.rs index 1494b62c6..e696789a8 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_shipping_option.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_shipping_option.rs @@ -13,7 +13,12 @@ pub struct PaymentLinksResourceShippingOptionBuilder { shipping_rate: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - shipping_amount: self.shipping_amount?, - shipping_rate: self.shipping_rate.take()?, - }) + let (Some(shipping_amount), Some(shipping_rate)) = + (self.shipping_amount, self.shipping_rate.take()) + else { + return None; + }; + Some(Self::Out { shipping_amount, shipping_rate }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = PaymentLinksResourceShippingOptionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "shipping_amount" => b.shipping_amount = Some(FromValueOpt::from_value(v)?), - "shipping_rate" => b.shipping_rate = Some(FromValueOpt::from_value(v)?), + "shipping_amount" => b.shipping_amount = FromValueOpt::from_value(v), + "shipping_rate" => b.shipping_rate = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_subscription_data.rs b/generated/async-stripe-shared/src/payment_links_resource_subscription_data.rs index 7a4d138b9..e6a40b06b 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_subscription_data.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_subscription_data.rs @@ -22,7 +22,12 @@ pub struct PaymentLinksResourceSubscriptionDataBuilder { trial_settings: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,12 +82,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(description), + Some(invoice_settings), + Some(metadata), + Some(trial_period_days), + Some(trial_settings), + ) = ( + self.description.take(), + self.invoice_settings.take(), + self.metadata.take(), + self.trial_period_days, + self.trial_settings, + ) + else { + return None; + }; Some(Self::Out { - description: self.description.take()?, - invoice_settings: self.invoice_settings.take()?, - metadata: self.metadata.take()?, - trial_period_days: self.trial_period_days?, - trial_settings: self.trial_settings?, + description, + invoice_settings, + metadata, + trial_period_days, + trial_settings, }) } } @@ -110,11 +131,11 @@ const _: () = { let mut b = PaymentLinksResourceSubscriptionDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "invoice_settings" => b.invoice_settings = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "trial_period_days" => b.trial_period_days = Some(FromValueOpt::from_value(v)?), - "trial_settings" => b.trial_settings = Some(FromValueOpt::from_value(v)?), + "description" => b.description = FromValueOpt::from_value(v), + "invoice_settings" => b.invoice_settings = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "trial_period_days" => b.trial_period_days = FromValueOpt::from_value(v), + "trial_settings" => b.trial_settings = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_subscription_data_invoice_settings.rs b/generated/async-stripe-shared/src/payment_links_resource_subscription_data_invoice_settings.rs index 9aada4393..f6f9049d2 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_subscription_data_invoice_settings.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_subscription_data_invoice_settings.rs @@ -9,7 +9,12 @@ pub struct PaymentLinksResourceSubscriptionDataInvoiceSettingsBuilder { issuer: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { issuer: self.issuer.take()? }) + let (Some(issuer),) = (self.issuer.take(),) else { + return None; + }; + Some(Self::Out { issuer }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentLinksResourceSubscriptionDataInvoiceSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), + "issuer" => b.issuer = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_tax_id_collection.rs b/generated/async-stripe-shared/src/payment_links_resource_tax_id_collection.rs index c3d9489c2..e9f057793 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_tax_id_collection.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_tax_id_collection.rs @@ -10,7 +10,12 @@ pub struct PaymentLinksResourceTaxIdCollectionBuilder { enabled: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled? }) + let (Some(enabled),) = (self.enabled,) else { + return None; + }; + Some(Self::Out { enabled }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentLinksResourceTaxIdCollectionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_links_resource_transfer_data.rs b/generated/async-stripe-shared/src/payment_links_resource_transfer_data.rs index 7694f4ed4..101332a6f 100644 --- a/generated/async-stripe-shared/src/payment_links_resource_transfer_data.rs +++ b/generated/async-stripe-shared/src/payment_links_resource_transfer_data.rs @@ -14,7 +14,12 @@ pub struct PaymentLinksResourceTransferDataBuilder { destination: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { amount: self.amount?, destination: self.destination.take()? }) + let (Some(amount), Some(destination)) = (self.amount, self.destination.take()) else { + return None; + }; + Some(Self::Out { amount, destination }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = PaymentLinksResourceTransferDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "destination" => b.destination = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "destination" => b.destination = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method.rs b/generated/async-stripe-shared/src/payment_method.rs index 2b90be427..7f7a089dc 100644 --- a/generated/async-stripe-shared/src/payment_method.rs +++ b/generated/async-stripe-shared/src/payment_method.rs @@ -114,7 +114,12 @@ pub struct PaymentMethodBuilder { zip: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -249,52 +254,148 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(acss_debit), + Some(affirm), + Some(afterpay_clearpay), + Some(alipay), + Some(amazon_pay), + Some(au_becs_debit), + Some(bacs_debit), + Some(bancontact), + Some(billing_details), + Some(blik), + Some(boleto), + Some(card), + Some(card_present), + Some(cashapp), + Some(created), + Some(customer), + Some(customer_balance), + Some(eps), + Some(fpx), + Some(giropay), + Some(grabpay), + Some(id), + Some(ideal), + Some(interac_present), + Some(klarna), + Some(konbini), + Some(link), + Some(livemode), + Some(metadata), + Some(mobilepay), + Some(oxxo), + Some(p24), + Some(paynow), + Some(paypal), + Some(pix), + Some(promptpay), + Some(radar_options), + Some(revolut_pay), + Some(sepa_debit), + Some(sofort), + Some(swish), + Some(type_), + Some(us_bank_account), + Some(wechat_pay), + Some(zip), + ) = ( + self.acss_debit.take(), + self.affirm, + self.afterpay_clearpay, + self.alipay, + self.amazon_pay, + self.au_becs_debit.take(), + self.bacs_debit.take(), + self.bancontact, + self.billing_details.take(), + self.blik, + self.boleto.take(), + self.card.take(), + self.card_present.take(), + self.cashapp.take(), + self.created, + self.customer.take(), + self.customer_balance, + self.eps, + self.fpx, + self.giropay, + self.grabpay, + self.id.take(), + self.ideal, + self.interac_present.take(), + self.klarna, + self.konbini, + self.link.take(), + self.livemode, + self.metadata.take(), + self.mobilepay, + self.oxxo, + self.p24, + self.paynow, + self.paypal.take(), + self.pix, + self.promptpay, + self.radar_options.take(), + self.revolut_pay, + self.sepa_debit.take(), + self.sofort.take(), + self.swish, + self.type_, + self.us_bank_account.take(), + self.wechat_pay, + self.zip, + ) + else { + return None; + }; Some(Self::Out { - acss_debit: self.acss_debit.take()?, - affirm: self.affirm?, - afterpay_clearpay: self.afterpay_clearpay?, - alipay: self.alipay?, - amazon_pay: self.amazon_pay?, - au_becs_debit: self.au_becs_debit.take()?, - bacs_debit: self.bacs_debit.take()?, - bancontact: self.bancontact?, - billing_details: self.billing_details.take()?, - blik: self.blik?, - boleto: self.boleto.take()?, - card: self.card.take()?, - card_present: self.card_present.take()?, - cashapp: self.cashapp.take()?, - created: self.created?, - customer: self.customer.take()?, - customer_balance: self.customer_balance?, - eps: self.eps?, - fpx: self.fpx?, - giropay: self.giropay?, - grabpay: self.grabpay?, - id: self.id.take()?, - ideal: self.ideal?, - interac_present: self.interac_present.take()?, - klarna: self.klarna?, - konbini: self.konbini?, - link: self.link.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - mobilepay: self.mobilepay?, - oxxo: self.oxxo?, - p24: self.p24?, - paynow: self.paynow?, - paypal: self.paypal.take()?, - pix: self.pix?, - promptpay: self.promptpay?, - radar_options: self.radar_options.take()?, - revolut_pay: self.revolut_pay?, - sepa_debit: self.sepa_debit.take()?, - sofort: self.sofort.take()?, - swish: self.swish?, - type_: self.type_?, - us_bank_account: self.us_bank_account.take()?, - wechat_pay: self.wechat_pay?, - zip: self.zip?, + acss_debit, + affirm, + afterpay_clearpay, + alipay, + amazon_pay, + au_becs_debit, + bacs_debit, + bancontact, + billing_details, + blik, + boleto, + card, + card_present, + cashapp, + created, + customer, + customer_balance, + eps, + fpx, + giropay, + grabpay, + id, + ideal, + interac_present, + klarna, + konbini, + link, + livemode, + metadata, + mobilepay, + oxxo, + p24, + paynow, + paypal, + pix, + promptpay, + radar_options, + revolut_pay, + sepa_debit, + sofort, + swish, + type_, + us_bank_account, + wechat_pay, + zip, }) } } @@ -322,51 +423,51 @@ const _: () = { let mut b = PaymentMethodBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "acss_debit" => b.acss_debit = Some(FromValueOpt::from_value(v)?), - "affirm" => b.affirm = Some(FromValueOpt::from_value(v)?), - "afterpay_clearpay" => b.afterpay_clearpay = Some(FromValueOpt::from_value(v)?), - "alipay" => b.alipay = Some(FromValueOpt::from_value(v)?), - "amazon_pay" => b.amazon_pay = Some(FromValueOpt::from_value(v)?), - "au_becs_debit" => b.au_becs_debit = Some(FromValueOpt::from_value(v)?), - "bacs_debit" => b.bacs_debit = Some(FromValueOpt::from_value(v)?), - "bancontact" => b.bancontact = Some(FromValueOpt::from_value(v)?), - "billing_details" => b.billing_details = Some(FromValueOpt::from_value(v)?), - "blik" => b.blik = Some(FromValueOpt::from_value(v)?), - "boleto" => b.boleto = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "card_present" => b.card_present = Some(FromValueOpt::from_value(v)?), - "cashapp" => b.cashapp = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "customer_balance" => b.customer_balance = Some(FromValueOpt::from_value(v)?), - "eps" => b.eps = Some(FromValueOpt::from_value(v)?), - "fpx" => b.fpx = Some(FromValueOpt::from_value(v)?), - "giropay" => b.giropay = Some(FromValueOpt::from_value(v)?), - "grabpay" => b.grabpay = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "ideal" => b.ideal = Some(FromValueOpt::from_value(v)?), - "interac_present" => b.interac_present = Some(FromValueOpt::from_value(v)?), - "klarna" => b.klarna = Some(FromValueOpt::from_value(v)?), - "konbini" => b.konbini = Some(FromValueOpt::from_value(v)?), - "link" => b.link = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "mobilepay" => b.mobilepay = Some(FromValueOpt::from_value(v)?), - "oxxo" => b.oxxo = Some(FromValueOpt::from_value(v)?), - "p24" => b.p24 = Some(FromValueOpt::from_value(v)?), - "paynow" => b.paynow = Some(FromValueOpt::from_value(v)?), - "paypal" => b.paypal = Some(FromValueOpt::from_value(v)?), - "pix" => b.pix = Some(FromValueOpt::from_value(v)?), - "promptpay" => b.promptpay = Some(FromValueOpt::from_value(v)?), - "radar_options" => b.radar_options = Some(FromValueOpt::from_value(v)?), - "revolut_pay" => b.revolut_pay = Some(FromValueOpt::from_value(v)?), - "sepa_debit" => b.sepa_debit = Some(FromValueOpt::from_value(v)?), - "sofort" => b.sofort = Some(FromValueOpt::from_value(v)?), - "swish" => b.swish = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "us_bank_account" => b.us_bank_account = Some(FromValueOpt::from_value(v)?), - "wechat_pay" => b.wechat_pay = Some(FromValueOpt::from_value(v)?), - "zip" => b.zip = Some(FromValueOpt::from_value(v)?), + "acss_debit" => b.acss_debit = FromValueOpt::from_value(v), + "affirm" => b.affirm = FromValueOpt::from_value(v), + "afterpay_clearpay" => b.afterpay_clearpay = FromValueOpt::from_value(v), + "alipay" => b.alipay = FromValueOpt::from_value(v), + "amazon_pay" => b.amazon_pay = FromValueOpt::from_value(v), + "au_becs_debit" => b.au_becs_debit = FromValueOpt::from_value(v), + "bacs_debit" => b.bacs_debit = FromValueOpt::from_value(v), + "bancontact" => b.bancontact = FromValueOpt::from_value(v), + "billing_details" => b.billing_details = FromValueOpt::from_value(v), + "blik" => b.blik = FromValueOpt::from_value(v), + "boleto" => b.boleto = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "card_present" => b.card_present = FromValueOpt::from_value(v), + "cashapp" => b.cashapp = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "customer_balance" => b.customer_balance = FromValueOpt::from_value(v), + "eps" => b.eps = FromValueOpt::from_value(v), + "fpx" => b.fpx = FromValueOpt::from_value(v), + "giropay" => b.giropay = FromValueOpt::from_value(v), + "grabpay" => b.grabpay = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "ideal" => b.ideal = FromValueOpt::from_value(v), + "interac_present" => b.interac_present = FromValueOpt::from_value(v), + "klarna" => b.klarna = FromValueOpt::from_value(v), + "konbini" => b.konbini = FromValueOpt::from_value(v), + "link" => b.link = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "mobilepay" => b.mobilepay = FromValueOpt::from_value(v), + "oxxo" => b.oxxo = FromValueOpt::from_value(v), + "p24" => b.p24 = FromValueOpt::from_value(v), + "paynow" => b.paynow = FromValueOpt::from_value(v), + "paypal" => b.paypal = FromValueOpt::from_value(v), + "pix" => b.pix = FromValueOpt::from_value(v), + "promptpay" => b.promptpay = FromValueOpt::from_value(v), + "radar_options" => b.radar_options = FromValueOpt::from_value(v), + "revolut_pay" => b.revolut_pay = FromValueOpt::from_value(v), + "sepa_debit" => b.sepa_debit = FromValueOpt::from_value(v), + "sofort" => b.sofort = FromValueOpt::from_value(v), + "swish" => b.swish = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "us_bank_account" => b.us_bank_account = FromValueOpt::from_value(v), + "wechat_pay" => b.wechat_pay = FromValueOpt::from_value(v), + "zip" => b.zip = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_acss_debit.rs b/generated/async-stripe-shared/src/payment_method_acss_debit.rs index eba4ceea8..84293dc3d 100644 --- a/generated/async-stripe-shared/src/payment_method_acss_debit.rs +++ b/generated/async-stripe-shared/src/payment_method_acss_debit.rs @@ -23,7 +23,12 @@ pub struct PaymentMethodAcssDebitBuilder { transit_number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -78,13 +83,23 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank_name: self.bank_name.take()?, - fingerprint: self.fingerprint.take()?, - institution_number: self.institution_number.take()?, - last4: self.last4.take()?, - transit_number: self.transit_number.take()?, - }) + let ( + Some(bank_name), + Some(fingerprint), + Some(institution_number), + Some(last4), + Some(transit_number), + ) = ( + self.bank_name.take(), + self.fingerprint.take(), + self.institution_number.take(), + self.last4.take(), + self.transit_number.take(), + ) + else { + return None; + }; + Some(Self::Out { bank_name, fingerprint, institution_number, last4, transit_number }) } } @@ -111,13 +126,11 @@ const _: () = { let mut b = PaymentMethodAcssDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "institution_number" => { - b.institution_number = Some(FromValueOpt::from_value(v)?) - } - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "transit_number" => b.transit_number = Some(FromValueOpt::from_value(v)?), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "institution_number" => b.institution_number = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "transit_number" => b.transit_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_affirm.rs b/generated/async-stripe-shared/src/payment_method_affirm.rs index a4401f971..e92385cc8 100644 --- a/generated/async-stripe-shared/src/payment_method_affirm.rs +++ b/generated/async-stripe-shared/src/payment_method_affirm.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodAffirm {} #[doc(hidden)] pub struct PaymentMethodAffirmBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_afterpay_clearpay.rs b/generated/async-stripe-shared/src/payment_method_afterpay_clearpay.rs index d8be8f5d8..85f2d5034 100644 --- a/generated/async-stripe-shared/src/payment_method_afterpay_clearpay.rs +++ b/generated/async-stripe-shared/src/payment_method_afterpay_clearpay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodAfterpayClearpay {} #[doc(hidden)] pub struct PaymentMethodAfterpayClearpayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_amazon_pay.rs b/generated/async-stripe-shared/src/payment_method_amazon_pay.rs index 7e7de3b8a..1fba6f8ce 100644 --- a/generated/async-stripe-shared/src/payment_method_amazon_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_amazon_pay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodAmazonPay {} #[doc(hidden)] pub struct PaymentMethodAmazonPayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_au_becs_debit.rs b/generated/async-stripe-shared/src/payment_method_au_becs_debit.rs index c03ece50f..c6ded617e 100644 --- a/generated/async-stripe-shared/src/payment_method_au_becs_debit.rs +++ b/generated/async-stripe-shared/src/payment_method_au_becs_debit.rs @@ -17,7 +17,12 @@ pub struct PaymentMethodAuBecsDebitBuilder { last4: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bsb_number: self.bsb_number.take()?, - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - }) + let (Some(bsb_number), Some(fingerprint), Some(last4)) = + (self.bsb_number.take(), self.fingerprint.take(), self.last4.take()) + else { + return None; + }; + Some(Self::Out { bsb_number, fingerprint, last4 }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = PaymentMethodAuBecsDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bsb_number" => b.bsb_number = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), + "bsb_number" => b.bsb_number = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_bacs_debit.rs b/generated/async-stripe-shared/src/payment_method_bacs_debit.rs index fd72e5fca..1c2b273fa 100644 --- a/generated/async-stripe-shared/src/payment_method_bacs_debit.rs +++ b/generated/async-stripe-shared/src/payment_method_bacs_debit.rs @@ -17,7 +17,12 @@ pub struct PaymentMethodBacsDebitBuilder { sort_code: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - sort_code: self.sort_code.take()?, - }) + let (Some(fingerprint), Some(last4), Some(sort_code)) = + (self.fingerprint.take(), self.last4.take(), self.sort_code.take()) + else { + return None; + }; + Some(Self::Out { fingerprint, last4, sort_code }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = PaymentMethodBacsDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "sort_code" => b.sort_code = Some(FromValueOpt::from_value(v)?), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "sort_code" => b.sort_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_bancontact.rs b/generated/async-stripe-shared/src/payment_method_bancontact.rs index ab586b671..b2a0031d0 100644 --- a/generated/async-stripe-shared/src/payment_method_bancontact.rs +++ b/generated/async-stripe-shared/src/payment_method_bancontact.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodBancontact {} #[doc(hidden)] pub struct PaymentMethodBancontactBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_blik.rs b/generated/async-stripe-shared/src/payment_method_blik.rs index ecf537ac7..0241d2e03 100644 --- a/generated/async-stripe-shared/src/payment_method_blik.rs +++ b/generated/async-stripe-shared/src/payment_method_blik.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodBlik {} #[doc(hidden)] pub struct PaymentMethodBlikBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_boleto.rs b/generated/async-stripe-shared/src/payment_method_boleto.rs index 92f5838ce..6e32c6a17 100644 --- a/generated/async-stripe-shared/src/payment_method_boleto.rs +++ b/generated/async-stripe-shared/src/payment_method_boleto.rs @@ -10,7 +10,12 @@ pub struct PaymentMethodBoletoBuilder { tax_id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { tax_id: self.tax_id.take()? }) + let (Some(tax_id),) = (self.tax_id.take(),) else { + return None; + }; + Some(Self::Out { tax_id }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentMethodBoletoBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "tax_id" => b.tax_id = Some(FromValueOpt::from_value(v)?), + "tax_id" => b.tax_id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_card.rs b/generated/async-stripe-shared/src/payment_method_card.rs index 9ad2b51b3..a182cd684 100644 --- a/generated/async-stripe-shared/src/payment_method_card.rs +++ b/generated/async-stripe-shared/src/payment_method_card.rs @@ -62,7 +62,12 @@ pub struct PaymentMethodCardBuilder { wallet: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -137,22 +142,58 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(brand), + Some(checks), + Some(country), + Some(description), + Some(display_brand), + Some(exp_month), + Some(exp_year), + Some(fingerprint), + Some(funding), + Some(iin), + Some(issuer), + Some(last4), + Some(networks), + Some(three_d_secure_usage), + Some(wallet), + ) = ( + self.brand.take(), + self.checks.take(), + self.country.take(), + self.description.take(), + self.display_brand.take(), + self.exp_month, + self.exp_year, + self.fingerprint.take(), + self.funding.take(), + self.iin.take(), + self.issuer.take(), + self.last4.take(), + self.networks.take(), + self.three_d_secure_usage, + self.wallet.take(), + ) + else { + return None; + }; Some(Self::Out { - brand: self.brand.take()?, - checks: self.checks.take()?, - country: self.country.take()?, - description: self.description.take()?, - display_brand: self.display_brand.take()?, - exp_month: self.exp_month?, - exp_year: self.exp_year?, - fingerprint: self.fingerprint.take()?, - funding: self.funding.take()?, - iin: self.iin.take()?, - issuer: self.issuer.take()?, - last4: self.last4.take()?, - networks: self.networks.take()?, - three_d_secure_usage: self.three_d_secure_usage?, - wallet: self.wallet.take()?, + brand, + checks, + country, + description, + display_brand, + exp_month, + exp_year, + fingerprint, + funding, + iin, + issuer, + last4, + networks, + three_d_secure_usage, + wallet, }) } } @@ -180,23 +221,21 @@ const _: () = { let mut b = PaymentMethodCardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "brand" => b.brand = Some(FromValueOpt::from_value(v)?), - "checks" => b.checks = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "display_brand" => b.display_brand = Some(FromValueOpt::from_value(v)?), - "exp_month" => b.exp_month = Some(FromValueOpt::from_value(v)?), - "exp_year" => b.exp_year = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "funding" => b.funding = Some(FromValueOpt::from_value(v)?), - "iin" => b.iin = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "networks" => b.networks = Some(FromValueOpt::from_value(v)?), - "three_d_secure_usage" => { - b.three_d_secure_usage = Some(FromValueOpt::from_value(v)?) - } - "wallet" => b.wallet = Some(FromValueOpt::from_value(v)?), + "brand" => b.brand = FromValueOpt::from_value(v), + "checks" => b.checks = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "display_brand" => b.display_brand = FromValueOpt::from_value(v), + "exp_month" => b.exp_month = FromValueOpt::from_value(v), + "exp_year" => b.exp_year = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "funding" => b.funding = FromValueOpt::from_value(v), + "iin" => b.iin = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "networks" => b.networks = FromValueOpt::from_value(v), + "three_d_secure_usage" => b.three_d_secure_usage = FromValueOpt::from_value(v), + "wallet" => b.wallet = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_card_checks.rs b/generated/async-stripe-shared/src/payment_method_card_checks.rs index f66c4a325..cb964a8da 100644 --- a/generated/async-stripe-shared/src/payment_method_card_checks.rs +++ b/generated/async-stripe-shared/src/payment_method_card_checks.rs @@ -16,7 +16,12 @@ pub struct PaymentMethodCardChecksBuilder { cvc_check: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,14 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - address_line1_check: self.address_line1_check.take()?, - address_postal_code_check: self.address_postal_code_check.take()?, - cvc_check: self.cvc_check.take()?, - }) + let (Some(address_line1_check), Some(address_postal_code_check), Some(cvc_check)) = ( + self.address_line1_check.take(), + self.address_postal_code_check.take(), + self.cvc_check.take(), + ) else { + return None; + }; + Some(Self::Out { address_line1_check, address_postal_code_check, cvc_check }) } } @@ -100,13 +108,11 @@ const _: () = { let mut b = PaymentMethodCardChecksBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address_line1_check" => { - b.address_line1_check = Some(FromValueOpt::from_value(v)?) - } + "address_line1_check" => b.address_line1_check = FromValueOpt::from_value(v), "address_postal_code_check" => { - b.address_postal_code_check = Some(FromValueOpt::from_value(v)?) + b.address_postal_code_check = FromValueOpt::from_value(v) } - "cvc_check" => b.cvc_check = Some(FromValueOpt::from_value(v)?), + "cvc_check" => b.cvc_check = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_card_present.rs b/generated/async-stripe-shared/src/payment_method_card_present.rs index f3396484c..51c03bfee 100644 --- a/generated/async-stripe-shared/src/payment_method_card_present.rs +++ b/generated/async-stripe-shared/src/payment_method_card_present.rs @@ -58,7 +58,12 @@ pub struct PaymentMethodCardPresentBuilder { read_method: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -129,20 +134,52 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(brand), + Some(cardholder_name), + Some(country), + Some(description), + Some(exp_month), + Some(exp_year), + Some(fingerprint), + Some(funding), + Some(iin), + Some(issuer), + Some(last4), + Some(networks), + Some(read_method), + ) = ( + self.brand.take(), + self.cardholder_name.take(), + self.country.take(), + self.description.take(), + self.exp_month, + self.exp_year, + self.fingerprint.take(), + self.funding.take(), + self.iin.take(), + self.issuer.take(), + self.last4.take(), + self.networks.take(), + self.read_method, + ) + else { + return None; + }; Some(Self::Out { - brand: self.brand.take()?, - cardholder_name: self.cardholder_name.take()?, - country: self.country.take()?, - description: self.description.take()?, - exp_month: self.exp_month?, - exp_year: self.exp_year?, - fingerprint: self.fingerprint.take()?, - funding: self.funding.take()?, - iin: self.iin.take()?, - issuer: self.issuer.take()?, - last4: self.last4.take()?, - networks: self.networks.take()?, - read_method: self.read_method?, + brand, + cardholder_name, + country, + description, + exp_month, + exp_year, + fingerprint, + funding, + iin, + issuer, + last4, + networks, + read_method, }) } } @@ -170,19 +207,19 @@ const _: () = { let mut b = PaymentMethodCardPresentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "brand" => b.brand = Some(FromValueOpt::from_value(v)?), - "cardholder_name" => b.cardholder_name = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "exp_month" => b.exp_month = Some(FromValueOpt::from_value(v)?), - "exp_year" => b.exp_year = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "funding" => b.funding = Some(FromValueOpt::from_value(v)?), - "iin" => b.iin = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "networks" => b.networks = Some(FromValueOpt::from_value(v)?), - "read_method" => b.read_method = Some(FromValueOpt::from_value(v)?), + "brand" => b.brand = FromValueOpt::from_value(v), + "cardholder_name" => b.cardholder_name = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "exp_month" => b.exp_month = FromValueOpt::from_value(v), + "exp_year" => b.exp_year = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "funding" => b.funding = FromValueOpt::from_value(v), + "iin" => b.iin = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "networks" => b.networks = FromValueOpt::from_value(v), + "read_method" => b.read_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_card_present_networks.rs b/generated/async-stripe-shared/src/payment_method_card_present_networks.rs index 6806f7133..bee580314 100644 --- a/generated/async-stripe-shared/src/payment_method_card_present_networks.rs +++ b/generated/async-stripe-shared/src/payment_method_card_present_networks.rs @@ -13,7 +13,12 @@ pub struct PaymentMethodCardPresentNetworksBuilder { preferred: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { available: self.available.take()?, preferred: self.preferred.take()? }) + let (Some(available), Some(preferred)) = (self.available.take(), self.preferred.take()) + else { + return None; + }; + Some(Self::Out { available, preferred }) } } @@ -86,8 +95,8 @@ const _: () = { let mut b = PaymentMethodCardPresentNetworksBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "available" => b.available = Some(FromValueOpt::from_value(v)?), - "preferred" => b.preferred = Some(FromValueOpt::from_value(v)?), + "available" => b.available = FromValueOpt::from_value(v), + "preferred" => b.preferred = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_card_wallet.rs b/generated/async-stripe-shared/src/payment_method_card_wallet.rs index 71a9cd403..3f6cb00ae 100644 --- a/generated/async-stripe-shared/src/payment_method_card_wallet.rs +++ b/generated/async-stripe-shared/src/payment_method_card_wallet.rs @@ -31,7 +31,12 @@ pub struct PaymentMethodCardWalletBuilder { visa_checkout: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -94,16 +99,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amex_express_checkout), + Some(apple_pay), + Some(dynamic_last4), + Some(google_pay), + Some(link), + Some(masterpass), + Some(samsung_pay), + Some(type_), + Some(visa_checkout), + ) = ( + self.amex_express_checkout, + self.apple_pay, + self.dynamic_last4.take(), + self.google_pay, + self.link, + self.masterpass.take(), + self.samsung_pay, + self.type_, + self.visa_checkout.take(), + ) + else { + return None; + }; Some(Self::Out { - amex_express_checkout: self.amex_express_checkout?, - apple_pay: self.apple_pay?, - dynamic_last4: self.dynamic_last4.take()?, - google_pay: self.google_pay?, - link: self.link?, - masterpass: self.masterpass.take()?, - samsung_pay: self.samsung_pay?, - type_: self.type_?, - visa_checkout: self.visa_checkout.take()?, + amex_express_checkout, + apple_pay, + dynamic_last4, + google_pay, + link, + masterpass, + samsung_pay, + type_, + visa_checkout, }) } } @@ -132,16 +161,16 @@ const _: () = { for (k, v) in obj { match k.as_str() { "amex_express_checkout" => { - b.amex_express_checkout = Some(FromValueOpt::from_value(v)?) + b.amex_express_checkout = FromValueOpt::from_value(v) } - "apple_pay" => b.apple_pay = Some(FromValueOpt::from_value(v)?), - "dynamic_last4" => b.dynamic_last4 = Some(FromValueOpt::from_value(v)?), - "google_pay" => b.google_pay = Some(FromValueOpt::from_value(v)?), - "link" => b.link = Some(FromValueOpt::from_value(v)?), - "masterpass" => b.masterpass = Some(FromValueOpt::from_value(v)?), - "samsung_pay" => b.samsung_pay = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "visa_checkout" => b.visa_checkout = Some(FromValueOpt::from_value(v)?), + "apple_pay" => b.apple_pay = FromValueOpt::from_value(v), + "dynamic_last4" => b.dynamic_last4 = FromValueOpt::from_value(v), + "google_pay" => b.google_pay = FromValueOpt::from_value(v), + "link" => b.link = FromValueOpt::from_value(v), + "masterpass" => b.masterpass = FromValueOpt::from_value(v), + "samsung_pay" => b.samsung_pay = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "visa_checkout" => b.visa_checkout = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_card_wallet_amex_express_checkout.rs b/generated/async-stripe-shared/src/payment_method_card_wallet_amex_express_checkout.rs index 7a110f6d1..1d3257d4a 100644 --- a/generated/async-stripe-shared/src/payment_method_card_wallet_amex_express_checkout.rs +++ b/generated/async-stripe-shared/src/payment_method_card_wallet_amex_express_checkout.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodCardWalletAmexExpressCheckout {} #[doc(hidden)] pub struct PaymentMethodCardWalletAmexExpressCheckoutBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_card_wallet_apple_pay.rs b/generated/async-stripe-shared/src/payment_method_card_wallet_apple_pay.rs index 8bacae120..e57612428 100644 --- a/generated/async-stripe-shared/src/payment_method_card_wallet_apple_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_card_wallet_apple_pay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodCardWalletApplePay {} #[doc(hidden)] pub struct PaymentMethodCardWalletApplePayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_card_wallet_google_pay.rs b/generated/async-stripe-shared/src/payment_method_card_wallet_google_pay.rs index cd819623d..bb77b3d53 100644 --- a/generated/async-stripe-shared/src/payment_method_card_wallet_google_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_card_wallet_google_pay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodCardWalletGooglePay {} #[doc(hidden)] pub struct PaymentMethodCardWalletGooglePayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_card_wallet_link.rs b/generated/async-stripe-shared/src/payment_method_card_wallet_link.rs index 2b40e2227..337e60225 100644 --- a/generated/async-stripe-shared/src/payment_method_card_wallet_link.rs +++ b/generated/async-stripe-shared/src/payment_method_card_wallet_link.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodCardWalletLink {} #[doc(hidden)] pub struct PaymentMethodCardWalletLinkBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_card_wallet_masterpass.rs b/generated/async-stripe-shared/src/payment_method_card_wallet_masterpass.rs index 35338db8f..fdb31ec35 100644 --- a/generated/async-stripe-shared/src/payment_method_card_wallet_masterpass.rs +++ b/generated/async-stripe-shared/src/payment_method_card_wallet_masterpass.rs @@ -27,7 +27,12 @@ pub struct PaymentMethodCardWalletMasterpassBuilder { shipping_address: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -80,12 +85,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - billing_address: self.billing_address.take()?, - email: self.email.take()?, - name: self.name.take()?, - shipping_address: self.shipping_address.take()?, - }) + let (Some(billing_address), Some(email), Some(name), Some(shipping_address)) = ( + self.billing_address.take(), + self.email.take(), + self.name.take(), + self.shipping_address.take(), + ) else { + return None; + }; + Some(Self::Out { billing_address, email, name, shipping_address }) } } @@ -112,10 +120,10 @@ const _: () = { let mut b = PaymentMethodCardWalletMasterpassBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "billing_address" => b.billing_address = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "shipping_address" => b.shipping_address = Some(FromValueOpt::from_value(v)?), + "billing_address" => b.billing_address = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "shipping_address" => b.shipping_address = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_card_wallet_samsung_pay.rs b/generated/async-stripe-shared/src/payment_method_card_wallet_samsung_pay.rs index ba4c4e946..cff6b948d 100644 --- a/generated/async-stripe-shared/src/payment_method_card_wallet_samsung_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_card_wallet_samsung_pay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodCardWalletSamsungPay {} #[doc(hidden)] pub struct PaymentMethodCardWalletSamsungPayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_card_wallet_visa_checkout.rs b/generated/async-stripe-shared/src/payment_method_card_wallet_visa_checkout.rs index f9c58cb8c..aaafd8525 100644 --- a/generated/async-stripe-shared/src/payment_method_card_wallet_visa_checkout.rs +++ b/generated/async-stripe-shared/src/payment_method_card_wallet_visa_checkout.rs @@ -27,7 +27,12 @@ pub struct PaymentMethodCardWalletVisaCheckoutBuilder { shipping_address: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -80,12 +85,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - billing_address: self.billing_address.take()?, - email: self.email.take()?, - name: self.name.take()?, - shipping_address: self.shipping_address.take()?, - }) + let (Some(billing_address), Some(email), Some(name), Some(shipping_address)) = ( + self.billing_address.take(), + self.email.take(), + self.name.take(), + self.shipping_address.take(), + ) else { + return None; + }; + Some(Self::Out { billing_address, email, name, shipping_address }) } } @@ -112,10 +120,10 @@ const _: () = { let mut b = PaymentMethodCardWalletVisaCheckoutBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "billing_address" => b.billing_address = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "shipping_address" => b.shipping_address = Some(FromValueOpt::from_value(v)?), + "billing_address" => b.billing_address = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "shipping_address" => b.shipping_address = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_cashapp.rs b/generated/async-stripe-shared/src/payment_method_cashapp.rs index 9fdba019d..83673be4f 100644 --- a/generated/async-stripe-shared/src/payment_method_cashapp.rs +++ b/generated/async-stripe-shared/src/payment_method_cashapp.rs @@ -13,7 +13,12 @@ pub struct PaymentMethodCashappBuilder { cashtag: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { buyer_id: self.buyer_id.take()?, cashtag: self.cashtag.take()? }) + let (Some(buyer_id), Some(cashtag)) = (self.buyer_id.take(), self.cashtag.take()) + else { + return None; + }; + Some(Self::Out { buyer_id, cashtag }) } } @@ -86,8 +95,8 @@ const _: () = { let mut b = PaymentMethodCashappBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "buyer_id" => b.buyer_id = Some(FromValueOpt::from_value(v)?), - "cashtag" => b.cashtag = Some(FromValueOpt::from_value(v)?), + "buyer_id" => b.buyer_id = FromValueOpt::from_value(v), + "cashtag" => b.cashtag = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_config_biz_payment_method_configuration_details.rs b/generated/async-stripe-shared/src/payment_method_config_biz_payment_method_configuration_details.rs index 4a6e3292e..b523e0515 100644 --- a/generated/async-stripe-shared/src/payment_method_config_biz_payment_method_configuration_details.rs +++ b/generated/async-stripe-shared/src/payment_method_config_biz_payment_method_configuration_details.rs @@ -13,7 +13,12 @@ pub struct PaymentMethodConfigBizPaymentMethodConfigurationDetailsBuilder { parent: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { id: self.id.take()?, parent: self.parent.take()? }) + let (Some(id), Some(parent)) = (self.id.take(), self.parent.take()) else { + return None; + }; + Some(Self::Out { id, parent }) } } @@ -88,8 +96,8 @@ const _: () = { PaymentMethodConfigBizPaymentMethodConfigurationDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "parent" => b.parent = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "parent" => b.parent = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_customer_balance.rs b/generated/async-stripe-shared/src/payment_method_customer_balance.rs index 9480a0f9a..1dcc8cecb 100644 --- a/generated/async-stripe-shared/src/payment_method_customer_balance.rs +++ b/generated/async-stripe-shared/src/payment_method_customer_balance.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodCustomerBalance {} #[doc(hidden)] pub struct PaymentMethodCustomerBalanceBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_details.rs b/generated/async-stripe-shared/src/payment_method_details.rs index 62196f6c3..d4866a03a 100644 --- a/generated/async-stripe-shared/src/payment_method_details.rs +++ b/generated/async-stripe-shared/src/payment_method_details.rs @@ -99,7 +99,12 @@ pub struct PaymentMethodDetailsBuilder { zip: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -232,51 +237,145 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(ach_credit_transfer), + Some(ach_debit), + Some(acss_debit), + Some(affirm), + Some(afterpay_clearpay), + Some(alipay), + Some(amazon_pay), + Some(au_becs_debit), + Some(bacs_debit), + Some(bancontact), + Some(blik), + Some(boleto), + Some(card), + Some(card_present), + Some(cashapp), + Some(customer_balance), + Some(eps), + Some(fpx), + Some(giropay), + Some(grabpay), + Some(ideal), + Some(interac_present), + Some(klarna), + Some(konbini), + Some(link), + Some(mobilepay), + Some(multibanco), + Some(oxxo), + Some(p24), + Some(paynow), + Some(paypal), + Some(pix), + Some(promptpay), + Some(revolut_pay), + Some(sepa_credit_transfer), + Some(sepa_debit), + Some(sofort), + Some(stripe_account), + Some(swish), + Some(type_), + Some(us_bank_account), + Some(wechat), + Some(wechat_pay), + Some(zip), + ) = ( + self.ach_credit_transfer.take(), + self.ach_debit.take(), + self.acss_debit.take(), + self.affirm, + self.afterpay_clearpay.take(), + self.alipay.take(), + self.amazon_pay, + self.au_becs_debit.take(), + self.bacs_debit.take(), + self.bancontact.take(), + self.blik, + self.boleto.take(), + self.card.take(), + self.card_present.take(), + self.cashapp.take(), + self.customer_balance, + self.eps.take(), + self.fpx.take(), + self.giropay.take(), + self.grabpay.take(), + self.ideal.take(), + self.interac_present.take(), + self.klarna.take(), + self.konbini, + self.link.take(), + self.mobilepay.take(), + self.multibanco.take(), + self.oxxo.take(), + self.p24.take(), + self.paynow.take(), + self.paypal.take(), + self.pix.take(), + self.promptpay.take(), + self.revolut_pay, + self.sepa_credit_transfer.take(), + self.sepa_debit.take(), + self.sofort.take(), + self.stripe_account, + self.swish.take(), + self.type_.take(), + self.us_bank_account.take(), + self.wechat, + self.wechat_pay.take(), + self.zip, + ) + else { + return None; + }; Some(Self::Out { - ach_credit_transfer: self.ach_credit_transfer.take()?, - ach_debit: self.ach_debit.take()?, - acss_debit: self.acss_debit.take()?, - affirm: self.affirm?, - afterpay_clearpay: self.afterpay_clearpay.take()?, - alipay: self.alipay.take()?, - amazon_pay: self.amazon_pay?, - au_becs_debit: self.au_becs_debit.take()?, - bacs_debit: self.bacs_debit.take()?, - bancontact: self.bancontact.take()?, - blik: self.blik?, - boleto: self.boleto.take()?, - card: self.card.take()?, - card_present: self.card_present.take()?, - cashapp: self.cashapp.take()?, - customer_balance: self.customer_balance?, - eps: self.eps.take()?, - fpx: self.fpx.take()?, - giropay: self.giropay.take()?, - grabpay: self.grabpay.take()?, - ideal: self.ideal.take()?, - interac_present: self.interac_present.take()?, - klarna: self.klarna.take()?, - konbini: self.konbini?, - link: self.link.take()?, - mobilepay: self.mobilepay.take()?, - multibanco: self.multibanco.take()?, - oxxo: self.oxxo.take()?, - p24: self.p24.take()?, - paynow: self.paynow.take()?, - paypal: self.paypal.take()?, - pix: self.pix.take()?, - promptpay: self.promptpay.take()?, - revolut_pay: self.revolut_pay?, - sepa_credit_transfer: self.sepa_credit_transfer.take()?, - sepa_debit: self.sepa_debit.take()?, - sofort: self.sofort.take()?, - stripe_account: self.stripe_account?, - swish: self.swish.take()?, - type_: self.type_.take()?, - us_bank_account: self.us_bank_account.take()?, - wechat: self.wechat?, - wechat_pay: self.wechat_pay.take()?, - zip: self.zip?, + ach_credit_transfer, + ach_debit, + acss_debit, + affirm, + afterpay_clearpay, + alipay, + amazon_pay, + au_becs_debit, + bacs_debit, + bancontact, + blik, + boleto, + card, + card_present, + cashapp, + customer_balance, + eps, + fpx, + giropay, + grabpay, + ideal, + interac_present, + klarna, + konbini, + link, + mobilepay, + multibanco, + oxxo, + p24, + paynow, + paypal, + pix, + promptpay, + revolut_pay, + sepa_credit_transfer, + sepa_debit, + sofort, + stripe_account, + swish, + type_, + us_bank_account, + wechat, + wechat_pay, + zip, }) } } @@ -304,54 +403,50 @@ const _: () = { let mut b = PaymentMethodDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "ach_credit_transfer" => { - b.ach_credit_transfer = Some(FromValueOpt::from_value(v)?) - } - "ach_debit" => b.ach_debit = Some(FromValueOpt::from_value(v)?), - "acss_debit" => b.acss_debit = Some(FromValueOpt::from_value(v)?), - "affirm" => b.affirm = Some(FromValueOpt::from_value(v)?), - "afterpay_clearpay" => b.afterpay_clearpay = Some(FromValueOpt::from_value(v)?), - "alipay" => b.alipay = Some(FromValueOpt::from_value(v)?), - "amazon_pay" => b.amazon_pay = Some(FromValueOpt::from_value(v)?), - "au_becs_debit" => b.au_becs_debit = Some(FromValueOpt::from_value(v)?), - "bacs_debit" => b.bacs_debit = Some(FromValueOpt::from_value(v)?), - "bancontact" => b.bancontact = Some(FromValueOpt::from_value(v)?), - "blik" => b.blik = Some(FromValueOpt::from_value(v)?), - "boleto" => b.boleto = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "card_present" => b.card_present = Some(FromValueOpt::from_value(v)?), - "cashapp" => b.cashapp = Some(FromValueOpt::from_value(v)?), - "customer_balance" => b.customer_balance = Some(FromValueOpt::from_value(v)?), - "eps" => b.eps = Some(FromValueOpt::from_value(v)?), - "fpx" => b.fpx = Some(FromValueOpt::from_value(v)?), - "giropay" => b.giropay = Some(FromValueOpt::from_value(v)?), - "grabpay" => b.grabpay = Some(FromValueOpt::from_value(v)?), - "ideal" => b.ideal = Some(FromValueOpt::from_value(v)?), - "interac_present" => b.interac_present = Some(FromValueOpt::from_value(v)?), - "klarna" => b.klarna = Some(FromValueOpt::from_value(v)?), - "konbini" => b.konbini = Some(FromValueOpt::from_value(v)?), - "link" => b.link = Some(FromValueOpt::from_value(v)?), - "mobilepay" => b.mobilepay = Some(FromValueOpt::from_value(v)?), - "multibanco" => b.multibanco = Some(FromValueOpt::from_value(v)?), - "oxxo" => b.oxxo = Some(FromValueOpt::from_value(v)?), - "p24" => b.p24 = Some(FromValueOpt::from_value(v)?), - "paynow" => b.paynow = Some(FromValueOpt::from_value(v)?), - "paypal" => b.paypal = Some(FromValueOpt::from_value(v)?), - "pix" => b.pix = Some(FromValueOpt::from_value(v)?), - "promptpay" => b.promptpay = Some(FromValueOpt::from_value(v)?), - "revolut_pay" => b.revolut_pay = Some(FromValueOpt::from_value(v)?), - "sepa_credit_transfer" => { - b.sepa_credit_transfer = Some(FromValueOpt::from_value(v)?) - } - "sepa_debit" => b.sepa_debit = Some(FromValueOpt::from_value(v)?), - "sofort" => b.sofort = Some(FromValueOpt::from_value(v)?), - "stripe_account" => b.stripe_account = Some(FromValueOpt::from_value(v)?), - "swish" => b.swish = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "us_bank_account" => b.us_bank_account = Some(FromValueOpt::from_value(v)?), - "wechat" => b.wechat = Some(FromValueOpt::from_value(v)?), - "wechat_pay" => b.wechat_pay = Some(FromValueOpt::from_value(v)?), - "zip" => b.zip = Some(FromValueOpt::from_value(v)?), + "ach_credit_transfer" => b.ach_credit_transfer = FromValueOpt::from_value(v), + "ach_debit" => b.ach_debit = FromValueOpt::from_value(v), + "acss_debit" => b.acss_debit = FromValueOpt::from_value(v), + "affirm" => b.affirm = FromValueOpt::from_value(v), + "afterpay_clearpay" => b.afterpay_clearpay = FromValueOpt::from_value(v), + "alipay" => b.alipay = FromValueOpt::from_value(v), + "amazon_pay" => b.amazon_pay = FromValueOpt::from_value(v), + "au_becs_debit" => b.au_becs_debit = FromValueOpt::from_value(v), + "bacs_debit" => b.bacs_debit = FromValueOpt::from_value(v), + "bancontact" => b.bancontact = FromValueOpt::from_value(v), + "blik" => b.blik = FromValueOpt::from_value(v), + "boleto" => b.boleto = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "card_present" => b.card_present = FromValueOpt::from_value(v), + "cashapp" => b.cashapp = FromValueOpt::from_value(v), + "customer_balance" => b.customer_balance = FromValueOpt::from_value(v), + "eps" => b.eps = FromValueOpt::from_value(v), + "fpx" => b.fpx = FromValueOpt::from_value(v), + "giropay" => b.giropay = FromValueOpt::from_value(v), + "grabpay" => b.grabpay = FromValueOpt::from_value(v), + "ideal" => b.ideal = FromValueOpt::from_value(v), + "interac_present" => b.interac_present = FromValueOpt::from_value(v), + "klarna" => b.klarna = FromValueOpt::from_value(v), + "konbini" => b.konbini = FromValueOpt::from_value(v), + "link" => b.link = FromValueOpt::from_value(v), + "mobilepay" => b.mobilepay = FromValueOpt::from_value(v), + "multibanco" => b.multibanco = FromValueOpt::from_value(v), + "oxxo" => b.oxxo = FromValueOpt::from_value(v), + "p24" => b.p24 = FromValueOpt::from_value(v), + "paynow" => b.paynow = FromValueOpt::from_value(v), + "paypal" => b.paypal = FromValueOpt::from_value(v), + "pix" => b.pix = FromValueOpt::from_value(v), + "promptpay" => b.promptpay = FromValueOpt::from_value(v), + "revolut_pay" => b.revolut_pay = FromValueOpt::from_value(v), + "sepa_credit_transfer" => b.sepa_credit_transfer = FromValueOpt::from_value(v), + "sepa_debit" => b.sepa_debit = FromValueOpt::from_value(v), + "sofort" => b.sofort = FromValueOpt::from_value(v), + "stripe_account" => b.stripe_account = FromValueOpt::from_value(v), + "swish" => b.swish = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "us_bank_account" => b.us_bank_account = FromValueOpt::from_value(v), + "wechat" => b.wechat = FromValueOpt::from_value(v), + "wechat_pay" => b.wechat_pay = FromValueOpt::from_value(v), + "zip" => b.zip = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_ach_credit_transfer.rs b/generated/async-stripe-shared/src/payment_method_details_ach_credit_transfer.rs index e83cc8e74..1346830a4 100644 --- a/generated/async-stripe-shared/src/payment_method_details_ach_credit_transfer.rs +++ b/generated/async-stripe-shared/src/payment_method_details_ach_credit_transfer.rs @@ -19,7 +19,12 @@ pub struct PaymentMethodDetailsAchCreditTransferBuilder { swift_code: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - account_number: self.account_number.take()?, - bank_name: self.bank_name.take()?, - routing_number: self.routing_number.take()?, - swift_code: self.swift_code.take()?, - }) + let (Some(account_number), Some(bank_name), Some(routing_number), Some(swift_code)) = ( + self.account_number.take(), + self.bank_name.take(), + self.routing_number.take(), + self.swift_code.take(), + ) else { + return None; + }; + Some(Self::Out { account_number, bank_name, routing_number, swift_code }) } } @@ -104,10 +112,10 @@ const _: () = { let mut b = PaymentMethodDetailsAchCreditTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_number" => b.account_number = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "routing_number" => b.routing_number = Some(FromValueOpt::from_value(v)?), - "swift_code" => b.swift_code = Some(FromValueOpt::from_value(v)?), + "account_number" => b.account_number = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "routing_number" => b.routing_number = FromValueOpt::from_value(v), + "swift_code" => b.swift_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_ach_debit.rs b/generated/async-stripe-shared/src/payment_method_details_ach_debit.rs index bc77ebbe2..26bfd2190 100644 --- a/generated/async-stripe-shared/src/payment_method_details_ach_debit.rs +++ b/generated/async-stripe-shared/src/payment_method_details_ach_debit.rs @@ -26,7 +26,12 @@ pub struct PaymentMethodDetailsAchDebitBuilder { routing_number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -83,13 +88,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_holder_type), + Some(bank_name), + Some(country), + Some(fingerprint), + Some(last4), + Some(routing_number), + ) = ( + self.account_holder_type, + self.bank_name.take(), + self.country.take(), + self.fingerprint.take(), + self.last4.take(), + self.routing_number.take(), + ) + else { + return None; + }; Some(Self::Out { - account_holder_type: self.account_holder_type?, - bank_name: self.bank_name.take()?, - country: self.country.take()?, - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - routing_number: self.routing_number.take()?, + account_holder_type, + bank_name, + country, + fingerprint, + last4, + routing_number, }) } } @@ -117,14 +140,12 @@ const _: () = { let mut b = PaymentMethodDetailsAchDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_holder_type" => { - b.account_holder_type = Some(FromValueOpt::from_value(v)?) - } - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "routing_number" => b.routing_number = Some(FromValueOpt::from_value(v)?), + "account_holder_type" => b.account_holder_type = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "routing_number" => b.routing_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_acss_debit.rs b/generated/async-stripe-shared/src/payment_method_details_acss_debit.rs index c3c0cc6f4..c378fafc0 100644 --- a/generated/async-stripe-shared/src/payment_method_details_acss_debit.rs +++ b/generated/async-stripe-shared/src/payment_method_details_acss_debit.rs @@ -26,7 +26,12 @@ pub struct PaymentMethodDetailsAcssDebitBuilder { transit_number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -83,13 +88,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(bank_name), + Some(fingerprint), + Some(institution_number), + Some(last4), + Some(mandate), + Some(transit_number), + ) = ( + self.bank_name.take(), + self.fingerprint.take(), + self.institution_number.take(), + self.last4.take(), + self.mandate.take(), + self.transit_number.take(), + ) + else { + return None; + }; Some(Self::Out { - bank_name: self.bank_name.take()?, - fingerprint: self.fingerprint.take()?, - institution_number: self.institution_number.take()?, - last4: self.last4.take()?, - mandate: self.mandate.take()?, - transit_number: self.transit_number.take()?, + bank_name, + fingerprint, + institution_number, + last4, + mandate, + transit_number, }) } } @@ -117,14 +140,12 @@ const _: () = { let mut b = PaymentMethodDetailsAcssDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "institution_number" => { - b.institution_number = Some(FromValueOpt::from_value(v)?) - } - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "mandate" => b.mandate = Some(FromValueOpt::from_value(v)?), - "transit_number" => b.transit_number = Some(FromValueOpt::from_value(v)?), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "institution_number" => b.institution_number = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "mandate" => b.mandate = FromValueOpt::from_value(v), + "transit_number" => b.transit_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_affirm.rs b/generated/async-stripe-shared/src/payment_method_details_affirm.rs index 95bfe087d..8b8dc1877 100644 --- a/generated/async-stripe-shared/src/payment_method_details_affirm.rs +++ b/generated/async-stripe-shared/src/payment_method_details_affirm.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodDetailsAffirm {} #[doc(hidden)] pub struct PaymentMethodDetailsAffirmBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_details_afterpay_clearpay.rs b/generated/async-stripe-shared/src/payment_method_details_afterpay_clearpay.rs index c1fb03239..2a73c5510 100644 --- a/generated/async-stripe-shared/src/payment_method_details_afterpay_clearpay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_afterpay_clearpay.rs @@ -13,7 +13,12 @@ pub struct PaymentMethodDetailsAfterpayClearpayBuilder { reference: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { order_id: self.order_id.take()?, reference: self.reference.take()? }) + let (Some(order_id), Some(reference)) = (self.order_id.take(), self.reference.take()) + else { + return None; + }; + Some(Self::Out { order_id, reference }) } } @@ -86,8 +95,8 @@ const _: () = { let mut b = PaymentMethodDetailsAfterpayClearpayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "order_id" => b.order_id = Some(FromValueOpt::from_value(v)?), - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), + "order_id" => b.order_id = FromValueOpt::from_value(v), + "reference" => b.reference = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_amazon_pay.rs b/generated/async-stripe-shared/src/payment_method_details_amazon_pay.rs index 9b70e7c10..a48c623d7 100644 --- a/generated/async-stripe-shared/src/payment_method_details_amazon_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_amazon_pay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodDetailsAmazonPay {} #[doc(hidden)] pub struct PaymentMethodDetailsAmazonPayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_details_au_becs_debit.rs b/generated/async-stripe-shared/src/payment_method_details_au_becs_debit.rs index ff1009355..6706a7b4d 100644 --- a/generated/async-stripe-shared/src/payment_method_details_au_becs_debit.rs +++ b/generated/async-stripe-shared/src/payment_method_details_au_becs_debit.rs @@ -20,7 +20,12 @@ pub struct PaymentMethodDetailsAuBecsDebitBuilder { mandate: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,12 +78,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bsb_number: self.bsb_number.take()?, - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - mandate: self.mandate.take()?, - }) + let (Some(bsb_number), Some(fingerprint), Some(last4), Some(mandate)) = ( + self.bsb_number.take(), + self.fingerprint.take(), + self.last4.take(), + self.mandate.take(), + ) else { + return None; + }; + Some(Self::Out { bsb_number, fingerprint, last4, mandate }) } } @@ -105,10 +113,10 @@ const _: () = { let mut b = PaymentMethodDetailsAuBecsDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bsb_number" => b.bsb_number = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "mandate" => b.mandate = Some(FromValueOpt::from_value(v)?), + "bsb_number" => b.bsb_number = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "mandate" => b.mandate = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_bacs_debit.rs b/generated/async-stripe-shared/src/payment_method_details_bacs_debit.rs index 71550fd7a..c1020b20d 100644 --- a/generated/async-stripe-shared/src/payment_method_details_bacs_debit.rs +++ b/generated/async-stripe-shared/src/payment_method_details_bacs_debit.rs @@ -20,7 +20,12 @@ pub struct PaymentMethodDetailsBacsDebitBuilder { sort_code: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,12 +78,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - mandate: self.mandate.take()?, - sort_code: self.sort_code.take()?, - }) + let (Some(fingerprint), Some(last4), Some(mandate), Some(sort_code)) = ( + self.fingerprint.take(), + self.last4.take(), + self.mandate.take(), + self.sort_code.take(), + ) else { + return None; + }; + Some(Self::Out { fingerprint, last4, mandate, sort_code }) } } @@ -105,10 +113,10 @@ const _: () = { let mut b = PaymentMethodDetailsBacsDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "mandate" => b.mandate = Some(FromValueOpt::from_value(v)?), - "sort_code" => b.sort_code = Some(FromValueOpt::from_value(v)?), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "mandate" => b.mandate = FromValueOpt::from_value(v), + "sort_code" => b.sort_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_bancontact.rs b/generated/async-stripe-shared/src/payment_method_details_bancontact.rs index 584707bea..dd788a802 100644 --- a/generated/async-stripe-shared/src/payment_method_details_bancontact.rs +++ b/generated/async-stripe-shared/src/payment_method_details_bancontact.rs @@ -33,7 +33,12 @@ pub struct PaymentMethodDetailsBancontactBuilder { verified_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -96,15 +101,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(bank_code), + Some(bank_name), + Some(bic), + Some(generated_sepa_debit), + Some(generated_sepa_debit_mandate), + Some(iban_last4), + Some(preferred_language), + Some(verified_name), + ) = ( + self.bank_code.take(), + self.bank_name.take(), + self.bic.take(), + self.generated_sepa_debit.take(), + self.generated_sepa_debit_mandate.take(), + self.iban_last4.take(), + self.preferred_language, + self.verified_name.take(), + ) + else { + return None; + }; Some(Self::Out { - bank_code: self.bank_code.take()?, - bank_name: self.bank_name.take()?, - bic: self.bic.take()?, - generated_sepa_debit: self.generated_sepa_debit.take()?, - generated_sepa_debit_mandate: self.generated_sepa_debit_mandate.take()?, - iban_last4: self.iban_last4.take()?, - preferred_language: self.preferred_language?, - verified_name: self.verified_name.take()?, + bank_code, + bank_name, + bic, + generated_sepa_debit, + generated_sepa_debit_mandate, + iban_last4, + preferred_language, + verified_name, }) } } @@ -132,20 +159,16 @@ const _: () = { let mut b = PaymentMethodDetailsBancontactBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_code" => b.bank_code = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), - "generated_sepa_debit" => { - b.generated_sepa_debit = Some(FromValueOpt::from_value(v)?) - } + "bank_code" => b.bank_code = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "bic" => b.bic = FromValueOpt::from_value(v), + "generated_sepa_debit" => b.generated_sepa_debit = FromValueOpt::from_value(v), "generated_sepa_debit_mandate" => { - b.generated_sepa_debit_mandate = Some(FromValueOpt::from_value(v)?) - } - "iban_last4" => b.iban_last4 = Some(FromValueOpt::from_value(v)?), - "preferred_language" => { - b.preferred_language = Some(FromValueOpt::from_value(v)?) + b.generated_sepa_debit_mandate = FromValueOpt::from_value(v) } - "verified_name" => b.verified_name = Some(FromValueOpt::from_value(v)?), + "iban_last4" => b.iban_last4 = FromValueOpt::from_value(v), + "preferred_language" => b.preferred_language = FromValueOpt::from_value(v), + "verified_name" => b.verified_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_blik.rs b/generated/async-stripe-shared/src/payment_method_details_blik.rs index 0397b4ad0..b6b2578b4 100644 --- a/generated/async-stripe-shared/src/payment_method_details_blik.rs +++ b/generated/async-stripe-shared/src/payment_method_details_blik.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodDetailsBlik {} #[doc(hidden)] pub struct PaymentMethodDetailsBlikBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_details_boleto.rs b/generated/async-stripe-shared/src/payment_method_details_boleto.rs index 94e6cca6a..4426ea021 100644 --- a/generated/async-stripe-shared/src/payment_method_details_boleto.rs +++ b/generated/async-stripe-shared/src/payment_method_details_boleto.rs @@ -10,7 +10,12 @@ pub struct PaymentMethodDetailsBoletoBuilder { tax_id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { tax_id: self.tax_id.take()? }) + let (Some(tax_id),) = (self.tax_id.take(),) else { + return None; + }; + Some(Self::Out { tax_id }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentMethodDetailsBoletoBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "tax_id" => b.tax_id = Some(FromValueOpt::from_value(v)?), + "tax_id" => b.tax_id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_card.rs b/generated/async-stripe-shared/src/payment_method_details_card.rs index d544c1777..8234084b0 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card.rs @@ -89,7 +89,12 @@ wallet: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -184,31 +189,85 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount_authorized), + Some(brand), + Some(capture_before), + Some(checks), + Some(country), + Some(description), + Some(exp_month), + Some(exp_year), + Some(extended_authorization), + Some(fingerprint), + Some(funding), + Some(iin), + Some(incremental_authorization), + Some(installments), + Some(issuer), + Some(last4), + Some(mandate), + Some(moto), + Some(multicapture), + Some(network), + Some(network_token), + Some(overcapture), + Some(three_d_secure), + Some(wallet), + ) = ( + self.amount_authorized, + self.brand.take(), + self.capture_before, + self.checks.take(), + self.country.take(), + self.description.take(), + self.exp_month, + self.exp_year, + self.extended_authorization, + self.fingerprint.take(), + self.funding.take(), + self.iin.take(), + self.incremental_authorization, + self.installments, + self.issuer.take(), + self.last4.take(), + self.mandate.take(), + self.moto, + self.multicapture, + self.network.take(), + self.network_token, + self.overcapture, + self.three_d_secure.take(), + self.wallet.take(), + ) + else { + return None; + }; Some(Self::Out { - amount_authorized: self.amount_authorized?, - brand: self.brand.take()?, - capture_before: self.capture_before?, - checks: self.checks.take()?, - country: self.country.take()?, - description: self.description.take()?, - exp_month: self.exp_month?, - exp_year: self.exp_year?, - extended_authorization: self.extended_authorization?, - fingerprint: self.fingerprint.take()?, - funding: self.funding.take()?, - iin: self.iin.take()?, - incremental_authorization: self.incremental_authorization?, - installments: self.installments?, - issuer: self.issuer.take()?, - last4: self.last4.take()?, - mandate: self.mandate.take()?, - moto: self.moto?, - multicapture: self.multicapture?, - network: self.network.take()?, - network_token: self.network_token?, - overcapture: self.overcapture?, - three_d_secure: self.three_d_secure.take()?, - wallet: self.wallet.take()?, + amount_authorized, + brand, + capture_before, + checks, + country, + description, + exp_month, + exp_year, + extended_authorization, + fingerprint, + funding, + iin, + incremental_authorization, + installments, + issuer, + last4, + mandate, + moto, + multicapture, + network, + network_token, + overcapture, + three_d_secure, + wallet, }) } } @@ -236,34 +295,34 @@ const _: () = { let mut b = PaymentMethodDetailsCardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_authorized" => b.amount_authorized = Some(FromValueOpt::from_value(v)?), - "brand" => b.brand = Some(FromValueOpt::from_value(v)?), - "capture_before" => b.capture_before = Some(FromValueOpt::from_value(v)?), - "checks" => b.checks = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "exp_month" => b.exp_month = Some(FromValueOpt::from_value(v)?), - "exp_year" => b.exp_year = Some(FromValueOpt::from_value(v)?), + "amount_authorized" => b.amount_authorized = FromValueOpt::from_value(v), + "brand" => b.brand = FromValueOpt::from_value(v), + "capture_before" => b.capture_before = FromValueOpt::from_value(v), + "checks" => b.checks = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "exp_month" => b.exp_month = FromValueOpt::from_value(v), + "exp_year" => b.exp_year = FromValueOpt::from_value(v), "extended_authorization" => { - b.extended_authorization = Some(FromValueOpt::from_value(v)?) + b.extended_authorization = FromValueOpt::from_value(v) } - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "funding" => b.funding = Some(FromValueOpt::from_value(v)?), - "iin" => b.iin = Some(FromValueOpt::from_value(v)?), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "funding" => b.funding = FromValueOpt::from_value(v), + "iin" => b.iin = FromValueOpt::from_value(v), "incremental_authorization" => { - b.incremental_authorization = Some(FromValueOpt::from_value(v)?) + b.incremental_authorization = FromValueOpt::from_value(v) } - "installments" => b.installments = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "mandate" => b.mandate = Some(FromValueOpt::from_value(v)?), - "moto" => b.moto = Some(FromValueOpt::from_value(v)?), - "multicapture" => b.multicapture = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), - "network_token" => b.network_token = Some(FromValueOpt::from_value(v)?), - "overcapture" => b.overcapture = Some(FromValueOpt::from_value(v)?), - "three_d_secure" => b.three_d_secure = Some(FromValueOpt::from_value(v)?), - "wallet" => b.wallet = Some(FromValueOpt::from_value(v)?), + "installments" => b.installments = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "mandate" => b.mandate = FromValueOpt::from_value(v), + "moto" => b.moto = FromValueOpt::from_value(v), + "multicapture" => b.multicapture = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), + "network_token" => b.network_token = FromValueOpt::from_value(v), + "overcapture" => b.overcapture = FromValueOpt::from_value(v), + "three_d_secure" => b.three_d_secure = FromValueOpt::from_value(v), + "wallet" => b.wallet = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_card_checks.rs b/generated/async-stripe-shared/src/payment_method_details_card_checks.rs index 6814f47e0..cfdbc93a9 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_checks.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_checks.rs @@ -16,7 +16,12 @@ pub struct PaymentMethodDetailsCardChecksBuilder { cvc_check: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,14 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - address_line1_check: self.address_line1_check.take()?, - address_postal_code_check: self.address_postal_code_check.take()?, - cvc_check: self.cvc_check.take()?, - }) + let (Some(address_line1_check), Some(address_postal_code_check), Some(cvc_check)) = ( + self.address_line1_check.take(), + self.address_postal_code_check.take(), + self.cvc_check.take(), + ) else { + return None; + }; + Some(Self::Out { address_line1_check, address_postal_code_check, cvc_check }) } } @@ -100,13 +108,11 @@ const _: () = { let mut b = PaymentMethodDetailsCardChecksBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address_line1_check" => { - b.address_line1_check = Some(FromValueOpt::from_value(v)?) - } + "address_line1_check" => b.address_line1_check = FromValueOpt::from_value(v), "address_postal_code_check" => { - b.address_postal_code_check = Some(FromValueOpt::from_value(v)?) + b.address_postal_code_check = FromValueOpt::from_value(v) } - "cvc_check" => b.cvc_check = Some(FromValueOpt::from_value(v)?), + "cvc_check" => b.cvc_check = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_card_installments.rs b/generated/async-stripe-shared/src/payment_method_details_card_installments.rs index d619d4d76..3588bd4dc 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_installments.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_installments.rs @@ -10,7 +10,12 @@ pub struct PaymentMethodDetailsCardInstallmentsBuilder { plan: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { plan: self.plan? }) + let (Some(plan),) = (self.plan,) else { + return None; + }; + Some(Self::Out { plan }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentMethodDetailsCardInstallmentsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "plan" => b.plan = Some(FromValueOpt::from_value(v)?), + "plan" => b.plan = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_card_installments_plan.rs b/generated/async-stripe-shared/src/payment_method_details_card_installments_plan.rs index 213b2c418..f2bf2a48e 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_installments_plan.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_installments_plan.rs @@ -18,7 +18,12 @@ pub struct PaymentMethodDetailsCardInstallmentsPlanBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,7 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { count: self.count?, interval: self.interval?, type_: self.type_? }) + let (Some(count), Some(interval), Some(type_)) = + (self.count, self.interval, self.type_) + else { + return None; + }; + Some(Self::Out { count, interval, type_ }) } } @@ -96,9 +106,9 @@ const _: () = { let mut b = PaymentMethodDetailsCardInstallmentsPlanBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "count" => b.count = Some(FromValueOpt::from_value(v)?), - "interval" => b.interval = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "count" => b.count = FromValueOpt::from_value(v), + "interval" => b.interval = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_card_network_token.rs b/generated/async-stripe-shared/src/payment_method_details_card_network_token.rs index 882c7cc49..740c9ef11 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_network_token.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_network_token.rs @@ -10,7 +10,12 @@ pub struct PaymentMethodDetailsCardNetworkTokenBuilder { used: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { used: self.used? }) + let (Some(used),) = (self.used,) else { + return None; + }; + Some(Self::Out { used }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentMethodDetailsCardNetworkTokenBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "used" => b.used = Some(FromValueOpt::from_value(v)?), + "used" => b.used = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_card_present.rs b/generated/async-stripe-shared/src/payment_method_details_card_present.rs index 34d370e00..dc7a97f11 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_present.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_present.rs @@ -85,7 +85,12 @@ pub struct PaymentMethodDetailsCardPresentBuilder { receipt: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -174,28 +179,76 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount_authorized), + Some(brand), + Some(capture_before), + Some(cardholder_name), + Some(country), + Some(description), + Some(emv_auth_data), + Some(exp_month), + Some(exp_year), + Some(fingerprint), + Some(funding), + Some(generated_card), + Some(iin), + Some(incremental_authorization_supported), + Some(issuer), + Some(last4), + Some(network), + Some(offline), + Some(overcapture_supported), + Some(read_method), + Some(receipt), + ) = ( + self.amount_authorized, + self.brand.take(), + self.capture_before, + self.cardholder_name.take(), + self.country.take(), + self.description.take(), + self.emv_auth_data.take(), + self.exp_month, + self.exp_year, + self.fingerprint.take(), + self.funding.take(), + self.generated_card.take(), + self.iin.take(), + self.incremental_authorization_supported, + self.issuer.take(), + self.last4.take(), + self.network.take(), + self.offline, + self.overcapture_supported, + self.read_method, + self.receipt.take(), + ) + else { + return None; + }; Some(Self::Out { - amount_authorized: self.amount_authorized?, - brand: self.brand.take()?, - capture_before: self.capture_before?, - cardholder_name: self.cardholder_name.take()?, - country: self.country.take()?, - description: self.description.take()?, - emv_auth_data: self.emv_auth_data.take()?, - exp_month: self.exp_month?, - exp_year: self.exp_year?, - fingerprint: self.fingerprint.take()?, - funding: self.funding.take()?, - generated_card: self.generated_card.take()?, - iin: self.iin.take()?, - incremental_authorization_supported: self.incremental_authorization_supported?, - issuer: self.issuer.take()?, - last4: self.last4.take()?, - network: self.network.take()?, - offline: self.offline?, - overcapture_supported: self.overcapture_supported?, - read_method: self.read_method?, - receipt: self.receipt.take()?, + amount_authorized, + brand, + capture_before, + cardholder_name, + country, + description, + emv_auth_data, + exp_month, + exp_year, + fingerprint, + funding, + generated_card, + iin, + incremental_authorization_supported, + issuer, + last4, + network, + offline, + overcapture_supported, + read_method, + receipt, }) } } @@ -223,31 +276,31 @@ const _: () = { let mut b = PaymentMethodDetailsCardPresentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_authorized" => b.amount_authorized = Some(FromValueOpt::from_value(v)?), - "brand" => b.brand = Some(FromValueOpt::from_value(v)?), - "capture_before" => b.capture_before = Some(FromValueOpt::from_value(v)?), - "cardholder_name" => b.cardholder_name = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "emv_auth_data" => b.emv_auth_data = Some(FromValueOpt::from_value(v)?), - "exp_month" => b.exp_month = Some(FromValueOpt::from_value(v)?), - "exp_year" => b.exp_year = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "funding" => b.funding = Some(FromValueOpt::from_value(v)?), - "generated_card" => b.generated_card = Some(FromValueOpt::from_value(v)?), - "iin" => b.iin = Some(FromValueOpt::from_value(v)?), + "amount_authorized" => b.amount_authorized = FromValueOpt::from_value(v), + "brand" => b.brand = FromValueOpt::from_value(v), + "capture_before" => b.capture_before = FromValueOpt::from_value(v), + "cardholder_name" => b.cardholder_name = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "emv_auth_data" => b.emv_auth_data = FromValueOpt::from_value(v), + "exp_month" => b.exp_month = FromValueOpt::from_value(v), + "exp_year" => b.exp_year = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "funding" => b.funding = FromValueOpt::from_value(v), + "generated_card" => b.generated_card = FromValueOpt::from_value(v), + "iin" => b.iin = FromValueOpt::from_value(v), "incremental_authorization_supported" => { - b.incremental_authorization_supported = Some(FromValueOpt::from_value(v)?) + b.incremental_authorization_supported = FromValueOpt::from_value(v) } - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), - "offline" => b.offline = Some(FromValueOpt::from_value(v)?), + "issuer" => b.issuer = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), + "offline" => b.offline = FromValueOpt::from_value(v), "overcapture_supported" => { - b.overcapture_supported = Some(FromValueOpt::from_value(v)?) + b.overcapture_supported = FromValueOpt::from_value(v) } - "read_method" => b.read_method = Some(FromValueOpt::from_value(v)?), - "receipt" => b.receipt = Some(FromValueOpt::from_value(v)?), + "read_method" => b.read_method = FromValueOpt::from_value(v), + "receipt" => b.receipt = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_card_present_offline.rs b/generated/async-stripe-shared/src/payment_method_details_card_present_offline.rs index a0424e920..965cbdbc5 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_present_offline.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_present_offline.rs @@ -10,7 +10,12 @@ pub struct PaymentMethodDetailsCardPresentOfflineBuilder { stored_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { stored_at: self.stored_at? }) + let (Some(stored_at),) = (self.stored_at,) else { + return None; + }; + Some(Self::Out { stored_at }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentMethodDetailsCardPresentOfflineBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "stored_at" => b.stored_at = Some(FromValueOpt::from_value(v)?), + "stored_at" => b.stored_at = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_card_present_receipt.rs b/generated/async-stripe-shared/src/payment_method_details_card_present_receipt.rs index 05626347d..ab9ee4d1d 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_present_receipt.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_present_receipt.rs @@ -35,7 +35,12 @@ pub struct PaymentMethodDetailsCardPresentReceiptBuilder { transaction_status_information: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -108,16 +113,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_type), + Some(application_cryptogram), + Some(application_preferred_name), + Some(authorization_code), + Some(authorization_response_code), + Some(cardholder_verification_method), + Some(dedicated_file_name), + Some(terminal_verification_results), + Some(transaction_status_information), + ) = ( + self.account_type, + self.application_cryptogram.take(), + self.application_preferred_name.take(), + self.authorization_code.take(), + self.authorization_response_code.take(), + self.cardholder_verification_method.take(), + self.dedicated_file_name.take(), + self.terminal_verification_results.take(), + self.transaction_status_information.take(), + ) + else { + return None; + }; Some(Self::Out { - account_type: self.account_type?, - application_cryptogram: self.application_cryptogram.take()?, - application_preferred_name: self.application_preferred_name.take()?, - authorization_code: self.authorization_code.take()?, - authorization_response_code: self.authorization_response_code.take()?, - cardholder_verification_method: self.cardholder_verification_method.take()?, - dedicated_file_name: self.dedicated_file_name.take()?, - terminal_verification_results: self.terminal_verification_results.take()?, - transaction_status_information: self.transaction_status_information.take()?, + account_type, + application_cryptogram, + application_preferred_name, + authorization_code, + authorization_response_code, + cardholder_verification_method, + dedicated_file_name, + terminal_verification_results, + transaction_status_information, }) } } @@ -145,30 +174,26 @@ const _: () = { let mut b = PaymentMethodDetailsCardPresentReceiptBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_type" => b.account_type = Some(FromValueOpt::from_value(v)?), + "account_type" => b.account_type = FromValueOpt::from_value(v), "application_cryptogram" => { - b.application_cryptogram = Some(FromValueOpt::from_value(v)?) + b.application_cryptogram = FromValueOpt::from_value(v) } "application_preferred_name" => { - b.application_preferred_name = Some(FromValueOpt::from_value(v)?) - } - "authorization_code" => { - b.authorization_code = Some(FromValueOpt::from_value(v)?) + b.application_preferred_name = FromValueOpt::from_value(v) } + "authorization_code" => b.authorization_code = FromValueOpt::from_value(v), "authorization_response_code" => { - b.authorization_response_code = Some(FromValueOpt::from_value(v)?) + b.authorization_response_code = FromValueOpt::from_value(v) } "cardholder_verification_method" => { - b.cardholder_verification_method = Some(FromValueOpt::from_value(v)?) - } - "dedicated_file_name" => { - b.dedicated_file_name = Some(FromValueOpt::from_value(v)?) + b.cardholder_verification_method = FromValueOpt::from_value(v) } + "dedicated_file_name" => b.dedicated_file_name = FromValueOpt::from_value(v), "terminal_verification_results" => { - b.terminal_verification_results = Some(FromValueOpt::from_value(v)?) + b.terminal_verification_results = FromValueOpt::from_value(v) } "transaction_status_information" => { - b.transaction_status_information = Some(FromValueOpt::from_value(v)?) + b.transaction_status_information = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet.rs index 3fec6761b..329321bcb 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet.rs @@ -32,7 +32,12 @@ pub struct PaymentMethodDetailsCardWalletBuilder { visa_checkout: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -95,16 +100,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amex_express_checkout), + Some(apple_pay), + Some(dynamic_last4), + Some(google_pay), + Some(link), + Some(masterpass), + Some(samsung_pay), + Some(type_), + Some(visa_checkout), + ) = ( + self.amex_express_checkout, + self.apple_pay, + self.dynamic_last4.take(), + self.google_pay, + self.link, + self.masterpass.take(), + self.samsung_pay, + self.type_, + self.visa_checkout.take(), + ) + else { + return None; + }; Some(Self::Out { - amex_express_checkout: self.amex_express_checkout?, - apple_pay: self.apple_pay?, - dynamic_last4: self.dynamic_last4.take()?, - google_pay: self.google_pay?, - link: self.link?, - masterpass: self.masterpass.take()?, - samsung_pay: self.samsung_pay?, - type_: self.type_?, - visa_checkout: self.visa_checkout.take()?, + amex_express_checkout, + apple_pay, + dynamic_last4, + google_pay, + link, + masterpass, + samsung_pay, + type_, + visa_checkout, }) } } @@ -133,16 +162,16 @@ const _: () = { for (k, v) in obj { match k.as_str() { "amex_express_checkout" => { - b.amex_express_checkout = Some(FromValueOpt::from_value(v)?) + b.amex_express_checkout = FromValueOpt::from_value(v) } - "apple_pay" => b.apple_pay = Some(FromValueOpt::from_value(v)?), - "dynamic_last4" => b.dynamic_last4 = Some(FromValueOpt::from_value(v)?), - "google_pay" => b.google_pay = Some(FromValueOpt::from_value(v)?), - "link" => b.link = Some(FromValueOpt::from_value(v)?), - "masterpass" => b.masterpass = Some(FromValueOpt::from_value(v)?), - "samsung_pay" => b.samsung_pay = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "visa_checkout" => b.visa_checkout = Some(FromValueOpt::from_value(v)?), + "apple_pay" => b.apple_pay = FromValueOpt::from_value(v), + "dynamic_last4" => b.dynamic_last4 = FromValueOpt::from_value(v), + "google_pay" => b.google_pay = FromValueOpt::from_value(v), + "link" => b.link = FromValueOpt::from_value(v), + "masterpass" => b.masterpass = FromValueOpt::from_value(v), + "samsung_pay" => b.samsung_pay = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "visa_checkout" => b.visa_checkout = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet_amex_express_checkout.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet_amex_express_checkout.rs index 5a2e1232e..fffb653cf 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet_amex_express_checkout.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet_amex_express_checkout.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodDetailsCardWalletAmexExpressCheckout {} #[doc(hidden)] pub struct PaymentMethodDetailsCardWalletAmexExpressCheckoutBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet_apple_pay.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet_apple_pay.rs index 8c664bbfb..39cc004f7 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet_apple_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet_apple_pay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodDetailsCardWalletApplePay {} #[doc(hidden)] pub struct PaymentMethodDetailsCardWalletApplePayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet_google_pay.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet_google_pay.rs index f4bffd58c..f68a5674c 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet_google_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet_google_pay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodDetailsCardWalletGooglePay {} #[doc(hidden)] pub struct PaymentMethodDetailsCardWalletGooglePayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet_link.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet_link.rs index 1c500d3e8..f7c7f8d20 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet_link.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet_link.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodDetailsCardWalletLink {} #[doc(hidden)] pub struct PaymentMethodDetailsCardWalletLinkBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet_masterpass.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet_masterpass.rs index cf7b47a54..bece78569 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet_masterpass.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet_masterpass.rs @@ -27,7 +27,12 @@ pub struct PaymentMethodDetailsCardWalletMasterpassBuilder { shipping_address: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -80,12 +85,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - billing_address: self.billing_address.take()?, - email: self.email.take()?, - name: self.name.take()?, - shipping_address: self.shipping_address.take()?, - }) + let (Some(billing_address), Some(email), Some(name), Some(shipping_address)) = ( + self.billing_address.take(), + self.email.take(), + self.name.take(), + self.shipping_address.take(), + ) else { + return None; + }; + Some(Self::Out { billing_address, email, name, shipping_address }) } } @@ -112,10 +120,10 @@ const _: () = { let mut b = PaymentMethodDetailsCardWalletMasterpassBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "billing_address" => b.billing_address = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "shipping_address" => b.shipping_address = Some(FromValueOpt::from_value(v)?), + "billing_address" => b.billing_address = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "shipping_address" => b.shipping_address = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet_samsung_pay.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet_samsung_pay.rs index 302bfefe6..0823c8504 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet_samsung_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet_samsung_pay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodDetailsCardWalletSamsungPay {} #[doc(hidden)] pub struct PaymentMethodDetailsCardWalletSamsungPayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet_visa_checkout.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet_visa_checkout.rs index ac5d1a6a0..9eb152d9c 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet_visa_checkout.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet_visa_checkout.rs @@ -27,7 +27,12 @@ pub struct PaymentMethodDetailsCardWalletVisaCheckoutBuilder { shipping_address: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -80,12 +85,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - billing_address: self.billing_address.take()?, - email: self.email.take()?, - name: self.name.take()?, - shipping_address: self.shipping_address.take()?, - }) + let (Some(billing_address), Some(email), Some(name), Some(shipping_address)) = ( + self.billing_address.take(), + self.email.take(), + self.name.take(), + self.shipping_address.take(), + ) else { + return None; + }; + Some(Self::Out { billing_address, email, name, shipping_address }) } } @@ -112,10 +120,10 @@ const _: () = { let mut b = PaymentMethodDetailsCardWalletVisaCheckoutBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "billing_address" => b.billing_address = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "shipping_address" => b.shipping_address = Some(FromValueOpt::from_value(v)?), + "billing_address" => b.billing_address = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "shipping_address" => b.shipping_address = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_cashapp.rs b/generated/async-stripe-shared/src/payment_method_details_cashapp.rs index 96001c675..f7e371aba 100644 --- a/generated/async-stripe-shared/src/payment_method_details_cashapp.rs +++ b/generated/async-stripe-shared/src/payment_method_details_cashapp.rs @@ -13,7 +13,12 @@ pub struct PaymentMethodDetailsCashappBuilder { cashtag: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { buyer_id: self.buyer_id.take()?, cashtag: self.cashtag.take()? }) + let (Some(buyer_id), Some(cashtag)) = (self.buyer_id.take(), self.cashtag.take()) + else { + return None; + }; + Some(Self::Out { buyer_id, cashtag }) } } @@ -86,8 +95,8 @@ const _: () = { let mut b = PaymentMethodDetailsCashappBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "buyer_id" => b.buyer_id = Some(FromValueOpt::from_value(v)?), - "cashtag" => b.cashtag = Some(FromValueOpt::from_value(v)?), + "buyer_id" => b.buyer_id = FromValueOpt::from_value(v), + "cashtag" => b.cashtag = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_customer_balance.rs b/generated/async-stripe-shared/src/payment_method_details_customer_balance.rs index effd9c06f..748051577 100644 --- a/generated/async-stripe-shared/src/payment_method_details_customer_balance.rs +++ b/generated/async-stripe-shared/src/payment_method_details_customer_balance.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodDetailsCustomerBalance {} #[doc(hidden)] pub struct PaymentMethodDetailsCustomerBalanceBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_details_eps.rs b/generated/async-stripe-shared/src/payment_method_details_eps.rs index e9d3a4766..be7108ed6 100644 --- a/generated/async-stripe-shared/src/payment_method_details_eps.rs +++ b/generated/async-stripe-shared/src/payment_method_details_eps.rs @@ -16,7 +16,12 @@ pub struct PaymentMethodDetailsEpsBuilder { verified_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,7 +67,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { bank: self.bank?, verified_name: self.verified_name.take()? }) + let (Some(bank), Some(verified_name)) = (self.bank, self.verified_name.take()) else { + return None; + }; + Some(Self::Out { bank, verified_name }) } } @@ -89,8 +97,8 @@ const _: () = { let mut b = PaymentMethodDetailsEpsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank" => b.bank = Some(FromValueOpt::from_value(v)?), - "verified_name" => b.verified_name = Some(FromValueOpt::from_value(v)?), + "bank" => b.bank = FromValueOpt::from_value(v), + "verified_name" => b.verified_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_fpx.rs b/generated/async-stripe-shared/src/payment_method_details_fpx.rs index ec27fed6c..0a6a9d75a 100644 --- a/generated/async-stripe-shared/src/payment_method_details_fpx.rs +++ b/generated/async-stripe-shared/src/payment_method_details_fpx.rs @@ -17,7 +17,12 @@ pub struct PaymentMethodDetailsFpxBuilder { transaction_id: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - account_holder_type: self.account_holder_type?, - bank: self.bank?, - transaction_id: self.transaction_id.take()?, - }) + let (Some(account_holder_type), Some(bank), Some(transaction_id)) = + (self.account_holder_type, self.bank, self.transaction_id.take()) + else { + return None; + }; + Some(Self::Out { account_holder_type, bank, transaction_id }) } } @@ -99,11 +105,9 @@ const _: () = { let mut b = PaymentMethodDetailsFpxBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_holder_type" => { - b.account_holder_type = Some(FromValueOpt::from_value(v)?) - } - "bank" => b.bank = Some(FromValueOpt::from_value(v)?), - "transaction_id" => b.transaction_id = Some(FromValueOpt::from_value(v)?), + "account_holder_type" => b.account_holder_type = FromValueOpt::from_value(v), + "bank" => b.bank = FromValueOpt::from_value(v), + "transaction_id" => b.transaction_id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_giropay.rs b/generated/async-stripe-shared/src/payment_method_details_giropay.rs index 4f63fe244..96f05c58c 100644 --- a/generated/async-stripe-shared/src/payment_method_details_giropay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_giropay.rs @@ -21,7 +21,12 @@ pub struct PaymentMethodDetailsGiropayBuilder { verified_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -74,12 +79,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank_code: self.bank_code.take()?, - bank_name: self.bank_name.take()?, - bic: self.bic.take()?, - verified_name: self.verified_name.take()?, - }) + let (Some(bank_code), Some(bank_name), Some(bic), Some(verified_name)) = ( + self.bank_code.take(), + self.bank_name.take(), + self.bic.take(), + self.verified_name.take(), + ) else { + return None; + }; + Some(Self::Out { bank_code, bank_name, bic, verified_name }) } } @@ -106,10 +114,10 @@ const _: () = { let mut b = PaymentMethodDetailsGiropayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_code" => b.bank_code = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), - "verified_name" => b.verified_name = Some(FromValueOpt::from_value(v)?), + "bank_code" => b.bank_code = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "bic" => b.bic = FromValueOpt::from_value(v), + "verified_name" => b.verified_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_grabpay.rs b/generated/async-stripe-shared/src/payment_method_details_grabpay.rs index e36631006..ae63ae322 100644 --- a/generated/async-stripe-shared/src/payment_method_details_grabpay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_grabpay.rs @@ -10,7 +10,12 @@ pub struct PaymentMethodDetailsGrabpayBuilder { transaction_id: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { transaction_id: self.transaction_id.take()? }) + let (Some(transaction_id),) = (self.transaction_id.take(),) else { + return None; + }; + Some(Self::Out { transaction_id }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentMethodDetailsGrabpayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "transaction_id" => b.transaction_id = Some(FromValueOpt::from_value(v)?), + "transaction_id" => b.transaction_id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_ideal.rs b/generated/async-stripe-shared/src/payment_method_details_ideal.rs index 0731ed092..d10da151e 100644 --- a/generated/async-stripe-shared/src/payment_method_details_ideal.rs +++ b/generated/async-stripe-shared/src/payment_method_details_ideal.rs @@ -27,7 +27,12 @@ pub struct PaymentMethodDetailsIdealBuilder { verified_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -86,13 +91,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(bank), + Some(bic), + Some(generated_sepa_debit), + Some(generated_sepa_debit_mandate), + Some(iban_last4), + Some(verified_name), + ) = ( + self.bank, + self.bic, + self.generated_sepa_debit.take(), + self.generated_sepa_debit_mandate.take(), + self.iban_last4.take(), + self.verified_name.take(), + ) + else { + return None; + }; Some(Self::Out { - bank: self.bank?, - bic: self.bic?, - generated_sepa_debit: self.generated_sepa_debit.take()?, - generated_sepa_debit_mandate: self.generated_sepa_debit_mandate.take()?, - iban_last4: self.iban_last4.take()?, - verified_name: self.verified_name.take()?, + bank, + bic, + generated_sepa_debit, + generated_sepa_debit_mandate, + iban_last4, + verified_name, }) } } @@ -120,16 +143,14 @@ const _: () = { let mut b = PaymentMethodDetailsIdealBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank" => b.bank = Some(FromValueOpt::from_value(v)?), - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), - "generated_sepa_debit" => { - b.generated_sepa_debit = Some(FromValueOpt::from_value(v)?) - } + "bank" => b.bank = FromValueOpt::from_value(v), + "bic" => b.bic = FromValueOpt::from_value(v), + "generated_sepa_debit" => b.generated_sepa_debit = FromValueOpt::from_value(v), "generated_sepa_debit_mandate" => { - b.generated_sepa_debit_mandate = Some(FromValueOpt::from_value(v)?) + b.generated_sepa_debit_mandate = FromValueOpt::from_value(v) } - "iban_last4" => b.iban_last4 = Some(FromValueOpt::from_value(v)?), - "verified_name" => b.verified_name = Some(FromValueOpt::from_value(v)?), + "iban_last4" => b.iban_last4 = FromValueOpt::from_value(v), + "verified_name" => b.verified_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_interac_present.rs b/generated/async-stripe-shared/src/payment_method_details_interac_present.rs index e6982436c..c85cbc7ab 100644 --- a/generated/async-stripe-shared/src/payment_method_details_interac_present.rs +++ b/generated/async-stripe-shared/src/payment_method_details_interac_present.rs @@ -71,7 +71,12 @@ pub struct PaymentMethodDetailsInteracPresentBuilder { receipt: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -150,24 +155,64 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(brand), + Some(cardholder_name), + Some(country), + Some(description), + Some(emv_auth_data), + Some(exp_month), + Some(exp_year), + Some(fingerprint), + Some(funding), + Some(generated_card), + Some(iin), + Some(issuer), + Some(last4), + Some(network), + Some(preferred_locales), + Some(read_method), + Some(receipt), + ) = ( + self.brand.take(), + self.cardholder_name.take(), + self.country.take(), + self.description.take(), + self.emv_auth_data.take(), + self.exp_month, + self.exp_year, + self.fingerprint.take(), + self.funding.take(), + self.generated_card.take(), + self.iin.take(), + self.issuer.take(), + self.last4.take(), + self.network.take(), + self.preferred_locales.take(), + self.read_method, + self.receipt.take(), + ) + else { + return None; + }; Some(Self::Out { - brand: self.brand.take()?, - cardholder_name: self.cardholder_name.take()?, - country: self.country.take()?, - description: self.description.take()?, - emv_auth_data: self.emv_auth_data.take()?, - exp_month: self.exp_month?, - exp_year: self.exp_year?, - fingerprint: self.fingerprint.take()?, - funding: self.funding.take()?, - generated_card: self.generated_card.take()?, - iin: self.iin.take()?, - issuer: self.issuer.take()?, - last4: self.last4.take()?, - network: self.network.take()?, - preferred_locales: self.preferred_locales.take()?, - read_method: self.read_method?, - receipt: self.receipt.take()?, + brand, + cardholder_name, + country, + description, + emv_auth_data, + exp_month, + exp_year, + fingerprint, + funding, + generated_card, + iin, + issuer, + last4, + network, + preferred_locales, + read_method, + receipt, }) } } @@ -195,23 +240,23 @@ const _: () = { let mut b = PaymentMethodDetailsInteracPresentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "brand" => b.brand = Some(FromValueOpt::from_value(v)?), - "cardholder_name" => b.cardholder_name = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "emv_auth_data" => b.emv_auth_data = Some(FromValueOpt::from_value(v)?), - "exp_month" => b.exp_month = Some(FromValueOpt::from_value(v)?), - "exp_year" => b.exp_year = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "funding" => b.funding = Some(FromValueOpt::from_value(v)?), - "generated_card" => b.generated_card = Some(FromValueOpt::from_value(v)?), - "iin" => b.iin = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), - "preferred_locales" => b.preferred_locales = Some(FromValueOpt::from_value(v)?), - "read_method" => b.read_method = Some(FromValueOpt::from_value(v)?), - "receipt" => b.receipt = Some(FromValueOpt::from_value(v)?), + "brand" => b.brand = FromValueOpt::from_value(v), + "cardholder_name" => b.cardholder_name = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "emv_auth_data" => b.emv_auth_data = FromValueOpt::from_value(v), + "exp_month" => b.exp_month = FromValueOpt::from_value(v), + "exp_year" => b.exp_year = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "funding" => b.funding = FromValueOpt::from_value(v), + "generated_card" => b.generated_card = FromValueOpt::from_value(v), + "iin" => b.iin = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), + "preferred_locales" => b.preferred_locales = FromValueOpt::from_value(v), + "read_method" => b.read_method = FromValueOpt::from_value(v), + "receipt" => b.receipt = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_interac_present_receipt.rs b/generated/async-stripe-shared/src/payment_method_details_interac_present_receipt.rs index 40682833e..dd04ade53 100644 --- a/generated/async-stripe-shared/src/payment_method_details_interac_present_receipt.rs +++ b/generated/async-stripe-shared/src/payment_method_details_interac_present_receipt.rs @@ -35,7 +35,12 @@ pub struct PaymentMethodDetailsInteracPresentReceiptBuilder { transaction_status_information: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -108,16 +113,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_type), + Some(application_cryptogram), + Some(application_preferred_name), + Some(authorization_code), + Some(authorization_response_code), + Some(cardholder_verification_method), + Some(dedicated_file_name), + Some(terminal_verification_results), + Some(transaction_status_information), + ) = ( + self.account_type, + self.application_cryptogram.take(), + self.application_preferred_name.take(), + self.authorization_code.take(), + self.authorization_response_code.take(), + self.cardholder_verification_method.take(), + self.dedicated_file_name.take(), + self.terminal_verification_results.take(), + self.transaction_status_information.take(), + ) + else { + return None; + }; Some(Self::Out { - account_type: self.account_type?, - application_cryptogram: self.application_cryptogram.take()?, - application_preferred_name: self.application_preferred_name.take()?, - authorization_code: self.authorization_code.take()?, - authorization_response_code: self.authorization_response_code.take()?, - cardholder_verification_method: self.cardholder_verification_method.take()?, - dedicated_file_name: self.dedicated_file_name.take()?, - terminal_verification_results: self.terminal_verification_results.take()?, - transaction_status_information: self.transaction_status_information.take()?, + account_type, + application_cryptogram, + application_preferred_name, + authorization_code, + authorization_response_code, + cardholder_verification_method, + dedicated_file_name, + terminal_verification_results, + transaction_status_information, }) } } @@ -145,30 +174,26 @@ const _: () = { let mut b = PaymentMethodDetailsInteracPresentReceiptBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_type" => b.account_type = Some(FromValueOpt::from_value(v)?), + "account_type" => b.account_type = FromValueOpt::from_value(v), "application_cryptogram" => { - b.application_cryptogram = Some(FromValueOpt::from_value(v)?) + b.application_cryptogram = FromValueOpt::from_value(v) } "application_preferred_name" => { - b.application_preferred_name = Some(FromValueOpt::from_value(v)?) - } - "authorization_code" => { - b.authorization_code = Some(FromValueOpt::from_value(v)?) + b.application_preferred_name = FromValueOpt::from_value(v) } + "authorization_code" => b.authorization_code = FromValueOpt::from_value(v), "authorization_response_code" => { - b.authorization_response_code = Some(FromValueOpt::from_value(v)?) + b.authorization_response_code = FromValueOpt::from_value(v) } "cardholder_verification_method" => { - b.cardholder_verification_method = Some(FromValueOpt::from_value(v)?) - } - "dedicated_file_name" => { - b.dedicated_file_name = Some(FromValueOpt::from_value(v)?) + b.cardholder_verification_method = FromValueOpt::from_value(v) } + "dedicated_file_name" => b.dedicated_file_name = FromValueOpt::from_value(v), "terminal_verification_results" => { - b.terminal_verification_results = Some(FromValueOpt::from_value(v)?) + b.terminal_verification_results = FromValueOpt::from_value(v) } "transaction_status_information" => { - b.transaction_status_information = Some(FromValueOpt::from_value(v)?) + b.transaction_status_information = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/payment_method_details_klarna.rs b/generated/async-stripe-shared/src/payment_method_details_klarna.rs index 0abfc56c4..2ca1ad5a5 100644 --- a/generated/async-stripe-shared/src/payment_method_details_klarna.rs +++ b/generated/async-stripe-shared/src/payment_method_details_klarna.rs @@ -15,7 +15,12 @@ pub struct PaymentMethodDetailsKlarnaBuilder { preferred_locale: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -64,10 +69,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - payment_method_category: self.payment_method_category.take()?, - preferred_locale: self.preferred_locale.take()?, - }) + let (Some(payment_method_category), Some(preferred_locale)) = + (self.payment_method_category.take(), self.preferred_locale.take()) + else { + return None; + }; + Some(Self::Out { payment_method_category, preferred_locale }) } } @@ -95,9 +102,9 @@ const _: () = { for (k, v) in obj { match k.as_str() { "payment_method_category" => { - b.payment_method_category = Some(FromValueOpt::from_value(v)?) + b.payment_method_category = FromValueOpt::from_value(v) } - "preferred_locale" => b.preferred_locale = Some(FromValueOpt::from_value(v)?), + "preferred_locale" => b.preferred_locale = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_konbini.rs b/generated/async-stripe-shared/src/payment_method_details_konbini.rs index 3bdc52f8d..e1af2ebaa 100644 --- a/generated/async-stripe-shared/src/payment_method_details_konbini.rs +++ b/generated/async-stripe-shared/src/payment_method_details_konbini.rs @@ -10,7 +10,12 @@ pub struct PaymentMethodDetailsKonbiniBuilder { store: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { store: self.store? }) + let (Some(store),) = (self.store,) else { + return None; + }; + Some(Self::Out { store }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentMethodDetailsKonbiniBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "store" => b.store = Some(FromValueOpt::from_value(v)?), + "store" => b.store = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_konbini_store.rs b/generated/async-stripe-shared/src/payment_method_details_konbini_store.rs index 80ed68ae7..abb4ddbce 100644 --- a/generated/async-stripe-shared/src/payment_method_details_konbini_store.rs +++ b/generated/async-stripe-shared/src/payment_method_details_konbini_store.rs @@ -10,7 +10,12 @@ pub struct PaymentMethodDetailsKonbiniStoreBuilder { chain: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { chain: self.chain? }) + let (Some(chain),) = (self.chain,) else { + return None; + }; + Some(Self::Out { chain }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentMethodDetailsKonbiniStoreBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "chain" => b.chain = Some(FromValueOpt::from_value(v)?), + "chain" => b.chain = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_link.rs b/generated/async-stripe-shared/src/payment_method_details_link.rs index 9232c1d97..979298032 100644 --- a/generated/async-stripe-shared/src/payment_method_details_link.rs +++ b/generated/async-stripe-shared/src/payment_method_details_link.rs @@ -11,7 +11,12 @@ pub struct PaymentMethodDetailsLinkBuilder { country: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { country: self.country.take()? }) + let (Some(country),) = (self.country.take(),) else { + return None; + }; + Some(Self::Out { country }) } } @@ -83,7 +91,7 @@ const _: () = { let mut b = PaymentMethodDetailsLinkBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "country" => b.country = Some(FromValueOpt::from_value(v)?), + "country" => b.country = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_mobilepay.rs b/generated/async-stripe-shared/src/payment_method_details_mobilepay.rs index fbc442b48..605cd9717 100644 --- a/generated/async-stripe-shared/src/payment_method_details_mobilepay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_mobilepay.rs @@ -9,7 +9,12 @@ pub struct PaymentMethodDetailsMobilepayBuilder { card: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -54,7 +59,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { card: self.card.take()? }) + let (Some(card),) = (self.card.take(),) else { + return None; + }; + Some(Self::Out { card }) } } @@ -81,7 +89,7 @@ const _: () = { let mut b = PaymentMethodDetailsMobilepayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "card" => b.card = Some(FromValueOpt::from_value(v)?), + "card" => b.card = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_multibanco.rs b/generated/async-stripe-shared/src/payment_method_details_multibanco.rs index 63bda151c..96e732d06 100644 --- a/generated/async-stripe-shared/src/payment_method_details_multibanco.rs +++ b/generated/async-stripe-shared/src/payment_method_details_multibanco.rs @@ -13,7 +13,12 @@ pub struct PaymentMethodDetailsMultibancoBuilder { reference: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { entity: self.entity.take()?, reference: self.reference.take()? }) + let (Some(entity), Some(reference)) = (self.entity.take(), self.reference.take()) + else { + return None; + }; + Some(Self::Out { entity, reference }) } } @@ -86,8 +95,8 @@ const _: () = { let mut b = PaymentMethodDetailsMultibancoBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "entity" => b.entity = Some(FromValueOpt::from_value(v)?), - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), + "entity" => b.entity = FromValueOpt::from_value(v), + "reference" => b.reference = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_oxxo.rs b/generated/async-stripe-shared/src/payment_method_details_oxxo.rs index 53d00cb78..eeb9bed00 100644 --- a/generated/async-stripe-shared/src/payment_method_details_oxxo.rs +++ b/generated/async-stripe-shared/src/payment_method_details_oxxo.rs @@ -10,7 +10,12 @@ pub struct PaymentMethodDetailsOxxoBuilder { number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { number: self.number.take()? }) + let (Some(number),) = (self.number.take(),) else { + return None; + }; + Some(Self::Out { number }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentMethodDetailsOxxoBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "number" => b.number = Some(FromValueOpt::from_value(v)?), + "number" => b.number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_p24.rs b/generated/async-stripe-shared/src/payment_method_details_p24.rs index e9e5deb3b..1dfea092d 100644 --- a/generated/async-stripe-shared/src/payment_method_details_p24.rs +++ b/generated/async-stripe-shared/src/payment_method_details_p24.rs @@ -19,7 +19,12 @@ pub struct PaymentMethodDetailsP24Builder { verified_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,11 +75,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank: self.bank?, - reference: self.reference.take()?, - verified_name: self.verified_name.take()?, - }) + let (Some(bank), Some(reference), Some(verified_name)) = + (self.bank, self.reference.take(), self.verified_name.take()) + else { + return None; + }; + Some(Self::Out { bank, reference, verified_name }) } } @@ -101,9 +107,9 @@ const _: () = { let mut b = PaymentMethodDetailsP24Builder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank" => b.bank = Some(FromValueOpt::from_value(v)?), - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "verified_name" => b.verified_name = Some(FromValueOpt::from_value(v)?), + "bank" => b.bank = FromValueOpt::from_value(v), + "reference" => b.reference = FromValueOpt::from_value(v), + "verified_name" => b.verified_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_paynow.rs b/generated/async-stripe-shared/src/payment_method_details_paynow.rs index 85db6ab7d..3eb6fa518 100644 --- a/generated/async-stripe-shared/src/payment_method_details_paynow.rs +++ b/generated/async-stripe-shared/src/payment_method_details_paynow.rs @@ -10,7 +10,12 @@ pub struct PaymentMethodDetailsPaynowBuilder { reference: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { reference: self.reference.take()? }) + let (Some(reference),) = (self.reference.take(),) else { + return None; + }; + Some(Self::Out { reference }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentMethodDetailsPaynowBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), + "reference" => b.reference = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_paypal.rs b/generated/async-stripe-shared/src/payment_method_details_paypal.rs index 0483a8d40..a0756de4f 100644 --- a/generated/async-stripe-shared/src/payment_method_details_paypal.rs +++ b/generated/async-stripe-shared/src/payment_method_details_paypal.rs @@ -24,7 +24,12 @@ pub struct PaymentMethodDetailsPaypalBuilder { transaction_id: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -79,13 +84,23 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - payer_email: self.payer_email.take()?, - payer_id: self.payer_id.take()?, - payer_name: self.payer_name.take()?, - seller_protection: self.seller_protection.take()?, - transaction_id: self.transaction_id.take()?, - }) + let ( + Some(payer_email), + Some(payer_id), + Some(payer_name), + Some(seller_protection), + Some(transaction_id), + ) = ( + self.payer_email.take(), + self.payer_id.take(), + self.payer_name.take(), + self.seller_protection.take(), + self.transaction_id.take(), + ) + else { + return None; + }; + Some(Self::Out { payer_email, payer_id, payer_name, seller_protection, transaction_id }) } } @@ -112,11 +127,11 @@ const _: () = { let mut b = PaymentMethodDetailsPaypalBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "payer_email" => b.payer_email = Some(FromValueOpt::from_value(v)?), - "payer_id" => b.payer_id = Some(FromValueOpt::from_value(v)?), - "payer_name" => b.payer_name = Some(FromValueOpt::from_value(v)?), - "seller_protection" => b.seller_protection = Some(FromValueOpt::from_value(v)?), - "transaction_id" => b.transaction_id = Some(FromValueOpt::from_value(v)?), + "payer_email" => b.payer_email = FromValueOpt::from_value(v), + "payer_id" => b.payer_id = FromValueOpt::from_value(v), + "payer_name" => b.payer_name = FromValueOpt::from_value(v), + "seller_protection" => b.seller_protection = FromValueOpt::from_value(v), + "transaction_id" => b.transaction_id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_pix.rs b/generated/async-stripe-shared/src/payment_method_details_pix.rs index 5e35096c7..83d613ae9 100644 --- a/generated/async-stripe-shared/src/payment_method_details_pix.rs +++ b/generated/async-stripe-shared/src/payment_method_details_pix.rs @@ -10,7 +10,12 @@ pub struct PaymentMethodDetailsPixBuilder { bank_transaction_id: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { bank_transaction_id: self.bank_transaction_id.take()? }) + let (Some(bank_transaction_id),) = (self.bank_transaction_id.take(),) else { + return None; + }; + Some(Self::Out { bank_transaction_id }) } } @@ -82,9 +90,7 @@ const _: () = { let mut b = PaymentMethodDetailsPixBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_transaction_id" => { - b.bank_transaction_id = Some(FromValueOpt::from_value(v)?) - } + "bank_transaction_id" => b.bank_transaction_id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_promptpay.rs b/generated/async-stripe-shared/src/payment_method_details_promptpay.rs index 89edf7a93..a01349bba 100644 --- a/generated/async-stripe-shared/src/payment_method_details_promptpay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_promptpay.rs @@ -10,7 +10,12 @@ pub struct PaymentMethodDetailsPromptpayBuilder { reference: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { reference: self.reference.take()? }) + let (Some(reference),) = (self.reference.take(),) else { + return None; + }; + Some(Self::Out { reference }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentMethodDetailsPromptpayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), + "reference" => b.reference = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_revolut_pay.rs b/generated/async-stripe-shared/src/payment_method_details_revolut_pay.rs index 1ed9bc295..cb25b6cdf 100644 --- a/generated/async-stripe-shared/src/payment_method_details_revolut_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_revolut_pay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodDetailsRevolutPay {} #[doc(hidden)] pub struct PaymentMethodDetailsRevolutPayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_details_sepa_credit_transfer.rs b/generated/async-stripe-shared/src/payment_method_details_sepa_credit_transfer.rs index 63757e9f0..57ee86151 100644 --- a/generated/async-stripe-shared/src/payment_method_details_sepa_credit_transfer.rs +++ b/generated/async-stripe-shared/src/payment_method_details_sepa_credit_transfer.rs @@ -16,7 +16,12 @@ pub struct PaymentMethodDetailsSepaCreditTransferBuilder { iban: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank_name: self.bank_name.take()?, - bic: self.bic.take()?, - iban: self.iban.take()?, - }) + let (Some(bank_name), Some(bic), Some(iban)) = + (self.bank_name.take(), self.bic.take(), self.iban.take()) + else { + return None; + }; + Some(Self::Out { bank_name, bic, iban }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = PaymentMethodDetailsSepaCreditTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), - "iban" => b.iban = Some(FromValueOpt::from_value(v)?), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "bic" => b.bic = FromValueOpt::from_value(v), + "iban" => b.iban = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_sepa_debit.rs b/generated/async-stripe-shared/src/payment_method_details_sepa_debit.rs index eb2a0e0f5..36332ba72 100644 --- a/generated/async-stripe-shared/src/payment_method_details_sepa_debit.rs +++ b/generated/async-stripe-shared/src/payment_method_details_sepa_debit.rs @@ -27,7 +27,12 @@ pub struct PaymentMethodDetailsSepaDebitBuilder { mandate: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -84,14 +89,25 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank_code: self.bank_code.take()?, - branch_code: self.branch_code.take()?, - country: self.country.take()?, - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - mandate: self.mandate.take()?, - }) + let ( + Some(bank_code), + Some(branch_code), + Some(country), + Some(fingerprint), + Some(last4), + Some(mandate), + ) = ( + self.bank_code.take(), + self.branch_code.take(), + self.country.take(), + self.fingerprint.take(), + self.last4.take(), + self.mandate.take(), + ) + else { + return None; + }; + Some(Self::Out { bank_code, branch_code, country, fingerprint, last4, mandate }) } } @@ -118,12 +134,12 @@ const _: () = { let mut b = PaymentMethodDetailsSepaDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_code" => b.bank_code = Some(FromValueOpt::from_value(v)?), - "branch_code" => b.branch_code = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "mandate" => b.mandate = Some(FromValueOpt::from_value(v)?), + "bank_code" => b.bank_code = FromValueOpt::from_value(v), + "branch_code" => b.branch_code = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "mandate" => b.mandate = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_sofort.rs b/generated/async-stripe-shared/src/payment_method_details_sofort.rs index 22e80203a..80dc07a30 100644 --- a/generated/async-stripe-shared/src/payment_method_details_sofort.rs +++ b/generated/async-stripe-shared/src/payment_method_details_sofort.rs @@ -36,7 +36,12 @@ pub struct PaymentMethodDetailsSofortBuilder { verified_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -101,16 +106,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(bank_code), + Some(bank_name), + Some(bic), + Some(country), + Some(generated_sepa_debit), + Some(generated_sepa_debit_mandate), + Some(iban_last4), + Some(preferred_language), + Some(verified_name), + ) = ( + self.bank_code.take(), + self.bank_name.take(), + self.bic.take(), + self.country.take(), + self.generated_sepa_debit.take(), + self.generated_sepa_debit_mandate.take(), + self.iban_last4.take(), + self.preferred_language, + self.verified_name.take(), + ) + else { + return None; + }; Some(Self::Out { - bank_code: self.bank_code.take()?, - bank_name: self.bank_name.take()?, - bic: self.bic.take()?, - country: self.country.take()?, - generated_sepa_debit: self.generated_sepa_debit.take()?, - generated_sepa_debit_mandate: self.generated_sepa_debit_mandate.take()?, - iban_last4: self.iban_last4.take()?, - preferred_language: self.preferred_language?, - verified_name: self.verified_name.take()?, + bank_code, + bank_name, + bic, + country, + generated_sepa_debit, + generated_sepa_debit_mandate, + iban_last4, + preferred_language, + verified_name, }) } } @@ -138,21 +167,17 @@ const _: () = { let mut b = PaymentMethodDetailsSofortBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_code" => b.bank_code = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "generated_sepa_debit" => { - b.generated_sepa_debit = Some(FromValueOpt::from_value(v)?) - } + "bank_code" => b.bank_code = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "bic" => b.bic = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "generated_sepa_debit" => b.generated_sepa_debit = FromValueOpt::from_value(v), "generated_sepa_debit_mandate" => { - b.generated_sepa_debit_mandate = Some(FromValueOpt::from_value(v)?) - } - "iban_last4" => b.iban_last4 = Some(FromValueOpt::from_value(v)?), - "preferred_language" => { - b.preferred_language = Some(FromValueOpt::from_value(v)?) + b.generated_sepa_debit_mandate = FromValueOpt::from_value(v) } - "verified_name" => b.verified_name = Some(FromValueOpt::from_value(v)?), + "iban_last4" => b.iban_last4 = FromValueOpt::from_value(v), + "preferred_language" => b.preferred_language = FromValueOpt::from_value(v), + "verified_name" => b.verified_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_stripe_account.rs b/generated/async-stripe-shared/src/payment_method_details_stripe_account.rs index cd17999d6..a5d76ef95 100644 --- a/generated/async-stripe-shared/src/payment_method_details_stripe_account.rs +++ b/generated/async-stripe-shared/src/payment_method_details_stripe_account.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodDetailsStripeAccount {} #[doc(hidden)] pub struct PaymentMethodDetailsStripeAccountBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_details_swish.rs b/generated/async-stripe-shared/src/payment_method_details_swish.rs index bb5232830..c70b853ef 100644 --- a/generated/async-stripe-shared/src/payment_method_details_swish.rs +++ b/generated/async-stripe-shared/src/payment_method_details_swish.rs @@ -17,7 +17,12 @@ pub struct PaymentMethodDetailsSwishBuilder { verified_phone_last4: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,14 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - fingerprint: self.fingerprint.take()?, - payment_reference: self.payment_reference.take()?, - verified_phone_last4: self.verified_phone_last4.take()?, - }) + let (Some(fingerprint), Some(payment_reference), Some(verified_phone_last4)) = ( + self.fingerprint.take(), + self.payment_reference.take(), + self.verified_phone_last4.take(), + ) else { + return None; + }; + Some(Self::Out { fingerprint, payment_reference, verified_phone_last4 }) } } @@ -99,11 +107,9 @@ const _: () = { let mut b = PaymentMethodDetailsSwishBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "payment_reference" => b.payment_reference = Some(FromValueOpt::from_value(v)?), - "verified_phone_last4" => { - b.verified_phone_last4 = Some(FromValueOpt::from_value(v)?) - } + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "payment_reference" => b.payment_reference = FromValueOpt::from_value(v), + "verified_phone_last4" => b.verified_phone_last4 = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_us_bank_account.rs b/generated/async-stripe-shared/src/payment_method_details_us_bank_account.rs index 8067d15fa..058baef5e 100644 --- a/generated/async-stripe-shared/src/payment_method_details_us_bank_account.rs +++ b/generated/async-stripe-shared/src/payment_method_details_us_bank_account.rs @@ -32,7 +32,12 @@ pub struct PaymentMethodDetailsUsBankAccountBuilder { routing_number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -93,15 +98,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_holder_type), + Some(account_type), + Some(bank_name), + Some(fingerprint), + Some(last4), + Some(mandate), + Some(payment_reference), + Some(routing_number), + ) = ( + self.account_holder_type, + self.account_type, + self.bank_name.take(), + self.fingerprint.take(), + self.last4.take(), + self.mandate.take(), + self.payment_reference.take(), + self.routing_number.take(), + ) + else { + return None; + }; Some(Self::Out { - account_holder_type: self.account_holder_type?, - account_type: self.account_type?, - bank_name: self.bank_name.take()?, - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - mandate: self.mandate.take()?, - payment_reference: self.payment_reference.take()?, - routing_number: self.routing_number.take()?, + account_holder_type, + account_type, + bank_name, + fingerprint, + last4, + mandate, + payment_reference, + routing_number, }) } } @@ -129,16 +156,14 @@ const _: () = { let mut b = PaymentMethodDetailsUsBankAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_holder_type" => { - b.account_holder_type = Some(FromValueOpt::from_value(v)?) - } - "account_type" => b.account_type = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "mandate" => b.mandate = Some(FromValueOpt::from_value(v)?), - "payment_reference" => b.payment_reference = Some(FromValueOpt::from_value(v)?), - "routing_number" => b.routing_number = Some(FromValueOpt::from_value(v)?), + "account_holder_type" => b.account_holder_type = FromValueOpt::from_value(v), + "account_type" => b.account_type = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "mandate" => b.mandate = FromValueOpt::from_value(v), + "payment_reference" => b.payment_reference = FromValueOpt::from_value(v), + "routing_number" => b.routing_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_wechat.rs b/generated/async-stripe-shared/src/payment_method_details_wechat.rs index 6570d29a5..4acb49ffc 100644 --- a/generated/async-stripe-shared/src/payment_method_details_wechat.rs +++ b/generated/async-stripe-shared/src/payment_method_details_wechat.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodDetailsWechat {} #[doc(hidden)] pub struct PaymentMethodDetailsWechatBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_details_wechat_pay.rs b/generated/async-stripe-shared/src/payment_method_details_wechat_pay.rs index ca2212313..4efba718a 100644 --- a/generated/async-stripe-shared/src/payment_method_details_wechat_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_wechat_pay.rs @@ -14,7 +14,12 @@ pub struct PaymentMethodDetailsWechatPayBuilder { transaction_id: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,10 +65,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - fingerprint: self.fingerprint.take()?, - transaction_id: self.transaction_id.take()?, - }) + let (Some(fingerprint), Some(transaction_id)) = + (self.fingerprint.take(), self.transaction_id.take()) + else { + return None; + }; + Some(Self::Out { fingerprint, transaction_id }) } } @@ -90,8 +97,8 @@ const _: () = { let mut b = PaymentMethodDetailsWechatPayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "transaction_id" => b.transaction_id = Some(FromValueOpt::from_value(v)?), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "transaction_id" => b.transaction_id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_details_zip.rs b/generated/async-stripe-shared/src/payment_method_details_zip.rs index 174609b41..bcbdd8b2f 100644 --- a/generated/async-stripe-shared/src/payment_method_details_zip.rs +++ b/generated/async-stripe-shared/src/payment_method_details_zip.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodDetailsZip {} #[doc(hidden)] pub struct PaymentMethodDetailsZipBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_eps.rs b/generated/async-stripe-shared/src/payment_method_eps.rs index 6bf59489d..427371940 100644 --- a/generated/async-stripe-shared/src/payment_method_eps.rs +++ b/generated/async-stripe-shared/src/payment_method_eps.rs @@ -11,7 +11,12 @@ pub struct PaymentMethodEpsBuilder { bank: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { bank: self.bank? }) + let (Some(bank),) = (self.bank,) else { + return None; + }; + Some(Self::Out { bank }) } } @@ -83,7 +91,7 @@ const _: () = { let mut b = PaymentMethodEpsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank" => b.bank = Some(FromValueOpt::from_value(v)?), + "bank" => b.bank = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_fpx.rs b/generated/async-stripe-shared/src/payment_method_fpx.rs index 288e5d3a1..b0173b7ce 100644 --- a/generated/async-stripe-shared/src/payment_method_fpx.rs +++ b/generated/async-stripe-shared/src/payment_method_fpx.rs @@ -14,7 +14,12 @@ pub struct PaymentMethodFpxBuilder { bank: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { account_holder_type: self.account_holder_type?, bank: self.bank? }) + let (Some(account_holder_type), Some(bank)) = (self.account_holder_type, self.bank) + else { + return None; + }; + Some(Self::Out { account_holder_type, bank }) } } @@ -87,10 +96,8 @@ const _: () = { let mut b = PaymentMethodFpxBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_holder_type" => { - b.account_holder_type = Some(FromValueOpt::from_value(v)?) - } - "bank" => b.bank = Some(FromValueOpt::from_value(v)?), + "account_holder_type" => b.account_holder_type = FromValueOpt::from_value(v), + "bank" => b.bank = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_giropay.rs b/generated/async-stripe-shared/src/payment_method_giropay.rs index 1c8c923ff..e5ab3ca0c 100644 --- a/generated/async-stripe-shared/src/payment_method_giropay.rs +++ b/generated/async-stripe-shared/src/payment_method_giropay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodGiropay {} #[doc(hidden)] pub struct PaymentMethodGiropayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_grabpay.rs b/generated/async-stripe-shared/src/payment_method_grabpay.rs index c792e130e..d5421cb5a 100644 --- a/generated/async-stripe-shared/src/payment_method_grabpay.rs +++ b/generated/async-stripe-shared/src/payment_method_grabpay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodGrabpay {} #[doc(hidden)] pub struct PaymentMethodGrabpayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_ideal.rs b/generated/async-stripe-shared/src/payment_method_ideal.rs index 0a8e3a021..724e2056b 100644 --- a/generated/async-stripe-shared/src/payment_method_ideal.rs +++ b/generated/async-stripe-shared/src/payment_method_ideal.rs @@ -14,7 +14,12 @@ pub struct PaymentMethodIdealBuilder { bic: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { bank: self.bank?, bic: self.bic? }) + let (Some(bank), Some(bic)) = (self.bank, self.bic) else { + return None; + }; + Some(Self::Out { bank, bic }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = PaymentMethodIdealBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank" => b.bank = Some(FromValueOpt::from_value(v)?), - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), + "bank" => b.bank = FromValueOpt::from_value(v), + "bic" => b.bic = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_interac_present.rs b/generated/async-stripe-shared/src/payment_method_interac_present.rs index 37e6e290e..1fdb3eafd 100644 --- a/generated/async-stripe-shared/src/payment_method_interac_present.rs +++ b/generated/async-stripe-shared/src/payment_method_interac_present.rs @@ -60,7 +60,12 @@ pub struct PaymentMethodInteracPresentBuilder { read_method: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -133,21 +138,55 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(brand), + Some(cardholder_name), + Some(country), + Some(description), + Some(exp_month), + Some(exp_year), + Some(fingerprint), + Some(funding), + Some(iin), + Some(issuer), + Some(last4), + Some(networks), + Some(preferred_locales), + Some(read_method), + ) = ( + self.brand.take(), + self.cardholder_name.take(), + self.country.take(), + self.description.take(), + self.exp_month, + self.exp_year, + self.fingerprint.take(), + self.funding.take(), + self.iin.take(), + self.issuer.take(), + self.last4.take(), + self.networks.take(), + self.preferred_locales.take(), + self.read_method, + ) + else { + return None; + }; Some(Self::Out { - brand: self.brand.take()?, - cardholder_name: self.cardholder_name.take()?, - country: self.country.take()?, - description: self.description.take()?, - exp_month: self.exp_month?, - exp_year: self.exp_year?, - fingerprint: self.fingerprint.take()?, - funding: self.funding.take()?, - iin: self.iin.take()?, - issuer: self.issuer.take()?, - last4: self.last4.take()?, - networks: self.networks.take()?, - preferred_locales: self.preferred_locales.take()?, - read_method: self.read_method?, + brand, + cardholder_name, + country, + description, + exp_month, + exp_year, + fingerprint, + funding, + iin, + issuer, + last4, + networks, + preferred_locales, + read_method, }) } } @@ -175,20 +214,20 @@ const _: () = { let mut b = PaymentMethodInteracPresentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "brand" => b.brand = Some(FromValueOpt::from_value(v)?), - "cardholder_name" => b.cardholder_name = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "exp_month" => b.exp_month = Some(FromValueOpt::from_value(v)?), - "exp_year" => b.exp_year = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "funding" => b.funding = Some(FromValueOpt::from_value(v)?), - "iin" => b.iin = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "networks" => b.networks = Some(FromValueOpt::from_value(v)?), - "preferred_locales" => b.preferred_locales = Some(FromValueOpt::from_value(v)?), - "read_method" => b.read_method = Some(FromValueOpt::from_value(v)?), + "brand" => b.brand = FromValueOpt::from_value(v), + "cardholder_name" => b.cardholder_name = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "exp_month" => b.exp_month = FromValueOpt::from_value(v), + "exp_year" => b.exp_year = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "funding" => b.funding = FromValueOpt::from_value(v), + "iin" => b.iin = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "networks" => b.networks = FromValueOpt::from_value(v), + "preferred_locales" => b.preferred_locales = FromValueOpt::from_value(v), + "read_method" => b.read_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_klarna.rs b/generated/async-stripe-shared/src/payment_method_klarna.rs index 3e0e9f8e6..c2af88a7e 100644 --- a/generated/async-stripe-shared/src/payment_method_klarna.rs +++ b/generated/async-stripe-shared/src/payment_method_klarna.rs @@ -10,7 +10,12 @@ pub struct PaymentMethodKlarnaBuilder { dob: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { dob: self.dob? }) + let (Some(dob),) = (self.dob,) else { + return None; + }; + Some(Self::Out { dob }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentMethodKlarnaBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "dob" => b.dob = Some(FromValueOpt::from_value(v)?), + "dob" => b.dob = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_konbini.rs b/generated/async-stripe-shared/src/payment_method_konbini.rs index d15cabfbb..541d14d1f 100644 --- a/generated/async-stripe-shared/src/payment_method_konbini.rs +++ b/generated/async-stripe-shared/src/payment_method_konbini.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodKonbini {} #[doc(hidden)] pub struct PaymentMethodKonbiniBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_link.rs b/generated/async-stripe-shared/src/payment_method_link.rs index a217b00ab..4faaa59e0 100644 --- a/generated/async-stripe-shared/src/payment_method_link.rs +++ b/generated/async-stripe-shared/src/payment_method_link.rs @@ -13,7 +13,12 @@ pub struct PaymentMethodLinkBuilder { persistent_token: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - email: self.email.take()?, - persistent_token: self.persistent_token.take()?, - }) + let (Some(email), Some(persistent_token)) = + (self.email.take(), self.persistent_token.take()) + else { + return None; + }; + Some(Self::Out { email, persistent_token }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = PaymentMethodLinkBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "persistent_token" => b.persistent_token = Some(FromValueOpt::from_value(v)?), + "email" => b.email = FromValueOpt::from_value(v), + "persistent_token" => b.persistent_token = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_mobilepay.rs b/generated/async-stripe-shared/src/payment_method_mobilepay.rs index bc09988e7..e2f236b9f 100644 --- a/generated/async-stripe-shared/src/payment_method_mobilepay.rs +++ b/generated/async-stripe-shared/src/payment_method_mobilepay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodMobilepay {} #[doc(hidden)] pub struct PaymentMethodMobilepayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_options_affirm.rs b/generated/async-stripe-shared/src/payment_method_options_affirm.rs index cd3db391c..e6748a7b4 100644 --- a/generated/async-stripe-shared/src/payment_method_options_affirm.rs +++ b/generated/async-stripe-shared/src/payment_method_options_affirm.rs @@ -21,7 +21,12 @@ pub struct PaymentMethodOptionsAffirmBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,11 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - capture_method: self.capture_method?, - preferred_locale: self.preferred_locale.take()?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(capture_method), Some(preferred_locale), Some(setup_future_usage)) = + (self.capture_method, self.preferred_locale.take(), self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { capture_method, preferred_locale, setup_future_usage }) } } @@ -103,11 +109,9 @@ const _: () = { let mut b = PaymentMethodOptionsAffirmBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "capture_method" => b.capture_method = Some(FromValueOpt::from_value(v)?), - "preferred_locale" => b.preferred_locale = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "capture_method" => b.capture_method = FromValueOpt::from_value(v), + "preferred_locale" => b.preferred_locale = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_afterpay_clearpay.rs b/generated/async-stripe-shared/src/payment_method_options_afterpay_clearpay.rs index 90073fad6..29af83b97 100644 --- a/generated/async-stripe-shared/src/payment_method_options_afterpay_clearpay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_afterpay_clearpay.rs @@ -23,7 +23,12 @@ pub struct PaymentMethodOptionsAfterpayClearpayBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -74,11 +79,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - capture_method: self.capture_method?, - reference: self.reference.take()?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(capture_method), Some(reference), Some(setup_future_usage)) = + (self.capture_method, self.reference.take(), self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { capture_method, reference, setup_future_usage }) } } @@ -105,11 +111,9 @@ const _: () = { let mut b = PaymentMethodOptionsAfterpayClearpayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "capture_method" => b.capture_method = Some(FromValueOpt::from_value(v)?), - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "capture_method" => b.capture_method = FromValueOpt::from_value(v), + "reference" => b.reference = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_alipay.rs b/generated/async-stripe-shared/src/payment_method_options_alipay.rs index 82bdc9aed..78afb9542 100644 --- a/generated/async-stripe-shared/src/payment_method_options_alipay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_alipay.rs @@ -15,7 +15,12 @@ pub struct PaymentMethodOptionsAlipayBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = PaymentMethodOptionsAlipayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_amazon_pay.rs b/generated/async-stripe-shared/src/payment_method_options_amazon_pay.rs index 49ee9e4cb..391425d31 100644 --- a/generated/async-stripe-shared/src/payment_method_options_amazon_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_amazon_pay.rs @@ -18,7 +18,12 @@ pub struct PaymentMethodOptionsAmazonPayBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,10 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - capture_method: self.capture_method?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(capture_method), Some(setup_future_usage)) = + (self.capture_method, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { capture_method, setup_future_usage }) } } @@ -97,10 +104,8 @@ const _: () = { let mut b = PaymentMethodOptionsAmazonPayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "capture_method" => b.capture_method = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "capture_method" => b.capture_method = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_bacs_debit.rs b/generated/async-stripe-shared/src/payment_method_options_bacs_debit.rs index 6bd21ef63..5c8ddc26c 100644 --- a/generated/async-stripe-shared/src/payment_method_options_bacs_debit.rs +++ b/generated/async-stripe-shared/src/payment_method_options_bacs_debit.rs @@ -15,7 +15,12 @@ pub struct PaymentMethodOptionsBacsDebitBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = PaymentMethodOptionsBacsDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_bancontact.rs b/generated/async-stripe-shared/src/payment_method_options_bancontact.rs index 55c1ccd64..6268502a6 100644 --- a/generated/async-stripe-shared/src/payment_method_options_bancontact.rs +++ b/generated/async-stripe-shared/src/payment_method_options_bancontact.rs @@ -18,7 +18,12 @@ pub struct PaymentMethodOptionsBancontactBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,10 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - preferred_language: self.preferred_language?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(preferred_language), Some(setup_future_usage)) = + (self.preferred_language, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { preferred_language, setup_future_usage }) } } @@ -97,12 +104,8 @@ const _: () = { let mut b = PaymentMethodOptionsBancontactBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "preferred_language" => { - b.preferred_language = Some(FromValueOpt::from_value(v)?) - } - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "preferred_language" => b.preferred_language = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_boleto.rs b/generated/async-stripe-shared/src/payment_method_options_boleto.rs index 24125b371..bddf44e8c 100644 --- a/generated/async-stripe-shared/src/payment_method_options_boleto.rs +++ b/generated/async-stripe-shared/src/payment_method_options_boleto.rs @@ -19,7 +19,12 @@ pub struct PaymentMethodOptionsBoletoBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,10 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - expires_after_days: self.expires_after_days?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(expires_after_days), Some(setup_future_usage)) = + (self.expires_after_days, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { expires_after_days, setup_future_usage }) } } @@ -98,12 +105,8 @@ const _: () = { let mut b = PaymentMethodOptionsBoletoBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "expires_after_days" => { - b.expires_after_days = Some(FromValueOpt::from_value(v)?) - } - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "expires_after_days" => b.expires_after_days = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_card_installments.rs b/generated/async-stripe-shared/src/payment_method_options_card_installments.rs index 05d3d358a..b95939875 100644 --- a/generated/async-stripe-shared/src/payment_method_options_card_installments.rs +++ b/generated/async-stripe-shared/src/payment_method_options_card_installments.rs @@ -16,7 +16,12 @@ pub struct PaymentMethodOptionsCardInstallmentsBuilder { plan: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - available_plans: self.available_plans.take()?, - enabled: self.enabled?, - plan: self.plan?, - }) + let (Some(available_plans), Some(enabled), Some(plan)) = + (self.available_plans.take(), self.enabled, self.plan) + else { + return None; + }; + Some(Self::Out { available_plans, enabled, plan }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = PaymentMethodOptionsCardInstallmentsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "available_plans" => b.available_plans = Some(FromValueOpt::from_value(v)?), - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "plan" => b.plan = Some(FromValueOpt::from_value(v)?), + "available_plans" => b.available_plans = FromValueOpt::from_value(v), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "plan" => b.plan = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_card_mandate_options.rs b/generated/async-stripe-shared/src/payment_method_options_card_mandate_options.rs index 9616d4e78..1c9479ae4 100644 --- a/generated/async-stripe-shared/src/payment_method_options_card_mandate_options.rs +++ b/generated/async-stripe-shared/src/payment_method_options_card_mandate_options.rs @@ -41,7 +41,12 @@ pub struct PaymentMethodOptionsCardMandateOptionsBuilder { supported_types: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -104,16 +109,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_type), + Some(description), + Some(end_date), + Some(interval), + Some(interval_count), + Some(reference), + Some(start_date), + Some(supported_types), + ) = ( + self.amount, + self.amount_type, + self.description.take(), + self.end_date, + self.interval, + self.interval_count, + self.reference.take(), + self.start_date, + self.supported_types.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_type: self.amount_type?, - description: self.description.take()?, - end_date: self.end_date?, - interval: self.interval?, - interval_count: self.interval_count?, - reference: self.reference.take()?, - start_date: self.start_date?, - supported_types: self.supported_types.take()?, + amount, + amount_type, + description, + end_date, + interval, + interval_count, + reference, + start_date, + supported_types, }) } } @@ -141,15 +170,15 @@ const _: () = { let mut b = PaymentMethodOptionsCardMandateOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_type" => b.amount_type = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "end_date" => b.end_date = Some(FromValueOpt::from_value(v)?), - "interval" => b.interval = Some(FromValueOpt::from_value(v)?), - "interval_count" => b.interval_count = Some(FromValueOpt::from_value(v)?), - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "start_date" => b.start_date = Some(FromValueOpt::from_value(v)?), - "supported_types" => b.supported_types = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_type" => b.amount_type = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "end_date" => b.end_date = FromValueOpt::from_value(v), + "interval" => b.interval = FromValueOpt::from_value(v), + "interval_count" => b.interval_count = FromValueOpt::from_value(v), + "reference" => b.reference = FromValueOpt::from_value(v), + "start_date" => b.start_date = FromValueOpt::from_value(v), + "supported_types" => b.supported_types = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_card_present.rs b/generated/async-stripe-shared/src/payment_method_options_card_present.rs index 105b3aa4e..7bee7b45a 100644 --- a/generated/async-stripe-shared/src/payment_method_options_card_present.rs +++ b/generated/async-stripe-shared/src/payment_method_options_card_present.rs @@ -14,7 +14,12 @@ pub struct PaymentMethodOptionsCardPresentBuilder { request_incremental_authorization_support: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,10 +72,19 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(request_extended_authorization), + Some(request_incremental_authorization_support), + ) = ( + self.request_extended_authorization, + self.request_incremental_authorization_support, + ) + else { + return None; + }; Some(Self::Out { - request_extended_authorization: self.request_extended_authorization?, - request_incremental_authorization_support: self - .request_incremental_authorization_support?, + request_extended_authorization, + request_incremental_authorization_support, }) } } @@ -99,11 +113,10 @@ const _: () = { for (k, v) in obj { match k.as_str() { "request_extended_authorization" => { - b.request_extended_authorization = Some(FromValueOpt::from_value(v)?) + b.request_extended_authorization = FromValueOpt::from_value(v) } "request_incremental_authorization_support" => { - b.request_incremental_authorization_support = - Some(FromValueOpt::from_value(v)?) + b.request_incremental_authorization_support = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/payment_method_options_cashapp.rs b/generated/async-stripe-shared/src/payment_method_options_cashapp.rs index bd120bba4..e1fcfa822 100644 --- a/generated/async-stripe-shared/src/payment_method_options_cashapp.rs +++ b/generated/async-stripe-shared/src/payment_method_options_cashapp.rs @@ -18,7 +18,12 @@ pub struct PaymentMethodOptionsCashappBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,10 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - capture_method: self.capture_method?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(capture_method), Some(setup_future_usage)) = + (self.capture_method, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { capture_method, setup_future_usage }) } } @@ -97,10 +104,8 @@ const _: () = { let mut b = PaymentMethodOptionsCashappBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "capture_method" => b.capture_method = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "capture_method" => b.capture_method = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_customer_balance.rs b/generated/async-stripe-shared/src/payment_method_options_customer_balance.rs index a5fd5ac64..425bf832a 100644 --- a/generated/async-stripe-shared/src/payment_method_options_customer_balance.rs +++ b/generated/async-stripe-shared/src/payment_method_options_customer_balance.rs @@ -21,7 +21,12 @@ pub struct PaymentMethodOptionsCustomerBalanceBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,11 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank_transfer: self.bank_transfer.take()?, - funding_type: self.funding_type?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(bank_transfer), Some(funding_type), Some(setup_future_usage)) = + (self.bank_transfer.take(), self.funding_type, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { bank_transfer, funding_type, setup_future_usage }) } } @@ -103,11 +109,9 @@ const _: () = { let mut b = PaymentMethodOptionsCustomerBalanceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_transfer" => b.bank_transfer = Some(FromValueOpt::from_value(v)?), - "funding_type" => b.funding_type = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "bank_transfer" => b.bank_transfer = FromValueOpt::from_value(v), + "funding_type" => b.funding_type = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_customer_balance_bank_transfer.rs b/generated/async-stripe-shared/src/payment_method_options_customer_balance_bank_transfer.rs index bbd1c0581..f211069e2 100644 --- a/generated/async-stripe-shared/src/payment_method_options_customer_balance_bank_transfer.rs +++ b/generated/async-stripe-shared/src/payment_method_options_customer_balance_bank_transfer.rs @@ -22,7 +22,12 @@ pub struct PaymentMethodOptionsCustomerBalanceBankTransferBuilder { type_: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,11 +78,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - eu_bank_transfer: self.eu_bank_transfer?, - requested_address_types: self.requested_address_types.take()?, - type_: self.type_?, - }) + let (Some(eu_bank_transfer), Some(requested_address_types), Some(type_)) = + (self.eu_bank_transfer, self.requested_address_types.take(), self.type_) + else { + return None; + }; + Some(Self::Out { eu_bank_transfer, requested_address_types, type_ }) } } @@ -104,11 +110,11 @@ const _: () = { let mut b = PaymentMethodOptionsCustomerBalanceBankTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "eu_bank_transfer" => b.eu_bank_transfer = Some(FromValueOpt::from_value(v)?), + "eu_bank_transfer" => b.eu_bank_transfer = FromValueOpt::from_value(v), "requested_address_types" => { - b.requested_address_types = Some(FromValueOpt::from_value(v)?) + b.requested_address_types = FromValueOpt::from_value(v) } - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_customer_balance_eu_bank_account.rs b/generated/async-stripe-shared/src/payment_method_options_customer_balance_eu_bank_account.rs index b392046a0..8263c2c5b 100644 --- a/generated/async-stripe-shared/src/payment_method_options_customer_balance_eu_bank_account.rs +++ b/generated/async-stripe-shared/src/payment_method_options_customer_balance_eu_bank_account.rs @@ -11,7 +11,12 @@ pub struct PaymentMethodOptionsCustomerBalanceEuBankAccountBuilder { country: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { country: self.country? }) + let (Some(country),) = (self.country,) else { + return None; + }; + Some(Self::Out { country }) } } @@ -83,7 +91,7 @@ const _: () = { let mut b = PaymentMethodOptionsCustomerBalanceEuBankAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "country" => b.country = Some(FromValueOpt::from_value(v)?), + "country" => b.country = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_fpx.rs b/generated/async-stripe-shared/src/payment_method_options_fpx.rs index 75af06978..67dcf0400 100644 --- a/generated/async-stripe-shared/src/payment_method_options_fpx.rs +++ b/generated/async-stripe-shared/src/payment_method_options_fpx.rs @@ -15,7 +15,12 @@ pub struct PaymentMethodOptionsFpxBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = PaymentMethodOptionsFpxBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_giropay.rs b/generated/async-stripe-shared/src/payment_method_options_giropay.rs index 3c4fc270b..72af8f6ee 100644 --- a/generated/async-stripe-shared/src/payment_method_options_giropay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_giropay.rs @@ -15,7 +15,12 @@ pub struct PaymentMethodOptionsGiropayBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = PaymentMethodOptionsGiropayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_grabpay.rs b/generated/async-stripe-shared/src/payment_method_options_grabpay.rs index bcd8e38f5..70134f686 100644 --- a/generated/async-stripe-shared/src/payment_method_options_grabpay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_grabpay.rs @@ -15,7 +15,12 @@ pub struct PaymentMethodOptionsGrabpayBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = PaymentMethodOptionsGrabpayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_ideal.rs b/generated/async-stripe-shared/src/payment_method_options_ideal.rs index 86960fb01..adcdba4f3 100644 --- a/generated/async-stripe-shared/src/payment_method_options_ideal.rs +++ b/generated/async-stripe-shared/src/payment_method_options_ideal.rs @@ -15,7 +15,12 @@ pub struct PaymentMethodOptionsIdealBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = PaymentMethodOptionsIdealBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_interac_present.rs b/generated/async-stripe-shared/src/payment_method_options_interac_present.rs index 45c3c6a6a..68b19c8f6 100644 --- a/generated/async-stripe-shared/src/payment_method_options_interac_present.rs +++ b/generated/async-stripe-shared/src/payment_method_options_interac_present.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodOptionsInteracPresent {} #[doc(hidden)] pub struct PaymentMethodOptionsInteracPresentBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_options_klarna.rs b/generated/async-stripe-shared/src/payment_method_options_klarna.rs index 42ee23377..6055ba674 100644 --- a/generated/async-stripe-shared/src/payment_method_options_klarna.rs +++ b/generated/async-stripe-shared/src/payment_method_options_klarna.rs @@ -21,7 +21,12 @@ pub struct PaymentMethodOptionsKlarnaBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,11 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - capture_method: self.capture_method?, - preferred_locale: self.preferred_locale.take()?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(capture_method), Some(preferred_locale), Some(setup_future_usage)) = + (self.capture_method, self.preferred_locale.take(), self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { capture_method, preferred_locale, setup_future_usage }) } } @@ -103,11 +109,9 @@ const _: () = { let mut b = PaymentMethodOptionsKlarnaBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "capture_method" => b.capture_method = Some(FromValueOpt::from_value(v)?), - "preferred_locale" => b.preferred_locale = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "capture_method" => b.capture_method = FromValueOpt::from_value(v), + "preferred_locale" => b.preferred_locale = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_konbini.rs b/generated/async-stripe-shared/src/payment_method_options_konbini.rs index 4d5b346f0..9a6e2b798 100644 --- a/generated/async-stripe-shared/src/payment_method_options_konbini.rs +++ b/generated/async-stripe-shared/src/payment_method_options_konbini.rs @@ -29,7 +29,12 @@ pub struct PaymentMethodOptionsKonbiniBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -84,12 +89,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(confirmation_number), + Some(expires_after_days), + Some(expires_at), + Some(product_description), + Some(setup_future_usage), + ) = ( + self.confirmation_number.take(), + self.expires_after_days, + self.expires_at, + self.product_description.take(), + self.setup_future_usage, + ) + else { + return None; + }; Some(Self::Out { - confirmation_number: self.confirmation_number.take()?, - expires_after_days: self.expires_after_days?, - expires_at: self.expires_at?, - product_description: self.product_description.take()?, - setup_future_usage: self.setup_future_usage?, + confirmation_number, + expires_after_days, + expires_at, + product_description, + setup_future_usage, }) } } @@ -117,19 +138,11 @@ const _: () = { let mut b = PaymentMethodOptionsKonbiniBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "confirmation_number" => { - b.confirmation_number = Some(FromValueOpt::from_value(v)?) - } - "expires_after_days" => { - b.expires_after_days = Some(FromValueOpt::from_value(v)?) - } - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "product_description" => { - b.product_description = Some(FromValueOpt::from_value(v)?) - } - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "confirmation_number" => b.confirmation_number = FromValueOpt::from_value(v), + "expires_after_days" => b.expires_after_days = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "product_description" => b.product_description = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_oxxo.rs b/generated/async-stripe-shared/src/payment_method_options_oxxo.rs index 5ea1d17b8..666107c8c 100644 --- a/generated/async-stripe-shared/src/payment_method_options_oxxo.rs +++ b/generated/async-stripe-shared/src/payment_method_options_oxxo.rs @@ -19,7 +19,12 @@ pub struct PaymentMethodOptionsOxxoBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,10 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - expires_after_days: self.expires_after_days?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(expires_after_days), Some(setup_future_usage)) = + (self.expires_after_days, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { expires_after_days, setup_future_usage }) } } @@ -98,12 +105,8 @@ const _: () = { let mut b = PaymentMethodOptionsOxxoBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "expires_after_days" => { - b.expires_after_days = Some(FromValueOpt::from_value(v)?) - } - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "expires_after_days" => b.expires_after_days = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_p24.rs b/generated/async-stripe-shared/src/payment_method_options_p24.rs index 49f46d4c3..130373195 100644 --- a/generated/async-stripe-shared/src/payment_method_options_p24.rs +++ b/generated/async-stripe-shared/src/payment_method_options_p24.rs @@ -15,7 +15,12 @@ pub struct PaymentMethodOptionsP24Builder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = PaymentMethodOptionsP24Builder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_paynow.rs b/generated/async-stripe-shared/src/payment_method_options_paynow.rs index 472c21275..fa0907ef7 100644 --- a/generated/async-stripe-shared/src/payment_method_options_paynow.rs +++ b/generated/async-stripe-shared/src/payment_method_options_paynow.rs @@ -15,7 +15,12 @@ pub struct PaymentMethodOptionsPaynowBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = PaymentMethodOptionsPaynowBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_paypal.rs b/generated/async-stripe-shared/src/payment_method_options_paypal.rs index 4ba9803fb..0b7e6e45d 100644 --- a/generated/async-stripe-shared/src/payment_method_options_paypal.rs +++ b/generated/async-stripe-shared/src/payment_method_options_paypal.rs @@ -25,7 +25,12 @@ pub struct PaymentMethodOptionsPaypalBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -78,12 +83,21 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - capture_method: self.capture_method?, - preferred_locale: self.preferred_locale.take()?, - reference: self.reference.take()?, - setup_future_usage: self.setup_future_usage?, - }) + let ( + Some(capture_method), + Some(preferred_locale), + Some(reference), + Some(setup_future_usage), + ) = ( + self.capture_method, + self.preferred_locale.take(), + self.reference.take(), + self.setup_future_usage, + ) + else { + return None; + }; + Some(Self::Out { capture_method, preferred_locale, reference, setup_future_usage }) } } @@ -110,12 +124,10 @@ const _: () = { let mut b = PaymentMethodOptionsPaypalBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "capture_method" => b.capture_method = Some(FromValueOpt::from_value(v)?), - "preferred_locale" => b.preferred_locale = Some(FromValueOpt::from_value(v)?), - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "capture_method" => b.capture_method = FromValueOpt::from_value(v), + "preferred_locale" => b.preferred_locale = FromValueOpt::from_value(v), + "reference" => b.reference = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_pix.rs b/generated/async-stripe-shared/src/payment_method_options_pix.rs index 0d7f9f459..ff5da04e6 100644 --- a/generated/async-stripe-shared/src/payment_method_options_pix.rs +++ b/generated/async-stripe-shared/src/payment_method_options_pix.rs @@ -21,7 +21,12 @@ pub struct PaymentMethodOptionsPixBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,11 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - expires_after_seconds: self.expires_after_seconds?, - expires_at: self.expires_at?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(expires_after_seconds), Some(expires_at), Some(setup_future_usage)) = + (self.expires_after_seconds, self.expires_at, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { expires_after_seconds, expires_at, setup_future_usage }) } } @@ -104,12 +110,10 @@ const _: () = { for (k, v) in obj { match k.as_str() { "expires_after_seconds" => { - b.expires_after_seconds = Some(FromValueOpt::from_value(v)?) - } - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) + b.expires_after_seconds = FromValueOpt::from_value(v) } + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_promptpay.rs b/generated/async-stripe-shared/src/payment_method_options_promptpay.rs index 547d7f4b8..3649ea434 100644 --- a/generated/async-stripe-shared/src/payment_method_options_promptpay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_promptpay.rs @@ -15,7 +15,12 @@ pub struct PaymentMethodOptionsPromptpayBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = PaymentMethodOptionsPromptpayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_revolut_pay.rs b/generated/async-stripe-shared/src/payment_method_options_revolut_pay.rs index 32f5a857c..369ca814b 100644 --- a/generated/async-stripe-shared/src/payment_method_options_revolut_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_revolut_pay.rs @@ -18,7 +18,12 @@ pub struct PaymentMethodOptionsRevolutPayBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,10 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - capture_method: self.capture_method?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(capture_method), Some(setup_future_usage)) = + (self.capture_method, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { capture_method, setup_future_usage }) } } @@ -97,10 +104,8 @@ const _: () = { let mut b = PaymentMethodOptionsRevolutPayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "capture_method" => b.capture_method = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "capture_method" => b.capture_method = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_sofort.rs b/generated/async-stripe-shared/src/payment_method_options_sofort.rs index 0ea71a7e3..7baf873ab 100644 --- a/generated/async-stripe-shared/src/payment_method_options_sofort.rs +++ b/generated/async-stripe-shared/src/payment_method_options_sofort.rs @@ -18,7 +18,12 @@ pub struct PaymentMethodOptionsSofortBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,10 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - preferred_language: self.preferred_language?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(preferred_language), Some(setup_future_usage)) = + (self.preferred_language, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { preferred_language, setup_future_usage }) } } @@ -97,12 +104,8 @@ const _: () = { let mut b = PaymentMethodOptionsSofortBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "preferred_language" => { - b.preferred_language = Some(FromValueOpt::from_value(v)?) - } - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "preferred_language" => b.preferred_language = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_us_bank_account_mandate_options.rs b/generated/async-stripe-shared/src/payment_method_options_us_bank_account_mandate_options.rs index 8a0a3b3ff..397e62748 100644 --- a/generated/async-stripe-shared/src/payment_method_options_us_bank_account_mandate_options.rs +++ b/generated/async-stripe-shared/src/payment_method_options_us_bank_account_mandate_options.rs @@ -11,7 +11,12 @@ pub struct PaymentMethodOptionsUsBankAccountMandateOptionsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { collection_method: self.collection_method? }) + let (Some(collection_method),) = (self.collection_method,) else { + return None; + }; + Some(Self::Out { collection_method }) } } @@ -83,7 +91,7 @@ const _: () = { let mut b = PaymentMethodOptionsUsBankAccountMandateOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "collection_method" => b.collection_method = Some(FromValueOpt::from_value(v)?), + "collection_method" => b.collection_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_wechat_pay.rs b/generated/async-stripe-shared/src/payment_method_options_wechat_pay.rs index f56f102a8..f05d1c525 100644 --- a/generated/async-stripe-shared/src/payment_method_options_wechat_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_wechat_pay.rs @@ -21,7 +21,12 @@ pub struct PaymentMethodOptionsWechatPayBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,11 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - app_id: self.app_id.take()?, - client: self.client?, - setup_future_usage: self.setup_future_usage?, - }) + let (Some(app_id), Some(client), Some(setup_future_usage)) = + (self.app_id.take(), self.client, self.setup_future_usage) + else { + return None; + }; + Some(Self::Out { app_id, client, setup_future_usage }) } } @@ -103,11 +109,9 @@ const _: () = { let mut b = PaymentMethodOptionsWechatPayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "app_id" => b.app_id = Some(FromValueOpt::from_value(v)?), - "client" => b.client = Some(FromValueOpt::from_value(v)?), - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "app_id" => b.app_id = FromValueOpt::from_value(v), + "client" => b.client = FromValueOpt::from_value(v), + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_options_zip.rs b/generated/async-stripe-shared/src/payment_method_options_zip.rs index fccabe452..a04215940 100644 --- a/generated/async-stripe-shared/src/payment_method_options_zip.rs +++ b/generated/async-stripe-shared/src/payment_method_options_zip.rs @@ -15,7 +15,12 @@ pub struct PaymentMethodOptionsZipBuilder { setup_future_usage: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { setup_future_usage: self.setup_future_usage? }) + let (Some(setup_future_usage),) = (self.setup_future_usage,) else { + return None; + }; + Some(Self::Out { setup_future_usage }) } } @@ -87,9 +95,7 @@ const _: () = { let mut b = PaymentMethodOptionsZipBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "setup_future_usage" => { - b.setup_future_usage = Some(FromValueOpt::from_value(v)?) - } + "setup_future_usage" => b.setup_future_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_oxxo.rs b/generated/async-stripe-shared/src/payment_method_oxxo.rs index a164fc8e0..033c8b3ef 100644 --- a/generated/async-stripe-shared/src/payment_method_oxxo.rs +++ b/generated/async-stripe-shared/src/payment_method_oxxo.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodOxxo {} #[doc(hidden)] pub struct PaymentMethodOxxoBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_p24.rs b/generated/async-stripe-shared/src/payment_method_p24.rs index 73e9520a2..93dd863fe 100644 --- a/generated/async-stripe-shared/src/payment_method_p24.rs +++ b/generated/async-stripe-shared/src/payment_method_p24.rs @@ -10,7 +10,12 @@ pub struct PaymentMethodP24Builder { bank: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { bank: self.bank? }) + let (Some(bank),) = (self.bank,) else { + return None; + }; + Some(Self::Out { bank }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentMethodP24Builder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank" => b.bank = Some(FromValueOpt::from_value(v)?), + "bank" => b.bank = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_paynow.rs b/generated/async-stripe-shared/src/payment_method_paynow.rs index 1923e5051..f8d6c6df6 100644 --- a/generated/async-stripe-shared/src/payment_method_paynow.rs +++ b/generated/async-stripe-shared/src/payment_method_paynow.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodPaynow {} #[doc(hidden)] pub struct PaymentMethodPaynowBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_paypal.rs b/generated/async-stripe-shared/src/payment_method_paypal.rs index 4971fc219..9aea8e6ea 100644 --- a/generated/async-stripe-shared/src/payment_method_paypal.rs +++ b/generated/async-stripe-shared/src/payment_method_paypal.rs @@ -14,7 +14,12 @@ pub struct PaymentMethodPaypalBuilder { payer_id: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,10 +65,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - payer_email: self.payer_email.take()?, - payer_id: self.payer_id.take()?, - }) + let (Some(payer_email), Some(payer_id)) = + (self.payer_email.take(), self.payer_id.take()) + else { + return None; + }; + Some(Self::Out { payer_email, payer_id }) } } @@ -90,8 +97,8 @@ const _: () = { let mut b = PaymentMethodPaypalBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "payer_email" => b.payer_email = Some(FromValueOpt::from_value(v)?), - "payer_id" => b.payer_id = Some(FromValueOpt::from_value(v)?), + "payer_email" => b.payer_email = FromValueOpt::from_value(v), + "payer_id" => b.payer_id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_pix.rs b/generated/async-stripe-shared/src/payment_method_pix.rs index bb9ccb64f..d1cf45264 100644 --- a/generated/async-stripe-shared/src/payment_method_pix.rs +++ b/generated/async-stripe-shared/src/payment_method_pix.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodPix {} #[doc(hidden)] pub struct PaymentMethodPixBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_promptpay.rs b/generated/async-stripe-shared/src/payment_method_promptpay.rs index ecbca2e7c..b8e5b27f2 100644 --- a/generated/async-stripe-shared/src/payment_method_promptpay.rs +++ b/generated/async-stripe-shared/src/payment_method_promptpay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodPromptpay {} #[doc(hidden)] pub struct PaymentMethodPromptpayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_revolut_pay.rs b/generated/async-stripe-shared/src/payment_method_revolut_pay.rs index 06c9ce49c..8e093515e 100644 --- a/generated/async-stripe-shared/src/payment_method_revolut_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_revolut_pay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodRevolutPay {} #[doc(hidden)] pub struct PaymentMethodRevolutPayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_sepa_debit.rs b/generated/async-stripe-shared/src/payment_method_sepa_debit.rs index 610d77064..8f28c8aaf 100644 --- a/generated/async-stripe-shared/src/payment_method_sepa_debit.rs +++ b/generated/async-stripe-shared/src/payment_method_sepa_debit.rs @@ -26,7 +26,12 @@ pub struct PaymentMethodSepaDebitBuilder { last4: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -83,14 +88,25 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank_code: self.bank_code.take()?, - branch_code: self.branch_code.take()?, - country: self.country.take()?, - fingerprint: self.fingerprint.take()?, - generated_from: self.generated_from.take()?, - last4: self.last4.take()?, - }) + let ( + Some(bank_code), + Some(branch_code), + Some(country), + Some(fingerprint), + Some(generated_from), + Some(last4), + ) = ( + self.bank_code.take(), + self.branch_code.take(), + self.country.take(), + self.fingerprint.take(), + self.generated_from.take(), + self.last4.take(), + ) + else { + return None; + }; + Some(Self::Out { bank_code, branch_code, country, fingerprint, generated_from, last4 }) } } @@ -117,12 +133,12 @@ const _: () = { let mut b = PaymentMethodSepaDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_code" => b.bank_code = Some(FromValueOpt::from_value(v)?), - "branch_code" => b.branch_code = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "generated_from" => b.generated_from = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), + "bank_code" => b.bank_code = FromValueOpt::from_value(v), + "branch_code" => b.branch_code = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "generated_from" => b.generated_from = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_sofort.rs b/generated/async-stripe-shared/src/payment_method_sofort.rs index ef5c5a809..8364fe4a5 100644 --- a/generated/async-stripe-shared/src/payment_method_sofort.rs +++ b/generated/async-stripe-shared/src/payment_method_sofort.rs @@ -10,7 +10,12 @@ pub struct PaymentMethodSofortBuilder { country: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { country: self.country.take()? }) + let (Some(country),) = (self.country.take(),) else { + return None; + }; + Some(Self::Out { country }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PaymentMethodSofortBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "country" => b.country = Some(FromValueOpt::from_value(v)?), + "country" => b.country = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_swish.rs b/generated/async-stripe-shared/src/payment_method_swish.rs index 81eb9857b..b5ff18ac8 100644 --- a/generated/async-stripe-shared/src/payment_method_swish.rs +++ b/generated/async-stripe-shared/src/payment_method_swish.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodSwish {} #[doc(hidden)] pub struct PaymentMethodSwishBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_us_bank_account.rs b/generated/async-stripe-shared/src/payment_method_us_bank_account.rs index ea2679094..c4a357552 100644 --- a/generated/async-stripe-shared/src/payment_method_us_bank_account.rs +++ b/generated/async-stripe-shared/src/payment_method_us_bank_account.rs @@ -35,7 +35,12 @@ pub struct PaymentMethodUsBankAccountBuilder { status_details: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -100,16 +105,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_holder_type), + Some(account_type), + Some(bank_name), + Some(financial_connections_account), + Some(fingerprint), + Some(last4), + Some(networks), + Some(routing_number), + Some(status_details), + ) = ( + self.account_holder_type, + self.account_type, + self.bank_name.take(), + self.financial_connections_account.take(), + self.fingerprint.take(), + self.last4.take(), + self.networks.take(), + self.routing_number.take(), + self.status_details, + ) + else { + return None; + }; Some(Self::Out { - account_holder_type: self.account_holder_type?, - account_type: self.account_type?, - bank_name: self.bank_name.take()?, - financial_connections_account: self.financial_connections_account.take()?, - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - networks: self.networks.take()?, - routing_number: self.routing_number.take()?, - status_details: self.status_details?, + account_holder_type, + account_type, + bank_name, + financial_connections_account, + fingerprint, + last4, + networks, + routing_number, + status_details, }) } } @@ -137,19 +166,17 @@ const _: () = { let mut b = PaymentMethodUsBankAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_holder_type" => { - b.account_holder_type = Some(FromValueOpt::from_value(v)?) - } - "account_type" => b.account_type = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), + "account_holder_type" => b.account_holder_type = FromValueOpt::from_value(v), + "account_type" => b.account_type = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), "financial_connections_account" => { - b.financial_connections_account = Some(FromValueOpt::from_value(v)?) + b.financial_connections_account = FromValueOpt::from_value(v) } - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "networks" => b.networks = Some(FromValueOpt::from_value(v)?), - "routing_number" => b.routing_number = Some(FromValueOpt::from_value(v)?), - "status_details" => b.status_details = Some(FromValueOpt::from_value(v)?), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "networks" => b.networks = FromValueOpt::from_value(v), + "routing_number" => b.routing_number = FromValueOpt::from_value(v), + "status_details" => b.status_details = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_us_bank_account_blocked.rs b/generated/async-stripe-shared/src/payment_method_us_bank_account_blocked.rs index c8fcbf020..45ddfb738 100644 --- a/generated/async-stripe-shared/src/payment_method_us_bank_account_blocked.rs +++ b/generated/async-stripe-shared/src/payment_method_us_bank_account_blocked.rs @@ -13,7 +13,12 @@ pub struct PaymentMethodUsBankAccountBlockedBuilder { reason: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { network_code: self.network_code?, reason: self.reason? }) + let (Some(network_code), Some(reason)) = (self.network_code, self.reason) else { + return None; + }; + Some(Self::Out { network_code, reason }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = PaymentMethodUsBankAccountBlockedBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "network_code" => b.network_code = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), + "network_code" => b.network_code = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_us_bank_account_status_details.rs b/generated/async-stripe-shared/src/payment_method_us_bank_account_status_details.rs index cf3c57304..c4cd90ecf 100644 --- a/generated/async-stripe-shared/src/payment_method_us_bank_account_status_details.rs +++ b/generated/async-stripe-shared/src/payment_method_us_bank_account_status_details.rs @@ -9,7 +9,12 @@ pub struct PaymentMethodUsBankAccountStatusDetailsBuilder { blocked: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -54,7 +59,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { blocked: self.blocked? }) + let (Some(blocked),) = (self.blocked,) else { + return None; + }; + Some(Self::Out { blocked }) } } @@ -81,7 +89,7 @@ const _: () = { let mut b = PaymentMethodUsBankAccountStatusDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "blocked" => b.blocked = Some(FromValueOpt::from_value(v)?), + "blocked" => b.blocked = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/payment_method_wechat_pay.rs b/generated/async-stripe-shared/src/payment_method_wechat_pay.rs index ff73058d5..0a0a6d6cc 100644 --- a/generated/async-stripe-shared/src/payment_method_wechat_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_wechat_pay.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodWechatPay {} #[doc(hidden)] pub struct PaymentMethodWechatPayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payment_method_zip.rs b/generated/async-stripe-shared/src/payment_method_zip.rs index b6188375a..23b97c98a 100644 --- a/generated/async-stripe-shared/src/payment_method_zip.rs +++ b/generated/async-stripe-shared/src/payment_method_zip.rs @@ -5,7 +5,12 @@ pub struct PaymentMethodZip {} #[doc(hidden)] pub struct PaymentMethodZipBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/payout.rs b/generated/async-stripe-shared/src/payout.rs index 13062f8b5..4b2f194e6 100644 --- a/generated/async-stripe-shared/src/payout.rs +++ b/generated/async-stripe-shared/src/payout.rs @@ -95,7 +95,12 @@ pub struct PayoutBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -183,29 +188,79 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(arrival_date), + Some(automatic), + Some(balance_transaction), + Some(created), + Some(currency), + Some(description), + Some(destination), + Some(failure_balance_transaction), + Some(failure_code), + Some(failure_message), + Some(id), + Some(livemode), + Some(metadata), + Some(method), + Some(original_payout), + Some(reconciliation_status), + Some(reversed_by), + Some(source_type), + Some(statement_descriptor), + Some(status), + Some(type_), + ) = ( + self.amount, + self.arrival_date, + self.automatic, + self.balance_transaction.take(), + self.created, + self.currency, + self.description.take(), + self.destination.take(), + self.failure_balance_transaction.take(), + self.failure_code.take(), + self.failure_message.take(), + self.id.take(), + self.livemode, + self.metadata.take(), + self.method.take(), + self.original_payout.take(), + self.reconciliation_status, + self.reversed_by.take(), + self.source_type.take(), + self.statement_descriptor.take(), + self.status.take(), + self.type_, + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - arrival_date: self.arrival_date?, - automatic: self.automatic?, - balance_transaction: self.balance_transaction.take()?, - created: self.created?, - currency: self.currency?, - description: self.description.take()?, - destination: self.destination.take()?, - failure_balance_transaction: self.failure_balance_transaction.take()?, - failure_code: self.failure_code.take()?, - failure_message: self.failure_message.take()?, - id: self.id.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - method: self.method.take()?, - original_payout: self.original_payout.take()?, - reconciliation_status: self.reconciliation_status?, - reversed_by: self.reversed_by.take()?, - source_type: self.source_type.take()?, - statement_descriptor: self.statement_descriptor.take()?, - status: self.status.take()?, - type_: self.type_?, + amount, + arrival_date, + automatic, + balance_transaction, + created, + currency, + description, + destination, + failure_balance_transaction, + failure_code, + failure_message, + id, + livemode, + metadata, + method, + original_payout, + reconciliation_status, + reversed_by, + source_type, + statement_descriptor, + status, + type_, }) } } @@ -233,36 +288,32 @@ const _: () = { let mut b = PayoutBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "arrival_date" => b.arrival_date = Some(FromValueOpt::from_value(v)?), - "automatic" => b.automatic = Some(FromValueOpt::from_value(v)?), - "balance_transaction" => { - b.balance_transaction = Some(FromValueOpt::from_value(v)?) - } - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "destination" => b.destination = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "arrival_date" => b.arrival_date = FromValueOpt::from_value(v), + "automatic" => b.automatic = FromValueOpt::from_value(v), + "balance_transaction" => b.balance_transaction = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "destination" => b.destination = FromValueOpt::from_value(v), "failure_balance_transaction" => { - b.failure_balance_transaction = Some(FromValueOpt::from_value(v)?) + b.failure_balance_transaction = FromValueOpt::from_value(v) } - "failure_code" => b.failure_code = Some(FromValueOpt::from_value(v)?), - "failure_message" => b.failure_message = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "method" => b.method = Some(FromValueOpt::from_value(v)?), - "original_payout" => b.original_payout = Some(FromValueOpt::from_value(v)?), + "failure_code" => b.failure_code = FromValueOpt::from_value(v), + "failure_message" => b.failure_message = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "method" => b.method = FromValueOpt::from_value(v), + "original_payout" => b.original_payout = FromValueOpt::from_value(v), "reconciliation_status" => { - b.reconciliation_status = Some(FromValueOpt::from_value(v)?) - } - "reversed_by" => b.reversed_by = Some(FromValueOpt::from_value(v)?), - "source_type" => b.source_type = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) + b.reconciliation_status = FromValueOpt::from_value(v) } - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "reversed_by" => b.reversed_by = FromValueOpt::from_value(v), + "source_type" => b.source_type = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/paypal_seller_protection.rs b/generated/async-stripe-shared/src/paypal_seller_protection.rs index 9bef9b05c..5bb79779d 100644 --- a/generated/async-stripe-shared/src/paypal_seller_protection.rs +++ b/generated/async-stripe-shared/src/paypal_seller_protection.rs @@ -13,7 +13,12 @@ pub struct PaypalSellerProtectionBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - dispute_categories: self.dispute_categories.take()?, - status: self.status?, - }) + let (Some(dispute_categories), Some(status)) = + (self.dispute_categories.take(), self.status) + else { + return None; + }; + Some(Self::Out { dispute_categories, status }) } } @@ -89,10 +96,8 @@ const _: () = { let mut b = PaypalSellerProtectionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "dispute_categories" => { - b.dispute_categories = Some(FromValueOpt::from_value(v)?) - } - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "dispute_categories" => b.dispute_categories = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/period.rs b/generated/async-stripe-shared/src/period.rs index c8b3abc71..d3c8d29f7 100644 --- a/generated/async-stripe-shared/src/period.rs +++ b/generated/async-stripe-shared/src/period.rs @@ -13,7 +13,12 @@ pub struct PeriodBuilder { start: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { end: self.end?, start: self.start? }) + let (Some(end), Some(start)) = (self.end, self.start) else { + return None; + }; + Some(Self::Out { end, start }) } } @@ -83,8 +91,8 @@ const _: () = { let mut b = PeriodBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "end" => b.end = Some(FromValueOpt::from_value(v)?), - "start" => b.start = Some(FromValueOpt::from_value(v)?), + "end" => b.end = FromValueOpt::from_value(v), + "start" => b.start = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/person.rs b/generated/async-stripe-shared/src/person.rs index 5406935e5..8b47bb69f 100644 --- a/generated/async-stripe-shared/src/person.rs +++ b/generated/async-stripe-shared/src/person.rs @@ -101,7 +101,12 @@ pub struct PersonBuilder { verification: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -207,37 +212,103 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account), + Some(additional_tos_acceptances), + Some(address), + Some(address_kana), + Some(address_kanji), + Some(created), + Some(dob), + Some(email), + Some(first_name), + Some(first_name_kana), + Some(first_name_kanji), + Some(full_name_aliases), + Some(future_requirements), + Some(gender), + Some(id), + Some(id_number_provided), + Some(id_number_secondary_provided), + Some(last_name), + Some(last_name_kana), + Some(last_name_kanji), + Some(maiden_name), + Some(metadata), + Some(nationality), + Some(phone), + Some(political_exposure), + Some(registered_address), + Some(relationship), + Some(requirements), + Some(ssn_last_4_provided), + Some(verification), + ) = ( + self.account.take(), + self.additional_tos_acceptances.take(), + self.address.take(), + self.address_kana.take(), + self.address_kanji.take(), + self.created, + self.dob, + self.email.take(), + self.first_name.take(), + self.first_name_kana.take(), + self.first_name_kanji.take(), + self.full_name_aliases.take(), + self.future_requirements.take(), + self.gender.take(), + self.id.take(), + self.id_number_provided, + self.id_number_secondary_provided, + self.last_name.take(), + self.last_name_kana.take(), + self.last_name_kanji.take(), + self.maiden_name.take(), + self.metadata.take(), + self.nationality.take(), + self.phone.take(), + self.political_exposure, + self.registered_address.take(), + self.relationship.take(), + self.requirements.take(), + self.ssn_last_4_provided, + self.verification.take(), + ) + else { + return None; + }; Some(Self::Out { - account: self.account.take()?, - additional_tos_acceptances: self.additional_tos_acceptances.take()?, - address: self.address.take()?, - address_kana: self.address_kana.take()?, - address_kanji: self.address_kanji.take()?, - created: self.created?, - dob: self.dob?, - email: self.email.take()?, - first_name: self.first_name.take()?, - first_name_kana: self.first_name_kana.take()?, - first_name_kanji: self.first_name_kanji.take()?, - full_name_aliases: self.full_name_aliases.take()?, - future_requirements: self.future_requirements.take()?, - gender: self.gender.take()?, - id: self.id.take()?, - id_number_provided: self.id_number_provided?, - id_number_secondary_provided: self.id_number_secondary_provided?, - last_name: self.last_name.take()?, - last_name_kana: self.last_name_kana.take()?, - last_name_kanji: self.last_name_kanji.take()?, - maiden_name: self.maiden_name.take()?, - metadata: self.metadata.take()?, - nationality: self.nationality.take()?, - phone: self.phone.take()?, - political_exposure: self.political_exposure?, - registered_address: self.registered_address.take()?, - relationship: self.relationship.take()?, - requirements: self.requirements.take()?, - ssn_last_4_provided: self.ssn_last_4_provided?, - verification: self.verification.take()?, + account, + additional_tos_acceptances, + address, + address_kana, + address_kanji, + created, + dob, + email, + first_name, + first_name_kana, + first_name_kanji, + full_name_aliases, + future_requirements, + gender, + id, + id_number_provided, + id_number_secondary_provided, + last_name, + last_name_kana, + last_name_kanji, + maiden_name, + metadata, + nationality, + phone, + political_exposure, + registered_address, + relationship, + requirements, + ssn_last_4_provided, + verification, }) } } @@ -265,50 +336,40 @@ const _: () = { let mut b = PersonBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account" => b.account = Some(FromValueOpt::from_value(v)?), + "account" => b.account = FromValueOpt::from_value(v), "additional_tos_acceptances" => { - b.additional_tos_acceptances = Some(FromValueOpt::from_value(v)?) - } - "address" => b.address = Some(FromValueOpt::from_value(v)?), - "address_kana" => b.address_kana = Some(FromValueOpt::from_value(v)?), - "address_kanji" => b.address_kanji = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "dob" => b.dob = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "first_name" => b.first_name = Some(FromValueOpt::from_value(v)?), - "first_name_kana" => b.first_name_kana = Some(FromValueOpt::from_value(v)?), - "first_name_kanji" => b.first_name_kanji = Some(FromValueOpt::from_value(v)?), - "full_name_aliases" => b.full_name_aliases = Some(FromValueOpt::from_value(v)?), - "future_requirements" => { - b.future_requirements = Some(FromValueOpt::from_value(v)?) - } - "gender" => b.gender = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "id_number_provided" => { - b.id_number_provided = Some(FromValueOpt::from_value(v)?) + b.additional_tos_acceptances = FromValueOpt::from_value(v) } + "address" => b.address = FromValueOpt::from_value(v), + "address_kana" => b.address_kana = FromValueOpt::from_value(v), + "address_kanji" => b.address_kanji = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "dob" => b.dob = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "first_name" => b.first_name = FromValueOpt::from_value(v), + "first_name_kana" => b.first_name_kana = FromValueOpt::from_value(v), + "first_name_kanji" => b.first_name_kanji = FromValueOpt::from_value(v), + "full_name_aliases" => b.full_name_aliases = FromValueOpt::from_value(v), + "future_requirements" => b.future_requirements = FromValueOpt::from_value(v), + "gender" => b.gender = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "id_number_provided" => b.id_number_provided = FromValueOpt::from_value(v), "id_number_secondary_provided" => { - b.id_number_secondary_provided = Some(FromValueOpt::from_value(v)?) - } - "last_name" => b.last_name = Some(FromValueOpt::from_value(v)?), - "last_name_kana" => b.last_name_kana = Some(FromValueOpt::from_value(v)?), - "last_name_kanji" => b.last_name_kanji = Some(FromValueOpt::from_value(v)?), - "maiden_name" => b.maiden_name = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "nationality" => b.nationality = Some(FromValueOpt::from_value(v)?), - "phone" => b.phone = Some(FromValueOpt::from_value(v)?), - "political_exposure" => { - b.political_exposure = Some(FromValueOpt::from_value(v)?) - } - "registered_address" => { - b.registered_address = Some(FromValueOpt::from_value(v)?) - } - "relationship" => b.relationship = Some(FromValueOpt::from_value(v)?), - "requirements" => b.requirements = Some(FromValueOpt::from_value(v)?), - "ssn_last_4_provided" => { - b.ssn_last_4_provided = Some(FromValueOpt::from_value(v)?) + b.id_number_secondary_provided = FromValueOpt::from_value(v) } - "verification" => b.verification = Some(FromValueOpt::from_value(v)?), + "last_name" => b.last_name = FromValueOpt::from_value(v), + "last_name_kana" => b.last_name_kana = FromValueOpt::from_value(v), + "last_name_kanji" => b.last_name_kanji = FromValueOpt::from_value(v), + "maiden_name" => b.maiden_name = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "nationality" => b.nationality = FromValueOpt::from_value(v), + "phone" => b.phone = FromValueOpt::from_value(v), + "political_exposure" => b.political_exposure = FromValueOpt::from_value(v), + "registered_address" => b.registered_address = FromValueOpt::from_value(v), + "relationship" => b.relationship = FromValueOpt::from_value(v), + "requirements" => b.requirements = FromValueOpt::from_value(v), + "ssn_last_4_provided" => b.ssn_last_4_provided = FromValueOpt::from_value(v), + "verification" => b.verification = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/person_additional_tos_acceptance.rs b/generated/async-stripe-shared/src/person_additional_tos_acceptance.rs index 109cafaa9..eee588cfa 100644 --- a/generated/async-stripe-shared/src/person_additional_tos_acceptance.rs +++ b/generated/async-stripe-shared/src/person_additional_tos_acceptance.rs @@ -16,7 +16,12 @@ pub struct PersonAdditionalTosAcceptanceBuilder { user_agent: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - date: self.date?, - ip: self.ip.take()?, - user_agent: self.user_agent.take()?, - }) + let (Some(date), Some(ip), Some(user_agent)) = + (self.date, self.ip.take(), self.user_agent.take()) + else { + return None; + }; + Some(Self::Out { date, ip, user_agent }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = PersonAdditionalTosAcceptanceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "date" => b.date = Some(FromValueOpt::from_value(v)?), - "ip" => b.ip = Some(FromValueOpt::from_value(v)?), - "user_agent" => b.user_agent = Some(FromValueOpt::from_value(v)?), + "date" => b.date = FromValueOpt::from_value(v), + "ip" => b.ip = FromValueOpt::from_value(v), + "user_agent" => b.user_agent = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/person_additional_tos_acceptances.rs b/generated/async-stripe-shared/src/person_additional_tos_acceptances.rs index 742c65c5d..7be82418e 100644 --- a/generated/async-stripe-shared/src/person_additional_tos_acceptances.rs +++ b/generated/async-stripe-shared/src/person_additional_tos_acceptances.rs @@ -9,7 +9,12 @@ pub struct PersonAdditionalTosAcceptancesBuilder { account: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -54,7 +59,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { account: self.account.take()? }) + let (Some(account),) = (self.account.take(),) else { + return None; + }; + Some(Self::Out { account }) } } @@ -81,7 +89,7 @@ const _: () = { let mut b = PersonAdditionalTosAcceptancesBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account" => b.account = Some(FromValueOpt::from_value(v)?), + "account" => b.account = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/person_future_requirements.rs b/generated/async-stripe-shared/src/person_future_requirements.rs index 236fe134d..0b35d2739 100644 --- a/generated/async-stripe-shared/src/person_future_requirements.rs +++ b/generated/async-stripe-shared/src/person_future_requirements.rs @@ -32,7 +32,12 @@ pub struct PersonFutureRequirementsBuilder { pending_verification: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -89,13 +94,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(alternatives), + Some(currently_due), + Some(errors), + Some(eventually_due), + Some(past_due), + Some(pending_verification), + ) = ( + self.alternatives.take(), + self.currently_due.take(), + self.errors.take(), + self.eventually_due.take(), + self.past_due.take(), + self.pending_verification.take(), + ) + else { + return None; + }; Some(Self::Out { - alternatives: self.alternatives.take()?, - currently_due: self.currently_due.take()?, - errors: self.errors.take()?, - eventually_due: self.eventually_due.take()?, - past_due: self.past_due.take()?, - pending_verification: self.pending_verification.take()?, + alternatives, + currently_due, + errors, + eventually_due, + past_due, + pending_verification, }) } } @@ -123,14 +146,12 @@ const _: () = { let mut b = PersonFutureRequirementsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "alternatives" => b.alternatives = Some(FromValueOpt::from_value(v)?), - "currently_due" => b.currently_due = Some(FromValueOpt::from_value(v)?), - "errors" => b.errors = Some(FromValueOpt::from_value(v)?), - "eventually_due" => b.eventually_due = Some(FromValueOpt::from_value(v)?), - "past_due" => b.past_due = Some(FromValueOpt::from_value(v)?), - "pending_verification" => { - b.pending_verification = Some(FromValueOpt::from_value(v)?) - } + "alternatives" => b.alternatives = FromValueOpt::from_value(v), + "currently_due" => b.currently_due = FromValueOpt::from_value(v), + "errors" => b.errors = FromValueOpt::from_value(v), + "eventually_due" => b.eventually_due = FromValueOpt::from_value(v), + "past_due" => b.past_due = FromValueOpt::from_value(v), + "pending_verification" => b.pending_verification = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/person_relationship.rs b/generated/async-stripe-shared/src/person_relationship.rs index 71d283416..f7b75fc71 100644 --- a/generated/async-stripe-shared/src/person_relationship.rs +++ b/generated/async-stripe-shared/src/person_relationship.rs @@ -32,7 +32,12 @@ pub struct PersonRelationshipBuilder { title: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -91,14 +96,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(director), + Some(executive), + Some(legal_guardian), + Some(owner), + Some(percent_ownership), + Some(representative), + Some(title), + ) = ( + self.director, + self.executive, + self.legal_guardian, + self.owner, + self.percent_ownership, + self.representative, + self.title.take(), + ) + else { + return None; + }; Some(Self::Out { - director: self.director?, - executive: self.executive?, - legal_guardian: self.legal_guardian?, - owner: self.owner?, - percent_ownership: self.percent_ownership?, - representative: self.representative?, - title: self.title.take()?, + director, + executive, + legal_guardian, + owner, + percent_ownership, + representative, + title, }) } } @@ -126,13 +151,13 @@ const _: () = { let mut b = PersonRelationshipBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "director" => b.director = Some(FromValueOpt::from_value(v)?), - "executive" => b.executive = Some(FromValueOpt::from_value(v)?), - "legal_guardian" => b.legal_guardian = Some(FromValueOpt::from_value(v)?), - "owner" => b.owner = Some(FromValueOpt::from_value(v)?), - "percent_ownership" => b.percent_ownership = Some(FromValueOpt::from_value(v)?), - "representative" => b.representative = Some(FromValueOpt::from_value(v)?), - "title" => b.title = Some(FromValueOpt::from_value(v)?), + "director" => b.director = FromValueOpt::from_value(v), + "executive" => b.executive = FromValueOpt::from_value(v), + "legal_guardian" => b.legal_guardian = FromValueOpt::from_value(v), + "owner" => b.owner = FromValueOpt::from_value(v), + "percent_ownership" => b.percent_ownership = FromValueOpt::from_value(v), + "representative" => b.representative = FromValueOpt::from_value(v), + "title" => b.title = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/person_requirements.rs b/generated/async-stripe-shared/src/person_requirements.rs index b08684027..719b21a58 100644 --- a/generated/async-stripe-shared/src/person_requirements.rs +++ b/generated/async-stripe-shared/src/person_requirements.rs @@ -31,7 +31,12 @@ pub struct PersonRequirementsBuilder { pending_verification: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -88,13 +93,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(alternatives), + Some(currently_due), + Some(errors), + Some(eventually_due), + Some(past_due), + Some(pending_verification), + ) = ( + self.alternatives.take(), + self.currently_due.take(), + self.errors.take(), + self.eventually_due.take(), + self.past_due.take(), + self.pending_verification.take(), + ) + else { + return None; + }; Some(Self::Out { - alternatives: self.alternatives.take()?, - currently_due: self.currently_due.take()?, - errors: self.errors.take()?, - eventually_due: self.eventually_due.take()?, - past_due: self.past_due.take()?, - pending_verification: self.pending_verification.take()?, + alternatives, + currently_due, + errors, + eventually_due, + past_due, + pending_verification, }) } } @@ -122,14 +145,12 @@ const _: () = { let mut b = PersonRequirementsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "alternatives" => b.alternatives = Some(FromValueOpt::from_value(v)?), - "currently_due" => b.currently_due = Some(FromValueOpt::from_value(v)?), - "errors" => b.errors = Some(FromValueOpt::from_value(v)?), - "eventually_due" => b.eventually_due = Some(FromValueOpt::from_value(v)?), - "past_due" => b.past_due = Some(FromValueOpt::from_value(v)?), - "pending_verification" => { - b.pending_verification = Some(FromValueOpt::from_value(v)?) - } + "alternatives" => b.alternatives = FromValueOpt::from_value(v), + "currently_due" => b.currently_due = FromValueOpt::from_value(v), + "errors" => b.errors = FromValueOpt::from_value(v), + "eventually_due" => b.eventually_due = FromValueOpt::from_value(v), + "past_due" => b.past_due = FromValueOpt::from_value(v), + "pending_verification" => b.pending_verification = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/plan.rs b/generated/async-stripe-shared/src/plan.rs index 5107c692b..bb06dadfd 100644 --- a/generated/async-stripe-shared/src/plan.rs +++ b/generated/async-stripe-shared/src/plan.rs @@ -98,7 +98,12 @@ pub struct PlanBuilder { usage_type: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -180,27 +185,73 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(active), + Some(aggregate_usage), + Some(amount), + Some(amount_decimal), + Some(billing_scheme), + Some(created), + Some(currency), + Some(id), + Some(interval), + Some(interval_count), + Some(livemode), + Some(metadata), + Some(meter), + Some(nickname), + Some(product), + Some(tiers), + Some(tiers_mode), + Some(transform_usage), + Some(trial_period_days), + Some(usage_type), + ) = ( + self.active, + self.aggregate_usage, + self.amount, + self.amount_decimal.take(), + self.billing_scheme, + self.created, + self.currency, + self.id.take(), + self.interval, + self.interval_count, + self.livemode, + self.metadata.take(), + self.meter.take(), + self.nickname.take(), + self.product.take(), + self.tiers.take(), + self.tiers_mode, + self.transform_usage, + self.trial_period_days, + self.usage_type, + ) + else { + return None; + }; Some(Self::Out { - active: self.active?, - aggregate_usage: self.aggregate_usage?, - amount: self.amount?, - amount_decimal: self.amount_decimal.take()?, - billing_scheme: self.billing_scheme?, - created: self.created?, - currency: self.currency?, - id: self.id.take()?, - interval: self.interval?, - interval_count: self.interval_count?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - meter: self.meter.take()?, - nickname: self.nickname.take()?, - product: self.product.take()?, - tiers: self.tiers.take()?, - tiers_mode: self.tiers_mode?, - transform_usage: self.transform_usage?, - trial_period_days: self.trial_period_days?, - usage_type: self.usage_type?, + active, + aggregate_usage, + amount, + amount_decimal, + billing_scheme, + created, + currency, + id, + interval, + interval_count, + livemode, + metadata, + meter, + nickname, + product, + tiers, + tiers_mode, + transform_usage, + trial_period_days, + usage_type, }) } } @@ -228,26 +279,26 @@ const _: () = { let mut b = PlanBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "active" => b.active = Some(FromValueOpt::from_value(v)?), - "aggregate_usage" => b.aggregate_usage = Some(FromValueOpt::from_value(v)?), - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_decimal" => b.amount_decimal = Some(FromValueOpt::from_value(v)?), - "billing_scheme" => b.billing_scheme = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "interval" => b.interval = Some(FromValueOpt::from_value(v)?), - "interval_count" => b.interval_count = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "meter" => b.meter = Some(FromValueOpt::from_value(v)?), - "nickname" => b.nickname = Some(FromValueOpt::from_value(v)?), - "product" => b.product = Some(FromValueOpt::from_value(v)?), - "tiers" => b.tiers = Some(FromValueOpt::from_value(v)?), - "tiers_mode" => b.tiers_mode = Some(FromValueOpt::from_value(v)?), - "transform_usage" => b.transform_usage = Some(FromValueOpt::from_value(v)?), - "trial_period_days" => b.trial_period_days = Some(FromValueOpt::from_value(v)?), - "usage_type" => b.usage_type = Some(FromValueOpt::from_value(v)?), + "active" => b.active = FromValueOpt::from_value(v), + "aggregate_usage" => b.aggregate_usage = FromValueOpt::from_value(v), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_decimal" => b.amount_decimal = FromValueOpt::from_value(v), + "billing_scheme" => b.billing_scheme = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "interval" => b.interval = FromValueOpt::from_value(v), + "interval_count" => b.interval_count = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "meter" => b.meter = FromValueOpt::from_value(v), + "nickname" => b.nickname = FromValueOpt::from_value(v), + "product" => b.product = FromValueOpt::from_value(v), + "tiers" => b.tiers = FromValueOpt::from_value(v), + "tiers_mode" => b.tiers_mode = FromValueOpt::from_value(v), + "transform_usage" => b.transform_usage = FromValueOpt::from_value(v), + "trial_period_days" => b.trial_period_days = FromValueOpt::from_value(v), + "usage_type" => b.usage_type = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/plan_tier.rs b/generated/async-stripe-shared/src/plan_tier.rs index 97216e5bf..7bf5cf45a 100644 --- a/generated/async-stripe-shared/src/plan_tier.rs +++ b/generated/async-stripe-shared/src/plan_tier.rs @@ -22,7 +22,12 @@ pub struct PlanTierBuilder { up_to: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -74,12 +79,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(flat_amount), + Some(flat_amount_decimal), + Some(unit_amount), + Some(unit_amount_decimal), + Some(up_to), + ) = ( + self.flat_amount, + self.flat_amount_decimal.take(), + self.unit_amount, + self.unit_amount_decimal.take(), + self.up_to, + ) + else { + return None; + }; Some(Self::Out { - flat_amount: self.flat_amount?, - flat_amount_decimal: self.flat_amount_decimal.take()?, - unit_amount: self.unit_amount?, - unit_amount_decimal: self.unit_amount_decimal.take()?, - up_to: self.up_to?, + flat_amount, + flat_amount_decimal, + unit_amount, + unit_amount_decimal, + up_to, }) } } @@ -107,15 +128,11 @@ const _: () = { let mut b = PlanTierBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "flat_amount" => b.flat_amount = Some(FromValueOpt::from_value(v)?), - "flat_amount_decimal" => { - b.flat_amount_decimal = Some(FromValueOpt::from_value(v)?) - } - "unit_amount" => b.unit_amount = Some(FromValueOpt::from_value(v)?), - "unit_amount_decimal" => { - b.unit_amount_decimal = Some(FromValueOpt::from_value(v)?) - } - "up_to" => b.up_to = Some(FromValueOpt::from_value(v)?), + "flat_amount" => b.flat_amount = FromValueOpt::from_value(v), + "flat_amount_decimal" => b.flat_amount_decimal = FromValueOpt::from_value(v), + "unit_amount" => b.unit_amount = FromValueOpt::from_value(v), + "unit_amount_decimal" => b.unit_amount_decimal = FromValueOpt::from_value(v), + "up_to" => b.up_to = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/platform_tax_fee.rs b/generated/async-stripe-shared/src/platform_tax_fee.rs index 848a355f2..fc89e4969 100644 --- a/generated/async-stripe-shared/src/platform_tax_fee.rs +++ b/generated/async-stripe-shared/src/platform_tax_fee.rs @@ -19,7 +19,12 @@ pub struct PlatformTaxFeeBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - account: self.account.take()?, - id: self.id.take()?, - source_transaction: self.source_transaction.take()?, - type_: self.type_.take()?, - }) + let (Some(account), Some(id), Some(source_transaction), Some(type_)) = ( + self.account.take(), + self.id.take(), + self.source_transaction.take(), + self.type_.take(), + ) else { + return None; + }; + Some(Self::Out { account, id, source_transaction, type_ }) } } @@ -104,12 +112,10 @@ const _: () = { let mut b = PlatformTaxFeeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account" => b.account = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "source_transaction" => { - b.source_transaction = Some(FromValueOpt::from_value(v)?) - } - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "account" => b.account = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "source_transaction" => b.source_transaction = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/price.rs b/generated/async-stripe-shared/src/price.rs index 18c4d9a1e..4204a950d 100644 --- a/generated/async-stripe-shared/src/price.rs +++ b/generated/async-stripe-shared/src/price.rs @@ -97,7 +97,12 @@ pub struct PriceBuilder { unit_amount_decimal: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -179,27 +184,73 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(active), + Some(billing_scheme), + Some(created), + Some(currency), + Some(currency_options), + Some(custom_unit_amount), + Some(id), + Some(livemode), + Some(lookup_key), + Some(metadata), + Some(nickname), + Some(product), + Some(recurring), + Some(tax_behavior), + Some(tiers), + Some(tiers_mode), + Some(transform_quantity), + Some(type_), + Some(unit_amount), + Some(unit_amount_decimal), + ) = ( + self.active, + self.billing_scheme, + self.created, + self.currency, + self.currency_options.take(), + self.custom_unit_amount, + self.id.take(), + self.livemode, + self.lookup_key.take(), + self.metadata.take(), + self.nickname.take(), + self.product.take(), + self.recurring.take(), + self.tax_behavior, + self.tiers.take(), + self.tiers_mode, + self.transform_quantity, + self.type_, + self.unit_amount, + self.unit_amount_decimal.take(), + ) + else { + return None; + }; Some(Self::Out { - active: self.active?, - billing_scheme: self.billing_scheme?, - created: self.created?, - currency: self.currency?, - currency_options: self.currency_options.take()?, - custom_unit_amount: self.custom_unit_amount?, - id: self.id.take()?, - livemode: self.livemode?, - lookup_key: self.lookup_key.take()?, - metadata: self.metadata.take()?, - nickname: self.nickname.take()?, - product: self.product.take()?, - recurring: self.recurring.take()?, - tax_behavior: self.tax_behavior?, - tiers: self.tiers.take()?, - tiers_mode: self.tiers_mode?, - transform_quantity: self.transform_quantity?, - type_: self.type_?, - unit_amount: self.unit_amount?, - unit_amount_decimal: self.unit_amount_decimal.take()?, + active, + billing_scheme, + created, + currency, + currency_options, + custom_unit_amount, + id, + livemode, + lookup_key, + metadata, + nickname, + product, + recurring, + tax_behavior, + tiers, + tiers_mode, + transform_quantity, + type_, + unit_amount, + unit_amount_decimal, }) } } @@ -227,32 +278,26 @@ const _: () = { let mut b = PriceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "active" => b.active = Some(FromValueOpt::from_value(v)?), - "billing_scheme" => b.billing_scheme = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "currency_options" => b.currency_options = Some(FromValueOpt::from_value(v)?), - "custom_unit_amount" => { - b.custom_unit_amount = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "lookup_key" => b.lookup_key = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "nickname" => b.nickname = Some(FromValueOpt::from_value(v)?), - "product" => b.product = Some(FromValueOpt::from_value(v)?), - "recurring" => b.recurring = Some(FromValueOpt::from_value(v)?), - "tax_behavior" => b.tax_behavior = Some(FromValueOpt::from_value(v)?), - "tiers" => b.tiers = Some(FromValueOpt::from_value(v)?), - "tiers_mode" => b.tiers_mode = Some(FromValueOpt::from_value(v)?), - "transform_quantity" => { - b.transform_quantity = Some(FromValueOpt::from_value(v)?) - } - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "unit_amount" => b.unit_amount = Some(FromValueOpt::from_value(v)?), - "unit_amount_decimal" => { - b.unit_amount_decimal = Some(FromValueOpt::from_value(v)?) - } + "active" => b.active = FromValueOpt::from_value(v), + "billing_scheme" => b.billing_scheme = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "currency_options" => b.currency_options = FromValueOpt::from_value(v), + "custom_unit_amount" => b.custom_unit_amount = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "lookup_key" => b.lookup_key = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "nickname" => b.nickname = FromValueOpt::from_value(v), + "product" => b.product = FromValueOpt::from_value(v), + "recurring" => b.recurring = FromValueOpt::from_value(v), + "tax_behavior" => b.tax_behavior = FromValueOpt::from_value(v), + "tiers" => b.tiers = FromValueOpt::from_value(v), + "tiers_mode" => b.tiers_mode = FromValueOpt::from_value(v), + "transform_quantity" => b.transform_quantity = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "unit_amount" => b.unit_amount = FromValueOpt::from_value(v), + "unit_amount_decimal" => b.unit_amount_decimal = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/price_tier.rs b/generated/async-stripe-shared/src/price_tier.rs index 69659f96b..b51b598e8 100644 --- a/generated/async-stripe-shared/src/price_tier.rs +++ b/generated/async-stripe-shared/src/price_tier.rs @@ -22,7 +22,12 @@ pub struct PriceTierBuilder { up_to: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -74,12 +79,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(flat_amount), + Some(flat_amount_decimal), + Some(unit_amount), + Some(unit_amount_decimal), + Some(up_to), + ) = ( + self.flat_amount, + self.flat_amount_decimal.take(), + self.unit_amount, + self.unit_amount_decimal.take(), + self.up_to, + ) + else { + return None; + }; Some(Self::Out { - flat_amount: self.flat_amount?, - flat_amount_decimal: self.flat_amount_decimal.take()?, - unit_amount: self.unit_amount?, - unit_amount_decimal: self.unit_amount_decimal.take()?, - up_to: self.up_to?, + flat_amount, + flat_amount_decimal, + unit_amount, + unit_amount_decimal, + up_to, }) } } @@ -107,15 +128,11 @@ const _: () = { let mut b = PriceTierBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "flat_amount" => b.flat_amount = Some(FromValueOpt::from_value(v)?), - "flat_amount_decimal" => { - b.flat_amount_decimal = Some(FromValueOpt::from_value(v)?) - } - "unit_amount" => b.unit_amount = Some(FromValueOpt::from_value(v)?), - "unit_amount_decimal" => { - b.unit_amount_decimal = Some(FromValueOpt::from_value(v)?) - } - "up_to" => b.up_to = Some(FromValueOpt::from_value(v)?), + "flat_amount" => b.flat_amount = FromValueOpt::from_value(v), + "flat_amount_decimal" => b.flat_amount_decimal = FromValueOpt::from_value(v), + "unit_amount" => b.unit_amount = FromValueOpt::from_value(v), + "unit_amount_decimal" => b.unit_amount_decimal = FromValueOpt::from_value(v), + "up_to" => b.up_to = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/product.rs b/generated/async-stripe-shared/src/product.rs index f2499e360..6aae81439 100644 --- a/generated/async-stripe-shared/src/product.rs +++ b/generated/async-stripe-shared/src/product.rs @@ -77,7 +77,12 @@ pub struct ProductBuilder { url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -155,25 +160,67 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(active), + Some(created), + Some(default_price), + Some(description), + Some(id), + Some(images), + Some(livemode), + Some(marketing_features), + Some(metadata), + Some(name), + Some(package_dimensions), + Some(shippable), + Some(statement_descriptor), + Some(tax_code), + Some(type_), + Some(unit_label), + Some(updated), + Some(url), + ) = ( + self.active, + self.created, + self.default_price.take(), + self.description.take(), + self.id.take(), + self.images.take(), + self.livemode, + self.marketing_features.take(), + self.metadata.take(), + self.name.take(), + self.package_dimensions, + self.shippable, + self.statement_descriptor.take(), + self.tax_code.take(), + self.type_, + self.unit_label.take(), + self.updated, + self.url.take(), + ) + else { + return None; + }; Some(Self::Out { - active: self.active?, - created: self.created?, - default_price: self.default_price.take()?, - description: self.description.take()?, - id: self.id.take()?, - images: self.images.take()?, - livemode: self.livemode?, - marketing_features: self.marketing_features.take()?, - metadata: self.metadata.take()?, - name: self.name.take()?, - package_dimensions: self.package_dimensions?, - shippable: self.shippable?, - statement_descriptor: self.statement_descriptor.take()?, - tax_code: self.tax_code.take()?, - type_: self.type_?, - unit_label: self.unit_label.take()?, - updated: self.updated?, - url: self.url.take()?, + active, + created, + default_price, + description, + id, + images, + livemode, + marketing_features, + metadata, + name, + package_dimensions, + shippable, + statement_descriptor, + tax_code, + type_, + unit_label, + updated, + url, }) } } @@ -201,30 +248,24 @@ const _: () = { let mut b = ProductBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "active" => b.active = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "default_price" => b.default_price = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "images" => b.images = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "marketing_features" => { - b.marketing_features = Some(FromValueOpt::from_value(v)?) - } - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "package_dimensions" => { - b.package_dimensions = Some(FromValueOpt::from_value(v)?) - } - "shippable" => b.shippable = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } - "tax_code" => b.tax_code = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "unit_label" => b.unit_label = Some(FromValueOpt::from_value(v)?), - "updated" => b.updated = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "active" => b.active = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "default_price" => b.default_price = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "images" => b.images = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "marketing_features" => b.marketing_features = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "package_dimensions" => b.package_dimensions = FromValueOpt::from_value(v), + "shippable" => b.shippable = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), + "tax_code" => b.tax_code = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "unit_label" => b.unit_label = FromValueOpt::from_value(v), + "updated" => b.updated = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/product_marketing_feature.rs b/generated/async-stripe-shared/src/product_marketing_feature.rs index 17de00088..40b3afc4e 100644 --- a/generated/async-stripe-shared/src/product_marketing_feature.rs +++ b/generated/async-stripe-shared/src/product_marketing_feature.rs @@ -10,7 +10,12 @@ pub struct ProductMarketingFeatureBuilder { name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { name: self.name.take()? }) + let (Some(name),) = (self.name.take(),) else { + return None; + }; + Some(Self::Out { name }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = ProductMarketingFeatureBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "name" => b.name = Some(FromValueOpt::from_value(v)?), + "name" => b.name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/promotion_code.rs b/generated/async-stripe-shared/src/promotion_code.rs index 69bac325c..816c8308a 100644 --- a/generated/async-stripe-shared/src/promotion_code.rs +++ b/generated/async-stripe-shared/src/promotion_code.rs @@ -48,7 +48,12 @@ pub struct PromotionCodeBuilder { times_redeemed: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -117,19 +122,49 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(active), + Some(code), + Some(coupon), + Some(created), + Some(customer), + Some(expires_at), + Some(id), + Some(livemode), + Some(max_redemptions), + Some(metadata), + Some(restrictions), + Some(times_redeemed), + ) = ( + self.active, + self.code.take(), + self.coupon.take(), + self.created, + self.customer.take(), + self.expires_at, + self.id.take(), + self.livemode, + self.max_redemptions, + self.metadata.take(), + self.restrictions.take(), + self.times_redeemed, + ) + else { + return None; + }; Some(Self::Out { - active: self.active?, - code: self.code.take()?, - coupon: self.coupon.take()?, - created: self.created?, - customer: self.customer.take()?, - expires_at: self.expires_at?, - id: self.id.take()?, - livemode: self.livemode?, - max_redemptions: self.max_redemptions?, - metadata: self.metadata.take()?, - restrictions: self.restrictions.take()?, - times_redeemed: self.times_redeemed?, + active, + code, + coupon, + created, + customer, + expires_at, + id, + livemode, + max_redemptions, + metadata, + restrictions, + times_redeemed, }) } } @@ -157,18 +192,18 @@ const _: () = { let mut b = PromotionCodeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "active" => b.active = Some(FromValueOpt::from_value(v)?), - "code" => b.code = Some(FromValueOpt::from_value(v)?), - "coupon" => b.coupon = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "max_redemptions" => b.max_redemptions = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "restrictions" => b.restrictions = Some(FromValueOpt::from_value(v)?), - "times_redeemed" => b.times_redeemed = Some(FromValueOpt::from_value(v)?), + "active" => b.active = FromValueOpt::from_value(v), + "code" => b.code = FromValueOpt::from_value(v), + "coupon" => b.coupon = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "max_redemptions" => b.max_redemptions = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "restrictions" => b.restrictions = FromValueOpt::from_value(v), + "times_redeemed" => b.times_redeemed = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/promotion_code_currency_option.rs b/generated/async-stripe-shared/src/promotion_code_currency_option.rs index e17ae64a9..4c089daa1 100644 --- a/generated/async-stripe-shared/src/promotion_code_currency_option.rs +++ b/generated/async-stripe-shared/src/promotion_code_currency_option.rs @@ -10,7 +10,12 @@ pub struct PromotionCodeCurrencyOptionBuilder { minimum_amount: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { minimum_amount: self.minimum_amount? }) + let (Some(minimum_amount),) = (self.minimum_amount,) else { + return None; + }; + Some(Self::Out { minimum_amount }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = PromotionCodeCurrencyOptionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "minimum_amount" => b.minimum_amount = Some(FromValueOpt::from_value(v)?), + "minimum_amount" => b.minimum_amount = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/promotion_codes_resource_restrictions.rs b/generated/async-stripe-shared/src/promotion_codes_resource_restrictions.rs index 7f024a9b9..0ab654311 100644 --- a/generated/async-stripe-shared/src/promotion_codes_resource_restrictions.rs +++ b/generated/async-stripe-shared/src/promotion_codes_resource_restrictions.rs @@ -32,7 +32,12 @@ pub struct PromotionCodesResourceRestrictionsBuilder { minimum_amount_currency: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -85,11 +90,25 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(currency_options), + Some(first_time_transaction), + Some(minimum_amount), + Some(minimum_amount_currency), + ) = ( + self.currency_options.take(), + self.first_time_transaction, + self.minimum_amount, + self.minimum_amount_currency, + ) + else { + return None; + }; Some(Self::Out { - currency_options: self.currency_options.take()?, - first_time_transaction: self.first_time_transaction?, - minimum_amount: self.minimum_amount?, - minimum_amount_currency: self.minimum_amount_currency?, + currency_options, + first_time_transaction, + minimum_amount, + minimum_amount_currency, }) } } @@ -117,13 +136,13 @@ const _: () = { let mut b = PromotionCodesResourceRestrictionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "currency_options" => b.currency_options = Some(FromValueOpt::from_value(v)?), + "currency_options" => b.currency_options = FromValueOpt::from_value(v), "first_time_transaction" => { - b.first_time_transaction = Some(FromValueOpt::from_value(v)?) + b.first_time_transaction = FromValueOpt::from_value(v) } - "minimum_amount" => b.minimum_amount = Some(FromValueOpt::from_value(v)?), + "minimum_amount" => b.minimum_amount = FromValueOpt::from_value(v), "minimum_amount_currency" => { - b.minimum_amount_currency = Some(FromValueOpt::from_value(v)?) + b.minimum_amount_currency = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/quote.rs b/generated/async-stripe-shared/src/quote.rs index 3e4675201..069f34a00 100644 --- a/generated/async-stripe-shared/src/quote.rs +++ b/generated/async-stripe-shared/src/quote.rs @@ -122,7 +122,12 @@ pub struct QuoteBuilder { transfer_data: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -232,41 +237,115 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount_subtotal), + Some(amount_total), + Some(application), + Some(application_fee_amount), + Some(application_fee_percent), + Some(automatic_tax), + Some(collection_method), + Some(computed), + Some(created), + Some(currency), + Some(customer), + Some(default_tax_rates), + Some(description), + Some(discounts), + Some(expires_at), + Some(footer), + Some(from_quote), + Some(header), + Some(id), + Some(invoice), + Some(invoice_settings), + Some(line_items), + Some(livemode), + Some(metadata), + Some(number), + Some(on_behalf_of), + Some(status), + Some(status_transitions), + Some(subscription), + Some(subscription_data), + Some(subscription_schedule), + Some(test_clock), + Some(total_details), + Some(transfer_data), + ) = ( + self.amount_subtotal, + self.amount_total, + self.application.take(), + self.application_fee_amount, + self.application_fee_percent, + self.automatic_tax.take(), + self.collection_method, + self.computed.take(), + self.created, + self.currency, + self.customer.take(), + self.default_tax_rates.take(), + self.description.take(), + self.discounts.take(), + self.expires_at, + self.footer.take(), + self.from_quote.take(), + self.header.take(), + self.id.take(), + self.invoice.take(), + self.invoice_settings.take(), + self.line_items.take(), + self.livemode, + self.metadata.take(), + self.number.take(), + self.on_behalf_of.take(), + self.status, + self.status_transitions, + self.subscription.take(), + self.subscription_data.take(), + self.subscription_schedule.take(), + self.test_clock.take(), + self.total_details.take(), + self.transfer_data.take(), + ) + else { + return None; + }; Some(Self::Out { - amount_subtotal: self.amount_subtotal?, - amount_total: self.amount_total?, - application: self.application.take()?, - application_fee_amount: self.application_fee_amount?, - application_fee_percent: self.application_fee_percent?, - automatic_tax: self.automatic_tax.take()?, - collection_method: self.collection_method?, - computed: self.computed.take()?, - created: self.created?, - currency: self.currency?, - customer: self.customer.take()?, - default_tax_rates: self.default_tax_rates.take()?, - description: self.description.take()?, - discounts: self.discounts.take()?, - expires_at: self.expires_at?, - footer: self.footer.take()?, - from_quote: self.from_quote.take()?, - header: self.header.take()?, - id: self.id.take()?, - invoice: self.invoice.take()?, - invoice_settings: self.invoice_settings.take()?, - line_items: self.line_items.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - number: self.number.take()?, - on_behalf_of: self.on_behalf_of.take()?, - status: self.status?, - status_transitions: self.status_transitions?, - subscription: self.subscription.take()?, - subscription_data: self.subscription_data.take()?, - subscription_schedule: self.subscription_schedule.take()?, - test_clock: self.test_clock.take()?, - total_details: self.total_details.take()?, - transfer_data: self.transfer_data.take()?, + amount_subtotal, + amount_total, + application, + application_fee_amount, + application_fee_percent, + automatic_tax, + collection_method, + computed, + created, + currency, + customer, + default_tax_rates, + description, + discounts, + expires_at, + footer, + from_quote, + header, + id, + invoice, + invoice_settings, + line_items, + livemode, + metadata, + number, + on_behalf_of, + status, + status_transitions, + subscription, + subscription_data, + subscription_schedule, + test_clock, + total_details, + transfer_data, }) } } @@ -294,48 +373,46 @@ const _: () = { let mut b = QuoteBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_subtotal" => b.amount_subtotal = Some(FromValueOpt::from_value(v)?), - "amount_total" => b.amount_total = Some(FromValueOpt::from_value(v)?), - "application" => b.application = Some(FromValueOpt::from_value(v)?), + "amount_subtotal" => b.amount_subtotal = FromValueOpt::from_value(v), + "amount_total" => b.amount_total = FromValueOpt::from_value(v), + "application" => b.application = FromValueOpt::from_value(v), "application_fee_amount" => { - b.application_fee_amount = Some(FromValueOpt::from_value(v)?) + b.application_fee_amount = FromValueOpt::from_value(v) } "application_fee_percent" => { - b.application_fee_percent = Some(FromValueOpt::from_value(v)?) - } - "automatic_tax" => b.automatic_tax = Some(FromValueOpt::from_value(v)?), - "collection_method" => b.collection_method = Some(FromValueOpt::from_value(v)?), - "computed" => b.computed = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "default_tax_rates" => b.default_tax_rates = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "discounts" => b.discounts = Some(FromValueOpt::from_value(v)?), - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "footer" => b.footer = Some(FromValueOpt::from_value(v)?), - "from_quote" => b.from_quote = Some(FromValueOpt::from_value(v)?), - "header" => b.header = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "invoice" => b.invoice = Some(FromValueOpt::from_value(v)?), - "invoice_settings" => b.invoice_settings = Some(FromValueOpt::from_value(v)?), - "line_items" => b.line_items = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "number" => b.number = Some(FromValueOpt::from_value(v)?), - "on_behalf_of" => b.on_behalf_of = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_transitions" => { - b.status_transitions = Some(FromValueOpt::from_value(v)?) + b.application_fee_percent = FromValueOpt::from_value(v) } - "subscription" => b.subscription = Some(FromValueOpt::from_value(v)?), - "subscription_data" => b.subscription_data = Some(FromValueOpt::from_value(v)?), + "automatic_tax" => b.automatic_tax = FromValueOpt::from_value(v), + "collection_method" => b.collection_method = FromValueOpt::from_value(v), + "computed" => b.computed = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "default_tax_rates" => b.default_tax_rates = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "discounts" => b.discounts = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "footer" => b.footer = FromValueOpt::from_value(v), + "from_quote" => b.from_quote = FromValueOpt::from_value(v), + "header" => b.header = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "invoice" => b.invoice = FromValueOpt::from_value(v), + "invoice_settings" => b.invoice_settings = FromValueOpt::from_value(v), + "line_items" => b.line_items = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "number" => b.number = FromValueOpt::from_value(v), + "on_behalf_of" => b.on_behalf_of = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "status_transitions" => b.status_transitions = FromValueOpt::from_value(v), + "subscription" => b.subscription = FromValueOpt::from_value(v), + "subscription_data" => b.subscription_data = FromValueOpt::from_value(v), "subscription_schedule" => { - b.subscription_schedule = Some(FromValueOpt::from_value(v)?) + b.subscription_schedule = FromValueOpt::from_value(v) } - "test_clock" => b.test_clock = Some(FromValueOpt::from_value(v)?), - "total_details" => b.total_details = Some(FromValueOpt::from_value(v)?), - "transfer_data" => b.transfer_data = Some(FromValueOpt::from_value(v)?), + "test_clock" => b.test_clock = FromValueOpt::from_value(v), + "total_details" => b.total_details = FromValueOpt::from_value(v), + "transfer_data" => b.transfer_data = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/quotes_resource_automatic_tax.rs b/generated/async-stripe-shared/src/quotes_resource_automatic_tax.rs index 994311ec5..4f1b17da7 100644 --- a/generated/async-stripe-shared/src/quotes_resource_automatic_tax.rs +++ b/generated/async-stripe-shared/src/quotes_resource_automatic_tax.rs @@ -18,7 +18,12 @@ pub struct QuotesResourceAutomaticTaxBuilder { status: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - enabled: self.enabled?, - liability: self.liability.take()?, - status: self.status?, - }) + let (Some(enabled), Some(liability), Some(status)) = + (self.enabled, self.liability.take(), self.status) + else { + return None; + }; + Some(Self::Out { enabled, liability, status }) } } @@ -100,9 +106,9 @@ const _: () = { let mut b = QuotesResourceAutomaticTaxBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "liability" => b.liability = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "liability" => b.liability = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/quotes_resource_computed.rs b/generated/async-stripe-shared/src/quotes_resource_computed.rs index ad2754024..4494571bb 100644 --- a/generated/async-stripe-shared/src/quotes_resource_computed.rs +++ b/generated/async-stripe-shared/src/quotes_resource_computed.rs @@ -14,7 +14,12 @@ pub struct QuotesResourceComputedBuilder { upfront: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { recurring: self.recurring.take()?, upfront: self.upfront.take()? }) + let (Some(recurring), Some(upfront)) = (self.recurring.take(), self.upfront.take()) + else { + return None; + }; + Some(Self::Out { recurring, upfront }) } } @@ -87,8 +96,8 @@ const _: () = { let mut b = QuotesResourceComputedBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "recurring" => b.recurring = Some(FromValueOpt::from_value(v)?), - "upfront" => b.upfront = Some(FromValueOpt::from_value(v)?), + "recurring" => b.recurring = FromValueOpt::from_value(v), + "upfront" => b.upfront = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/quotes_resource_from_quote.rs b/generated/async-stripe-shared/src/quotes_resource_from_quote.rs index 39a425787..220e32355 100644 --- a/generated/async-stripe-shared/src/quotes_resource_from_quote.rs +++ b/generated/async-stripe-shared/src/quotes_resource_from_quote.rs @@ -13,7 +13,12 @@ pub struct QuotesResourceFromQuoteBuilder { quote: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { is_revision: self.is_revision?, quote: self.quote.take()? }) + let (Some(is_revision), Some(quote)) = (self.is_revision, self.quote.take()) else { + return None; + }; + Some(Self::Out { is_revision, quote }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = QuotesResourceFromQuoteBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "is_revision" => b.is_revision = Some(FromValueOpt::from_value(v)?), - "quote" => b.quote = Some(FromValueOpt::from_value(v)?), + "is_revision" => b.is_revision = FromValueOpt::from_value(v), + "quote" => b.quote = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/quotes_resource_recurring.rs b/generated/async-stripe-shared/src/quotes_resource_recurring.rs index 4a7f7e223..15d0de0db 100644 --- a/generated/async-stripe-shared/src/quotes_resource_recurring.rs +++ b/generated/async-stripe-shared/src/quotes_resource_recurring.rs @@ -22,7 +22,12 @@ pub struct QuotesResourceRecurringBuilder { total_details: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,12 +82,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount_subtotal), + Some(amount_total), + Some(interval), + Some(interval_count), + Some(total_details), + ) = ( + self.amount_subtotal, + self.amount_total, + self.interval, + self.interval_count, + self.total_details.take(), + ) + else { + return None; + }; Some(Self::Out { - amount_subtotal: self.amount_subtotal?, - amount_total: self.amount_total?, - interval: self.interval?, - interval_count: self.interval_count?, - total_details: self.total_details.take()?, + amount_subtotal, + amount_total, + interval, + interval_count, + total_details, }) } } @@ -110,11 +131,11 @@ const _: () = { let mut b = QuotesResourceRecurringBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_subtotal" => b.amount_subtotal = Some(FromValueOpt::from_value(v)?), - "amount_total" => b.amount_total = Some(FromValueOpt::from_value(v)?), - "interval" => b.interval = Some(FromValueOpt::from_value(v)?), - "interval_count" => b.interval_count = Some(FromValueOpt::from_value(v)?), - "total_details" => b.total_details = Some(FromValueOpt::from_value(v)?), + "amount_subtotal" => b.amount_subtotal = FromValueOpt::from_value(v), + "amount_total" => b.amount_total = FromValueOpt::from_value(v), + "interval" => b.interval = FromValueOpt::from_value(v), + "interval_count" => b.interval_count = FromValueOpt::from_value(v), + "total_details" => b.total_details = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/quotes_resource_status_transitions.rs b/generated/async-stripe-shared/src/quotes_resource_status_transitions.rs index 53a7b5b40..30f54a1c3 100644 --- a/generated/async-stripe-shared/src/quotes_resource_status_transitions.rs +++ b/generated/async-stripe-shared/src/quotes_resource_status_transitions.rs @@ -16,7 +16,12 @@ pub struct QuotesResourceStatusTransitionsBuilder { finalized_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - accepted_at: self.accepted_at?, - canceled_at: self.canceled_at?, - finalized_at: self.finalized_at?, - }) + let (Some(accepted_at), Some(canceled_at), Some(finalized_at)) = + (self.accepted_at, self.canceled_at, self.finalized_at) + else { + return None; + }; + Some(Self::Out { accepted_at, canceled_at, finalized_at }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = QuotesResourceStatusTransitionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "accepted_at" => b.accepted_at = Some(FromValueOpt::from_value(v)?), - "canceled_at" => b.canceled_at = Some(FromValueOpt::from_value(v)?), - "finalized_at" => b.finalized_at = Some(FromValueOpt::from_value(v)?), + "accepted_at" => b.accepted_at = FromValueOpt::from_value(v), + "canceled_at" => b.canceled_at = FromValueOpt::from_value(v), + "finalized_at" => b.finalized_at = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/quotes_resource_subscription_data_subscription_data.rs b/generated/async-stripe-shared/src/quotes_resource_subscription_data_subscription_data.rs index 2069adefe..42cdafd97 100644 --- a/generated/async-stripe-shared/src/quotes_resource_subscription_data_subscription_data.rs +++ b/generated/async-stripe-shared/src/quotes_resource_subscription_data_subscription_data.rs @@ -26,7 +26,12 @@ pub struct QuotesResourceSubscriptionDataSubscriptionDataBuilder { trial_period_days: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -79,12 +84,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - description: self.description.take()?, - effective_date: self.effective_date?, - metadata: self.metadata.take()?, - trial_period_days: self.trial_period_days?, - }) + let (Some(description), Some(effective_date), Some(metadata), Some(trial_period_days)) = ( + self.description.take(), + self.effective_date, + self.metadata.take(), + self.trial_period_days, + ) else { + return None; + }; + Some(Self::Out { description, effective_date, metadata, trial_period_days }) } } @@ -111,10 +119,10 @@ const _: () = { let mut b = QuotesResourceSubscriptionDataSubscriptionDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "effective_date" => b.effective_date = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "trial_period_days" => b.trial_period_days = Some(FromValueOpt::from_value(v)?), + "description" => b.description = FromValueOpt::from_value(v), + "effective_date" => b.effective_date = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "trial_period_days" => b.trial_period_days = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/quotes_resource_total_details.rs b/generated/async-stripe-shared/src/quotes_resource_total_details.rs index ea974f2b4..3d57e1e9c 100644 --- a/generated/async-stripe-shared/src/quotes_resource_total_details.rs +++ b/generated/async-stripe-shared/src/quotes_resource_total_details.rs @@ -18,7 +18,12 @@ pub struct QuotesResourceTotalDetailsBuilder { breakdown: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -71,12 +76,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount_discount: self.amount_discount?, - amount_shipping: self.amount_shipping?, - amount_tax: self.amount_tax?, - breakdown: self.breakdown.take()?, - }) + let (Some(amount_discount), Some(amount_shipping), Some(amount_tax), Some(breakdown)) = + (self.amount_discount, self.amount_shipping, self.amount_tax, self.breakdown.take()) + else { + return None; + }; + Some(Self::Out { amount_discount, amount_shipping, amount_tax, breakdown }) } } @@ -103,10 +108,10 @@ const _: () = { let mut b = QuotesResourceTotalDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_discount" => b.amount_discount = Some(FromValueOpt::from_value(v)?), - "amount_shipping" => b.amount_shipping = Some(FromValueOpt::from_value(v)?), - "amount_tax" => b.amount_tax = Some(FromValueOpt::from_value(v)?), - "breakdown" => b.breakdown = Some(FromValueOpt::from_value(v)?), + "amount_discount" => b.amount_discount = FromValueOpt::from_value(v), + "amount_shipping" => b.amount_shipping = FromValueOpt::from_value(v), + "amount_tax" => b.amount_tax = FromValueOpt::from_value(v), + "breakdown" => b.breakdown = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/quotes_resource_total_details_resource_breakdown.rs b/generated/async-stripe-shared/src/quotes_resource_total_details_resource_breakdown.rs index c7d0c145a..60b84ed73 100644 --- a/generated/async-stripe-shared/src/quotes_resource_total_details_resource_breakdown.rs +++ b/generated/async-stripe-shared/src/quotes_resource_total_details_resource_breakdown.rs @@ -13,7 +13,12 @@ pub struct QuotesResourceTotalDetailsResourceBreakdownBuilder { taxes: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { discounts: self.discounts.take()?, taxes: self.taxes.take()? }) + let (Some(discounts), Some(taxes)) = (self.discounts.take(), self.taxes.take()) else { + return None; + }; + Some(Self::Out { discounts, taxes }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = QuotesResourceTotalDetailsResourceBreakdownBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "discounts" => b.discounts = Some(FromValueOpt::from_value(v)?), - "taxes" => b.taxes = Some(FromValueOpt::from_value(v)?), + "discounts" => b.discounts = FromValueOpt::from_value(v), + "taxes" => b.taxes = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/quotes_resource_transfer_data.rs b/generated/async-stripe-shared/src/quotes_resource_transfer_data.rs index 7a119ad96..00b70ca2d 100644 --- a/generated/async-stripe-shared/src/quotes_resource_transfer_data.rs +++ b/generated/async-stripe-shared/src/quotes_resource_transfer_data.rs @@ -19,7 +19,12 @@ pub struct QuotesResourceTransferDataBuilder { destination: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,11 +75,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - amount_percent: self.amount_percent?, - destination: self.destination.take()?, - }) + let (Some(amount), Some(amount_percent), Some(destination)) = + (self.amount, self.amount_percent, self.destination.take()) + else { + return None; + }; + Some(Self::Out { amount, amount_percent, destination }) } } @@ -101,9 +107,9 @@ const _: () = { let mut b = QuotesResourceTransferDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_percent" => b.amount_percent = Some(FromValueOpt::from_value(v)?), - "destination" => b.destination = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_percent" => b.amount_percent = FromValueOpt::from_value(v), + "destination" => b.destination = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/quotes_resource_upfront.rs b/generated/async-stripe-shared/src/quotes_resource_upfront.rs index a14244c24..e89048a42 100644 --- a/generated/async-stripe-shared/src/quotes_resource_upfront.rs +++ b/generated/async-stripe-shared/src/quotes_resource_upfront.rs @@ -19,7 +19,12 @@ pub struct QuotesResourceUpfrontBuilder { total_details: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount_subtotal: self.amount_subtotal?, - amount_total: self.amount_total?, - line_items: self.line_items.take()?, - total_details: self.total_details.take()?, - }) + let (Some(amount_subtotal), Some(amount_total), Some(line_items), Some(total_details)) = ( + self.amount_subtotal, + self.amount_total, + self.line_items.take(), + self.total_details.take(), + ) else { + return None; + }; + Some(Self::Out { amount_subtotal, amount_total, line_items, total_details }) } } @@ -104,10 +112,10 @@ const _: () = { let mut b = QuotesResourceUpfrontBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_subtotal" => b.amount_subtotal = Some(FromValueOpt::from_value(v)?), - "amount_total" => b.amount_total = Some(FromValueOpt::from_value(v)?), - "line_items" => b.line_items = Some(FromValueOpt::from_value(v)?), - "total_details" => b.total_details = Some(FromValueOpt::from_value(v)?), + "amount_subtotal" => b.amount_subtotal = FromValueOpt::from_value(v), + "amount_total" => b.amount_total = FromValueOpt::from_value(v), + "line_items" => b.line_items = FromValueOpt::from_value(v), + "total_details" => b.total_details = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/radar_radar_options.rs b/generated/async-stripe-shared/src/radar_radar_options.rs index 77954bdf9..43a99e6ac 100644 --- a/generated/async-stripe-shared/src/radar_radar_options.rs +++ b/generated/async-stripe-shared/src/radar_radar_options.rs @@ -12,7 +12,12 @@ pub struct RadarRadarOptionsBuilder { session: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -57,7 +62,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { session: self.session.take()? }) + let (Some(session),) = (self.session.take(),) else { + return None; + }; + Some(Self::Out { session }) } } @@ -84,7 +92,7 @@ const _: () = { let mut b = RadarRadarOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "session" => b.session = Some(FromValueOpt::from_value(v)?), + "session" => b.session = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/radar_review_resource_location.rs b/generated/async-stripe-shared/src/radar_review_resource_location.rs index bb888ca2a..0cd27bdbb 100644 --- a/generated/async-stripe-shared/src/radar_review_resource_location.rs +++ b/generated/async-stripe-shared/src/radar_review_resource_location.rs @@ -22,7 +22,12 @@ pub struct RadarReviewResourceLocationBuilder { region: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,13 +82,16 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - city: self.city.take()?, - country: self.country.take()?, - latitude: self.latitude?, - longitude: self.longitude?, - region: self.region.take()?, - }) + let (Some(city), Some(country), Some(latitude), Some(longitude), Some(region)) = ( + self.city.take(), + self.country.take(), + self.latitude, + self.longitude, + self.region.take(), + ) else { + return None; + }; + Some(Self::Out { city, country, latitude, longitude, region }) } } @@ -110,11 +118,11 @@ const _: () = { let mut b = RadarReviewResourceLocationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "city" => b.city = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "latitude" => b.latitude = Some(FromValueOpt::from_value(v)?), - "longitude" => b.longitude = Some(FromValueOpt::from_value(v)?), - "region" => b.region = Some(FromValueOpt::from_value(v)?), + "city" => b.city = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "latitude" => b.latitude = FromValueOpt::from_value(v), + "longitude" => b.longitude = FromValueOpt::from_value(v), + "region" => b.region = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/radar_review_resource_session.rs b/generated/async-stripe-shared/src/radar_review_resource_session.rs index 1fe75f8c6..887c7f542 100644 --- a/generated/async-stripe-shared/src/radar_review_resource_session.rs +++ b/generated/async-stripe-shared/src/radar_review_resource_session.rs @@ -19,7 +19,12 @@ pub struct RadarReviewResourceSessionBuilder { version: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - browser: self.browser.take()?, - device: self.device.take()?, - platform: self.platform.take()?, - version: self.version.take()?, - }) + let (Some(browser), Some(device), Some(platform), Some(version)) = ( + self.browser.take(), + self.device.take(), + self.platform.take(), + self.version.take(), + ) else { + return None; + }; + Some(Self::Out { browser, device, platform, version }) } } @@ -104,10 +112,10 @@ const _: () = { let mut b = RadarReviewResourceSessionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "browser" => b.browser = Some(FromValueOpt::from_value(v)?), - "device" => b.device = Some(FromValueOpt::from_value(v)?), - "platform" => b.platform = Some(FromValueOpt::from_value(v)?), - "version" => b.version = Some(FromValueOpt::from_value(v)?), + "browser" => b.browser = FromValueOpt::from_value(v), + "device" => b.device = FromValueOpt::from_value(v), + "platform" => b.platform = FromValueOpt::from_value(v), + "version" => b.version = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/recurring.rs b/generated/async-stripe-shared/src/recurring.rs index fe04245cf..b8abb4575 100644 --- a/generated/async-stripe-shared/src/recurring.rs +++ b/generated/async-stripe-shared/src/recurring.rs @@ -30,7 +30,12 @@ pub struct RecurringBuilder { usage_type: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -84,13 +89,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(aggregate_usage), + Some(interval), + Some(interval_count), + Some(meter), + Some(trial_period_days), + Some(usage_type), + ) = ( + self.aggregate_usage, + self.interval, + self.interval_count, + self.meter.take(), + self.trial_period_days, + self.usage_type, + ) + else { + return None; + }; Some(Self::Out { - aggregate_usage: self.aggregate_usage?, - interval: self.interval?, - interval_count: self.interval_count?, - meter: self.meter.take()?, - trial_period_days: self.trial_period_days?, - usage_type: self.usage_type?, + aggregate_usage, + interval, + interval_count, + meter, + trial_period_days, + usage_type, }) } } @@ -118,12 +141,12 @@ const _: () = { let mut b = RecurringBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "aggregate_usage" => b.aggregate_usage = Some(FromValueOpt::from_value(v)?), - "interval" => b.interval = Some(FromValueOpt::from_value(v)?), - "interval_count" => b.interval_count = Some(FromValueOpt::from_value(v)?), - "meter" => b.meter = Some(FromValueOpt::from_value(v)?), - "trial_period_days" => b.trial_period_days = Some(FromValueOpt::from_value(v)?), - "usage_type" => b.usage_type = Some(FromValueOpt::from_value(v)?), + "aggregate_usage" => b.aggregate_usage = FromValueOpt::from_value(v), + "interval" => b.interval = FromValueOpt::from_value(v), + "interval_count" => b.interval_count = FromValueOpt::from_value(v), + "meter" => b.meter = FromValueOpt::from_value(v), + "trial_period_days" => b.trial_period_days = FromValueOpt::from_value(v), + "usage_type" => b.usage_type = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/refund.rs b/generated/async-stripe-shared/src/refund.rs index 2e74dc457..28143e8cd 100644 --- a/generated/async-stripe-shared/src/refund.rs +++ b/generated/async-stripe-shared/src/refund.rs @@ -80,7 +80,12 @@ pub struct RefundBuilder { transfer_reversal: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -164,26 +169,70 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(balance_transaction), + Some(charge), + Some(created), + Some(currency), + Some(description), + Some(destination_details), + Some(failure_balance_transaction), + Some(failure_reason), + Some(id), + Some(instructions_email), + Some(metadata), + Some(next_action), + Some(payment_intent), + Some(reason), + Some(receipt_number), + Some(source_transfer_reversal), + Some(status), + Some(transfer_reversal), + ) = ( + self.amount, + self.balance_transaction.take(), + self.charge.take(), + self.created, + self.currency, + self.description.take(), + self.destination_details.take(), + self.failure_balance_transaction.take(), + self.failure_reason.take(), + self.id.take(), + self.instructions_email.take(), + self.metadata.take(), + self.next_action.take(), + self.payment_intent.take(), + self.reason, + self.receipt_number.take(), + self.source_transfer_reversal.take(), + self.status.take(), + self.transfer_reversal.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - balance_transaction: self.balance_transaction.take()?, - charge: self.charge.take()?, - created: self.created?, - currency: self.currency?, - description: self.description.take()?, - destination_details: self.destination_details.take()?, - failure_balance_transaction: self.failure_balance_transaction.take()?, - failure_reason: self.failure_reason.take()?, - id: self.id.take()?, - instructions_email: self.instructions_email.take()?, - metadata: self.metadata.take()?, - next_action: self.next_action.take()?, - payment_intent: self.payment_intent.take()?, - reason: self.reason?, - receipt_number: self.receipt_number.take()?, - source_transfer_reversal: self.source_transfer_reversal.take()?, - status: self.status.take()?, - transfer_reversal: self.transfer_reversal.take()?, + amount, + balance_transaction, + charge, + created, + currency, + description, + destination_details, + failure_balance_transaction, + failure_reason, + id, + instructions_email, + metadata, + next_action, + payment_intent, + reason, + receipt_number, + source_transfer_reversal, + status, + transfer_reversal, }) } } @@ -211,35 +260,29 @@ const _: () = { let mut b = RefundBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "balance_transaction" => { - b.balance_transaction = Some(FromValueOpt::from_value(v)?) - } - "charge" => b.charge = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "destination_details" => { - b.destination_details = Some(FromValueOpt::from_value(v)?) - } + "amount" => b.amount = FromValueOpt::from_value(v), + "balance_transaction" => b.balance_transaction = FromValueOpt::from_value(v), + "charge" => b.charge = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "destination_details" => b.destination_details = FromValueOpt::from_value(v), "failure_balance_transaction" => { - b.failure_balance_transaction = Some(FromValueOpt::from_value(v)?) - } - "failure_reason" => b.failure_reason = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "instructions_email" => { - b.instructions_email = Some(FromValueOpt::from_value(v)?) + b.failure_balance_transaction = FromValueOpt::from_value(v) } - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "next_action" => b.next_action = Some(FromValueOpt::from_value(v)?), - "payment_intent" => b.payment_intent = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), - "receipt_number" => b.receipt_number = Some(FromValueOpt::from_value(v)?), + "failure_reason" => b.failure_reason = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "instructions_email" => b.instructions_email = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "next_action" => b.next_action = FromValueOpt::from_value(v), + "payment_intent" => b.payment_intent = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), + "receipt_number" => b.receipt_number = FromValueOpt::from_value(v), "source_transfer_reversal" => { - b.source_transfer_reversal = Some(FromValueOpt::from_value(v)?) + b.source_transfer_reversal = FromValueOpt::from_value(v) } - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "transfer_reversal" => b.transfer_reversal = Some(FromValueOpt::from_value(v)?), + "status" => b.status = FromValueOpt::from_value(v), + "transfer_reversal" => b.transfer_reversal = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/refund_destination_details.rs b/generated/async-stripe-shared/src/refund_destination_details.rs index 83e256331..903afe6ba 100644 --- a/generated/async-stripe-shared/src/refund_destination_details.rs +++ b/generated/async-stripe-shared/src/refund_destination_details.rs @@ -71,7 +71,12 @@ pub struct RefundDestinationDetailsBuilder { zip: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -176,37 +181,103 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(affirm), + Some(afterpay_clearpay), + Some(alipay), + Some(amazon_pay), + Some(au_bank_transfer), + Some(blik), + Some(br_bank_transfer), + Some(card), + Some(cashapp), + Some(customer_cash_balance), + Some(eps), + Some(eu_bank_transfer), + Some(gb_bank_transfer), + Some(giropay), + Some(grabpay), + Some(jp_bank_transfer), + Some(klarna), + Some(mx_bank_transfer), + Some(p24), + Some(paynow), + Some(paypal), + Some(pix), + Some(revolut), + Some(sofort), + Some(swish), + Some(th_bank_transfer), + Some(type_), + Some(us_bank_transfer), + Some(wechat_pay), + Some(zip), + ) = ( + self.affirm, + self.afterpay_clearpay, + self.alipay, + self.amazon_pay, + self.au_bank_transfer, + self.blik.take(), + self.br_bank_transfer.take(), + self.card.take(), + self.cashapp, + self.customer_cash_balance, + self.eps, + self.eu_bank_transfer.take(), + self.gb_bank_transfer.take(), + self.giropay, + self.grabpay, + self.jp_bank_transfer.take(), + self.klarna, + self.mx_bank_transfer.take(), + self.p24.take(), + self.paynow, + self.paypal, + self.pix, + self.revolut, + self.sofort, + self.swish.take(), + self.th_bank_transfer.take(), + self.type_.take(), + self.us_bank_transfer.take(), + self.wechat_pay, + self.zip, + ) + else { + return None; + }; Some(Self::Out { - affirm: self.affirm?, - afterpay_clearpay: self.afterpay_clearpay?, - alipay: self.alipay?, - amazon_pay: self.amazon_pay?, - au_bank_transfer: self.au_bank_transfer?, - blik: self.blik.take()?, - br_bank_transfer: self.br_bank_transfer.take()?, - card: self.card.take()?, - cashapp: self.cashapp?, - customer_cash_balance: self.customer_cash_balance?, - eps: self.eps?, - eu_bank_transfer: self.eu_bank_transfer.take()?, - gb_bank_transfer: self.gb_bank_transfer.take()?, - giropay: self.giropay?, - grabpay: self.grabpay?, - jp_bank_transfer: self.jp_bank_transfer.take()?, - klarna: self.klarna?, - mx_bank_transfer: self.mx_bank_transfer.take()?, - p24: self.p24.take()?, - paynow: self.paynow?, - paypal: self.paypal?, - pix: self.pix?, - revolut: self.revolut?, - sofort: self.sofort?, - swish: self.swish.take()?, - th_bank_transfer: self.th_bank_transfer.take()?, - type_: self.type_.take()?, - us_bank_transfer: self.us_bank_transfer.take()?, - wechat_pay: self.wechat_pay?, - zip: self.zip?, + affirm, + afterpay_clearpay, + alipay, + amazon_pay, + au_bank_transfer, + blik, + br_bank_transfer, + card, + cashapp, + customer_cash_balance, + eps, + eu_bank_transfer, + gb_bank_transfer, + giropay, + grabpay, + jp_bank_transfer, + klarna, + mx_bank_transfer, + p24, + paynow, + paypal, + pix, + revolut, + sofort, + swish, + th_bank_transfer, + type_, + us_bank_transfer, + wechat_pay, + zip, }) } } @@ -234,38 +305,38 @@ const _: () = { let mut b = RefundDestinationDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "affirm" => b.affirm = Some(FromValueOpt::from_value(v)?), - "afterpay_clearpay" => b.afterpay_clearpay = Some(FromValueOpt::from_value(v)?), - "alipay" => b.alipay = Some(FromValueOpt::from_value(v)?), - "amazon_pay" => b.amazon_pay = Some(FromValueOpt::from_value(v)?), - "au_bank_transfer" => b.au_bank_transfer = Some(FromValueOpt::from_value(v)?), - "blik" => b.blik = Some(FromValueOpt::from_value(v)?), - "br_bank_transfer" => b.br_bank_transfer = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "cashapp" => b.cashapp = Some(FromValueOpt::from_value(v)?), + "affirm" => b.affirm = FromValueOpt::from_value(v), + "afterpay_clearpay" => b.afterpay_clearpay = FromValueOpt::from_value(v), + "alipay" => b.alipay = FromValueOpt::from_value(v), + "amazon_pay" => b.amazon_pay = FromValueOpt::from_value(v), + "au_bank_transfer" => b.au_bank_transfer = FromValueOpt::from_value(v), + "blik" => b.blik = FromValueOpt::from_value(v), + "br_bank_transfer" => b.br_bank_transfer = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "cashapp" => b.cashapp = FromValueOpt::from_value(v), "customer_cash_balance" => { - b.customer_cash_balance = Some(FromValueOpt::from_value(v)?) + b.customer_cash_balance = FromValueOpt::from_value(v) } - "eps" => b.eps = Some(FromValueOpt::from_value(v)?), - "eu_bank_transfer" => b.eu_bank_transfer = Some(FromValueOpt::from_value(v)?), - "gb_bank_transfer" => b.gb_bank_transfer = Some(FromValueOpt::from_value(v)?), - "giropay" => b.giropay = Some(FromValueOpt::from_value(v)?), - "grabpay" => b.grabpay = Some(FromValueOpt::from_value(v)?), - "jp_bank_transfer" => b.jp_bank_transfer = Some(FromValueOpt::from_value(v)?), - "klarna" => b.klarna = Some(FromValueOpt::from_value(v)?), - "mx_bank_transfer" => b.mx_bank_transfer = Some(FromValueOpt::from_value(v)?), - "p24" => b.p24 = Some(FromValueOpt::from_value(v)?), - "paynow" => b.paynow = Some(FromValueOpt::from_value(v)?), - "paypal" => b.paypal = Some(FromValueOpt::from_value(v)?), - "pix" => b.pix = Some(FromValueOpt::from_value(v)?), - "revolut" => b.revolut = Some(FromValueOpt::from_value(v)?), - "sofort" => b.sofort = Some(FromValueOpt::from_value(v)?), - "swish" => b.swish = Some(FromValueOpt::from_value(v)?), - "th_bank_transfer" => b.th_bank_transfer = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "us_bank_transfer" => b.us_bank_transfer = Some(FromValueOpt::from_value(v)?), - "wechat_pay" => b.wechat_pay = Some(FromValueOpt::from_value(v)?), - "zip" => b.zip = Some(FromValueOpt::from_value(v)?), + "eps" => b.eps = FromValueOpt::from_value(v), + "eu_bank_transfer" => b.eu_bank_transfer = FromValueOpt::from_value(v), + "gb_bank_transfer" => b.gb_bank_transfer = FromValueOpt::from_value(v), + "giropay" => b.giropay = FromValueOpt::from_value(v), + "grabpay" => b.grabpay = FromValueOpt::from_value(v), + "jp_bank_transfer" => b.jp_bank_transfer = FromValueOpt::from_value(v), + "klarna" => b.klarna = FromValueOpt::from_value(v), + "mx_bank_transfer" => b.mx_bank_transfer = FromValueOpt::from_value(v), + "p24" => b.p24 = FromValueOpt::from_value(v), + "paynow" => b.paynow = FromValueOpt::from_value(v), + "paypal" => b.paypal = FromValueOpt::from_value(v), + "pix" => b.pix = FromValueOpt::from_value(v), + "revolut" => b.revolut = FromValueOpt::from_value(v), + "sofort" => b.sofort = FromValueOpt::from_value(v), + "swish" => b.swish = FromValueOpt::from_value(v), + "th_bank_transfer" => b.th_bank_transfer = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "us_bank_transfer" => b.us_bank_transfer = FromValueOpt::from_value(v), + "wechat_pay" => b.wechat_pay = FromValueOpt::from_value(v), + "zip" => b.zip = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/refund_destination_details_card.rs b/generated/async-stripe-shared/src/refund_destination_details_card.rs index 51f63c590..63f4364f7 100644 --- a/generated/async-stripe-shared/src/refund_destination_details_card.rs +++ b/generated/async-stripe-shared/src/refund_destination_details_card.rs @@ -20,7 +20,12 @@ pub struct RefundDestinationDetailsCardBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,12 +78,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - reference: self.reference.take()?, - reference_status: self.reference_status.take()?, - reference_type: self.reference_type.take()?, - type_: self.type_?, - }) + let (Some(reference), Some(reference_status), Some(reference_type), Some(type_)) = ( + self.reference.take(), + self.reference_status.take(), + self.reference_type.take(), + self.type_, + ) else { + return None; + }; + Some(Self::Out { reference, reference_status, reference_type, type_ }) } } @@ -105,10 +113,10 @@ const _: () = { let mut b = RefundDestinationDetailsCardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "reference_status" => b.reference_status = Some(FromValueOpt::from_value(v)?), - "reference_type" => b.reference_type = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "reference" => b.reference = FromValueOpt::from_value(v), + "reference_status" => b.reference_status = FromValueOpt::from_value(v), + "reference_type" => b.reference_type = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/refund_destination_details_generic.rs b/generated/async-stripe-shared/src/refund_destination_details_generic.rs index ca8c873a6..2867ab936 100644 --- a/generated/async-stripe-shared/src/refund_destination_details_generic.rs +++ b/generated/async-stripe-shared/src/refund_destination_details_generic.rs @@ -13,7 +13,12 @@ pub struct RefundDestinationDetailsGenericBuilder { reference_status: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - reference: self.reference.take()?, - reference_status: self.reference_status.take()?, - }) + let (Some(reference), Some(reference_status)) = + (self.reference.take(), self.reference_status.take()) + else { + return None; + }; + Some(Self::Out { reference, reference_status }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = RefundDestinationDetailsGenericBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "reference_status" => b.reference_status = Some(FromValueOpt::from_value(v)?), + "reference" => b.reference = FromValueOpt::from_value(v), + "reference_status" => b.reference_status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/refund_next_action.rs b/generated/async-stripe-shared/src/refund_next_action.rs index 10a4156a7..6d7b15fc7 100644 --- a/generated/async-stripe-shared/src/refund_next_action.rs +++ b/generated/async-stripe-shared/src/refund_next_action.rs @@ -14,7 +14,12 @@ pub struct RefundNextActionBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,10 +65,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - display_details: self.display_details.take()?, - type_: self.type_.take()?, - }) + let (Some(display_details), Some(type_)) = + (self.display_details.take(), self.type_.take()) + else { + return None; + }; + Some(Self::Out { display_details, type_ }) } } @@ -90,8 +97,8 @@ const _: () = { let mut b = RefundNextActionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "display_details" => b.display_details = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "display_details" => b.display_details = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/refund_next_action_display_details.rs b/generated/async-stripe-shared/src/refund_next_action_display_details.rs index b20a75198..0e07dc0d2 100644 --- a/generated/async-stripe-shared/src/refund_next_action_display_details.rs +++ b/generated/async-stripe-shared/src/refund_next_action_display_details.rs @@ -12,7 +12,12 @@ pub struct RefundNextActionDisplayDetailsBuilder { expires_at: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { email_sent: self.email_sent.take()?, expires_at: self.expires_at? }) + let (Some(email_sent), Some(expires_at)) = (self.email_sent.take(), self.expires_at) + else { + return None; + }; + Some(Self::Out { email_sent, expires_at }) } } @@ -85,8 +94,8 @@ const _: () = { let mut b = RefundNextActionDisplayDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "email_sent" => b.email_sent = Some(FromValueOpt::from_value(v)?), - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), + "email_sent" => b.email_sent = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/reserve_transaction.rs b/generated/async-stripe-shared/src/reserve_transaction.rs index f3b6e4a36..94b7ba276 100644 --- a/generated/async-stripe-shared/src/reserve_transaction.rs +++ b/generated/async-stripe-shared/src/reserve_transaction.rs @@ -18,7 +18,12 @@ pub struct ReserveTransactionBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -71,12 +76,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - currency: self.currency?, - description: self.description.take()?, - id: self.id.take()?, - }) + let (Some(amount), Some(currency), Some(description), Some(id)) = + (self.amount, self.currency, self.description.take(), self.id.take()) + else { + return None; + }; + Some(Self::Out { amount, currency, description, id }) } } @@ -103,10 +108,10 @@ const _: () = { let mut b = ReserveTransactionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/review.rs b/generated/async-stripe-shared/src/review.rs index e7a3bd680..99247175c 100644 --- a/generated/async-stripe-shared/src/review.rs +++ b/generated/async-stripe-shared/src/review.rs @@ -54,7 +54,12 @@ pub struct ReviewBuilder { session: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -122,20 +127,52 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(billing_zip), + Some(charge), + Some(closed_reason), + Some(created), + Some(id), + Some(ip_address), + Some(ip_address_location), + Some(livemode), + Some(open), + Some(opened_reason), + Some(payment_intent), + Some(reason), + Some(session), + ) = ( + self.billing_zip.take(), + self.charge.take(), + self.closed_reason, + self.created, + self.id.take(), + self.ip_address.take(), + self.ip_address_location.take(), + self.livemode, + self.open, + self.opened_reason, + self.payment_intent.take(), + self.reason.take(), + self.session.take(), + ) + else { + return None; + }; Some(Self::Out { - billing_zip: self.billing_zip.take()?, - charge: self.charge.take()?, - closed_reason: self.closed_reason?, - created: self.created?, - id: self.id.take()?, - ip_address: self.ip_address.take()?, - ip_address_location: self.ip_address_location.take()?, - livemode: self.livemode?, - open: self.open?, - opened_reason: self.opened_reason?, - payment_intent: self.payment_intent.take()?, - reason: self.reason.take()?, - session: self.session.take()?, + billing_zip, + charge, + closed_reason, + created, + id, + ip_address, + ip_address_location, + livemode, + open, + opened_reason, + payment_intent, + reason, + session, }) } } @@ -163,21 +200,19 @@ const _: () = { let mut b = ReviewBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "billing_zip" => b.billing_zip = Some(FromValueOpt::from_value(v)?), - "charge" => b.charge = Some(FromValueOpt::from_value(v)?), - "closed_reason" => b.closed_reason = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "ip_address" => b.ip_address = Some(FromValueOpt::from_value(v)?), - "ip_address_location" => { - b.ip_address_location = Some(FromValueOpt::from_value(v)?) - } - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "open" => b.open = Some(FromValueOpt::from_value(v)?), - "opened_reason" => b.opened_reason = Some(FromValueOpt::from_value(v)?), - "payment_intent" => b.payment_intent = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), - "session" => b.session = Some(FromValueOpt::from_value(v)?), + "billing_zip" => b.billing_zip = FromValueOpt::from_value(v), + "charge" => b.charge = FromValueOpt::from_value(v), + "closed_reason" => b.closed_reason = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "ip_address" => b.ip_address = FromValueOpt::from_value(v), + "ip_address_location" => b.ip_address_location = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "open" => b.open = FromValueOpt::from_value(v), + "opened_reason" => b.opened_reason = FromValueOpt::from_value(v), + "payment_intent" => b.payment_intent = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), + "session" => b.session = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/rule.rs b/generated/async-stripe-shared/src/rule.rs index 85958aa6f..8ca08a843 100644 --- a/generated/async-stripe-shared/src/rule.rs +++ b/generated/async-stripe-shared/src/rule.rs @@ -16,7 +16,12 @@ pub struct RuleBuilder { predicate: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -64,11 +69,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - action: self.action.take()?, - id: self.id.take()?, - predicate: self.predicate.take()?, - }) + let (Some(action), Some(id), Some(predicate)) = + (self.action.take(), self.id.take(), self.predicate.take()) + else { + return None; + }; + Some(Self::Out { action, id, predicate }) } } @@ -95,9 +101,9 @@ const _: () = { let mut b = RuleBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "action" => b.action = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "predicate" => b.predicate = Some(FromValueOpt::from_value(v)?), + "action" => b.action = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "predicate" => b.predicate = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/schedules_phase_automatic_tax.rs b/generated/async-stripe-shared/src/schedules_phase_automatic_tax.rs index 922249b68..f1f2e5074 100644 --- a/generated/async-stripe-shared/src/schedules_phase_automatic_tax.rs +++ b/generated/async-stripe-shared/src/schedules_phase_automatic_tax.rs @@ -15,7 +15,12 @@ pub struct SchedulesPhaseAutomaticTaxBuilder { liability: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -61,7 +66,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled?, liability: self.liability.take()? }) + let (Some(enabled), Some(liability)) = (self.enabled, self.liability.take()) else { + return None; + }; + Some(Self::Out { enabled, liability }) } } @@ -88,8 +96,8 @@ const _: () = { let mut b = SchedulesPhaseAutomaticTaxBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "liability" => b.liability = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "liability" => b.liability = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/sepa_debit_generated_from.rs b/generated/async-stripe-shared/src/sepa_debit_generated_from.rs index 819c4a75b..b5f3f1f52 100644 --- a/generated/async-stripe-shared/src/sepa_debit_generated_from.rs +++ b/generated/async-stripe-shared/src/sepa_debit_generated_from.rs @@ -13,7 +13,12 @@ pub struct SepaDebitGeneratedFromBuilder { setup_attempt: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - charge: self.charge.take()?, - setup_attempt: self.setup_attempt.take()?, - }) + let (Some(charge), Some(setup_attempt)) = + (self.charge.take(), self.setup_attempt.take()) + else { + return None; + }; + Some(Self::Out { charge, setup_attempt }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = SepaDebitGeneratedFromBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "charge" => b.charge = Some(FromValueOpt::from_value(v)?), - "setup_attempt" => b.setup_attempt = Some(FromValueOpt::from_value(v)?), + "charge" => b.charge = FromValueOpt::from_value(v), + "setup_attempt" => b.setup_attempt = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_attempt.rs b/generated/async-stripe-shared/src/setup_attempt.rs index cb77ced81..c49314168 100644 --- a/generated/async-stripe-shared/src/setup_attempt.rs +++ b/generated/async-stripe-shared/src/setup_attempt.rs @@ -60,7 +60,12 @@ pub struct SetupAttemptBuilder { usage: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -133,21 +138,55 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(application), + Some(attach_to_self), + Some(created), + Some(customer), + Some(flow_directions), + Some(id), + Some(livemode), + Some(on_behalf_of), + Some(payment_method), + Some(payment_method_details), + Some(setup_error), + Some(setup_intent), + Some(status), + Some(usage), + ) = ( + self.application.take(), + self.attach_to_self, + self.created, + self.customer.take(), + self.flow_directions.take(), + self.id.take(), + self.livemode, + self.on_behalf_of.take(), + self.payment_method.take(), + self.payment_method_details.take(), + self.setup_error.take(), + self.setup_intent.take(), + self.status.take(), + self.usage.take(), + ) + else { + return None; + }; Some(Self::Out { - application: self.application.take()?, - attach_to_self: self.attach_to_self?, - created: self.created?, - customer: self.customer.take()?, - flow_directions: self.flow_directions.take()?, - id: self.id.take()?, - livemode: self.livemode?, - on_behalf_of: self.on_behalf_of.take()?, - payment_method: self.payment_method.take()?, - payment_method_details: self.payment_method_details.take()?, - setup_error: self.setup_error.take()?, - setup_intent: self.setup_intent.take()?, - status: self.status.take()?, - usage: self.usage.take()?, + application, + attach_to_self, + created, + customer, + flow_directions, + id, + livemode, + on_behalf_of, + payment_method, + payment_method_details, + setup_error, + setup_intent, + status, + usage, }) } } @@ -175,22 +214,22 @@ const _: () = { let mut b = SetupAttemptBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "application" => b.application = Some(FromValueOpt::from_value(v)?), - "attach_to_self" => b.attach_to_self = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "flow_directions" => b.flow_directions = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "on_behalf_of" => b.on_behalf_of = Some(FromValueOpt::from_value(v)?), - "payment_method" => b.payment_method = Some(FromValueOpt::from_value(v)?), + "application" => b.application = FromValueOpt::from_value(v), + "attach_to_self" => b.attach_to_self = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "flow_directions" => b.flow_directions = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "on_behalf_of" => b.on_behalf_of = FromValueOpt::from_value(v), + "payment_method" => b.payment_method = FromValueOpt::from_value(v), "payment_method_details" => { - b.payment_method_details = Some(FromValueOpt::from_value(v)?) + b.payment_method_details = FromValueOpt::from_value(v) } - "setup_error" => b.setup_error = Some(FromValueOpt::from_value(v)?), - "setup_intent" => b.setup_intent = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "usage" => b.usage = Some(FromValueOpt::from_value(v)?), + "setup_error" => b.setup_error = FromValueOpt::from_value(v), + "setup_intent" => b.setup_intent = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "usage" => b.usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details.rs index 2f9c1adda..56ddfef32 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details.rs @@ -47,7 +47,12 @@ pub struct SetupAttemptPaymentMethodDetailsBuilder { us_bank_account: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -128,25 +133,67 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(acss_debit), + Some(amazon_pay), + Some(au_becs_debit), + Some(bacs_debit), + Some(bancontact), + Some(boleto), + Some(card), + Some(card_present), + Some(cashapp), + Some(ideal), + Some(klarna), + Some(link), + Some(paypal), + Some(revolut_pay), + Some(sepa_debit), + Some(sofort), + Some(type_), + Some(us_bank_account), + ) = ( + self.acss_debit, + self.amazon_pay, + self.au_becs_debit, + self.bacs_debit, + self.bancontact.take(), + self.boleto, + self.card.take(), + self.card_present.take(), + self.cashapp, + self.ideal.take(), + self.klarna, + self.link, + self.paypal, + self.revolut_pay, + self.sepa_debit, + self.sofort.take(), + self.type_.take(), + self.us_bank_account, + ) + else { + return None; + }; Some(Self::Out { - acss_debit: self.acss_debit?, - amazon_pay: self.amazon_pay?, - au_becs_debit: self.au_becs_debit?, - bacs_debit: self.bacs_debit?, - bancontact: self.bancontact.take()?, - boleto: self.boleto?, - card: self.card.take()?, - card_present: self.card_present.take()?, - cashapp: self.cashapp?, - ideal: self.ideal.take()?, - klarna: self.klarna?, - link: self.link?, - paypal: self.paypal?, - revolut_pay: self.revolut_pay?, - sepa_debit: self.sepa_debit?, - sofort: self.sofort.take()?, - type_: self.type_.take()?, - us_bank_account: self.us_bank_account?, + acss_debit, + amazon_pay, + au_becs_debit, + bacs_debit, + bancontact, + boleto, + card, + card_present, + cashapp, + ideal, + klarna, + link, + paypal, + revolut_pay, + sepa_debit, + sofort, + type_, + us_bank_account, }) } } @@ -174,24 +221,24 @@ const _: () = { let mut b = SetupAttemptPaymentMethodDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "acss_debit" => b.acss_debit = Some(FromValueOpt::from_value(v)?), - "amazon_pay" => b.amazon_pay = Some(FromValueOpt::from_value(v)?), - "au_becs_debit" => b.au_becs_debit = Some(FromValueOpt::from_value(v)?), - "bacs_debit" => b.bacs_debit = Some(FromValueOpt::from_value(v)?), - "bancontact" => b.bancontact = Some(FromValueOpt::from_value(v)?), - "boleto" => b.boleto = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "card_present" => b.card_present = Some(FromValueOpt::from_value(v)?), - "cashapp" => b.cashapp = Some(FromValueOpt::from_value(v)?), - "ideal" => b.ideal = Some(FromValueOpt::from_value(v)?), - "klarna" => b.klarna = Some(FromValueOpt::from_value(v)?), - "link" => b.link = Some(FromValueOpt::from_value(v)?), - "paypal" => b.paypal = Some(FromValueOpt::from_value(v)?), - "revolut_pay" => b.revolut_pay = Some(FromValueOpt::from_value(v)?), - "sepa_debit" => b.sepa_debit = Some(FromValueOpt::from_value(v)?), - "sofort" => b.sofort = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "us_bank_account" => b.us_bank_account = Some(FromValueOpt::from_value(v)?), + "acss_debit" => b.acss_debit = FromValueOpt::from_value(v), + "amazon_pay" => b.amazon_pay = FromValueOpt::from_value(v), + "au_becs_debit" => b.au_becs_debit = FromValueOpt::from_value(v), + "bacs_debit" => b.bacs_debit = FromValueOpt::from_value(v), + "bancontact" => b.bancontact = FromValueOpt::from_value(v), + "boleto" => b.boleto = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "card_present" => b.card_present = FromValueOpt::from_value(v), + "cashapp" => b.cashapp = FromValueOpt::from_value(v), + "ideal" => b.ideal = FromValueOpt::from_value(v), + "klarna" => b.klarna = FromValueOpt::from_value(v), + "link" => b.link = FromValueOpt::from_value(v), + "paypal" => b.paypal = FromValueOpt::from_value(v), + "revolut_pay" => b.revolut_pay = FromValueOpt::from_value(v), + "sepa_debit" => b.sepa_debit = FromValueOpt::from_value(v), + "sofort" => b.sofort = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "us_bank_account" => b.us_bank_account = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_acss_debit.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_acss_debit.rs index 9b58b6ae1..5c1096166 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_acss_debit.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_acss_debit.rs @@ -5,7 +5,12 @@ pub struct SetupAttemptPaymentMethodDetailsAcssDebit {} #[doc(hidden)] pub struct SetupAttemptPaymentMethodDetailsAcssDebitBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_amazon_pay.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_amazon_pay.rs index 888a3015e..18e44a5e9 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_amazon_pay.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_amazon_pay.rs @@ -5,7 +5,12 @@ pub struct SetupAttemptPaymentMethodDetailsAmazonPay {} #[doc(hidden)] pub struct SetupAttemptPaymentMethodDetailsAmazonPayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_au_becs_debit.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_au_becs_debit.rs index 1e16d18bc..9597b4812 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_au_becs_debit.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_au_becs_debit.rs @@ -5,7 +5,12 @@ pub struct SetupAttemptPaymentMethodDetailsAuBecsDebit {} #[doc(hidden)] pub struct SetupAttemptPaymentMethodDetailsAuBecsDebitBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bacs_debit.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bacs_debit.rs index c80316a7c..23a3f960f 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bacs_debit.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bacs_debit.rs @@ -5,7 +5,12 @@ pub struct SetupAttemptPaymentMethodDetailsBacsDebit {} #[doc(hidden)] pub struct SetupAttemptPaymentMethodDetailsBacsDebitBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bancontact.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bancontact.rs index 4f267ef05..299246068 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bancontact.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bancontact.rs @@ -33,7 +33,12 @@ pub struct SetupAttemptPaymentMethodDetailsBancontactBuilder { verified_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -96,15 +101,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(bank_code), + Some(bank_name), + Some(bic), + Some(generated_sepa_debit), + Some(generated_sepa_debit_mandate), + Some(iban_last4), + Some(preferred_language), + Some(verified_name), + ) = ( + self.bank_code.take(), + self.bank_name.take(), + self.bic.take(), + self.generated_sepa_debit.take(), + self.generated_sepa_debit_mandate.take(), + self.iban_last4.take(), + self.preferred_language, + self.verified_name.take(), + ) + else { + return None; + }; Some(Self::Out { - bank_code: self.bank_code.take()?, - bank_name: self.bank_name.take()?, - bic: self.bic.take()?, - generated_sepa_debit: self.generated_sepa_debit.take()?, - generated_sepa_debit_mandate: self.generated_sepa_debit_mandate.take()?, - iban_last4: self.iban_last4.take()?, - preferred_language: self.preferred_language?, - verified_name: self.verified_name.take()?, + bank_code, + bank_name, + bic, + generated_sepa_debit, + generated_sepa_debit_mandate, + iban_last4, + preferred_language, + verified_name, }) } } @@ -132,20 +159,16 @@ const _: () = { let mut b = SetupAttemptPaymentMethodDetailsBancontactBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_code" => b.bank_code = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), - "generated_sepa_debit" => { - b.generated_sepa_debit = Some(FromValueOpt::from_value(v)?) - } + "bank_code" => b.bank_code = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "bic" => b.bic = FromValueOpt::from_value(v), + "generated_sepa_debit" => b.generated_sepa_debit = FromValueOpt::from_value(v), "generated_sepa_debit_mandate" => { - b.generated_sepa_debit_mandate = Some(FromValueOpt::from_value(v)?) - } - "iban_last4" => b.iban_last4 = Some(FromValueOpt::from_value(v)?), - "preferred_language" => { - b.preferred_language = Some(FromValueOpt::from_value(v)?) + b.generated_sepa_debit_mandate = FromValueOpt::from_value(v) } - "verified_name" => b.verified_name = Some(FromValueOpt::from_value(v)?), + "iban_last4" => b.iban_last4 = FromValueOpt::from_value(v), + "preferred_language" => b.preferred_language = FromValueOpt::from_value(v), + "verified_name" => b.verified_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_boleto.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_boleto.rs index 746576d6e..5b5c3c524 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_boleto.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_boleto.rs @@ -5,7 +5,12 @@ pub struct SetupAttemptPaymentMethodDetailsBoleto {} #[doc(hidden)] pub struct SetupAttemptPaymentMethodDetailsBoletoBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card.rs index ee71aa0bd..939003487 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card.rs @@ -59,7 +59,12 @@ pub struct SetupAttemptPaymentMethodDetailsCardBuilder { wallet: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -132,21 +137,55 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(brand), + Some(checks), + Some(country), + Some(description), + Some(exp_month), + Some(exp_year), + Some(fingerprint), + Some(funding), + Some(iin), + Some(issuer), + Some(last4), + Some(network), + Some(three_d_secure), + Some(wallet), + ) = ( + self.brand.take(), + self.checks.take(), + self.country.take(), + self.description.take(), + self.exp_month, + self.exp_year, + self.fingerprint.take(), + self.funding.take(), + self.iin.take(), + self.issuer.take(), + self.last4.take(), + self.network.take(), + self.three_d_secure.take(), + self.wallet, + ) + else { + return None; + }; Some(Self::Out { - brand: self.brand.take()?, - checks: self.checks.take()?, - country: self.country.take()?, - description: self.description.take()?, - exp_month: self.exp_month?, - exp_year: self.exp_year?, - fingerprint: self.fingerprint.take()?, - funding: self.funding.take()?, - iin: self.iin.take()?, - issuer: self.issuer.take()?, - last4: self.last4.take()?, - network: self.network.take()?, - three_d_secure: self.three_d_secure.take()?, - wallet: self.wallet?, + brand, + checks, + country, + description, + exp_month, + exp_year, + fingerprint, + funding, + iin, + issuer, + last4, + network, + three_d_secure, + wallet, }) } } @@ -174,20 +213,20 @@ const _: () = { let mut b = SetupAttemptPaymentMethodDetailsCardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "brand" => b.brand = Some(FromValueOpt::from_value(v)?), - "checks" => b.checks = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "exp_month" => b.exp_month = Some(FromValueOpt::from_value(v)?), - "exp_year" => b.exp_year = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "funding" => b.funding = Some(FromValueOpt::from_value(v)?), - "iin" => b.iin = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), - "three_d_secure" => b.three_d_secure = Some(FromValueOpt::from_value(v)?), - "wallet" => b.wallet = Some(FromValueOpt::from_value(v)?), + "brand" => b.brand = FromValueOpt::from_value(v), + "checks" => b.checks = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "exp_month" => b.exp_month = FromValueOpt::from_value(v), + "exp_year" => b.exp_year = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "funding" => b.funding = FromValueOpt::from_value(v), + "iin" => b.iin = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), + "three_d_secure" => b.three_d_secure = FromValueOpt::from_value(v), + "wallet" => b.wallet = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_checks.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_checks.rs index ac3e9f203..d0e7ac40c 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_checks.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_checks.rs @@ -16,7 +16,12 @@ pub struct SetupAttemptPaymentMethodDetailsCardChecksBuilder { cvc_check: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,14 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - address_line1_check: self.address_line1_check.take()?, - address_postal_code_check: self.address_postal_code_check.take()?, - cvc_check: self.cvc_check.take()?, - }) + let (Some(address_line1_check), Some(address_postal_code_check), Some(cvc_check)) = ( + self.address_line1_check.take(), + self.address_postal_code_check.take(), + self.cvc_check.take(), + ) else { + return None; + }; + Some(Self::Out { address_line1_check, address_postal_code_check, cvc_check }) } } @@ -100,13 +108,11 @@ const _: () = { let mut b = SetupAttemptPaymentMethodDetailsCardChecksBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address_line1_check" => { - b.address_line1_check = Some(FromValueOpt::from_value(v)?) - } + "address_line1_check" => b.address_line1_check = FromValueOpt::from_value(v), "address_postal_code_check" => { - b.address_postal_code_check = Some(FromValueOpt::from_value(v)?) + b.address_postal_code_check = FromValueOpt::from_value(v) } - "cvc_check" => b.cvc_check = Some(FromValueOpt::from_value(v)?), + "cvc_check" => b.cvc_check = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_present.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_present.rs index 60cba7078..f16ec1552 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_present.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_present.rs @@ -13,7 +13,12 @@ pub struct SetupAttemptPaymentMethodDetailsCardPresentBuilder { offline: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { generated_card: self.generated_card.take()?, offline: self.offline? }) + let (Some(generated_card), Some(offline)) = (self.generated_card.take(), self.offline) + else { + return None; + }; + Some(Self::Out { generated_card, offline }) } } @@ -86,8 +95,8 @@ const _: () = { let mut b = SetupAttemptPaymentMethodDetailsCardPresentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "generated_card" => b.generated_card = Some(FromValueOpt::from_value(v)?), - "offline" => b.offline = Some(FromValueOpt::from_value(v)?), + "generated_card" => b.generated_card = FromValueOpt::from_value(v), + "offline" => b.offline = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_wallet.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_wallet.rs index ea11db0b9..d71f00730 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_wallet.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_wallet.rs @@ -17,7 +17,12 @@ pub struct SetupAttemptPaymentMethodDetailsCardWalletBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - apple_pay: self.apple_pay?, - google_pay: self.google_pay?, - type_: self.type_?, - }) + let (Some(apple_pay), Some(google_pay), Some(type_)) = + (self.apple_pay, self.google_pay, self.type_) + else { + return None; + }; + Some(Self::Out { apple_pay, google_pay, type_ }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = SetupAttemptPaymentMethodDetailsCardWalletBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "apple_pay" => b.apple_pay = Some(FromValueOpt::from_value(v)?), - "google_pay" => b.google_pay = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "apple_pay" => b.apple_pay = FromValueOpt::from_value(v), + "google_pay" => b.google_pay = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_cashapp.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_cashapp.rs index dcc279404..4a60669db 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_cashapp.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_cashapp.rs @@ -5,7 +5,12 @@ pub struct SetupAttemptPaymentMethodDetailsCashapp {} #[doc(hidden)] pub struct SetupAttemptPaymentMethodDetailsCashappBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_ideal.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_ideal.rs index 59af7f2d6..90dd58b9d 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_ideal.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_ideal.rs @@ -27,7 +27,12 @@ pub struct SetupAttemptPaymentMethodDetailsIdealBuilder { verified_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -86,13 +91,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(bank), + Some(bic), + Some(generated_sepa_debit), + Some(generated_sepa_debit_mandate), + Some(iban_last4), + Some(verified_name), + ) = ( + self.bank, + self.bic, + self.generated_sepa_debit.take(), + self.generated_sepa_debit_mandate.take(), + self.iban_last4.take(), + self.verified_name.take(), + ) + else { + return None; + }; Some(Self::Out { - bank: self.bank?, - bic: self.bic?, - generated_sepa_debit: self.generated_sepa_debit.take()?, - generated_sepa_debit_mandate: self.generated_sepa_debit_mandate.take()?, - iban_last4: self.iban_last4.take()?, - verified_name: self.verified_name.take()?, + bank, + bic, + generated_sepa_debit, + generated_sepa_debit_mandate, + iban_last4, + verified_name, }) } } @@ -120,16 +143,14 @@ const _: () = { let mut b = SetupAttemptPaymentMethodDetailsIdealBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank" => b.bank = Some(FromValueOpt::from_value(v)?), - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), - "generated_sepa_debit" => { - b.generated_sepa_debit = Some(FromValueOpt::from_value(v)?) - } + "bank" => b.bank = FromValueOpt::from_value(v), + "bic" => b.bic = FromValueOpt::from_value(v), + "generated_sepa_debit" => b.generated_sepa_debit = FromValueOpt::from_value(v), "generated_sepa_debit_mandate" => { - b.generated_sepa_debit_mandate = Some(FromValueOpt::from_value(v)?) + b.generated_sepa_debit_mandate = FromValueOpt::from_value(v) } - "iban_last4" => b.iban_last4 = Some(FromValueOpt::from_value(v)?), - "verified_name" => b.verified_name = Some(FromValueOpt::from_value(v)?), + "iban_last4" => b.iban_last4 = FromValueOpt::from_value(v), + "verified_name" => b.verified_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_klarna.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_klarna.rs index 7f849aeca..658142737 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_klarna.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_klarna.rs @@ -5,7 +5,12 @@ pub struct SetupAttemptPaymentMethodDetailsKlarna {} #[doc(hidden)] pub struct SetupAttemptPaymentMethodDetailsKlarnaBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_link.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_link.rs index 8f5547fa6..a8740ec85 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_link.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_link.rs @@ -5,7 +5,12 @@ pub struct SetupAttemptPaymentMethodDetailsLink {} #[doc(hidden)] pub struct SetupAttemptPaymentMethodDetailsLinkBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_paypal.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_paypal.rs index 24c39dfeb..be1bf6752 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_paypal.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_paypal.rs @@ -5,7 +5,12 @@ pub struct SetupAttemptPaymentMethodDetailsPaypal {} #[doc(hidden)] pub struct SetupAttemptPaymentMethodDetailsPaypalBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_revolut_pay.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_revolut_pay.rs index ca735d848..731c6821c 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_revolut_pay.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_revolut_pay.rs @@ -5,7 +5,12 @@ pub struct SetupAttemptPaymentMethodDetailsRevolutPay {} #[doc(hidden)] pub struct SetupAttemptPaymentMethodDetailsRevolutPayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sepa_debit.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sepa_debit.rs index 7e5ff11bd..55c47b6b2 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sepa_debit.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sepa_debit.rs @@ -5,7 +5,12 @@ pub struct SetupAttemptPaymentMethodDetailsSepaDebit {} #[doc(hidden)] pub struct SetupAttemptPaymentMethodDetailsSepaDebitBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sofort.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sofort.rs index 73e41c356..419320483 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sofort.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sofort.rs @@ -33,7 +33,12 @@ pub struct SetupAttemptPaymentMethodDetailsSofortBuilder { verified_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -96,15 +101,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(bank_code), + Some(bank_name), + Some(bic), + Some(generated_sepa_debit), + Some(generated_sepa_debit_mandate), + Some(iban_last4), + Some(preferred_language), + Some(verified_name), + ) = ( + self.bank_code.take(), + self.bank_name.take(), + self.bic.take(), + self.generated_sepa_debit.take(), + self.generated_sepa_debit_mandate.take(), + self.iban_last4.take(), + self.preferred_language, + self.verified_name.take(), + ) + else { + return None; + }; Some(Self::Out { - bank_code: self.bank_code.take()?, - bank_name: self.bank_name.take()?, - bic: self.bic.take()?, - generated_sepa_debit: self.generated_sepa_debit.take()?, - generated_sepa_debit_mandate: self.generated_sepa_debit_mandate.take()?, - iban_last4: self.iban_last4.take()?, - preferred_language: self.preferred_language?, - verified_name: self.verified_name.take()?, + bank_code, + bank_name, + bic, + generated_sepa_debit, + generated_sepa_debit_mandate, + iban_last4, + preferred_language, + verified_name, }) } } @@ -132,20 +159,16 @@ const _: () = { let mut b = SetupAttemptPaymentMethodDetailsSofortBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_code" => b.bank_code = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), - "generated_sepa_debit" => { - b.generated_sepa_debit = Some(FromValueOpt::from_value(v)?) - } + "bank_code" => b.bank_code = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "bic" => b.bic = FromValueOpt::from_value(v), + "generated_sepa_debit" => b.generated_sepa_debit = FromValueOpt::from_value(v), "generated_sepa_debit_mandate" => { - b.generated_sepa_debit_mandate = Some(FromValueOpt::from_value(v)?) - } - "iban_last4" => b.iban_last4 = Some(FromValueOpt::from_value(v)?), - "preferred_language" => { - b.preferred_language = Some(FromValueOpt::from_value(v)?) + b.generated_sepa_debit_mandate = FromValueOpt::from_value(v) } - "verified_name" => b.verified_name = Some(FromValueOpt::from_value(v)?), + "iban_last4" => b.iban_last4 = FromValueOpt::from_value(v), + "preferred_language" => b.preferred_language = FromValueOpt::from_value(v), + "verified_name" => b.verified_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_us_bank_account.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_us_bank_account.rs index c9318932a..7ab8d7c5b 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_us_bank_account.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_us_bank_account.rs @@ -5,7 +5,12 @@ pub struct SetupAttemptPaymentMethodDetailsUsBankAccount {} #[doc(hidden)] pub struct SetupAttemptPaymentMethodDetailsUsBankAccountBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/setup_intent.rs b/generated/async-stripe-shared/src/setup_intent.rs index 177f3b341..b46ac7794 100644 --- a/generated/async-stripe-shared/src/setup_intent.rs +++ b/generated/async-stripe-shared/src/setup_intent.rs @@ -124,7 +124,12 @@ pub struct SetupIntentBuilder { usage: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -221,33 +226,85 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(application), + Some(attach_to_self), + Some(automatic_payment_methods), + Some(cancellation_reason), + Some(client_secret), + Some(created), + Some(customer), + Some(description), + Some(flow_directions), + Some(id), + Some(last_setup_error), + Some(latest_attempt), + Some(livemode), + Some(mandate), + Some(metadata), + Some(next_action), + Some(on_behalf_of), + Some(payment_method), + Some(payment_method_configuration_details), + Some(payment_method_options), + Some(payment_method_types), + Some(single_use_mandate), + Some(status), + Some(usage), + ) = ( + self.application.take(), + self.attach_to_self, + self.automatic_payment_methods, + self.cancellation_reason, + self.client_secret.take(), + self.created, + self.customer.take(), + self.description.take(), + self.flow_directions.take(), + self.id.take(), + self.last_setup_error.take(), + self.latest_attempt.take(), + self.livemode, + self.mandate.take(), + self.metadata.take(), + self.next_action.take(), + self.on_behalf_of.take(), + self.payment_method.take(), + self.payment_method_configuration_details.take(), + self.payment_method_options.take(), + self.payment_method_types.take(), + self.single_use_mandate.take(), + self.status, + self.usage.take(), + ) + else { + return None; + }; Some(Self::Out { - application: self.application.take()?, - attach_to_self: self.attach_to_self?, - automatic_payment_methods: self.automatic_payment_methods?, - cancellation_reason: self.cancellation_reason?, - client_secret: self.client_secret.take()?, - created: self.created?, - customer: self.customer.take()?, - description: self.description.take()?, - flow_directions: self.flow_directions.take()?, - id: self.id.take()?, - last_setup_error: self.last_setup_error.take()?, - latest_attempt: self.latest_attempt.take()?, - livemode: self.livemode?, - mandate: self.mandate.take()?, - metadata: self.metadata.take()?, - next_action: self.next_action.take()?, - on_behalf_of: self.on_behalf_of.take()?, - payment_method: self.payment_method.take()?, - payment_method_configuration_details: self - .payment_method_configuration_details - .take()?, - payment_method_options: self.payment_method_options.take()?, - payment_method_types: self.payment_method_types.take()?, - single_use_mandate: self.single_use_mandate.take()?, - status: self.status?, - usage: self.usage.take()?, + application, + attach_to_self, + automatic_payment_methods, + cancellation_reason, + client_secret, + created, + customer, + description, + flow_directions, + id, + last_setup_error, + latest_attempt, + livemode, + mandate, + metadata, + next_action, + on_behalf_of, + payment_method, + payment_method_configuration_details, + payment_method_options, + payment_method_types, + single_use_mandate, + status, + usage, }) } } @@ -275,42 +332,36 @@ const _: () = { let mut b = SetupIntentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "application" => b.application = Some(FromValueOpt::from_value(v)?), - "attach_to_self" => b.attach_to_self = Some(FromValueOpt::from_value(v)?), + "application" => b.application = FromValueOpt::from_value(v), + "attach_to_self" => b.attach_to_self = FromValueOpt::from_value(v), "automatic_payment_methods" => { - b.automatic_payment_methods = Some(FromValueOpt::from_value(v)?) - } - "cancellation_reason" => { - b.cancellation_reason = Some(FromValueOpt::from_value(v)?) + b.automatic_payment_methods = FromValueOpt::from_value(v) } - "client_secret" => b.client_secret = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "flow_directions" => b.flow_directions = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "last_setup_error" => b.last_setup_error = Some(FromValueOpt::from_value(v)?), - "latest_attempt" => b.latest_attempt = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "mandate" => b.mandate = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "next_action" => b.next_action = Some(FromValueOpt::from_value(v)?), - "on_behalf_of" => b.on_behalf_of = Some(FromValueOpt::from_value(v)?), - "payment_method" => b.payment_method = Some(FromValueOpt::from_value(v)?), + "cancellation_reason" => b.cancellation_reason = FromValueOpt::from_value(v), + "client_secret" => b.client_secret = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "flow_directions" => b.flow_directions = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "last_setup_error" => b.last_setup_error = FromValueOpt::from_value(v), + "latest_attempt" => b.latest_attempt = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "mandate" => b.mandate = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "next_action" => b.next_action = FromValueOpt::from_value(v), + "on_behalf_of" => b.on_behalf_of = FromValueOpt::from_value(v), + "payment_method" => b.payment_method = FromValueOpt::from_value(v), "payment_method_configuration_details" => { - b.payment_method_configuration_details = Some(FromValueOpt::from_value(v)?) + b.payment_method_configuration_details = FromValueOpt::from_value(v) } "payment_method_options" => { - b.payment_method_options = Some(FromValueOpt::from_value(v)?) - } - "payment_method_types" => { - b.payment_method_types = Some(FromValueOpt::from_value(v)?) - } - "single_use_mandate" => { - b.single_use_mandate = Some(FromValueOpt::from_value(v)?) + b.payment_method_options = FromValueOpt::from_value(v) } - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "usage" => b.usage = Some(FromValueOpt::from_value(v)?), + "payment_method_types" => b.payment_method_types = FromValueOpt::from_value(v), + "single_use_mandate" => b.single_use_mandate = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "usage" => b.usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_intent_next_action.rs b/generated/async-stripe-shared/src/setup_intent_next_action.rs index cbce8bf3d..12e2b510b 100644 --- a/generated/async-stripe-shared/src/setup_intent_next_action.rs +++ b/generated/async-stripe-shared/src/setup_intent_next_action.rs @@ -29,7 +29,12 @@ pub struct SetupIntentNextActionBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -88,14 +93,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(cashapp_handle_redirect_or_display_qr_code), + Some(redirect_to_url), + Some(type_), + Some(use_stripe_sdk), + Some(verify_with_microdeposits), + ) = ( + self.cashapp_handle_redirect_or_display_qr_code.take(), + self.redirect_to_url.take(), + self.type_.take(), + self.use_stripe_sdk.take(), + self.verify_with_microdeposits.take(), + ) + else { + return None; + }; Some(Self::Out { - cashapp_handle_redirect_or_display_qr_code: self - .cashapp_handle_redirect_or_display_qr_code - .take()?, - redirect_to_url: self.redirect_to_url.take()?, - type_: self.type_.take()?, - use_stripe_sdk: self.use_stripe_sdk.take()?, - verify_with_microdeposits: self.verify_with_microdeposits.take()?, + cashapp_handle_redirect_or_display_qr_code, + redirect_to_url, + type_, + use_stripe_sdk, + verify_with_microdeposits, }) } } @@ -124,14 +143,13 @@ const _: () = { for (k, v) in obj { match k.as_str() { "cashapp_handle_redirect_or_display_qr_code" => { - b.cashapp_handle_redirect_or_display_qr_code = - Some(FromValueOpt::from_value(v)?) + b.cashapp_handle_redirect_or_display_qr_code = FromValueOpt::from_value(v) } - "redirect_to_url" => b.redirect_to_url = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "use_stripe_sdk" => b.use_stripe_sdk = Some(FromValueOpt::from_value(v)?), + "redirect_to_url" => b.redirect_to_url = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "use_stripe_sdk" => b.use_stripe_sdk = FromValueOpt::from_value(v), "verify_with_microdeposits" => { - b.verify_with_microdeposits = Some(FromValueOpt::from_value(v)?) + b.verify_with_microdeposits = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/setup_intent_next_action_redirect_to_url.rs b/generated/async-stripe-shared/src/setup_intent_next_action_redirect_to_url.rs index fba9624aa..395f64e61 100644 --- a/generated/async-stripe-shared/src/setup_intent_next_action_redirect_to_url.rs +++ b/generated/async-stripe-shared/src/setup_intent_next_action_redirect_to_url.rs @@ -13,7 +13,12 @@ pub struct SetupIntentNextActionRedirectToUrlBuilder { url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { return_url: self.return_url.take()?, url: self.url.take()? }) + let (Some(return_url), Some(url)) = (self.return_url.take(), self.url.take()) else { + return None; + }; + Some(Self::Out { return_url, url }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = SetupIntentNextActionRedirectToUrlBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "return_url" => b.return_url = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "return_url" => b.return_url = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_intent_next_action_verify_with_microdeposits.rs b/generated/async-stripe-shared/src/setup_intent_next_action_verify_with_microdeposits.rs index f19b40932..df84465b7 100644 --- a/generated/async-stripe-shared/src/setup_intent_next_action_verify_with_microdeposits.rs +++ b/generated/async-stripe-shared/src/setup_intent_next_action_verify_with_microdeposits.rs @@ -17,7 +17,12 @@ pub struct SetupIntentNextActionVerifyWithMicrodepositsBuilder { microdeposit_type: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - arrival_date: self.arrival_date?, - hosted_verification_url: self.hosted_verification_url.take()?, - microdeposit_type: self.microdeposit_type?, - }) + let (Some(arrival_date), Some(hosted_verification_url), Some(microdeposit_type)) = + (self.arrival_date, self.hosted_verification_url.take(), self.microdeposit_type) + else { + return None; + }; + Some(Self::Out { arrival_date, hosted_verification_url, microdeposit_type }) } } @@ -99,11 +105,11 @@ const _: () = { let mut b = SetupIntentNextActionVerifyWithMicrodepositsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "arrival_date" => b.arrival_date = Some(FromValueOpt::from_value(v)?), + "arrival_date" => b.arrival_date = FromValueOpt::from_value(v), "hosted_verification_url" => { - b.hosted_verification_url = Some(FromValueOpt::from_value(v)?) + b.hosted_verification_url = FromValueOpt::from_value(v) } - "microdeposit_type" => b.microdeposit_type = Some(FromValueOpt::from_value(v)?), + "microdeposit_type" => b.microdeposit_type = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options.rs index 96deeefab..9a3a10a08 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options.rs @@ -23,7 +23,12 @@ pub struct SetupIntentPaymentMethodOptionsBuilder { us_bank_account: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -84,15 +89,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(acss_debit), + Some(amazon_pay), + Some(card), + Some(card_present), + Some(link), + Some(paypal), + Some(sepa_debit), + Some(us_bank_account), + ) = ( + self.acss_debit.take(), + self.amazon_pay, + self.card.take(), + self.card_present, + self.link.take(), + self.paypal.take(), + self.sepa_debit, + self.us_bank_account.take(), + ) + else { + return None; + }; Some(Self::Out { - acss_debit: self.acss_debit.take()?, - amazon_pay: self.amazon_pay?, - card: self.card.take()?, - card_present: self.card_present?, - link: self.link.take()?, - paypal: self.paypal.take()?, - sepa_debit: self.sepa_debit?, - us_bank_account: self.us_bank_account.take()?, + acss_debit, + amazon_pay, + card, + card_present, + link, + paypal, + sepa_debit, + us_bank_account, }) } } @@ -120,14 +147,14 @@ const _: () = { let mut b = SetupIntentPaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "acss_debit" => b.acss_debit = Some(FromValueOpt::from_value(v)?), - "amazon_pay" => b.amazon_pay = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "card_present" => b.card_present = Some(FromValueOpt::from_value(v)?), - "link" => b.link = Some(FromValueOpt::from_value(v)?), - "paypal" => b.paypal = Some(FromValueOpt::from_value(v)?), - "sepa_debit" => b.sepa_debit = Some(FromValueOpt::from_value(v)?), - "us_bank_account" => b.us_bank_account = Some(FromValueOpt::from_value(v)?), + "acss_debit" => b.acss_debit = FromValueOpt::from_value(v), + "amazon_pay" => b.amazon_pay = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "card_present" => b.card_present = FromValueOpt::from_value(v), + "link" => b.link = FromValueOpt::from_value(v), + "paypal" => b.paypal = FromValueOpt::from_value(v), + "sepa_debit" => b.sepa_debit = FromValueOpt::from_value(v), + "us_bank_account" => b.us_bank_account = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_acss_debit.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_acss_debit.rs index 3c9477358..300ecfe70 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_acss_debit.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_acss_debit.rs @@ -17,7 +17,12 @@ pub struct SetupIntentPaymentMethodOptionsAcssDebitBuilder { verification_method: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - currency: self.currency?, - mandate_options: self.mandate_options.take()?, - verification_method: self.verification_method?, - }) + let (Some(currency), Some(mandate_options), Some(verification_method)) = + (self.currency, self.mandate_options.take(), self.verification_method) + else { + return None; + }; + Some(Self::Out { currency, mandate_options, verification_method }) } } @@ -99,11 +105,9 @@ const _: () = { let mut b = SetupIntentPaymentMethodOptionsAcssDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "mandate_options" => b.mandate_options = Some(FromValueOpt::from_value(v)?), - "verification_method" => { - b.verification_method = Some(FromValueOpt::from_value(v)?) - } + "currency" => b.currency = FromValueOpt::from_value(v), + "mandate_options" => b.mandate_options = FromValueOpt::from_value(v), + "verification_method" => b.verification_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_amazon_pay.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_amazon_pay.rs index b67f02917..564d08450 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_amazon_pay.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_amazon_pay.rs @@ -5,7 +5,12 @@ pub struct SetupIntentPaymentMethodOptionsAmazonPay {} #[doc(hidden)] pub struct SetupIntentPaymentMethodOptionsAmazonPayBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_card.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_card.rs index e0f2d22ae..93c253557 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_card.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_card.rs @@ -22,7 +22,12 @@ pub struct SetupIntentPaymentMethodOptionsCardBuilder { request_three_d_secure: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,11 +78,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - mandate_options: self.mandate_options.take()?, - network: self.network?, - request_three_d_secure: self.request_three_d_secure?, - }) + let (Some(mandate_options), Some(network), Some(request_three_d_secure)) = + (self.mandate_options.take(), self.network, self.request_three_d_secure) + else { + return None; + }; + Some(Self::Out { mandate_options, network, request_three_d_secure }) } } @@ -104,10 +110,10 @@ const _: () = { let mut b = SetupIntentPaymentMethodOptionsCardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "mandate_options" => b.mandate_options = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), + "mandate_options" => b.mandate_options = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), "request_three_d_secure" => { - b.request_three_d_secure = Some(FromValueOpt::from_value(v)?) + b.request_three_d_secure = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_mandate_options.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_mandate_options.rs index f7818724a..f661ce490 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_mandate_options.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_mandate_options.rs @@ -47,7 +47,12 @@ pub struct SetupIntentPaymentMethodOptionsCardMandateOptionsBuilder { Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -112,17 +117,43 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_type), + Some(currency), + Some(description), + Some(end_date), + Some(interval), + Some(interval_count), + Some(reference), + Some(start_date), + Some(supported_types), + ) = ( + self.amount, + self.amount_type, + self.currency, + self.description.take(), + self.end_date, + self.interval, + self.interval_count, + self.reference.take(), + self.start_date, + self.supported_types.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_type: self.amount_type?, - currency: self.currency?, - description: self.description.take()?, - end_date: self.end_date?, - interval: self.interval?, - interval_count: self.interval_count?, - reference: self.reference.take()?, - start_date: self.start_date?, - supported_types: self.supported_types.take()?, + amount, + amount_type, + currency, + description, + end_date, + interval, + interval_count, + reference, + start_date, + supported_types, }) } } @@ -150,16 +181,16 @@ const _: () = { let mut b = SetupIntentPaymentMethodOptionsCardMandateOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_type" => b.amount_type = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "end_date" => b.end_date = Some(FromValueOpt::from_value(v)?), - "interval" => b.interval = Some(FromValueOpt::from_value(v)?), - "interval_count" => b.interval_count = Some(FromValueOpt::from_value(v)?), - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "start_date" => b.start_date = Some(FromValueOpt::from_value(v)?), - "supported_types" => b.supported_types = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_type" => b.amount_type = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "end_date" => b.end_date = FromValueOpt::from_value(v), + "interval" => b.interval = FromValueOpt::from_value(v), + "interval_count" => b.interval_count = FromValueOpt::from_value(v), + "reference" => b.reference = FromValueOpt::from_value(v), + "start_date" => b.start_date = FromValueOpt::from_value(v), + "supported_types" => b.supported_types = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_present.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_present.rs index fd9622420..0a4f7fcb6 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_present.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_present.rs @@ -5,7 +5,12 @@ pub struct SetupIntentPaymentMethodOptionsCardPresent {} #[doc(hidden)] pub struct SetupIntentPaymentMethodOptionsCardPresentBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -48,6 +53,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_link.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_link.rs index b85f8d395..44b4ff227 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_link.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_link.rs @@ -10,7 +10,12 @@ pub struct SetupIntentPaymentMethodOptionsLinkBuilder { persistent_token: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { persistent_token: self.persistent_token.take()? }) + let (Some(persistent_token),) = (self.persistent_token.take(),) else { + return None; + }; + Some(Self::Out { persistent_token }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = SetupIntentPaymentMethodOptionsLinkBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "persistent_token" => b.persistent_token = Some(FromValueOpt::from_value(v)?), + "persistent_token" => b.persistent_token = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_acss_debit.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_acss_debit.rs index 161b7baae..3b6a1329b 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_acss_debit.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_acss_debit.rs @@ -28,7 +28,12 @@ pub struct SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -84,12 +89,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(custom_mandate_url), + Some(default_for), + Some(interval_description), + Some(payment_schedule), + Some(transaction_type), + ) = ( + self.custom_mandate_url.take(), + self.default_for.take(), + self.interval_description.take(), + self.payment_schedule, + self.transaction_type, + ) + else { + return None; + }; Some(Self::Out { - custom_mandate_url: self.custom_mandate_url.take()?, - default_for: self.default_for.take()?, - interval_description: self.interval_description.take()?, - payment_schedule: self.payment_schedule?, - transaction_type: self.transaction_type?, + custom_mandate_url, + default_for, + interval_description, + payment_schedule, + transaction_type, }) } } @@ -118,15 +139,11 @@ const _: () = { SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "custom_mandate_url" => { - b.custom_mandate_url = Some(FromValueOpt::from_value(v)?) - } - "default_for" => b.default_for = Some(FromValueOpt::from_value(v)?), - "interval_description" => { - b.interval_description = Some(FromValueOpt::from_value(v)?) - } - "payment_schedule" => b.payment_schedule = Some(FromValueOpt::from_value(v)?), - "transaction_type" => b.transaction_type = Some(FromValueOpt::from_value(v)?), + "custom_mandate_url" => b.custom_mandate_url = FromValueOpt::from_value(v), + "default_for" => b.default_for = FromValueOpt::from_value(v), + "interval_description" => b.interval_description = FromValueOpt::from_value(v), + "payment_schedule" => b.payment_schedule = FromValueOpt::from_value(v), + "transaction_type" => b.transaction_type = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_sepa_debit.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_sepa_debit.rs index ffb2cceb7..ce4f1f1f2 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_sepa_debit.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_sepa_debit.rs @@ -5,7 +5,12 @@ pub struct SetupIntentPaymentMethodOptionsMandateOptionsSepaDebit {} #[doc(hidden)] pub struct SetupIntentPaymentMethodOptionsMandateOptionsSepaDebitBuilder {} -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -49,6 +54,9 @@ const _: () = { } fn take_out(&mut self) -> Option { + let () = () else { + return None; + }; Some(Self::Out {}) } } diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_paypal.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_paypal.rs index 2a8cda66f..cd500f93c 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_paypal.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_paypal.rs @@ -11,7 +11,12 @@ pub struct SetupIntentPaymentMethodOptionsPaypalBuilder { billing_agreement_id: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { billing_agreement_id: self.billing_agreement_id.take()? }) + let (Some(billing_agreement_id),) = (self.billing_agreement_id.take(),) else { + return None; + }; + Some(Self::Out { billing_agreement_id }) } } @@ -83,9 +91,7 @@ const _: () = { let mut b = SetupIntentPaymentMethodOptionsPaypalBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "billing_agreement_id" => { - b.billing_agreement_id = Some(FromValueOpt::from_value(v)?) - } + "billing_agreement_id" => b.billing_agreement_id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_sepa_debit.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_sepa_debit.rs index 3546a9d4b..dd88366d8 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_sepa_debit.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_sepa_debit.rs @@ -11,7 +11,12 @@ pub struct SetupIntentPaymentMethodOptionsSepaDebitBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { mandate_options: self.mandate_options? }) + let (Some(mandate_options),) = (self.mandate_options,) else { + return None; + }; + Some(Self::Out { mandate_options }) } } @@ -83,7 +91,7 @@ const _: () = { let mut b = SetupIntentPaymentMethodOptionsSepaDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "mandate_options" => b.mandate_options = Some(FromValueOpt::from_value(v)?), + "mandate_options" => b.mandate_options = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_us_bank_account.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_us_bank_account.rs index 0c49b3cbe..e9c80a48a 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_us_bank_account.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_us_bank_account.rs @@ -15,7 +15,12 @@ pub struct SetupIntentPaymentMethodOptionsUsBankAccountBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -66,11 +71,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - financial_connections: self.financial_connections.take()?, - mandate_options: self.mandate_options?, - verification_method: self.verification_method?, - }) + let (Some(financial_connections), Some(mandate_options), Some(verification_method)) = + (self.financial_connections.take(), self.mandate_options, self.verification_method) + else { + return None; + }; + Some(Self::Out { financial_connections, mandate_options, verification_method }) } } @@ -98,12 +104,10 @@ const _: () = { for (k, v) in obj { match k.as_str() { "financial_connections" => { - b.financial_connections = Some(FromValueOpt::from_value(v)?) - } - "mandate_options" => b.mandate_options = Some(FromValueOpt::from_value(v)?), - "verification_method" => { - b.verification_method = Some(FromValueOpt::from_value(v)?) + b.financial_connections = FromValueOpt::from_value(v) } + "mandate_options" => b.mandate_options = FromValueOpt::from_value(v), + "verification_method" => b.verification_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/shipping.rs b/generated/async-stripe-shared/src/shipping.rs index d62e2a705..a0bfb83cd 100644 --- a/generated/async-stripe-shared/src/shipping.rs +++ b/generated/async-stripe-shared/src/shipping.rs @@ -22,7 +22,12 @@ pub struct ShippingBuilder { tracking_number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -74,13 +79,16 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - address: self.address.take()?, - carrier: self.carrier.take()?, - name: self.name.take()?, - phone: self.phone.take()?, - tracking_number: self.tracking_number.take()?, - }) + let (Some(address), Some(carrier), Some(name), Some(phone), Some(tracking_number)) = ( + self.address.take(), + self.carrier.take(), + self.name.take(), + self.phone.take(), + self.tracking_number.take(), + ) else { + return None; + }; + Some(Self::Out { address, carrier, name, phone, tracking_number }) } } @@ -107,11 +115,11 @@ const _: () = { let mut b = ShippingBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), - "carrier" => b.carrier = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "phone" => b.phone = Some(FromValueOpt::from_value(v)?), - "tracking_number" => b.tracking_number = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), + "carrier" => b.carrier = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "phone" => b.phone = FromValueOpt::from_value(v), + "tracking_number" => b.tracking_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/shipping_rate.rs b/generated/async-stripe-shared/src/shipping_rate.rs index 440396ca3..c32170b76 100644 --- a/generated/async-stripe-shared/src/shipping_rate.rs +++ b/generated/async-stripe-shared/src/shipping_rate.rs @@ -49,7 +49,12 @@ pub struct ShippingRateBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -116,18 +121,46 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(active), + Some(created), + Some(delivery_estimate), + Some(display_name), + Some(fixed_amount), + Some(id), + Some(livemode), + Some(metadata), + Some(tax_behavior), + Some(tax_code), + Some(type_), + ) = ( + self.active, + self.created, + self.delivery_estimate, + self.display_name.take(), + self.fixed_amount.take(), + self.id.take(), + self.livemode, + self.metadata.take(), + self.tax_behavior, + self.tax_code.take(), + self.type_, + ) + else { + return None; + }; Some(Self::Out { - active: self.active?, - created: self.created?, - delivery_estimate: self.delivery_estimate?, - display_name: self.display_name.take()?, - fixed_amount: self.fixed_amount.take()?, - id: self.id.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - tax_behavior: self.tax_behavior?, - tax_code: self.tax_code.take()?, - type_: self.type_?, + active, + created, + delivery_estimate, + display_name, + fixed_amount, + id, + livemode, + metadata, + tax_behavior, + tax_code, + type_, }) } } @@ -155,17 +188,17 @@ const _: () = { let mut b = ShippingRateBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "active" => b.active = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "delivery_estimate" => b.delivery_estimate = Some(FromValueOpt::from_value(v)?), - "display_name" => b.display_name = Some(FromValueOpt::from_value(v)?), - "fixed_amount" => b.fixed_amount = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "tax_behavior" => b.tax_behavior = Some(FromValueOpt::from_value(v)?), - "tax_code" => b.tax_code = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "active" => b.active = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "delivery_estimate" => b.delivery_estimate = FromValueOpt::from_value(v), + "display_name" => b.display_name = FromValueOpt::from_value(v), + "fixed_amount" => b.fixed_amount = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "tax_behavior" => b.tax_behavior = FromValueOpt::from_value(v), + "tax_code" => b.tax_code = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/shipping_rate_currency_option.rs b/generated/async-stripe-shared/src/shipping_rate_currency_option.rs index 5b0d7833e..037e1f8b5 100644 --- a/generated/async-stripe-shared/src/shipping_rate_currency_option.rs +++ b/generated/async-stripe-shared/src/shipping_rate_currency_option.rs @@ -14,7 +14,12 @@ pub struct ShippingRateCurrencyOptionBuilder { tax_behavior: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { amount: self.amount?, tax_behavior: self.tax_behavior? }) + let (Some(amount), Some(tax_behavior)) = (self.amount, self.tax_behavior) else { + return None; + }; + Some(Self::Out { amount, tax_behavior }) } } @@ -87,8 +95,8 @@ const _: () = { let mut b = ShippingRateCurrencyOptionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "tax_behavior" => b.tax_behavior = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "tax_behavior" => b.tax_behavior = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/shipping_rate_delivery_estimate.rs b/generated/async-stripe-shared/src/shipping_rate_delivery_estimate.rs index cd9014602..5bccbb5c9 100644 --- a/generated/async-stripe-shared/src/shipping_rate_delivery_estimate.rs +++ b/generated/async-stripe-shared/src/shipping_rate_delivery_estimate.rs @@ -13,7 +13,12 @@ pub struct ShippingRateDeliveryEstimateBuilder { minimum: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { maximum: self.maximum?, minimum: self.minimum? }) + let (Some(maximum), Some(minimum)) = (self.maximum, self.minimum) else { + return None; + }; + Some(Self::Out { maximum, minimum }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = ShippingRateDeliveryEstimateBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "maximum" => b.maximum = Some(FromValueOpt::from_value(v)?), - "minimum" => b.minimum = Some(FromValueOpt::from_value(v)?), + "maximum" => b.maximum = FromValueOpt::from_value(v), + "minimum" => b.minimum = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/shipping_rate_delivery_estimate_bound.rs b/generated/async-stripe-shared/src/shipping_rate_delivery_estimate_bound.rs index 023228f42..3ff24e3be 100644 --- a/generated/async-stripe-shared/src/shipping_rate_delivery_estimate_bound.rs +++ b/generated/async-stripe-shared/src/shipping_rate_delivery_estimate_bound.rs @@ -13,7 +13,12 @@ pub struct ShippingRateDeliveryEstimateBoundBuilder { value: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { unit: self.unit?, value: self.value? }) + let (Some(unit), Some(value)) = (self.unit, self.value) else { + return None; + }; + Some(Self::Out { unit, value }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = ShippingRateDeliveryEstimateBoundBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "unit" => b.unit = Some(FromValueOpt::from_value(v)?), - "value" => b.value = Some(FromValueOpt::from_value(v)?), + "unit" => b.unit = FromValueOpt::from_value(v), + "value" => b.value = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/shipping_rate_fixed_amount.rs b/generated/async-stripe-shared/src/shipping_rate_fixed_amount.rs index aaef6e785..cbe929319 100644 --- a/generated/async-stripe-shared/src/shipping_rate_fixed_amount.rs +++ b/generated/async-stripe-shared/src/shipping_rate_fixed_amount.rs @@ -30,7 +30,12 @@ pub struct ShippingRateFixedAmountBuilder { >, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -81,11 +86,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - currency: self.currency?, - currency_options: self.currency_options.take()?, - }) + let (Some(amount), Some(currency), Some(currency_options)) = + (self.amount, self.currency, self.currency_options.take()) + else { + return None; + }; + Some(Self::Out { amount, currency, currency_options }) } } @@ -112,9 +118,9 @@ const _: () = { let mut b = ShippingRateFixedAmountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "currency_options" => b.currency_options = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "currency_options" => b.currency_options = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source.rs b/generated/async-stripe-shared/src/source.rs index f066738f1..5f6e05ac4 100644 --- a/generated/async-stripe-shared/src/source.rs +++ b/generated/async-stripe-shared/src/source.rs @@ -122,7 +122,12 @@ pub struct SourceBuilder { wechat: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -238,44 +243,124 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(ach_credit_transfer), + Some(ach_debit), + Some(acss_debit), + Some(alipay), + Some(amount), + Some(au_becs_debit), + Some(bancontact), + Some(card), + Some(card_present), + Some(client_secret), + Some(code_verification), + Some(created), + Some(currency), + Some(customer), + Some(eps), + Some(flow), + Some(giropay), + Some(id), + Some(ideal), + Some(klarna), + Some(livemode), + Some(metadata), + Some(multibanco), + Some(owner), + Some(p24), + Some(receiver), + Some(redirect), + Some(sepa_credit_transfer), + Some(sepa_debit), + Some(sofort), + Some(source_order), + Some(statement_descriptor), + Some(status), + Some(three_d_secure), + Some(type_), + Some(usage), + Some(wechat), + ) = ( + self.ach_credit_transfer.take(), + self.ach_debit.take(), + self.acss_debit.take(), + self.alipay.take(), + self.amount, + self.au_becs_debit.take(), + self.bancontact.take(), + self.card.take(), + self.card_present.take(), + self.client_secret.take(), + self.code_verification.take(), + self.created, + self.currency, + self.customer.take(), + self.eps.take(), + self.flow.take(), + self.giropay.take(), + self.id.take(), + self.ideal.take(), + self.klarna.take(), + self.livemode, + self.metadata.take(), + self.multibanco.take(), + self.owner.take(), + self.p24.take(), + self.receiver.take(), + self.redirect.take(), + self.sepa_credit_transfer.take(), + self.sepa_debit.take(), + self.sofort.take(), + self.source_order.take(), + self.statement_descriptor.take(), + self.status.take(), + self.three_d_secure.take(), + self.type_, + self.usage.take(), + self.wechat.take(), + ) + else { + return None; + }; Some(Self::Out { - ach_credit_transfer: self.ach_credit_transfer.take()?, - ach_debit: self.ach_debit.take()?, - acss_debit: self.acss_debit.take()?, - alipay: self.alipay.take()?, - amount: self.amount?, - au_becs_debit: self.au_becs_debit.take()?, - bancontact: self.bancontact.take()?, - card: self.card.take()?, - card_present: self.card_present.take()?, - client_secret: self.client_secret.take()?, - code_verification: self.code_verification.take()?, - created: self.created?, - currency: self.currency?, - customer: self.customer.take()?, - eps: self.eps.take()?, - flow: self.flow.take()?, - giropay: self.giropay.take()?, - id: self.id.take()?, - ideal: self.ideal.take()?, - klarna: self.klarna.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - multibanco: self.multibanco.take()?, - owner: self.owner.take()?, - p24: self.p24.take()?, - receiver: self.receiver.take()?, - redirect: self.redirect.take()?, - sepa_credit_transfer: self.sepa_credit_transfer.take()?, - sepa_debit: self.sepa_debit.take()?, - sofort: self.sofort.take()?, - source_order: self.source_order.take()?, - statement_descriptor: self.statement_descriptor.take()?, - status: self.status.take()?, - three_d_secure: self.three_d_secure.take()?, - type_: self.type_?, - usage: self.usage.take()?, - wechat: self.wechat.take()?, + ach_credit_transfer, + ach_debit, + acss_debit, + alipay, + amount, + au_becs_debit, + bancontact, + card, + card_present, + client_secret, + code_verification, + created, + currency, + customer, + eps, + flow, + giropay, + id, + ideal, + klarna, + livemode, + metadata, + multibanco, + owner, + p24, + receiver, + redirect, + sepa_credit_transfer, + sepa_debit, + sofort, + source_order, + statement_descriptor, + status, + three_d_secure, + type_, + usage, + wechat, }) } } @@ -303,49 +388,43 @@ const _: () = { let mut b = SourceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "ach_credit_transfer" => { - b.ach_credit_transfer = Some(FromValueOpt::from_value(v)?) - } - "ach_debit" => b.ach_debit = Some(FromValueOpt::from_value(v)?), - "acss_debit" => b.acss_debit = Some(FromValueOpt::from_value(v)?), - "alipay" => b.alipay = Some(FromValueOpt::from_value(v)?), - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "au_becs_debit" => b.au_becs_debit = Some(FromValueOpt::from_value(v)?), - "bancontact" => b.bancontact = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "card_present" => b.card_present = Some(FromValueOpt::from_value(v)?), - "client_secret" => b.client_secret = Some(FromValueOpt::from_value(v)?), - "code_verification" => b.code_verification = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "eps" => b.eps = Some(FromValueOpt::from_value(v)?), - "flow" => b.flow = Some(FromValueOpt::from_value(v)?), - "giropay" => b.giropay = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "ideal" => b.ideal = Some(FromValueOpt::from_value(v)?), - "klarna" => b.klarna = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "multibanco" => b.multibanco = Some(FromValueOpt::from_value(v)?), - "owner" => b.owner = Some(FromValueOpt::from_value(v)?), - "p24" => b.p24 = Some(FromValueOpt::from_value(v)?), - "receiver" => b.receiver = Some(FromValueOpt::from_value(v)?), - "redirect" => b.redirect = Some(FromValueOpt::from_value(v)?), - "sepa_credit_transfer" => { - b.sepa_credit_transfer = Some(FromValueOpt::from_value(v)?) - } - "sepa_debit" => b.sepa_debit = Some(FromValueOpt::from_value(v)?), - "sofort" => b.sofort = Some(FromValueOpt::from_value(v)?), - "source_order" => b.source_order = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "three_d_secure" => b.three_d_secure = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "usage" => b.usage = Some(FromValueOpt::from_value(v)?), - "wechat" => b.wechat = Some(FromValueOpt::from_value(v)?), + "ach_credit_transfer" => b.ach_credit_transfer = FromValueOpt::from_value(v), + "ach_debit" => b.ach_debit = FromValueOpt::from_value(v), + "acss_debit" => b.acss_debit = FromValueOpt::from_value(v), + "alipay" => b.alipay = FromValueOpt::from_value(v), + "amount" => b.amount = FromValueOpt::from_value(v), + "au_becs_debit" => b.au_becs_debit = FromValueOpt::from_value(v), + "bancontact" => b.bancontact = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "card_present" => b.card_present = FromValueOpt::from_value(v), + "client_secret" => b.client_secret = FromValueOpt::from_value(v), + "code_verification" => b.code_verification = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "eps" => b.eps = FromValueOpt::from_value(v), + "flow" => b.flow = FromValueOpt::from_value(v), + "giropay" => b.giropay = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "ideal" => b.ideal = FromValueOpt::from_value(v), + "klarna" => b.klarna = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "multibanco" => b.multibanco = FromValueOpt::from_value(v), + "owner" => b.owner = FromValueOpt::from_value(v), + "p24" => b.p24 = FromValueOpt::from_value(v), + "receiver" => b.receiver = FromValueOpt::from_value(v), + "redirect" => b.redirect = FromValueOpt::from_value(v), + "sepa_credit_transfer" => b.sepa_credit_transfer = FromValueOpt::from_value(v), + "sepa_debit" => b.sepa_debit = FromValueOpt::from_value(v), + "sofort" => b.sofort = FromValueOpt::from_value(v), + "source_order" => b.source_order = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "three_d_secure" => b.three_d_secure = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "usage" => b.usage = FromValueOpt::from_value(v), + "wechat" => b.wechat = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_code_verification_flow.rs b/generated/async-stripe-shared/src/source_code_verification_flow.rs index fd89e3077..40d2489c4 100644 --- a/generated/async-stripe-shared/src/source_code_verification_flow.rs +++ b/generated/async-stripe-shared/src/source_code_verification_flow.rs @@ -13,7 +13,12 @@ pub struct SourceCodeVerificationFlowBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - attempts_remaining: self.attempts_remaining?, - status: self.status.take()?, - }) + let (Some(attempts_remaining), Some(status)) = + (self.attempts_remaining, self.status.take()) + else { + return None; + }; + Some(Self::Out { attempts_remaining, status }) } } @@ -89,10 +96,8 @@ const _: () = { let mut b = SourceCodeVerificationFlowBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "attempts_remaining" => { - b.attempts_remaining = Some(FromValueOpt::from_value(v)?) - } - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "attempts_remaining" => b.attempts_remaining = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_order.rs b/generated/async-stripe-shared/src/source_order.rs index b252f56b7..e5f927622 100644 --- a/generated/async-stripe-shared/src/source_order.rs +++ b/generated/async-stripe-shared/src/source_order.rs @@ -22,7 +22,12 @@ pub struct SourceOrderBuilder { shipping: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,13 +82,16 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - currency: self.currency?, - email: self.email.take()?, - items: self.items.take()?, - shipping: self.shipping.take()?, - }) + let (Some(amount), Some(currency), Some(email), Some(items), Some(shipping)) = ( + self.amount, + self.currency, + self.email.take(), + self.items.take(), + self.shipping.take(), + ) else { + return None; + }; + Some(Self::Out { amount, currency, email, items, shipping }) } } @@ -110,11 +118,11 @@ const _: () = { let mut b = SourceOrderBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "items" => b.items = Some(FromValueOpt::from_value(v)?), - "shipping" => b.shipping = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "items" => b.items = FromValueOpt::from_value(v), + "shipping" => b.shipping = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_order_item.rs b/generated/async-stripe-shared/src/source_order_item.rs index e9be7d478..73e84afbd 100644 --- a/generated/async-stripe-shared/src/source_order_item.rs +++ b/generated/async-stripe-shared/src/source_order_item.rs @@ -28,7 +28,12 @@ pub struct SourceOrderItemBuilder { type_: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -85,14 +90,25 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - currency: self.currency?, - description: self.description.take()?, - parent: self.parent.take()?, - quantity: self.quantity?, - type_: self.type_.take()?, - }) + let ( + Some(amount), + Some(currency), + Some(description), + Some(parent), + Some(quantity), + Some(type_), + ) = ( + self.amount, + self.currency, + self.description.take(), + self.parent.take(), + self.quantity, + self.type_.take(), + ) + else { + return None; + }; + Some(Self::Out { amount, currency, description, parent, quantity, type_ }) } } @@ -119,12 +135,12 @@ const _: () = { let mut b = SourceOrderItemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "parent" => b.parent = Some(FromValueOpt::from_value(v)?), - "quantity" => b.quantity = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "parent" => b.parent = FromValueOpt::from_value(v), + "quantity" => b.quantity = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_owner.rs b/generated/async-stripe-shared/src/source_owner.rs index a28777ab7..31de2a188 100644 --- a/generated/async-stripe-shared/src/source_owner.rs +++ b/generated/async-stripe-shared/src/source_owner.rs @@ -39,7 +39,12 @@ pub struct SourceOwnerBuilder { verified_phone: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -100,15 +105,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(address), + Some(email), + Some(name), + Some(phone), + Some(verified_address), + Some(verified_email), + Some(verified_name), + Some(verified_phone), + ) = ( + self.address.take(), + self.email.take(), + self.name.take(), + self.phone.take(), + self.verified_address.take(), + self.verified_email.take(), + self.verified_name.take(), + self.verified_phone.take(), + ) + else { + return None; + }; Some(Self::Out { - address: self.address.take()?, - email: self.email.take()?, - name: self.name.take()?, - phone: self.phone.take()?, - verified_address: self.verified_address.take()?, - verified_email: self.verified_email.take()?, - verified_name: self.verified_name.take()?, - verified_phone: self.verified_phone.take()?, + address, + email, + name, + phone, + verified_address, + verified_email, + verified_name, + verified_phone, }) } } @@ -136,14 +163,14 @@ const _: () = { let mut b = SourceOwnerBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "phone" => b.phone = Some(FromValueOpt::from_value(v)?), - "verified_address" => b.verified_address = Some(FromValueOpt::from_value(v)?), - "verified_email" => b.verified_email = Some(FromValueOpt::from_value(v)?), - "verified_name" => b.verified_name = Some(FromValueOpt::from_value(v)?), - "verified_phone" => b.verified_phone = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "phone" => b.phone = FromValueOpt::from_value(v), + "verified_address" => b.verified_address = FromValueOpt::from_value(v), + "verified_email" => b.verified_email = FromValueOpt::from_value(v), + "verified_name" => b.verified_name = FromValueOpt::from_value(v), + "verified_phone" => b.verified_phone = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_receiver_flow.rs b/generated/async-stripe-shared/src/source_receiver_flow.rs index 442b4eef7..25629cd43 100644 --- a/generated/async-stripe-shared/src/source_receiver_flow.rs +++ b/generated/async-stripe-shared/src/source_receiver_flow.rs @@ -32,7 +32,12 @@ pub struct SourceReceiverFlowBuilder { refund_attributes_status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -93,13 +98,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(address), + Some(amount_charged), + Some(amount_received), + Some(amount_returned), + Some(refund_attributes_method), + Some(refund_attributes_status), + ) = ( + self.address.take(), + self.amount_charged, + self.amount_received, + self.amount_returned, + self.refund_attributes_method.take(), + self.refund_attributes_status.take(), + ) + else { + return None; + }; Some(Self::Out { - address: self.address.take()?, - amount_charged: self.amount_charged?, - amount_received: self.amount_received?, - amount_returned: self.amount_returned?, - refund_attributes_method: self.refund_attributes_method.take()?, - refund_attributes_status: self.refund_attributes_status.take()?, + address, + amount_charged, + amount_received, + amount_returned, + refund_attributes_method, + refund_attributes_status, }) } } @@ -127,15 +150,15 @@ const _: () = { let mut b = SourceReceiverFlowBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), - "amount_charged" => b.amount_charged = Some(FromValueOpt::from_value(v)?), - "amount_received" => b.amount_received = Some(FromValueOpt::from_value(v)?), - "amount_returned" => b.amount_returned = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), + "amount_charged" => b.amount_charged = FromValueOpt::from_value(v), + "amount_received" => b.amount_received = FromValueOpt::from_value(v), + "amount_returned" => b.amount_returned = FromValueOpt::from_value(v), "refund_attributes_method" => { - b.refund_attributes_method = Some(FromValueOpt::from_value(v)?) + b.refund_attributes_method = FromValueOpt::from_value(v) } "refund_attributes_status" => { - b.refund_attributes_status = Some(FromValueOpt::from_value(v)?) + b.refund_attributes_status = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/source_redirect_flow.rs b/generated/async-stripe-shared/src/source_redirect_flow.rs index 42365b040..f632fa771 100644 --- a/generated/async-stripe-shared/src/source_redirect_flow.rs +++ b/generated/async-stripe-shared/src/source_redirect_flow.rs @@ -20,7 +20,12 @@ pub struct SourceRedirectFlowBuilder { url: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,12 +78,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - failure_reason: self.failure_reason.take()?, - return_url: self.return_url.take()?, - status: self.status.take()?, - url: self.url.take()?, - }) + let (Some(failure_reason), Some(return_url), Some(status), Some(url)) = ( + self.failure_reason.take(), + self.return_url.take(), + self.status.take(), + self.url.take(), + ) else { + return None; + }; + Some(Self::Out { failure_reason, return_url, status, url }) } } @@ -105,10 +113,10 @@ const _: () = { let mut b = SourceRedirectFlowBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "failure_reason" => b.failure_reason = Some(FromValueOpt::from_value(v)?), - "return_url" => b.return_url = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "url" => b.url = Some(FromValueOpt::from_value(v)?), + "failure_reason" => b.failure_reason = FromValueOpt::from_value(v), + "return_url" => b.return_url = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "url" => b.url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_transaction.rs b/generated/async-stripe-shared/src/source_transaction.rs index a357c02de..76a5a97b2 100644 --- a/generated/async-stripe-shared/src/source_transaction.rs +++ b/generated/async-stripe-shared/src/source_transaction.rs @@ -46,7 +46,12 @@ pub struct SourceTransactionBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -117,20 +122,52 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(ach_credit_transfer), + Some(amount), + Some(chf_credit_transfer), + Some(created), + Some(currency), + Some(gbp_credit_transfer), + Some(id), + Some(livemode), + Some(paper_check), + Some(sepa_credit_transfer), + Some(source), + Some(status), + Some(type_), + ) = ( + self.ach_credit_transfer.take(), + self.amount, + self.chf_credit_transfer.take(), + self.created, + self.currency, + self.gbp_credit_transfer.take(), + self.id.take(), + self.livemode, + self.paper_check.take(), + self.sepa_credit_transfer.take(), + self.source.take(), + self.status.take(), + self.type_, + ) + else { + return None; + }; Some(Self::Out { - ach_credit_transfer: self.ach_credit_transfer.take()?, - amount: self.amount?, - chf_credit_transfer: self.chf_credit_transfer.take()?, - created: self.created?, - currency: self.currency?, - gbp_credit_transfer: self.gbp_credit_transfer.take()?, - id: self.id.take()?, - livemode: self.livemode?, - paper_check: self.paper_check.take()?, - sepa_credit_transfer: self.sepa_credit_transfer.take()?, - source: self.source.take()?, - status: self.status.take()?, - type_: self.type_?, + ach_credit_transfer, + amount, + chf_credit_transfer, + created, + currency, + gbp_credit_transfer, + id, + livemode, + paper_check, + sepa_credit_transfer, + source, + status, + type_, }) } } @@ -158,27 +195,19 @@ const _: () = { let mut b = SourceTransactionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "ach_credit_transfer" => { - b.ach_credit_transfer = Some(FromValueOpt::from_value(v)?) - } - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "chf_credit_transfer" => { - b.chf_credit_transfer = Some(FromValueOpt::from_value(v)?) - } - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "gbp_credit_transfer" => { - b.gbp_credit_transfer = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "paper_check" => b.paper_check = Some(FromValueOpt::from_value(v)?), - "sepa_credit_transfer" => { - b.sepa_credit_transfer = Some(FromValueOpt::from_value(v)?) - } - "source" => b.source = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "ach_credit_transfer" => b.ach_credit_transfer = FromValueOpt::from_value(v), + "amount" => b.amount = FromValueOpt::from_value(v), + "chf_credit_transfer" => b.chf_credit_transfer = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "gbp_credit_transfer" => b.gbp_credit_transfer = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "paper_check" => b.paper_check = FromValueOpt::from_value(v), + "sepa_credit_transfer" => b.sepa_credit_transfer = FromValueOpt::from_value(v), + "source" => b.source = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_transaction_ach_credit_transfer_data.rs b/generated/async-stripe-shared/src/source_transaction_ach_credit_transfer_data.rs index 4a5285ab0..3c1bd0176 100644 --- a/generated/async-stripe-shared/src/source_transaction_ach_credit_transfer_data.rs +++ b/generated/async-stripe-shared/src/source_transaction_ach_credit_transfer_data.rs @@ -19,7 +19,12 @@ pub struct SourceTransactionAchCreditTransferDataBuilder { routing_number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - customer_data: self.customer_data.take()?, - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - routing_number: self.routing_number.take()?, - }) + let (Some(customer_data), Some(fingerprint), Some(last4), Some(routing_number)) = ( + self.customer_data.take(), + self.fingerprint.take(), + self.last4.take(), + self.routing_number.take(), + ) else { + return None; + }; + Some(Self::Out { customer_data, fingerprint, last4, routing_number }) } } @@ -104,10 +112,10 @@ const _: () = { let mut b = SourceTransactionAchCreditTransferDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "customer_data" => b.customer_data = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "routing_number" => b.routing_number = Some(FromValueOpt::from_value(v)?), + "customer_data" => b.customer_data = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "routing_number" => b.routing_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_transaction_chf_credit_transfer_data.rs b/generated/async-stripe-shared/src/source_transaction_chf_credit_transfer_data.rs index 6ab8b2de7..16b69e5e0 100644 --- a/generated/async-stripe-shared/src/source_transaction_chf_credit_transfer_data.rs +++ b/generated/async-stripe-shared/src/source_transaction_chf_credit_transfer_data.rs @@ -22,7 +22,12 @@ pub struct SourceTransactionChfCreditTransferDataBuilder { sender_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,12 +82,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(reference), + Some(sender_address_country), + Some(sender_address_line1), + Some(sender_iban), + Some(sender_name), + ) = ( + self.reference.take(), + self.sender_address_country.take(), + self.sender_address_line1.take(), + self.sender_iban.take(), + self.sender_name.take(), + ) + else { + return None; + }; Some(Self::Out { - reference: self.reference.take()?, - sender_address_country: self.sender_address_country.take()?, - sender_address_line1: self.sender_address_line1.take()?, - sender_iban: self.sender_iban.take()?, - sender_name: self.sender_name.take()?, + reference, + sender_address_country, + sender_address_line1, + sender_iban, + sender_name, }) } } @@ -110,15 +131,13 @@ const _: () = { let mut b = SourceTransactionChfCreditTransferDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), + "reference" => b.reference = FromValueOpt::from_value(v), "sender_address_country" => { - b.sender_address_country = Some(FromValueOpt::from_value(v)?) - } - "sender_address_line1" => { - b.sender_address_line1 = Some(FromValueOpt::from_value(v)?) + b.sender_address_country = FromValueOpt::from_value(v) } - "sender_iban" => b.sender_iban = Some(FromValueOpt::from_value(v)?), - "sender_name" => b.sender_name = Some(FromValueOpt::from_value(v)?), + "sender_address_line1" => b.sender_address_line1 = FromValueOpt::from_value(v), + "sender_iban" => b.sender_iban = FromValueOpt::from_value(v), + "sender_name" => b.sender_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_transaction_gbp_credit_transfer_data.rs b/generated/async-stripe-shared/src/source_transaction_gbp_credit_transfer_data.rs index 96532aa12..c9b24ac3f 100644 --- a/generated/async-stripe-shared/src/source_transaction_gbp_credit_transfer_data.rs +++ b/generated/async-stripe-shared/src/source_transaction_gbp_credit_transfer_data.rs @@ -30,7 +30,12 @@ pub struct SourceTransactionGbpCreditTransferDataBuilder { sender_sort_code: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -89,14 +94,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(fingerprint), + Some(funding_method), + Some(last4), + Some(reference), + Some(sender_account_number), + Some(sender_name), + Some(sender_sort_code), + ) = ( + self.fingerprint.take(), + self.funding_method.take(), + self.last4.take(), + self.reference.take(), + self.sender_account_number.take(), + self.sender_name.take(), + self.sender_sort_code.take(), + ) + else { + return None; + }; Some(Self::Out { - fingerprint: self.fingerprint.take()?, - funding_method: self.funding_method.take()?, - last4: self.last4.take()?, - reference: self.reference.take()?, - sender_account_number: self.sender_account_number.take()?, - sender_name: self.sender_name.take()?, - sender_sort_code: self.sender_sort_code.take()?, + fingerprint, + funding_method, + last4, + reference, + sender_account_number, + sender_name, + sender_sort_code, }) } } @@ -124,15 +149,15 @@ const _: () = { let mut b = SourceTransactionGbpCreditTransferDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "funding_method" => b.funding_method = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "funding_method" => b.funding_method = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "reference" => b.reference = FromValueOpt::from_value(v), "sender_account_number" => { - b.sender_account_number = Some(FromValueOpt::from_value(v)?) + b.sender_account_number = FromValueOpt::from_value(v) } - "sender_name" => b.sender_name = Some(FromValueOpt::from_value(v)?), - "sender_sort_code" => b.sender_sort_code = Some(FromValueOpt::from_value(v)?), + "sender_name" => b.sender_name = FromValueOpt::from_value(v), + "sender_sort_code" => b.sender_sort_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_transaction_paper_check_data.rs b/generated/async-stripe-shared/src/source_transaction_paper_check_data.rs index fb15e8317..f144f7f4b 100644 --- a/generated/async-stripe-shared/src/source_transaction_paper_check_data.rs +++ b/generated/async-stripe-shared/src/source_transaction_paper_check_data.rs @@ -14,7 +14,12 @@ pub struct SourceTransactionPaperCheckDataBuilder { invoices: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,10 +65,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - available_at: self.available_at.take()?, - invoices: self.invoices.take()?, - }) + let (Some(available_at), Some(invoices)) = + (self.available_at.take(), self.invoices.take()) + else { + return None; + }; + Some(Self::Out { available_at, invoices }) } } @@ -90,8 +97,8 @@ const _: () = { let mut b = SourceTransactionPaperCheckDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "available_at" => b.available_at = Some(FromValueOpt::from_value(v)?), - "invoices" => b.invoices = Some(FromValueOpt::from_value(v)?), + "available_at" => b.available_at = FromValueOpt::from_value(v), + "invoices" => b.invoices = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_transaction_sepa_credit_transfer_data.rs b/generated/async-stripe-shared/src/source_transaction_sepa_credit_transfer_data.rs index 30c48b7ff..795761ed8 100644 --- a/generated/async-stripe-shared/src/source_transaction_sepa_credit_transfer_data.rs +++ b/generated/async-stripe-shared/src/source_transaction_sepa_credit_transfer_data.rs @@ -16,7 +16,12 @@ pub struct SourceTransactionSepaCreditTransferDataBuilder { sender_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - reference: self.reference.take()?, - sender_iban: self.sender_iban.take()?, - sender_name: self.sender_name.take()?, - }) + let (Some(reference), Some(sender_iban), Some(sender_name)) = + (self.reference.take(), self.sender_iban.take(), self.sender_name.take()) + else { + return None; + }; + Some(Self::Out { reference, sender_iban, sender_name }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = SourceTransactionSepaCreditTransferDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "sender_iban" => b.sender_iban = Some(FromValueOpt::from_value(v)?), - "sender_name" => b.sender_name = Some(FromValueOpt::from_value(v)?), + "reference" => b.reference = FromValueOpt::from_value(v), + "sender_iban" => b.sender_iban = FromValueOpt::from_value(v), + "sender_name" => b.sender_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_ach_credit_transfer.rs b/generated/async-stripe-shared/src/source_type_ach_credit_transfer.rs index 3e4f8bb26..598a00f22 100644 --- a/generated/async-stripe-shared/src/source_type_ach_credit_transfer.rs +++ b/generated/async-stripe-shared/src/source_type_ach_credit_transfer.rs @@ -23,7 +23,12 @@ pub struct SourceTypeAchCreditTransferBuilder { swift_code: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -88,15 +93,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_number), + Some(bank_name), + Some(fingerprint), + Some(refund_account_holder_name), + Some(refund_account_holder_type), + Some(refund_routing_number), + Some(routing_number), + Some(swift_code), + ) = ( + self.account_number.take(), + self.bank_name.take(), + self.fingerprint.take(), + self.refund_account_holder_name.take(), + self.refund_account_holder_type.take(), + self.refund_routing_number.take(), + self.routing_number.take(), + self.swift_code.take(), + ) + else { + return None; + }; Some(Self::Out { - account_number: self.account_number.take()?, - bank_name: self.bank_name.take()?, - fingerprint: self.fingerprint.take()?, - refund_account_holder_name: self.refund_account_holder_name.take()?, - refund_account_holder_type: self.refund_account_holder_type.take()?, - refund_routing_number: self.refund_routing_number.take()?, - routing_number: self.routing_number.take()?, - swift_code: self.swift_code.take()?, + account_number, + bank_name, + fingerprint, + refund_account_holder_name, + refund_account_holder_type, + refund_routing_number, + routing_number, + swift_code, }) } } @@ -124,20 +151,20 @@ const _: () = { let mut b = SourceTypeAchCreditTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_number" => b.account_number = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), + "account_number" => b.account_number = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), "refund_account_holder_name" => { - b.refund_account_holder_name = Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_name = FromValueOpt::from_value(v) } "refund_account_holder_type" => { - b.refund_account_holder_type = Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_type = FromValueOpt::from_value(v) } "refund_routing_number" => { - b.refund_routing_number = Some(FromValueOpt::from_value(v)?) + b.refund_routing_number = FromValueOpt::from_value(v) } - "routing_number" => b.routing_number = Some(FromValueOpt::from_value(v)?), - "swift_code" => b.swift_code = Some(FromValueOpt::from_value(v)?), + "routing_number" => b.routing_number = FromValueOpt::from_value(v), + "swift_code" => b.swift_code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_ach_debit.rs b/generated/async-stripe-shared/src/source_type_ach_debit.rs index af9d0f05a..040ea1af3 100644 --- a/generated/async-stripe-shared/src/source_type_ach_debit.rs +++ b/generated/async-stripe-shared/src/source_type_ach_debit.rs @@ -20,7 +20,12 @@ pub struct SourceTypeAchDebitBuilder { type_: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,14 +82,25 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank_name: self.bank_name.take()?, - country: self.country.take()?, - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - routing_number: self.routing_number.take()?, - type_: self.type_.take()?, - }) + let ( + Some(bank_name), + Some(country), + Some(fingerprint), + Some(last4), + Some(routing_number), + Some(type_), + ) = ( + self.bank_name.take(), + self.country.take(), + self.fingerprint.take(), + self.last4.take(), + self.routing_number.take(), + self.type_.take(), + ) + else { + return None; + }; + Some(Self::Out { bank_name, country, fingerprint, last4, routing_number, type_ }) } } @@ -111,12 +127,12 @@ const _: () = { let mut b = SourceTypeAchDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "routing_number" => b.routing_number = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "routing_number" => b.routing_number = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_acss_debit.rs b/generated/async-stripe-shared/src/source_type_acss_debit.rs index 29e73ae7c..61281bb83 100644 --- a/generated/async-stripe-shared/src/source_type_acss_debit.rs +++ b/generated/async-stripe-shared/src/source_type_acss_debit.rs @@ -27,7 +27,12 @@ pub struct SourceTypeAcssDebitBuilder { routing_number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -94,17 +99,43 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(bank_address_city), + Some(bank_address_line_1), + Some(bank_address_line_2), + Some(bank_address_postal_code), + Some(bank_name), + Some(category), + Some(country), + Some(fingerprint), + Some(last4), + Some(routing_number), + ) = ( + self.bank_address_city.take(), + self.bank_address_line_1.take(), + self.bank_address_line_2.take(), + self.bank_address_postal_code.take(), + self.bank_name.take(), + self.category.take(), + self.country.take(), + self.fingerprint.take(), + self.last4.take(), + self.routing_number.take(), + ) + else { + return None; + }; Some(Self::Out { - bank_address_city: self.bank_address_city.take()?, - bank_address_line_1: self.bank_address_line_1.take()?, - bank_address_line_2: self.bank_address_line_2.take()?, - bank_address_postal_code: self.bank_address_postal_code.take()?, - bank_name: self.bank_name.take()?, - category: self.category.take()?, - country: self.country.take()?, - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - routing_number: self.routing_number.take()?, + bank_address_city, + bank_address_line_1, + bank_address_line_2, + bank_address_postal_code, + bank_name, + category, + country, + fingerprint, + last4, + routing_number, }) } } @@ -132,22 +163,18 @@ const _: () = { let mut b = SourceTypeAcssDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_address_city" => b.bank_address_city = Some(FromValueOpt::from_value(v)?), - "bank_address_line_1" => { - b.bank_address_line_1 = Some(FromValueOpt::from_value(v)?) - } - "bank_address_line_2" => { - b.bank_address_line_2 = Some(FromValueOpt::from_value(v)?) - } + "bank_address_city" => b.bank_address_city = FromValueOpt::from_value(v), + "bank_address_line_1" => b.bank_address_line_1 = FromValueOpt::from_value(v), + "bank_address_line_2" => b.bank_address_line_2 = FromValueOpt::from_value(v), "bank_address_postal_code" => { - b.bank_address_postal_code = Some(FromValueOpt::from_value(v)?) + b.bank_address_postal_code = FromValueOpt::from_value(v) } - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "category" => b.category = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "routing_number" => b.routing_number = Some(FromValueOpt::from_value(v)?), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "category" => b.category = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "routing_number" => b.routing_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_alipay.rs b/generated/async-stripe-shared/src/source_type_alipay.rs index e82dfb555..4e7f1821e 100644 --- a/generated/async-stripe-shared/src/source_type_alipay.rs +++ b/generated/async-stripe-shared/src/source_type_alipay.rs @@ -13,7 +13,12 @@ pub struct SourceTypeAlipayBuilder { statement_descriptor: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -64,11 +69,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - data_string: self.data_string.take()?, - native_url: self.native_url.take()?, - statement_descriptor: self.statement_descriptor.take()?, - }) + let (Some(data_string), Some(native_url), Some(statement_descriptor)) = + (self.data_string.take(), self.native_url.take(), self.statement_descriptor.take()) + else { + return None; + }; + Some(Self::Out { data_string, native_url, statement_descriptor }) } } @@ -95,11 +101,9 @@ const _: () = { let mut b = SourceTypeAlipayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "data_string" => b.data_string = Some(FromValueOpt::from_value(v)?), - "native_url" => b.native_url = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } + "data_string" => b.data_string = FromValueOpt::from_value(v), + "native_url" => b.native_url = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_au_becs_debit.rs b/generated/async-stripe-shared/src/source_type_au_becs_debit.rs index b88d44499..0a850b74a 100644 --- a/generated/async-stripe-shared/src/source_type_au_becs_debit.rs +++ b/generated/async-stripe-shared/src/source_type_au_becs_debit.rs @@ -13,7 +13,12 @@ pub struct SourceTypeAuBecsDebitBuilder { last4: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -64,11 +69,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bsb_number: self.bsb_number.take()?, - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - }) + let (Some(bsb_number), Some(fingerprint), Some(last4)) = + (self.bsb_number.take(), self.fingerprint.take(), self.last4.take()) + else { + return None; + }; + Some(Self::Out { bsb_number, fingerprint, last4 }) } } @@ -95,9 +101,9 @@ const _: () = { let mut b = SourceTypeAuBecsDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bsb_number" => b.bsb_number = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), + "bsb_number" => b.bsb_number = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_bancontact.rs b/generated/async-stripe-shared/src/source_type_bancontact.rs index 636736257..4999b1126 100644 --- a/generated/async-stripe-shared/src/source_type_bancontact.rs +++ b/generated/async-stripe-shared/src/source_type_bancontact.rs @@ -19,7 +19,12 @@ pub struct SourceTypeBancontactBuilder { statement_descriptor: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -76,13 +81,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(bank_code), + Some(bank_name), + Some(bic), + Some(iban_last4), + Some(preferred_language), + Some(statement_descriptor), + ) = ( + self.bank_code.take(), + self.bank_name.take(), + self.bic.take(), + self.iban_last4.take(), + self.preferred_language.take(), + self.statement_descriptor.take(), + ) + else { + return None; + }; Some(Self::Out { - bank_code: self.bank_code.take()?, - bank_name: self.bank_name.take()?, - bic: self.bic.take()?, - iban_last4: self.iban_last4.take()?, - preferred_language: self.preferred_language.take()?, - statement_descriptor: self.statement_descriptor.take()?, + bank_code, + bank_name, + bic, + iban_last4, + preferred_language, + statement_descriptor, }) } } @@ -110,16 +133,12 @@ const _: () = { let mut b = SourceTypeBancontactBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_code" => b.bank_code = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), - "iban_last4" => b.iban_last4 = Some(FromValueOpt::from_value(v)?), - "preferred_language" => { - b.preferred_language = Some(FromValueOpt::from_value(v)?) - } - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } + "bank_code" => b.bank_code = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "bic" => b.bic = FromValueOpt::from_value(v), + "iban_last4" => b.iban_last4 = FromValueOpt::from_value(v), + "preferred_language" => b.preferred_language = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_card.rs b/generated/async-stripe-shared/src/source_type_card.rs index 9208070e5..568347f0f 100644 --- a/generated/async-stripe-shared/src/source_type_card.rs +++ b/generated/async-stripe-shared/src/source_type_card.rs @@ -41,7 +41,12 @@ pub struct SourceTypeCardBuilder { tokenization_method: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -120,24 +125,64 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(address_line1_check), + Some(address_zip_check), + Some(brand), + Some(country), + Some(cvc_check), + Some(description), + Some(dynamic_last4), + Some(exp_month), + Some(exp_year), + Some(fingerprint), + Some(funding), + Some(iin), + Some(issuer), + Some(last4), + Some(name), + Some(three_d_secure), + Some(tokenization_method), + ) = ( + self.address_line1_check.take(), + self.address_zip_check.take(), + self.brand.take(), + self.country.take(), + self.cvc_check.take(), + self.description.take(), + self.dynamic_last4.take(), + self.exp_month, + self.exp_year, + self.fingerprint.take(), + self.funding.take(), + self.iin.take(), + self.issuer.take(), + self.last4.take(), + self.name.take(), + self.three_d_secure.take(), + self.tokenization_method.take(), + ) + else { + return None; + }; Some(Self::Out { - address_line1_check: self.address_line1_check.take()?, - address_zip_check: self.address_zip_check.take()?, - brand: self.brand.take()?, - country: self.country.take()?, - cvc_check: self.cvc_check.take()?, - description: self.description.take()?, - dynamic_last4: self.dynamic_last4.take()?, - exp_month: self.exp_month?, - exp_year: self.exp_year?, - fingerprint: self.fingerprint.take()?, - funding: self.funding.take()?, - iin: self.iin.take()?, - issuer: self.issuer.take()?, - last4: self.last4.take()?, - name: self.name.take()?, - three_d_secure: self.three_d_secure.take()?, - tokenization_method: self.tokenization_method.take()?, + address_line1_check, + address_zip_check, + brand, + country, + cvc_check, + description, + dynamic_last4, + exp_month, + exp_year, + fingerprint, + funding, + iin, + issuer, + last4, + name, + three_d_secure, + tokenization_method, }) } } @@ -165,27 +210,23 @@ const _: () = { let mut b = SourceTypeCardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address_line1_check" => { - b.address_line1_check = Some(FromValueOpt::from_value(v)?) - } - "address_zip_check" => b.address_zip_check = Some(FromValueOpt::from_value(v)?), - "brand" => b.brand = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "cvc_check" => b.cvc_check = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "dynamic_last4" => b.dynamic_last4 = Some(FromValueOpt::from_value(v)?), - "exp_month" => b.exp_month = Some(FromValueOpt::from_value(v)?), - "exp_year" => b.exp_year = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "funding" => b.funding = Some(FromValueOpt::from_value(v)?), - "iin" => b.iin = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "three_d_secure" => b.three_d_secure = Some(FromValueOpt::from_value(v)?), - "tokenization_method" => { - b.tokenization_method = Some(FromValueOpt::from_value(v)?) - } + "address_line1_check" => b.address_line1_check = FromValueOpt::from_value(v), + "address_zip_check" => b.address_zip_check = FromValueOpt::from_value(v), + "brand" => b.brand = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "cvc_check" => b.cvc_check = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "dynamic_last4" => b.dynamic_last4 = FromValueOpt::from_value(v), + "exp_month" => b.exp_month = FromValueOpt::from_value(v), + "exp_year" => b.exp_year = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "funding" => b.funding = FromValueOpt::from_value(v), + "iin" => b.iin = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "three_d_secure" => b.three_d_secure = FromValueOpt::from_value(v), + "tokenization_method" => b.tokenization_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_card_present.rs b/generated/async-stripe-shared/src/source_type_card_present.rs index 434bbcc52..2ca2aa5c6 100644 --- a/generated/async-stripe-shared/src/source_type_card_present.rs +++ b/generated/async-stripe-shared/src/source_type_card_present.rs @@ -59,7 +59,12 @@ pub struct SourceTypeCardPresentBuilder { transaction_status_information: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -168,33 +173,91 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(application_cryptogram), + Some(application_preferred_name), + Some(authorization_code), + Some(authorization_response_code), + Some(brand), + Some(country), + Some(cvm_type), + Some(data_type), + Some(dedicated_file_name), + Some(description), + Some(emv_auth_data), + Some(evidence_customer_signature), + Some(evidence_transaction_certificate), + Some(exp_month), + Some(exp_year), + Some(fingerprint), + Some(funding), + Some(iin), + Some(issuer), + Some(last4), + Some(pos_device_id), + Some(pos_entry_mode), + Some(read_method), + Some(reader), + Some(terminal_verification_results), + Some(transaction_status_information), + ) = ( + self.application_cryptogram.take(), + self.application_preferred_name.take(), + self.authorization_code.take(), + self.authorization_response_code.take(), + self.brand.take(), + self.country.take(), + self.cvm_type.take(), + self.data_type.take(), + self.dedicated_file_name.take(), + self.description.take(), + self.emv_auth_data.take(), + self.evidence_customer_signature.take(), + self.evidence_transaction_certificate.take(), + self.exp_month, + self.exp_year, + self.fingerprint.take(), + self.funding.take(), + self.iin.take(), + self.issuer.take(), + self.last4.take(), + self.pos_device_id.take(), + self.pos_entry_mode.take(), + self.read_method.take(), + self.reader.take(), + self.terminal_verification_results.take(), + self.transaction_status_information.take(), + ) + else { + return None; + }; Some(Self::Out { - application_cryptogram: self.application_cryptogram.take()?, - application_preferred_name: self.application_preferred_name.take()?, - authorization_code: self.authorization_code.take()?, - authorization_response_code: self.authorization_response_code.take()?, - brand: self.brand.take()?, - country: self.country.take()?, - cvm_type: self.cvm_type.take()?, - data_type: self.data_type.take()?, - dedicated_file_name: self.dedicated_file_name.take()?, - description: self.description.take()?, - emv_auth_data: self.emv_auth_data.take()?, - evidence_customer_signature: self.evidence_customer_signature.take()?, - evidence_transaction_certificate: self.evidence_transaction_certificate.take()?, - exp_month: self.exp_month?, - exp_year: self.exp_year?, - fingerprint: self.fingerprint.take()?, - funding: self.funding.take()?, - iin: self.iin.take()?, - issuer: self.issuer.take()?, - last4: self.last4.take()?, - pos_device_id: self.pos_device_id.take()?, - pos_entry_mode: self.pos_entry_mode.take()?, - read_method: self.read_method.take()?, - reader: self.reader.take()?, - terminal_verification_results: self.terminal_verification_results.take()?, - transaction_status_information: self.transaction_status_information.take()?, + application_cryptogram, + application_preferred_name, + authorization_code, + authorization_response_code, + brand, + country, + cvm_type, + data_type, + dedicated_file_name, + description, + emv_auth_data, + evidence_customer_signature, + evidence_transaction_certificate, + exp_month, + exp_year, + fingerprint, + funding, + iin, + issuer, + last4, + pos_device_id, + pos_entry_mode, + read_method, + reader, + terminal_verification_results, + transaction_status_information, }) } } @@ -223,48 +286,44 @@ const _: () = { for (k, v) in obj { match k.as_str() { "application_cryptogram" => { - b.application_cryptogram = Some(FromValueOpt::from_value(v)?) + b.application_cryptogram = FromValueOpt::from_value(v) } "application_preferred_name" => { - b.application_preferred_name = Some(FromValueOpt::from_value(v)?) - } - "authorization_code" => { - b.authorization_code = Some(FromValueOpt::from_value(v)?) + b.application_preferred_name = FromValueOpt::from_value(v) } + "authorization_code" => b.authorization_code = FromValueOpt::from_value(v), "authorization_response_code" => { - b.authorization_response_code = Some(FromValueOpt::from_value(v)?) - } - "brand" => b.brand = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "cvm_type" => b.cvm_type = Some(FromValueOpt::from_value(v)?), - "data_type" => b.data_type = Some(FromValueOpt::from_value(v)?), - "dedicated_file_name" => { - b.dedicated_file_name = Some(FromValueOpt::from_value(v)?) + b.authorization_response_code = FromValueOpt::from_value(v) } - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "emv_auth_data" => b.emv_auth_data = Some(FromValueOpt::from_value(v)?), + "brand" => b.brand = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "cvm_type" => b.cvm_type = FromValueOpt::from_value(v), + "data_type" => b.data_type = FromValueOpt::from_value(v), + "dedicated_file_name" => b.dedicated_file_name = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "emv_auth_data" => b.emv_auth_data = FromValueOpt::from_value(v), "evidence_customer_signature" => { - b.evidence_customer_signature = Some(FromValueOpt::from_value(v)?) + b.evidence_customer_signature = FromValueOpt::from_value(v) } "evidence_transaction_certificate" => { - b.evidence_transaction_certificate = Some(FromValueOpt::from_value(v)?) + b.evidence_transaction_certificate = FromValueOpt::from_value(v) } - "exp_month" => b.exp_month = Some(FromValueOpt::from_value(v)?), - "exp_year" => b.exp_year = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "funding" => b.funding = Some(FromValueOpt::from_value(v)?), - "iin" => b.iin = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "pos_device_id" => b.pos_device_id = Some(FromValueOpt::from_value(v)?), - "pos_entry_mode" => b.pos_entry_mode = Some(FromValueOpt::from_value(v)?), - "read_method" => b.read_method = Some(FromValueOpt::from_value(v)?), - "reader" => b.reader = Some(FromValueOpt::from_value(v)?), + "exp_month" => b.exp_month = FromValueOpt::from_value(v), + "exp_year" => b.exp_year = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "funding" => b.funding = FromValueOpt::from_value(v), + "iin" => b.iin = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "pos_device_id" => b.pos_device_id = FromValueOpt::from_value(v), + "pos_entry_mode" => b.pos_entry_mode = FromValueOpt::from_value(v), + "read_method" => b.read_method = FromValueOpt::from_value(v), + "reader" => b.reader = FromValueOpt::from_value(v), "terminal_verification_results" => { - b.terminal_verification_results = Some(FromValueOpt::from_value(v)?) + b.terminal_verification_results = FromValueOpt::from_value(v) } "transaction_status_information" => { - b.transaction_status_information = Some(FromValueOpt::from_value(v)?) + b.transaction_status_information = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/source_type_eps.rs b/generated/async-stripe-shared/src/source_type_eps.rs index e916eb550..6e7b99879 100644 --- a/generated/async-stripe-shared/src/source_type_eps.rs +++ b/generated/async-stripe-shared/src/source_type_eps.rs @@ -11,7 +11,12 @@ pub struct SourceTypeEpsBuilder { statement_descriptor: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -57,10 +62,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - reference: self.reference.take()?, - statement_descriptor: self.statement_descriptor.take()?, - }) + let (Some(reference), Some(statement_descriptor)) = + (self.reference.take(), self.statement_descriptor.take()) + else { + return None; + }; + Some(Self::Out { reference, statement_descriptor }) } } @@ -87,10 +94,8 @@ const _: () = { let mut b = SourceTypeEpsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } + "reference" => b.reference = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_giropay.rs b/generated/async-stripe-shared/src/source_type_giropay.rs index dbf3cd8b6..a5b282c11 100644 --- a/generated/async-stripe-shared/src/source_type_giropay.rs +++ b/generated/async-stripe-shared/src/source_type_giropay.rs @@ -15,7 +15,12 @@ pub struct SourceTypeGiropayBuilder { statement_descriptor: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,12 +73,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank_code: self.bank_code.take()?, - bank_name: self.bank_name.take()?, - bic: self.bic.take()?, - statement_descriptor: self.statement_descriptor.take()?, - }) + let (Some(bank_code), Some(bank_name), Some(bic), Some(statement_descriptor)) = ( + self.bank_code.take(), + self.bank_name.take(), + self.bic.take(), + self.statement_descriptor.take(), + ) else { + return None; + }; + Some(Self::Out { bank_code, bank_name, bic, statement_descriptor }) } } @@ -100,12 +108,10 @@ const _: () = { let mut b = SourceTypeGiropayBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_code" => b.bank_code = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } + "bank_code" => b.bank_code = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "bic" => b.bic = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_ideal.rs b/generated/async-stripe-shared/src/source_type_ideal.rs index ae1871b66..21c7291d8 100644 --- a/generated/async-stripe-shared/src/source_type_ideal.rs +++ b/generated/async-stripe-shared/src/source_type_ideal.rs @@ -15,7 +15,12 @@ pub struct SourceTypeIdealBuilder { statement_descriptor: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,12 +73,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank: self.bank.take()?, - bic: self.bic.take()?, - iban_last4: self.iban_last4.take()?, - statement_descriptor: self.statement_descriptor.take()?, - }) + let (Some(bank), Some(bic), Some(iban_last4), Some(statement_descriptor)) = ( + self.bank.take(), + self.bic.take(), + self.iban_last4.take(), + self.statement_descriptor.take(), + ) else { + return None; + }; + Some(Self::Out { bank, bic, iban_last4, statement_descriptor }) } } @@ -100,12 +108,10 @@ const _: () = { let mut b = SourceTypeIdealBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank" => b.bank = Some(FromValueOpt::from_value(v)?), - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), - "iban_last4" => b.iban_last4 = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } + "bank" => b.bank = FromValueOpt::from_value(v), + "bic" => b.bic = FromValueOpt::from_value(v), + "iban_last4" => b.iban_last4 = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_klarna.rs b/generated/async-stripe-shared/src/source_type_klarna.rs index bf3df8c07..53aaa6123 100644 --- a/generated/async-stripe-shared/src/source_type_klarna.rs +++ b/generated/async-stripe-shared/src/source_type_klarna.rs @@ -59,7 +59,12 @@ pub struct SourceTypeKlarnaBuilder { shipping_last_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -172,35 +177,91 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(background_image_url), + Some(client_token), + Some(first_name), + Some(last_name), + Some(locale), + Some(logo_url), + Some(page_title), + Some(pay_later_asset_urls_descriptive), + Some(pay_later_asset_urls_standard), + Some(pay_later_name), + Some(pay_later_redirect_url), + Some(pay_now_asset_urls_descriptive), + Some(pay_now_asset_urls_standard), + Some(pay_now_name), + Some(pay_now_redirect_url), + Some(pay_over_time_asset_urls_descriptive), + Some(pay_over_time_asset_urls_standard), + Some(pay_over_time_name), + Some(pay_over_time_redirect_url), + Some(payment_method_categories), + Some(purchase_country), + Some(purchase_type), + Some(redirect_url), + Some(shipping_delay), + Some(shipping_first_name), + Some(shipping_last_name), + ) = ( + self.background_image_url.take(), + self.client_token.take(), + self.first_name.take(), + self.last_name.take(), + self.locale.take(), + self.logo_url.take(), + self.page_title.take(), + self.pay_later_asset_urls_descriptive.take(), + self.pay_later_asset_urls_standard.take(), + self.pay_later_name.take(), + self.pay_later_redirect_url.take(), + self.pay_now_asset_urls_descriptive.take(), + self.pay_now_asset_urls_standard.take(), + self.pay_now_name.take(), + self.pay_now_redirect_url.take(), + self.pay_over_time_asset_urls_descriptive.take(), + self.pay_over_time_asset_urls_standard.take(), + self.pay_over_time_name.take(), + self.pay_over_time_redirect_url.take(), + self.payment_method_categories.take(), + self.purchase_country.take(), + self.purchase_type.take(), + self.redirect_url.take(), + self.shipping_delay, + self.shipping_first_name.take(), + self.shipping_last_name.take(), + ) + else { + return None; + }; Some(Self::Out { - background_image_url: self.background_image_url.take()?, - client_token: self.client_token.take()?, - first_name: self.first_name.take()?, - last_name: self.last_name.take()?, - locale: self.locale.take()?, - logo_url: self.logo_url.take()?, - page_title: self.page_title.take()?, - pay_later_asset_urls_descriptive: self.pay_later_asset_urls_descriptive.take()?, - pay_later_asset_urls_standard: self.pay_later_asset_urls_standard.take()?, - pay_later_name: self.pay_later_name.take()?, - pay_later_redirect_url: self.pay_later_redirect_url.take()?, - pay_now_asset_urls_descriptive: self.pay_now_asset_urls_descriptive.take()?, - pay_now_asset_urls_standard: self.pay_now_asset_urls_standard.take()?, - pay_now_name: self.pay_now_name.take()?, - pay_now_redirect_url: self.pay_now_redirect_url.take()?, - pay_over_time_asset_urls_descriptive: self - .pay_over_time_asset_urls_descriptive - .take()?, - pay_over_time_asset_urls_standard: self.pay_over_time_asset_urls_standard.take()?, - pay_over_time_name: self.pay_over_time_name.take()?, - pay_over_time_redirect_url: self.pay_over_time_redirect_url.take()?, - payment_method_categories: self.payment_method_categories.take()?, - purchase_country: self.purchase_country.take()?, - purchase_type: self.purchase_type.take()?, - redirect_url: self.redirect_url.take()?, - shipping_delay: self.shipping_delay?, - shipping_first_name: self.shipping_first_name.take()?, - shipping_last_name: self.shipping_last_name.take()?, + background_image_url, + client_token, + first_name, + last_name, + locale, + logo_url, + page_title, + pay_later_asset_urls_descriptive, + pay_later_asset_urls_standard, + pay_later_name, + pay_later_redirect_url, + pay_now_asset_urls_descriptive, + pay_now_asset_urls_standard, + pay_now_name, + pay_now_redirect_url, + pay_over_time_asset_urls_descriptive, + pay_over_time_asset_urls_standard, + pay_over_time_name, + pay_over_time_redirect_url, + payment_method_categories, + purchase_country, + purchase_type, + redirect_url, + shipping_delay, + shipping_first_name, + shipping_last_name, }) } } @@ -228,60 +289,50 @@ const _: () = { let mut b = SourceTypeKlarnaBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "background_image_url" => { - b.background_image_url = Some(FromValueOpt::from_value(v)?) - } - "client_token" => b.client_token = Some(FromValueOpt::from_value(v)?), - "first_name" => b.first_name = Some(FromValueOpt::from_value(v)?), - "last_name" => b.last_name = Some(FromValueOpt::from_value(v)?), - "locale" => b.locale = Some(FromValueOpt::from_value(v)?), - "logo_url" => b.logo_url = Some(FromValueOpt::from_value(v)?), - "page_title" => b.page_title = Some(FromValueOpt::from_value(v)?), + "background_image_url" => b.background_image_url = FromValueOpt::from_value(v), + "client_token" => b.client_token = FromValueOpt::from_value(v), + "first_name" => b.first_name = FromValueOpt::from_value(v), + "last_name" => b.last_name = FromValueOpt::from_value(v), + "locale" => b.locale = FromValueOpt::from_value(v), + "logo_url" => b.logo_url = FromValueOpt::from_value(v), + "page_title" => b.page_title = FromValueOpt::from_value(v), "pay_later_asset_urls_descriptive" => { - b.pay_later_asset_urls_descriptive = Some(FromValueOpt::from_value(v)?) + b.pay_later_asset_urls_descriptive = FromValueOpt::from_value(v) } "pay_later_asset_urls_standard" => { - b.pay_later_asset_urls_standard = Some(FromValueOpt::from_value(v)?) + b.pay_later_asset_urls_standard = FromValueOpt::from_value(v) } - "pay_later_name" => b.pay_later_name = Some(FromValueOpt::from_value(v)?), + "pay_later_name" => b.pay_later_name = FromValueOpt::from_value(v), "pay_later_redirect_url" => { - b.pay_later_redirect_url = Some(FromValueOpt::from_value(v)?) + b.pay_later_redirect_url = FromValueOpt::from_value(v) } "pay_now_asset_urls_descriptive" => { - b.pay_now_asset_urls_descriptive = Some(FromValueOpt::from_value(v)?) + b.pay_now_asset_urls_descriptive = FromValueOpt::from_value(v) } "pay_now_asset_urls_standard" => { - b.pay_now_asset_urls_standard = Some(FromValueOpt::from_value(v)?) - } - "pay_now_name" => b.pay_now_name = Some(FromValueOpt::from_value(v)?), - "pay_now_redirect_url" => { - b.pay_now_redirect_url = Some(FromValueOpt::from_value(v)?) + b.pay_now_asset_urls_standard = FromValueOpt::from_value(v) } + "pay_now_name" => b.pay_now_name = FromValueOpt::from_value(v), + "pay_now_redirect_url" => b.pay_now_redirect_url = FromValueOpt::from_value(v), "pay_over_time_asset_urls_descriptive" => { - b.pay_over_time_asset_urls_descriptive = Some(FromValueOpt::from_value(v)?) + b.pay_over_time_asset_urls_descriptive = FromValueOpt::from_value(v) } "pay_over_time_asset_urls_standard" => { - b.pay_over_time_asset_urls_standard = Some(FromValueOpt::from_value(v)?) - } - "pay_over_time_name" => { - b.pay_over_time_name = Some(FromValueOpt::from_value(v)?) + b.pay_over_time_asset_urls_standard = FromValueOpt::from_value(v) } + "pay_over_time_name" => b.pay_over_time_name = FromValueOpt::from_value(v), "pay_over_time_redirect_url" => { - b.pay_over_time_redirect_url = Some(FromValueOpt::from_value(v)?) + b.pay_over_time_redirect_url = FromValueOpt::from_value(v) } "payment_method_categories" => { - b.payment_method_categories = Some(FromValueOpt::from_value(v)?) - } - "purchase_country" => b.purchase_country = Some(FromValueOpt::from_value(v)?), - "purchase_type" => b.purchase_type = Some(FromValueOpt::from_value(v)?), - "redirect_url" => b.redirect_url = Some(FromValueOpt::from_value(v)?), - "shipping_delay" => b.shipping_delay = Some(FromValueOpt::from_value(v)?), - "shipping_first_name" => { - b.shipping_first_name = Some(FromValueOpt::from_value(v)?) - } - "shipping_last_name" => { - b.shipping_last_name = Some(FromValueOpt::from_value(v)?) + b.payment_method_categories = FromValueOpt::from_value(v) } + "purchase_country" => b.purchase_country = FromValueOpt::from_value(v), + "purchase_type" => b.purchase_type = FromValueOpt::from_value(v), + "redirect_url" => b.redirect_url = FromValueOpt::from_value(v), + "shipping_delay" => b.shipping_delay = FromValueOpt::from_value(v), + "shipping_first_name" => b.shipping_first_name = FromValueOpt::from_value(v), + "shipping_last_name" => b.shipping_last_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_multibanco.rs b/generated/async-stripe-shared/src/source_type_multibanco.rs index 60810e007..20701c7bf 100644 --- a/generated/async-stripe-shared/src/source_type_multibanco.rs +++ b/generated/async-stripe-shared/src/source_type_multibanco.rs @@ -27,7 +27,12 @@ pub struct SourceTypeMultibancoBuilder { refund_iban: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -106,29 +111,43 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(entity), + Some(reference), + Some(refund_account_holder_address_city), + Some(refund_account_holder_address_country), + Some(refund_account_holder_address_line1), + Some(refund_account_holder_address_line2), + Some(refund_account_holder_address_postal_code), + Some(refund_account_holder_address_state), + Some(refund_account_holder_name), + Some(refund_iban), + ) = ( + self.entity.take(), + self.reference.take(), + self.refund_account_holder_address_city.take(), + self.refund_account_holder_address_country.take(), + self.refund_account_holder_address_line1.take(), + self.refund_account_holder_address_line2.take(), + self.refund_account_holder_address_postal_code.take(), + self.refund_account_holder_address_state.take(), + self.refund_account_holder_name.take(), + self.refund_iban.take(), + ) + else { + return None; + }; Some(Self::Out { - entity: self.entity.take()?, - reference: self.reference.take()?, - refund_account_holder_address_city: self - .refund_account_holder_address_city - .take()?, - refund_account_holder_address_country: self - .refund_account_holder_address_country - .take()?, - refund_account_holder_address_line1: self - .refund_account_holder_address_line1 - .take()?, - refund_account_holder_address_line2: self - .refund_account_holder_address_line2 - .take()?, - refund_account_holder_address_postal_code: self - .refund_account_holder_address_postal_code - .take()?, - refund_account_holder_address_state: self - .refund_account_holder_address_state - .take()?, - refund_account_holder_name: self.refund_account_holder_name.take()?, - refund_iban: self.refund_iban.take()?, + entity, + reference, + refund_account_holder_address_city, + refund_account_holder_address_country, + refund_account_holder_address_line1, + refund_account_holder_address_line2, + refund_account_holder_address_postal_code, + refund_account_holder_address_state, + refund_account_holder_name, + refund_iban, }) } } @@ -156,31 +175,30 @@ const _: () = { let mut b = SourceTypeMultibancoBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "entity" => b.entity = Some(FromValueOpt::from_value(v)?), - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), + "entity" => b.entity = FromValueOpt::from_value(v), + "reference" => b.reference = FromValueOpt::from_value(v), "refund_account_holder_address_city" => { - b.refund_account_holder_address_city = Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_address_city = FromValueOpt::from_value(v) } "refund_account_holder_address_country" => { - b.refund_account_holder_address_country = Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_address_country = FromValueOpt::from_value(v) } "refund_account_holder_address_line1" => { - b.refund_account_holder_address_line1 = Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_address_line1 = FromValueOpt::from_value(v) } "refund_account_holder_address_line2" => { - b.refund_account_holder_address_line2 = Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_address_line2 = FromValueOpt::from_value(v) } "refund_account_holder_address_postal_code" => { - b.refund_account_holder_address_postal_code = - Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_address_postal_code = FromValueOpt::from_value(v) } "refund_account_holder_address_state" => { - b.refund_account_holder_address_state = Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_address_state = FromValueOpt::from_value(v) } "refund_account_holder_name" => { - b.refund_account_holder_name = Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_name = FromValueOpt::from_value(v) } - "refund_iban" => b.refund_iban = Some(FromValueOpt::from_value(v)?), + "refund_iban" => b.refund_iban = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_p24.rs b/generated/async-stripe-shared/src/source_type_p24.rs index fee5dbe47..947360017 100644 --- a/generated/async-stripe-shared/src/source_type_p24.rs +++ b/generated/async-stripe-shared/src/source_type_p24.rs @@ -9,7 +9,12 @@ pub struct SourceTypeP24Builder { reference: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -54,7 +59,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { reference: self.reference.take()? }) + let (Some(reference),) = (self.reference.take(),) else { + return None; + }; + Some(Self::Out { reference }) } } @@ -81,7 +89,7 @@ const _: () = { let mut b = SourceTypeP24Builder::deser_default(); for (k, v) in obj { match k.as_str() { - "reference" => b.reference = Some(FromValueOpt::from_value(v)?), + "reference" => b.reference = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_sepa_credit_transfer.rs b/generated/async-stripe-shared/src/source_type_sepa_credit_transfer.rs index 806396038..9bb721130 100644 --- a/generated/async-stripe-shared/src/source_type_sepa_credit_transfer.rs +++ b/generated/async-stripe-shared/src/source_type_sepa_credit_transfer.rs @@ -29,7 +29,12 @@ pub struct SourceTypeSepaCreditTransferBuilder { refund_iban: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -110,30 +115,46 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(bank_name), + Some(bic), + Some(iban), + Some(refund_account_holder_address_city), + Some(refund_account_holder_address_country), + Some(refund_account_holder_address_line1), + Some(refund_account_holder_address_line2), + Some(refund_account_holder_address_postal_code), + Some(refund_account_holder_address_state), + Some(refund_account_holder_name), + Some(refund_iban), + ) = ( + self.bank_name.take(), + self.bic.take(), + self.iban.take(), + self.refund_account_holder_address_city.take(), + self.refund_account_holder_address_country.take(), + self.refund_account_holder_address_line1.take(), + self.refund_account_holder_address_line2.take(), + self.refund_account_holder_address_postal_code.take(), + self.refund_account_holder_address_state.take(), + self.refund_account_holder_name.take(), + self.refund_iban.take(), + ) + else { + return None; + }; Some(Self::Out { - bank_name: self.bank_name.take()?, - bic: self.bic.take()?, - iban: self.iban.take()?, - refund_account_holder_address_city: self - .refund_account_holder_address_city - .take()?, - refund_account_holder_address_country: self - .refund_account_holder_address_country - .take()?, - refund_account_holder_address_line1: self - .refund_account_holder_address_line1 - .take()?, - refund_account_holder_address_line2: self - .refund_account_holder_address_line2 - .take()?, - refund_account_holder_address_postal_code: self - .refund_account_holder_address_postal_code - .take()?, - refund_account_holder_address_state: self - .refund_account_holder_address_state - .take()?, - refund_account_holder_name: self.refund_account_holder_name.take()?, - refund_iban: self.refund_iban.take()?, + bank_name, + bic, + iban, + refund_account_holder_address_city, + refund_account_holder_address_country, + refund_account_holder_address_line1, + refund_account_holder_address_line2, + refund_account_holder_address_postal_code, + refund_account_holder_address_state, + refund_account_holder_name, + refund_iban, }) } } @@ -161,32 +182,31 @@ const _: () = { let mut b = SourceTypeSepaCreditTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), - "iban" => b.iban = Some(FromValueOpt::from_value(v)?), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "bic" => b.bic = FromValueOpt::from_value(v), + "iban" => b.iban = FromValueOpt::from_value(v), "refund_account_holder_address_city" => { - b.refund_account_holder_address_city = Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_address_city = FromValueOpt::from_value(v) } "refund_account_holder_address_country" => { - b.refund_account_holder_address_country = Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_address_country = FromValueOpt::from_value(v) } "refund_account_holder_address_line1" => { - b.refund_account_holder_address_line1 = Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_address_line1 = FromValueOpt::from_value(v) } "refund_account_holder_address_line2" => { - b.refund_account_holder_address_line2 = Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_address_line2 = FromValueOpt::from_value(v) } "refund_account_holder_address_postal_code" => { - b.refund_account_holder_address_postal_code = - Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_address_postal_code = FromValueOpt::from_value(v) } "refund_account_holder_address_state" => { - b.refund_account_holder_address_state = Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_address_state = FromValueOpt::from_value(v) } "refund_account_holder_name" => { - b.refund_account_holder_name = Some(FromValueOpt::from_value(v)?) + b.refund_account_holder_name = FromValueOpt::from_value(v) } - "refund_iban" => b.refund_iban = Some(FromValueOpt::from_value(v)?), + "refund_iban" => b.refund_iban = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_sepa_debit.rs b/generated/async-stripe-shared/src/source_type_sepa_debit.rs index e10badb08..1c154cf31 100644 --- a/generated/async-stripe-shared/src/source_type_sepa_debit.rs +++ b/generated/async-stripe-shared/src/source_type_sepa_debit.rs @@ -21,7 +21,12 @@ pub struct SourceTypeSepaDebitBuilder { mandate_url: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -80,14 +85,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(bank_code), + Some(branch_code), + Some(country), + Some(fingerprint), + Some(last4), + Some(mandate_reference), + Some(mandate_url), + ) = ( + self.bank_code.take(), + self.branch_code.take(), + self.country.take(), + self.fingerprint.take(), + self.last4.take(), + self.mandate_reference.take(), + self.mandate_url.take(), + ) + else { + return None; + }; Some(Self::Out { - bank_code: self.bank_code.take()?, - branch_code: self.branch_code.take()?, - country: self.country.take()?, - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - mandate_reference: self.mandate_reference.take()?, - mandate_url: self.mandate_url.take()?, + bank_code, + branch_code, + country, + fingerprint, + last4, + mandate_reference, + mandate_url, }) } } @@ -115,13 +140,13 @@ const _: () = { let mut b = SourceTypeSepaDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_code" => b.bank_code = Some(FromValueOpt::from_value(v)?), - "branch_code" => b.branch_code = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "mandate_reference" => b.mandate_reference = Some(FromValueOpt::from_value(v)?), - "mandate_url" => b.mandate_url = Some(FromValueOpt::from_value(v)?), + "bank_code" => b.bank_code = FromValueOpt::from_value(v), + "branch_code" => b.branch_code = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "mandate_reference" => b.mandate_reference = FromValueOpt::from_value(v), + "mandate_url" => b.mandate_url = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_sofort.rs b/generated/async-stripe-shared/src/source_type_sofort.rs index 7e16b832d..b07b8342a 100644 --- a/generated/async-stripe-shared/src/source_type_sofort.rs +++ b/generated/async-stripe-shared/src/source_type_sofort.rs @@ -21,7 +21,12 @@ pub struct SourceTypeSofortBuilder { statement_descriptor: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -80,14 +85,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(bank_code), + Some(bank_name), + Some(bic), + Some(country), + Some(iban_last4), + Some(preferred_language), + Some(statement_descriptor), + ) = ( + self.bank_code.take(), + self.bank_name.take(), + self.bic.take(), + self.country.take(), + self.iban_last4.take(), + self.preferred_language.take(), + self.statement_descriptor.take(), + ) + else { + return None; + }; Some(Self::Out { - bank_code: self.bank_code.take()?, - bank_name: self.bank_name.take()?, - bic: self.bic.take()?, - country: self.country.take()?, - iban_last4: self.iban_last4.take()?, - preferred_language: self.preferred_language.take()?, - statement_descriptor: self.statement_descriptor.take()?, + bank_code, + bank_name, + bic, + country, + iban_last4, + preferred_language, + statement_descriptor, }) } } @@ -115,17 +140,13 @@ const _: () = { let mut b = SourceTypeSofortBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_code" => b.bank_code = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "bic" => b.bic = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "iban_last4" => b.iban_last4 = Some(FromValueOpt::from_value(v)?), - "preferred_language" => { - b.preferred_language = Some(FromValueOpt::from_value(v)?) - } - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } + "bank_code" => b.bank_code = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "bic" => b.bic = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "iban_last4" => b.iban_last4 = FromValueOpt::from_value(v), + "preferred_language" => b.preferred_language = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_three_d_secure.rs b/generated/async-stripe-shared/src/source_type_three_d_secure.rs index 4420d599e..260b1ff58 100644 --- a/generated/async-stripe-shared/src/source_type_three_d_secure.rs +++ b/generated/async-stripe-shared/src/source_type_three_d_secure.rs @@ -47,7 +47,12 @@ pub struct SourceTypeThreeDSecureBuilder { tokenization_method: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -132,27 +137,73 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(address_line1_check), + Some(address_zip_check), + Some(authenticated), + Some(brand), + Some(card), + Some(country), + Some(customer), + Some(cvc_check), + Some(description), + Some(dynamic_last4), + Some(exp_month), + Some(exp_year), + Some(fingerprint), + Some(funding), + Some(iin), + Some(issuer), + Some(last4), + Some(name), + Some(three_d_secure), + Some(tokenization_method), + ) = ( + self.address_line1_check.take(), + self.address_zip_check.take(), + self.authenticated, + self.brand.take(), + self.card.take(), + self.country.take(), + self.customer.take(), + self.cvc_check.take(), + self.description.take(), + self.dynamic_last4.take(), + self.exp_month, + self.exp_year, + self.fingerprint.take(), + self.funding.take(), + self.iin.take(), + self.issuer.take(), + self.last4.take(), + self.name.take(), + self.three_d_secure.take(), + self.tokenization_method.take(), + ) + else { + return None; + }; Some(Self::Out { - address_line1_check: self.address_line1_check.take()?, - address_zip_check: self.address_zip_check.take()?, - authenticated: self.authenticated?, - brand: self.brand.take()?, - card: self.card.take()?, - country: self.country.take()?, - customer: self.customer.take()?, - cvc_check: self.cvc_check.take()?, - description: self.description.take()?, - dynamic_last4: self.dynamic_last4.take()?, - exp_month: self.exp_month?, - exp_year: self.exp_year?, - fingerprint: self.fingerprint.take()?, - funding: self.funding.take()?, - iin: self.iin.take()?, - issuer: self.issuer.take()?, - last4: self.last4.take()?, - name: self.name.take()?, - three_d_secure: self.three_d_secure.take()?, - tokenization_method: self.tokenization_method.take()?, + address_line1_check, + address_zip_check, + authenticated, + brand, + card, + country, + customer, + cvc_check, + description, + dynamic_last4, + exp_month, + exp_year, + fingerprint, + funding, + iin, + issuer, + last4, + name, + three_d_secure, + tokenization_method, }) } } @@ -180,30 +231,26 @@ const _: () = { let mut b = SourceTypeThreeDSecureBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address_line1_check" => { - b.address_line1_check = Some(FromValueOpt::from_value(v)?) - } - "address_zip_check" => b.address_zip_check = Some(FromValueOpt::from_value(v)?), - "authenticated" => b.authenticated = Some(FromValueOpt::from_value(v)?), - "brand" => b.brand = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "cvc_check" => b.cvc_check = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "dynamic_last4" => b.dynamic_last4 = Some(FromValueOpt::from_value(v)?), - "exp_month" => b.exp_month = Some(FromValueOpt::from_value(v)?), - "exp_year" => b.exp_year = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "funding" => b.funding = Some(FromValueOpt::from_value(v)?), - "iin" => b.iin = Some(FromValueOpt::from_value(v)?), - "issuer" => b.issuer = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "three_d_secure" => b.three_d_secure = Some(FromValueOpt::from_value(v)?), - "tokenization_method" => { - b.tokenization_method = Some(FromValueOpt::from_value(v)?) - } + "address_line1_check" => b.address_line1_check = FromValueOpt::from_value(v), + "address_zip_check" => b.address_zip_check = FromValueOpt::from_value(v), + "authenticated" => b.authenticated = FromValueOpt::from_value(v), + "brand" => b.brand = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "cvc_check" => b.cvc_check = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "dynamic_last4" => b.dynamic_last4 = FromValueOpt::from_value(v), + "exp_month" => b.exp_month = FromValueOpt::from_value(v), + "exp_year" => b.exp_year = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "funding" => b.funding = FromValueOpt::from_value(v), + "iin" => b.iin = FromValueOpt::from_value(v), + "issuer" => b.issuer = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "three_d_secure" => b.three_d_secure = FromValueOpt::from_value(v), + "tokenization_method" => b.tokenization_method = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/source_type_wechat.rs b/generated/async-stripe-shared/src/source_type_wechat.rs index 1652bb9e1..70dcc8667 100644 --- a/generated/async-stripe-shared/src/source_type_wechat.rs +++ b/generated/async-stripe-shared/src/source_type_wechat.rs @@ -13,7 +13,12 @@ pub struct SourceTypeWechatBuilder { statement_descriptor: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -64,11 +69,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - prepay_id: self.prepay_id.take()?, - qr_code_url: self.qr_code_url.take()?, - statement_descriptor: self.statement_descriptor.take()?, - }) + let (Some(prepay_id), Some(qr_code_url), Some(statement_descriptor)) = + (self.prepay_id.take(), self.qr_code_url.take(), self.statement_descriptor.take()) + else { + return None; + }; + Some(Self::Out { prepay_id, qr_code_url, statement_descriptor }) } } @@ -95,11 +101,9 @@ const _: () = { let mut b = SourceTypeWechatBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "prepay_id" => b.prepay_id = Some(FromValueOpt::from_value(v)?), - "qr_code_url" => b.qr_code_url = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } + "prepay_id" => b.prepay_id = FromValueOpt::from_value(v), + "qr_code_url" => b.qr_code_url = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscription.rs b/generated/async-stripe-shared/src/subscription.rs index 7eceb42dd..c7cd4c2a0 100644 --- a/generated/async-stripe-shared/src/subscription.rs +++ b/generated/async-stripe-shared/src/subscription.rs @@ -200,7 +200,12 @@ pub struct SubscriptionBuilder { trial_start: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -339,51 +344,145 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(application), + Some(application_fee_percent), + Some(automatic_tax), + Some(billing_cycle_anchor), + Some(billing_cycle_anchor_config), + Some(billing_thresholds), + Some(cancel_at), + Some(cancel_at_period_end), + Some(canceled_at), + Some(cancellation_details), + Some(collection_method), + Some(created), + Some(currency), + Some(current_period_end), + Some(current_period_start), + Some(customer), + Some(days_until_due), + Some(default_payment_method), + Some(default_source), + Some(default_tax_rates), + Some(description), + Some(discount), + Some(discounts), + Some(ended_at), + Some(id), + Some(items), + Some(latest_invoice), + Some(livemode), + Some(metadata), + Some(next_pending_invoice_item_invoice), + Some(on_behalf_of), + Some(pause_collection), + Some(payment_settings), + Some(pending_invoice_item_interval), + Some(pending_setup_intent), + Some(pending_update), + Some(schedule), + Some(start_date), + Some(status), + Some(test_clock), + Some(transfer_data), + Some(trial_end), + Some(trial_settings), + Some(trial_start), + ) = ( + self.application.take(), + self.application_fee_percent, + self.automatic_tax.take(), + self.billing_cycle_anchor, + self.billing_cycle_anchor_config, + self.billing_thresholds, + self.cancel_at, + self.cancel_at_period_end, + self.canceled_at, + self.cancellation_details.take(), + self.collection_method, + self.created, + self.currency, + self.current_period_end, + self.current_period_start, + self.customer.take(), + self.days_until_due, + self.default_payment_method.take(), + self.default_source.take(), + self.default_tax_rates.take(), + self.description.take(), + self.discount.take(), + self.discounts.take(), + self.ended_at, + self.id.take(), + self.items.take(), + self.latest_invoice.take(), + self.livemode, + self.metadata.take(), + self.next_pending_invoice_item_invoice, + self.on_behalf_of.take(), + self.pause_collection, + self.payment_settings.take(), + self.pending_invoice_item_interval, + self.pending_setup_intent.take(), + self.pending_update.take(), + self.schedule.take(), + self.start_date, + self.status, + self.test_clock.take(), + self.transfer_data.take(), + self.trial_end, + self.trial_settings, + self.trial_start, + ) + else { + return None; + }; Some(Self::Out { - application: self.application.take()?, - application_fee_percent: self.application_fee_percent?, - automatic_tax: self.automatic_tax.take()?, - billing_cycle_anchor: self.billing_cycle_anchor?, - billing_cycle_anchor_config: self.billing_cycle_anchor_config?, - billing_thresholds: self.billing_thresholds?, - cancel_at: self.cancel_at?, - cancel_at_period_end: self.cancel_at_period_end?, - canceled_at: self.canceled_at?, - cancellation_details: self.cancellation_details.take()?, - collection_method: self.collection_method?, - created: self.created?, - currency: self.currency?, - current_period_end: self.current_period_end?, - current_period_start: self.current_period_start?, - customer: self.customer.take()?, - days_until_due: self.days_until_due?, - default_payment_method: self.default_payment_method.take()?, - default_source: self.default_source.take()?, - default_tax_rates: self.default_tax_rates.take()?, - description: self.description.take()?, - discount: self.discount.take()?, - discounts: self.discounts.take()?, - ended_at: self.ended_at?, - id: self.id.take()?, - items: self.items.take()?, - latest_invoice: self.latest_invoice.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - next_pending_invoice_item_invoice: self.next_pending_invoice_item_invoice?, - on_behalf_of: self.on_behalf_of.take()?, - pause_collection: self.pause_collection?, - payment_settings: self.payment_settings.take()?, - pending_invoice_item_interval: self.pending_invoice_item_interval?, - pending_setup_intent: self.pending_setup_intent.take()?, - pending_update: self.pending_update.take()?, - schedule: self.schedule.take()?, - start_date: self.start_date?, - status: self.status?, - test_clock: self.test_clock.take()?, - transfer_data: self.transfer_data.take()?, - trial_end: self.trial_end?, - trial_settings: self.trial_settings?, - trial_start: self.trial_start?, + application, + application_fee_percent, + automatic_tax, + billing_cycle_anchor, + billing_cycle_anchor_config, + billing_thresholds, + cancel_at, + cancel_at_period_end, + canceled_at, + cancellation_details, + collection_method, + created, + currency, + current_period_end, + current_period_start, + customer, + days_until_due, + default_payment_method, + default_source, + default_tax_rates, + description, + discount, + discounts, + ended_at, + id, + items, + latest_invoice, + livemode, + metadata, + next_pending_invoice_item_invoice, + on_behalf_of, + pause_collection, + payment_settings, + pending_invoice_item_interval, + pending_setup_intent, + pending_update, + schedule, + start_date, + status, + test_clock, + transfer_data, + trial_end, + trial_settings, + trial_start, }) } } @@ -411,74 +510,60 @@ const _: () = { let mut b = SubscriptionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "application" => b.application = Some(FromValueOpt::from_value(v)?), + "application" => b.application = FromValueOpt::from_value(v), "application_fee_percent" => { - b.application_fee_percent = Some(FromValueOpt::from_value(v)?) - } - "automatic_tax" => b.automatic_tax = Some(FromValueOpt::from_value(v)?), - "billing_cycle_anchor" => { - b.billing_cycle_anchor = Some(FromValueOpt::from_value(v)?) + b.application_fee_percent = FromValueOpt::from_value(v) } + "automatic_tax" => b.automatic_tax = FromValueOpt::from_value(v), + "billing_cycle_anchor" => b.billing_cycle_anchor = FromValueOpt::from_value(v), "billing_cycle_anchor_config" => { - b.billing_cycle_anchor_config = Some(FromValueOpt::from_value(v)?) - } - "billing_thresholds" => { - b.billing_thresholds = Some(FromValueOpt::from_value(v)?) - } - "cancel_at" => b.cancel_at = Some(FromValueOpt::from_value(v)?), - "cancel_at_period_end" => { - b.cancel_at_period_end = Some(FromValueOpt::from_value(v)?) + b.billing_cycle_anchor_config = FromValueOpt::from_value(v) } - "canceled_at" => b.canceled_at = Some(FromValueOpt::from_value(v)?), - "cancellation_details" => { - b.cancellation_details = Some(FromValueOpt::from_value(v)?) - } - "collection_method" => b.collection_method = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "current_period_end" => { - b.current_period_end = Some(FromValueOpt::from_value(v)?) - } - "current_period_start" => { - b.current_period_start = Some(FromValueOpt::from_value(v)?) - } - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "days_until_due" => b.days_until_due = Some(FromValueOpt::from_value(v)?), + "billing_thresholds" => b.billing_thresholds = FromValueOpt::from_value(v), + "cancel_at" => b.cancel_at = FromValueOpt::from_value(v), + "cancel_at_period_end" => b.cancel_at_period_end = FromValueOpt::from_value(v), + "canceled_at" => b.canceled_at = FromValueOpt::from_value(v), + "cancellation_details" => b.cancellation_details = FromValueOpt::from_value(v), + "collection_method" => b.collection_method = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "current_period_end" => b.current_period_end = FromValueOpt::from_value(v), + "current_period_start" => b.current_period_start = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "days_until_due" => b.days_until_due = FromValueOpt::from_value(v), "default_payment_method" => { - b.default_payment_method = Some(FromValueOpt::from_value(v)?) + b.default_payment_method = FromValueOpt::from_value(v) } - "default_source" => b.default_source = Some(FromValueOpt::from_value(v)?), - "default_tax_rates" => b.default_tax_rates = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "discount" => b.discount = Some(FromValueOpt::from_value(v)?), - "discounts" => b.discounts = Some(FromValueOpt::from_value(v)?), - "ended_at" => b.ended_at = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "items" => b.items = Some(FromValueOpt::from_value(v)?), - "latest_invoice" => b.latest_invoice = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), + "default_source" => b.default_source = FromValueOpt::from_value(v), + "default_tax_rates" => b.default_tax_rates = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "discount" => b.discount = FromValueOpt::from_value(v), + "discounts" => b.discounts = FromValueOpt::from_value(v), + "ended_at" => b.ended_at = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "items" => b.items = FromValueOpt::from_value(v), + "latest_invoice" => b.latest_invoice = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), "next_pending_invoice_item_invoice" => { - b.next_pending_invoice_item_invoice = Some(FromValueOpt::from_value(v)?) + b.next_pending_invoice_item_invoice = FromValueOpt::from_value(v) } - "on_behalf_of" => b.on_behalf_of = Some(FromValueOpt::from_value(v)?), - "pause_collection" => b.pause_collection = Some(FromValueOpt::from_value(v)?), - "payment_settings" => b.payment_settings = Some(FromValueOpt::from_value(v)?), + "on_behalf_of" => b.on_behalf_of = FromValueOpt::from_value(v), + "pause_collection" => b.pause_collection = FromValueOpt::from_value(v), + "payment_settings" => b.payment_settings = FromValueOpt::from_value(v), "pending_invoice_item_interval" => { - b.pending_invoice_item_interval = Some(FromValueOpt::from_value(v)?) - } - "pending_setup_intent" => { - b.pending_setup_intent = Some(FromValueOpt::from_value(v)?) + b.pending_invoice_item_interval = FromValueOpt::from_value(v) } - "pending_update" => b.pending_update = Some(FromValueOpt::from_value(v)?), - "schedule" => b.schedule = Some(FromValueOpt::from_value(v)?), - "start_date" => b.start_date = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "test_clock" => b.test_clock = Some(FromValueOpt::from_value(v)?), - "transfer_data" => b.transfer_data = Some(FromValueOpt::from_value(v)?), - "trial_end" => b.trial_end = Some(FromValueOpt::from_value(v)?), - "trial_settings" => b.trial_settings = Some(FromValueOpt::from_value(v)?), - "trial_start" => b.trial_start = Some(FromValueOpt::from_value(v)?), + "pending_setup_intent" => b.pending_setup_intent = FromValueOpt::from_value(v), + "pending_update" => b.pending_update = FromValueOpt::from_value(v), + "schedule" => b.schedule = FromValueOpt::from_value(v), + "start_date" => b.start_date = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "test_clock" => b.test_clock = FromValueOpt::from_value(v), + "transfer_data" => b.transfer_data = FromValueOpt::from_value(v), + "trial_end" => b.trial_end = FromValueOpt::from_value(v), + "trial_settings" => b.trial_settings = FromValueOpt::from_value(v), + "trial_start" => b.trial_start = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscription_automatic_tax.rs b/generated/async-stripe-shared/src/subscription_automatic_tax.rs index 91d93ae3d..c957621ac 100644 --- a/generated/async-stripe-shared/src/subscription_automatic_tax.rs +++ b/generated/async-stripe-shared/src/subscription_automatic_tax.rs @@ -15,7 +15,12 @@ pub struct SubscriptionAutomaticTaxBuilder { liability: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -61,7 +66,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled?, liability: self.liability.take()? }) + let (Some(enabled), Some(liability)) = (self.enabled, self.liability.take()) else { + return None; + }; + Some(Self::Out { enabled, liability }) } } @@ -88,8 +96,8 @@ const _: () = { let mut b = SubscriptionAutomaticTaxBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "liability" => b.liability = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "liability" => b.liability = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscription_billing_thresholds.rs b/generated/async-stripe-shared/src/subscription_billing_thresholds.rs index 91598b446..ab8559fb6 100644 --- a/generated/async-stripe-shared/src/subscription_billing_thresholds.rs +++ b/generated/async-stripe-shared/src/subscription_billing_thresholds.rs @@ -15,7 +15,12 @@ pub struct SubscriptionBillingThresholdsBuilder { reset_billing_cycle_anchor: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -66,10 +71,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount_gte: self.amount_gte?, - reset_billing_cycle_anchor: self.reset_billing_cycle_anchor?, - }) + let (Some(amount_gte), Some(reset_billing_cycle_anchor)) = + (self.amount_gte, self.reset_billing_cycle_anchor) + else { + return None; + }; + Some(Self::Out { amount_gte, reset_billing_cycle_anchor }) } } @@ -96,9 +103,9 @@ const _: () = { let mut b = SubscriptionBillingThresholdsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_gte" => b.amount_gte = Some(FromValueOpt::from_value(v)?), + "amount_gte" => b.amount_gte = FromValueOpt::from_value(v), "reset_billing_cycle_anchor" => { - b.reset_billing_cycle_anchor = Some(FromValueOpt::from_value(v)?) + b.reset_billing_cycle_anchor = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/subscription_details_data.rs b/generated/async-stripe-shared/src/subscription_details_data.rs index 0216cb46b..dbc48d84c 100644 --- a/generated/async-stripe-shared/src/subscription_details_data.rs +++ b/generated/async-stripe-shared/src/subscription_details_data.rs @@ -12,7 +12,12 @@ pub struct SubscriptionDetailsDataBuilder { metadata: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -57,7 +62,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { metadata: self.metadata.take()? }) + let (Some(metadata),) = (self.metadata.take(),) else { + return None; + }; + Some(Self::Out { metadata }) } } @@ -84,7 +92,7 @@ const _: () = { let mut b = SubscriptionDetailsDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), + "metadata" => b.metadata = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscription_item.rs b/generated/async-stripe-shared/src/subscription_item.rs index 1e57379e5..551271c14 100644 --- a/generated/async-stripe-shared/src/subscription_item.rs +++ b/generated/async-stripe-shared/src/subscription_item.rs @@ -42,7 +42,12 @@ pub struct SubscriptionItemBuilder { tax_rates: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -107,17 +112,43 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(billing_thresholds), + Some(created), + Some(discounts), + Some(id), + Some(metadata), + Some(plan), + Some(price), + Some(quantity), + Some(subscription), + Some(tax_rates), + ) = ( + self.billing_thresholds, + self.created, + self.discounts.take(), + self.id.take(), + self.metadata.take(), + self.plan.take(), + self.price.take(), + self.quantity, + self.subscription.take(), + self.tax_rates.take(), + ) + else { + return None; + }; Some(Self::Out { - billing_thresholds: self.billing_thresholds?, - created: self.created?, - discounts: self.discounts.take()?, - id: self.id.take()?, - metadata: self.metadata.take()?, - plan: self.plan.take()?, - price: self.price.take()?, - quantity: self.quantity?, - subscription: self.subscription.take()?, - tax_rates: self.tax_rates.take()?, + billing_thresholds, + created, + discounts, + id, + metadata, + plan, + price, + quantity, + subscription, + tax_rates, }) } } @@ -145,18 +176,16 @@ const _: () = { let mut b = SubscriptionItemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "billing_thresholds" => { - b.billing_thresholds = Some(FromValueOpt::from_value(v)?) - } - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "discounts" => b.discounts = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "plan" => b.plan = Some(FromValueOpt::from_value(v)?), - "price" => b.price = Some(FromValueOpt::from_value(v)?), - "quantity" => b.quantity = Some(FromValueOpt::from_value(v)?), - "subscription" => b.subscription = Some(FromValueOpt::from_value(v)?), - "tax_rates" => b.tax_rates = Some(FromValueOpt::from_value(v)?), + "billing_thresholds" => b.billing_thresholds = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "discounts" => b.discounts = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "plan" => b.plan = FromValueOpt::from_value(v), + "price" => b.price = FromValueOpt::from_value(v), + "quantity" => b.quantity = FromValueOpt::from_value(v), + "subscription" => b.subscription = FromValueOpt::from_value(v), + "tax_rates" => b.tax_rates = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscription_item_billing_thresholds.rs b/generated/async-stripe-shared/src/subscription_item_billing_thresholds.rs index 08145f94e..233a8565e 100644 --- a/generated/async-stripe-shared/src/subscription_item_billing_thresholds.rs +++ b/generated/async-stripe-shared/src/subscription_item_billing_thresholds.rs @@ -10,7 +10,12 @@ pub struct SubscriptionItemBillingThresholdsBuilder { usage_gte: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { usage_gte: self.usage_gte? }) + let (Some(usage_gte),) = (self.usage_gte,) else { + return None; + }; + Some(Self::Out { usage_gte }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = SubscriptionItemBillingThresholdsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "usage_gte" => b.usage_gte = Some(FromValueOpt::from_value(v)?), + "usage_gte" => b.usage_gte = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscription_payment_method_options_card.rs b/generated/async-stripe-shared/src/subscription_payment_method_options_card.rs index 1b2f78cde..5382b2ae6 100644 --- a/generated/async-stripe-shared/src/subscription_payment_method_options_card.rs +++ b/generated/async-stripe-shared/src/subscription_payment_method_options_card.rs @@ -19,7 +19,12 @@ pub struct SubscriptionPaymentMethodOptionsCardBuilder { request_three_d_secure: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,11 +75,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - mandate_options: self.mandate_options.take()?, - network: self.network?, - request_three_d_secure: self.request_three_d_secure?, - }) + let (Some(mandate_options), Some(network), Some(request_three_d_secure)) = + (self.mandate_options.take(), self.network, self.request_three_d_secure) + else { + return None; + }; + Some(Self::Out { mandate_options, network, request_three_d_secure }) } } @@ -101,10 +107,10 @@ const _: () = { let mut b = SubscriptionPaymentMethodOptionsCardBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "mandate_options" => b.mandate_options = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), + "mandate_options" => b.mandate_options = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), "request_three_d_secure" => { - b.request_three_d_secure = Some(FromValueOpt::from_value(v)?) + b.request_three_d_secure = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/subscription_pending_invoice_item_interval.rs b/generated/async-stripe-shared/src/subscription_pending_invoice_item_interval.rs index 84de524cc..2bc3b6bad 100644 --- a/generated/async-stripe-shared/src/subscription_pending_invoice_item_interval.rs +++ b/generated/async-stripe-shared/src/subscription_pending_invoice_item_interval.rs @@ -15,7 +15,12 @@ pub struct SubscriptionPendingInvoiceItemIntervalBuilder { interval_count: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -61,7 +66,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { interval: self.interval?, interval_count: self.interval_count? }) + let (Some(interval), Some(interval_count)) = (self.interval, self.interval_count) + else { + return None; + }; + Some(Self::Out { interval, interval_count }) } } @@ -88,8 +97,8 @@ const _: () = { let mut b = SubscriptionPendingInvoiceItemIntervalBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "interval" => b.interval = Some(FromValueOpt::from_value(v)?), - "interval_count" => b.interval_count = Some(FromValueOpt::from_value(v)?), + "interval" => b.interval = FromValueOpt::from_value(v), + "interval_count" => b.interval_count = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscription_schedule.rs b/generated/async-stripe-shared/src/subscription_schedule.rs index c76609e08..047f8af9d 100644 --- a/generated/async-stripe-shared/src/subscription_schedule.rs +++ b/generated/async-stripe-shared/src/subscription_schedule.rs @@ -67,7 +67,12 @@ pub struct SubscriptionScheduleBuilder { test_clock: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -146,24 +151,64 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(application), + Some(canceled_at), + Some(completed_at), + Some(created), + Some(current_phase), + Some(customer), + Some(default_settings), + Some(end_behavior), + Some(id), + Some(livemode), + Some(metadata), + Some(phases), + Some(released_at), + Some(released_subscription), + Some(status), + Some(subscription), + Some(test_clock), + ) = ( + self.application.take(), + self.canceled_at, + self.completed_at, + self.created, + self.current_phase, + self.customer.take(), + self.default_settings.take(), + self.end_behavior, + self.id.take(), + self.livemode, + self.metadata.take(), + self.phases.take(), + self.released_at, + self.released_subscription.take(), + self.status, + self.subscription.take(), + self.test_clock.take(), + ) + else { + return None; + }; Some(Self::Out { - application: self.application.take()?, - canceled_at: self.canceled_at?, - completed_at: self.completed_at?, - created: self.created?, - current_phase: self.current_phase?, - customer: self.customer.take()?, - default_settings: self.default_settings.take()?, - end_behavior: self.end_behavior?, - id: self.id.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - phases: self.phases.take()?, - released_at: self.released_at?, - released_subscription: self.released_subscription.take()?, - status: self.status?, - subscription: self.subscription.take()?, - test_clock: self.test_clock.take()?, + application, + canceled_at, + completed_at, + created, + current_phase, + customer, + default_settings, + end_behavior, + id, + livemode, + metadata, + phases, + released_at, + released_subscription, + status, + subscription, + test_clock, }) } } @@ -191,25 +236,25 @@ const _: () = { let mut b = SubscriptionScheduleBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "application" => b.application = Some(FromValueOpt::from_value(v)?), - "canceled_at" => b.canceled_at = Some(FromValueOpt::from_value(v)?), - "completed_at" => b.completed_at = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "current_phase" => b.current_phase = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "default_settings" => b.default_settings = Some(FromValueOpt::from_value(v)?), - "end_behavior" => b.end_behavior = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "phases" => b.phases = Some(FromValueOpt::from_value(v)?), - "released_at" => b.released_at = Some(FromValueOpt::from_value(v)?), + "application" => b.application = FromValueOpt::from_value(v), + "canceled_at" => b.canceled_at = FromValueOpt::from_value(v), + "completed_at" => b.completed_at = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "current_phase" => b.current_phase = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "default_settings" => b.default_settings = FromValueOpt::from_value(v), + "end_behavior" => b.end_behavior = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "phases" => b.phases = FromValueOpt::from_value(v), + "released_at" => b.released_at = FromValueOpt::from_value(v), "released_subscription" => { - b.released_subscription = Some(FromValueOpt::from_value(v)?) + b.released_subscription = FromValueOpt::from_value(v) } - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "subscription" => b.subscription = Some(FromValueOpt::from_value(v)?), - "test_clock" => b.test_clock = Some(FromValueOpt::from_value(v)?), + "status" => b.status = FromValueOpt::from_value(v), + "subscription" => b.subscription = FromValueOpt::from_value(v), + "test_clock" => b.test_clock = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscription_schedule_add_invoice_item.rs b/generated/async-stripe-shared/src/subscription_schedule_add_invoice_item.rs index a014788ef..15d53399c 100644 --- a/generated/async-stripe-shared/src/subscription_schedule_add_invoice_item.rs +++ b/generated/async-stripe-shared/src/subscription_schedule_add_invoice_item.rs @@ -20,7 +20,12 @@ pub struct SubscriptionScheduleAddInvoiceItemBuilder { tax_rates: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,12 +78,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - discounts: self.discounts.take()?, - price: self.price.take()?, - quantity: self.quantity?, - tax_rates: self.tax_rates.take()?, - }) + let (Some(discounts), Some(price), Some(quantity), Some(tax_rates)) = + (self.discounts.take(), self.price.take(), self.quantity, self.tax_rates.take()) + else { + return None; + }; + Some(Self::Out { discounts, price, quantity, tax_rates }) } } @@ -105,10 +110,10 @@ const _: () = { let mut b = SubscriptionScheduleAddInvoiceItemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "discounts" => b.discounts = Some(FromValueOpt::from_value(v)?), - "price" => b.price = Some(FromValueOpt::from_value(v)?), - "quantity" => b.quantity = Some(FromValueOpt::from_value(v)?), - "tax_rates" => b.tax_rates = Some(FromValueOpt::from_value(v)?), + "discounts" => b.discounts = FromValueOpt::from_value(v), + "price" => b.price = FromValueOpt::from_value(v), + "quantity" => b.quantity = FromValueOpt::from_value(v), + "tax_rates" => b.tax_rates = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscription_schedule_configuration_item.rs b/generated/async-stripe-shared/src/subscription_schedule_configuration_item.rs index d0d9f278e..9d6e3253a 100644 --- a/generated/async-stripe-shared/src/subscription_schedule_configuration_item.rs +++ b/generated/async-stripe-shared/src/subscription_schedule_configuration_item.rs @@ -33,7 +33,12 @@ pub struct SubscriptionScheduleConfigurationItemBuilder { tax_rates: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -92,14 +97,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(billing_thresholds), + Some(discounts), + Some(metadata), + Some(plan), + Some(price), + Some(quantity), + Some(tax_rates), + ) = ( + self.billing_thresholds, + self.discounts.take(), + self.metadata.take(), + self.plan.take(), + self.price.take(), + self.quantity, + self.tax_rates.take(), + ) + else { + return None; + }; Some(Self::Out { - billing_thresholds: self.billing_thresholds?, - discounts: self.discounts.take()?, - metadata: self.metadata.take()?, - plan: self.plan.take()?, - price: self.price.take()?, - quantity: self.quantity?, - tax_rates: self.tax_rates.take()?, + billing_thresholds, + discounts, + metadata, + plan, + price, + quantity, + tax_rates, }) } } @@ -127,15 +152,13 @@ const _: () = { let mut b = SubscriptionScheduleConfigurationItemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "billing_thresholds" => { - b.billing_thresholds = Some(FromValueOpt::from_value(v)?) - } - "discounts" => b.discounts = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "plan" => b.plan = Some(FromValueOpt::from_value(v)?), - "price" => b.price = Some(FromValueOpt::from_value(v)?), - "quantity" => b.quantity = Some(FromValueOpt::from_value(v)?), - "tax_rates" => b.tax_rates = Some(FromValueOpt::from_value(v)?), + "billing_thresholds" => b.billing_thresholds = FromValueOpt::from_value(v), + "discounts" => b.discounts = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "plan" => b.plan = FromValueOpt::from_value(v), + "price" => b.price = FromValueOpt::from_value(v), + "quantity" => b.quantity = FromValueOpt::from_value(v), + "tax_rates" => b.tax_rates = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscription_schedule_current_phase.rs b/generated/async-stripe-shared/src/subscription_schedule_current_phase.rs index 9ef44e872..61171c541 100644 --- a/generated/async-stripe-shared/src/subscription_schedule_current_phase.rs +++ b/generated/async-stripe-shared/src/subscription_schedule_current_phase.rs @@ -13,7 +13,12 @@ pub struct SubscriptionScheduleCurrentPhaseBuilder { start_date: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { end_date: self.end_date?, start_date: self.start_date? }) + let (Some(end_date), Some(start_date)) = (self.end_date, self.start_date) else { + return None; + }; + Some(Self::Out { end_date, start_date }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = SubscriptionScheduleCurrentPhaseBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "end_date" => b.end_date = Some(FromValueOpt::from_value(v)?), - "start_date" => b.start_date = Some(FromValueOpt::from_value(v)?), + "end_date" => b.end_date = FromValueOpt::from_value(v), + "start_date" => b.start_date = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscription_schedule_phase_configuration.rs b/generated/async-stripe-shared/src/subscription_schedule_phase_configuration.rs index 0c5631090..4079cfe2d 100644 --- a/generated/async-stripe-shared/src/subscription_schedule_phase_configuration.rs +++ b/generated/async-stripe-shared/src/subscription_schedule_phase_configuration.rs @@ -85,7 +85,12 @@ pub struct SubscriptionSchedulePhaseConfigurationBuilder { trial_end: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -172,28 +177,76 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(add_invoice_items), + Some(application_fee_percent), + Some(automatic_tax), + Some(billing_cycle_anchor), + Some(billing_thresholds), + Some(collection_method), + Some(coupon), + Some(currency), + Some(default_payment_method), + Some(default_tax_rates), + Some(description), + Some(discounts), + Some(end_date), + Some(invoice_settings), + Some(items), + Some(metadata), + Some(on_behalf_of), + Some(proration_behavior), + Some(start_date), + Some(transfer_data), + Some(trial_end), + ) = ( + self.add_invoice_items.take(), + self.application_fee_percent, + self.automatic_tax.take(), + self.billing_cycle_anchor, + self.billing_thresholds, + self.collection_method, + self.coupon.take(), + self.currency, + self.default_payment_method.take(), + self.default_tax_rates.take(), + self.description.take(), + self.discounts.take(), + self.end_date, + self.invoice_settings.take(), + self.items.take(), + self.metadata.take(), + self.on_behalf_of.take(), + self.proration_behavior, + self.start_date, + self.transfer_data.take(), + self.trial_end, + ) + else { + return None; + }; Some(Self::Out { - add_invoice_items: self.add_invoice_items.take()?, - application_fee_percent: self.application_fee_percent?, - automatic_tax: self.automatic_tax.take()?, - billing_cycle_anchor: self.billing_cycle_anchor?, - billing_thresholds: self.billing_thresholds?, - collection_method: self.collection_method?, - coupon: self.coupon.take()?, - currency: self.currency?, - default_payment_method: self.default_payment_method.take()?, - default_tax_rates: self.default_tax_rates.take()?, - description: self.description.take()?, - discounts: self.discounts.take()?, - end_date: self.end_date?, - invoice_settings: self.invoice_settings.take()?, - items: self.items.take()?, - metadata: self.metadata.take()?, - on_behalf_of: self.on_behalf_of.take()?, - proration_behavior: self.proration_behavior?, - start_date: self.start_date?, - transfer_data: self.transfer_data.take()?, - trial_end: self.trial_end?, + add_invoice_items, + application_fee_percent, + automatic_tax, + billing_cycle_anchor, + billing_thresholds, + collection_method, + coupon, + currency, + default_payment_method, + default_tax_rates, + description, + discounts, + end_date, + invoice_settings, + items, + metadata, + on_behalf_of, + proration_behavior, + start_date, + transfer_data, + trial_end, }) } } @@ -221,37 +274,31 @@ const _: () = { let mut b = SubscriptionSchedulePhaseConfigurationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "add_invoice_items" => b.add_invoice_items = Some(FromValueOpt::from_value(v)?), + "add_invoice_items" => b.add_invoice_items = FromValueOpt::from_value(v), "application_fee_percent" => { - b.application_fee_percent = Some(FromValueOpt::from_value(v)?) + b.application_fee_percent = FromValueOpt::from_value(v) } - "automatic_tax" => b.automatic_tax = Some(FromValueOpt::from_value(v)?), - "billing_cycle_anchor" => { - b.billing_cycle_anchor = Some(FromValueOpt::from_value(v)?) - } - "billing_thresholds" => { - b.billing_thresholds = Some(FromValueOpt::from_value(v)?) - } - "collection_method" => b.collection_method = Some(FromValueOpt::from_value(v)?), - "coupon" => b.coupon = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), + "automatic_tax" => b.automatic_tax = FromValueOpt::from_value(v), + "billing_cycle_anchor" => b.billing_cycle_anchor = FromValueOpt::from_value(v), + "billing_thresholds" => b.billing_thresholds = FromValueOpt::from_value(v), + "collection_method" => b.collection_method = FromValueOpt::from_value(v), + "coupon" => b.coupon = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), "default_payment_method" => { - b.default_payment_method = Some(FromValueOpt::from_value(v)?) - } - "default_tax_rates" => b.default_tax_rates = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "discounts" => b.discounts = Some(FromValueOpt::from_value(v)?), - "end_date" => b.end_date = Some(FromValueOpt::from_value(v)?), - "invoice_settings" => b.invoice_settings = Some(FromValueOpt::from_value(v)?), - "items" => b.items = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "on_behalf_of" => b.on_behalf_of = Some(FromValueOpt::from_value(v)?), - "proration_behavior" => { - b.proration_behavior = Some(FromValueOpt::from_value(v)?) + b.default_payment_method = FromValueOpt::from_value(v) } - "start_date" => b.start_date = Some(FromValueOpt::from_value(v)?), - "transfer_data" => b.transfer_data = Some(FromValueOpt::from_value(v)?), - "trial_end" => b.trial_end = Some(FromValueOpt::from_value(v)?), + "default_tax_rates" => b.default_tax_rates = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "discounts" => b.discounts = FromValueOpt::from_value(v), + "end_date" => b.end_date = FromValueOpt::from_value(v), + "invoice_settings" => b.invoice_settings = FromValueOpt::from_value(v), + "items" => b.items = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "on_behalf_of" => b.on_behalf_of = FromValueOpt::from_value(v), + "proration_behavior" => b.proration_behavior = FromValueOpt::from_value(v), + "start_date" => b.start_date = FromValueOpt::from_value(v), + "transfer_data" => b.transfer_data = FromValueOpt::from_value(v), + "trial_end" => b.trial_end = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings.rs b/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings.rs index 17b895ff4..d60dbc08b 100644 --- a/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings.rs +++ b/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings.rs @@ -46,7 +46,12 @@ pub struct SubscriptionSchedulesResourceDefaultSettingsBuilder { transfer_data: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -111,17 +116,43 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(application_fee_percent), + Some(automatic_tax), + Some(billing_cycle_anchor), + Some(billing_thresholds), + Some(collection_method), + Some(default_payment_method), + Some(description), + Some(invoice_settings), + Some(on_behalf_of), + Some(transfer_data), + ) = ( + self.application_fee_percent, + self.automatic_tax.take(), + self.billing_cycle_anchor, + self.billing_thresholds, + self.collection_method, + self.default_payment_method.take(), + self.description.take(), + self.invoice_settings.take(), + self.on_behalf_of.take(), + self.transfer_data.take(), + ) + else { + return None; + }; Some(Self::Out { - application_fee_percent: self.application_fee_percent?, - automatic_tax: self.automatic_tax.take()?, - billing_cycle_anchor: self.billing_cycle_anchor?, - billing_thresholds: self.billing_thresholds?, - collection_method: self.collection_method?, - default_payment_method: self.default_payment_method.take()?, - description: self.description.take()?, - invoice_settings: self.invoice_settings.take()?, - on_behalf_of: self.on_behalf_of.take()?, - transfer_data: self.transfer_data.take()?, + application_fee_percent, + automatic_tax, + billing_cycle_anchor, + billing_thresholds, + collection_method, + default_payment_method, + description, + invoice_settings, + on_behalf_of, + transfer_data, }) } } @@ -150,23 +181,19 @@ const _: () = { for (k, v) in obj { match k.as_str() { "application_fee_percent" => { - b.application_fee_percent = Some(FromValueOpt::from_value(v)?) - } - "automatic_tax" => b.automatic_tax = Some(FromValueOpt::from_value(v)?), - "billing_cycle_anchor" => { - b.billing_cycle_anchor = Some(FromValueOpt::from_value(v)?) - } - "billing_thresholds" => { - b.billing_thresholds = Some(FromValueOpt::from_value(v)?) + b.application_fee_percent = FromValueOpt::from_value(v) } - "collection_method" => b.collection_method = Some(FromValueOpt::from_value(v)?), + "automatic_tax" => b.automatic_tax = FromValueOpt::from_value(v), + "billing_cycle_anchor" => b.billing_cycle_anchor = FromValueOpt::from_value(v), + "billing_thresholds" => b.billing_thresholds = FromValueOpt::from_value(v), + "collection_method" => b.collection_method = FromValueOpt::from_value(v), "default_payment_method" => { - b.default_payment_method = Some(FromValueOpt::from_value(v)?) + b.default_payment_method = FromValueOpt::from_value(v) } - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "invoice_settings" => b.invoice_settings = Some(FromValueOpt::from_value(v)?), - "on_behalf_of" => b.on_behalf_of = Some(FromValueOpt::from_value(v)?), - "transfer_data" => b.transfer_data = Some(FromValueOpt::from_value(v)?), + "description" => b.description = FromValueOpt::from_value(v), + "invoice_settings" => b.invoice_settings = FromValueOpt::from_value(v), + "on_behalf_of" => b.on_behalf_of = FromValueOpt::from_value(v), + "transfer_data" => b.transfer_data = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings_automatic_tax.rs b/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings_automatic_tax.rs index 1e103e6db..aa4a17a36 100644 --- a/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings_automatic_tax.rs +++ b/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings_automatic_tax.rs @@ -15,7 +15,12 @@ pub struct SubscriptionSchedulesResourceDefaultSettingsAutomaticTaxBuilder { liability: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,7 +67,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled?, liability: self.liability.take()? }) + let (Some(enabled), Some(liability)) = (self.enabled, self.liability.take()) else { + return None; + }; + Some(Self::Out { enabled, liability }) } } @@ -90,8 +98,8 @@ const _: () = { SubscriptionSchedulesResourceDefaultSettingsAutomaticTaxBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), - "liability" => b.liability = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), + "liability" => b.liability = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscription_transfer_data.rs b/generated/async-stripe-shared/src/subscription_transfer_data.rs index afc2f7447..a559f3553 100644 --- a/generated/async-stripe-shared/src/subscription_transfer_data.rs +++ b/generated/async-stripe-shared/src/subscription_transfer_data.rs @@ -15,7 +15,12 @@ pub struct SubscriptionTransferDataBuilder { destination: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -61,10 +66,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount_percent: self.amount_percent?, - destination: self.destination.take()?, - }) + let (Some(amount_percent), Some(destination)) = + (self.amount_percent, self.destination.take()) + else { + return None; + }; + Some(Self::Out { amount_percent, destination }) } } @@ -91,8 +98,8 @@ const _: () = { let mut b = SubscriptionTransferDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_percent" => b.amount_percent = Some(FromValueOpt::from_value(v)?), - "destination" => b.destination = Some(FromValueOpt::from_value(v)?), + "amount_percent" => b.amount_percent = FromValueOpt::from_value(v), + "destination" => b.destination = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscriptions_resource_billing_cycle_anchor_config.rs b/generated/async-stripe-shared/src/subscriptions_resource_billing_cycle_anchor_config.rs index 1159036fb..4d2c21c51 100644 --- a/generated/async-stripe-shared/src/subscriptions_resource_billing_cycle_anchor_config.rs +++ b/generated/async-stripe-shared/src/subscriptions_resource_billing_cycle_anchor_config.rs @@ -22,7 +22,12 @@ pub struct SubscriptionsResourceBillingCycleAnchorConfigBuilder { second: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,13 +82,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - day_of_month: self.day_of_month?, - hour: self.hour?, - minute: self.minute?, - month: self.month?, - second: self.second?, - }) + let (Some(day_of_month), Some(hour), Some(minute), Some(month), Some(second)) = + (self.day_of_month, self.hour, self.minute, self.month, self.second) + else { + return None; + }; + Some(Self::Out { day_of_month, hour, minute, month, second }) } } @@ -110,11 +114,11 @@ const _: () = { let mut b = SubscriptionsResourceBillingCycleAnchorConfigBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "day_of_month" => b.day_of_month = Some(FromValueOpt::from_value(v)?), - "hour" => b.hour = Some(FromValueOpt::from_value(v)?), - "minute" => b.minute = Some(FromValueOpt::from_value(v)?), - "month" => b.month = Some(FromValueOpt::from_value(v)?), - "second" => b.second = Some(FromValueOpt::from_value(v)?), + "day_of_month" => b.day_of_month = FromValueOpt::from_value(v), + "hour" => b.hour = FromValueOpt::from_value(v), + "minute" => b.minute = FromValueOpt::from_value(v), + "month" => b.month = FromValueOpt::from_value(v), + "second" => b.second = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscriptions_resource_pause_collection.rs b/generated/async-stripe-shared/src/subscriptions_resource_pause_collection.rs index 47b1f413e..ee678d0a3 100644 --- a/generated/async-stripe-shared/src/subscriptions_resource_pause_collection.rs +++ b/generated/async-stripe-shared/src/subscriptions_resource_pause_collection.rs @@ -16,7 +16,12 @@ pub struct SubscriptionsResourcePauseCollectionBuilder { resumes_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -62,7 +67,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { behavior: self.behavior?, resumes_at: self.resumes_at? }) + let (Some(behavior), Some(resumes_at)) = (self.behavior, self.resumes_at) else { + return None; + }; + Some(Self::Out { behavior, resumes_at }) } } @@ -89,8 +97,8 @@ const _: () = { let mut b = SubscriptionsResourcePauseCollectionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "behavior" => b.behavior = Some(FromValueOpt::from_value(v)?), - "resumes_at" => b.resumes_at = Some(FromValueOpt::from_value(v)?), + "behavior" => b.behavior = FromValueOpt::from_value(v), + "resumes_at" => b.resumes_at = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscriptions_resource_payment_method_options.rs b/generated/async-stripe-shared/src/subscriptions_resource_payment_method_options.rs index 25cd8a5d3..1e874cd52 100644 --- a/generated/async-stripe-shared/src/subscriptions_resource_payment_method_options.rs +++ b/generated/async-stripe-shared/src/subscriptions_resource_payment_method_options.rs @@ -28,7 +28,12 @@ pub struct SubscriptionsResourcePaymentMethodOptionsBuilder { us_bank_account: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -87,14 +92,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(acss_debit), + Some(bancontact), + Some(card), + Some(customer_balance), + Some(konbini), + Some(sepa_debit), + Some(us_bank_account), + ) = ( + self.acss_debit, + self.bancontact, + self.card.take(), + self.customer_balance.take(), + self.konbini, + self.sepa_debit, + self.us_bank_account.take(), + ) + else { + return None; + }; Some(Self::Out { - acss_debit: self.acss_debit?, - bancontact: self.bancontact?, - card: self.card.take()?, - customer_balance: self.customer_balance.take()?, - konbini: self.konbini?, - sepa_debit: self.sepa_debit?, - us_bank_account: self.us_bank_account.take()?, + acss_debit, + bancontact, + card, + customer_balance, + konbini, + sepa_debit, + us_bank_account, }) } } @@ -122,13 +147,13 @@ const _: () = { let mut b = SubscriptionsResourcePaymentMethodOptionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "acss_debit" => b.acss_debit = Some(FromValueOpt::from_value(v)?), - "bancontact" => b.bancontact = Some(FromValueOpt::from_value(v)?), - "card" => b.card = Some(FromValueOpt::from_value(v)?), - "customer_balance" => b.customer_balance = Some(FromValueOpt::from_value(v)?), - "konbini" => b.konbini = Some(FromValueOpt::from_value(v)?), - "sepa_debit" => b.sepa_debit = Some(FromValueOpt::from_value(v)?), - "us_bank_account" => b.us_bank_account = Some(FromValueOpt::from_value(v)?), + "acss_debit" => b.acss_debit = FromValueOpt::from_value(v), + "bancontact" => b.bancontact = FromValueOpt::from_value(v), + "card" => b.card = FromValueOpt::from_value(v), + "customer_balance" => b.customer_balance = FromValueOpt::from_value(v), + "konbini" => b.konbini = FromValueOpt::from_value(v), + "sepa_debit" => b.sepa_debit = FromValueOpt::from_value(v), + "us_bank_account" => b.us_bank_account = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscriptions_resource_payment_settings.rs b/generated/async-stripe-shared/src/subscriptions_resource_payment_settings.rs index da87942d3..5c69e16d4 100644 --- a/generated/async-stripe-shared/src/subscriptions_resource_payment_settings.rs +++ b/generated/async-stripe-shared/src/subscriptions_resource_payment_settings.rs @@ -22,7 +22,12 @@ pub struct SubscriptionsResourcePaymentSettingsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -75,10 +80,22 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(payment_method_options), + Some(payment_method_types), + Some(save_default_payment_method), + ) = ( + self.payment_method_options.take(), + self.payment_method_types.take(), + self.save_default_payment_method, + ) + else { + return None; + }; Some(Self::Out { - payment_method_options: self.payment_method_options.take()?, - payment_method_types: self.payment_method_types.take()?, - save_default_payment_method: self.save_default_payment_method?, + payment_method_options, + payment_method_types, + save_default_payment_method, }) } } @@ -107,13 +124,11 @@ const _: () = { for (k, v) in obj { match k.as_str() { "payment_method_options" => { - b.payment_method_options = Some(FromValueOpt::from_value(v)?) - } - "payment_method_types" => { - b.payment_method_types = Some(FromValueOpt::from_value(v)?) + b.payment_method_options = FromValueOpt::from_value(v) } + "payment_method_types" => b.payment_method_types = FromValueOpt::from_value(v), "save_default_payment_method" => { - b.save_default_payment_method = Some(FromValueOpt::from_value(v)?) + b.save_default_payment_method = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/subscriptions_resource_pending_update.rs b/generated/async-stripe-shared/src/subscriptions_resource_pending_update.rs index c5f2e025d..3ddddec00 100644 --- a/generated/async-stripe-shared/src/subscriptions_resource_pending_update.rs +++ b/generated/async-stripe-shared/src/subscriptions_resource_pending_update.rs @@ -28,7 +28,12 @@ pub struct SubscriptionsResourcePendingUpdateBuilder { trial_from_plan: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -83,12 +88,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(billing_cycle_anchor), + Some(expires_at), + Some(subscription_items), + Some(trial_end), + Some(trial_from_plan), + ) = ( + self.billing_cycle_anchor, + self.expires_at, + self.subscription_items.take(), + self.trial_end, + self.trial_from_plan, + ) + else { + return None; + }; Some(Self::Out { - billing_cycle_anchor: self.billing_cycle_anchor?, - expires_at: self.expires_at?, - subscription_items: self.subscription_items.take()?, - trial_end: self.trial_end?, - trial_from_plan: self.trial_from_plan?, + billing_cycle_anchor, + expires_at, + subscription_items, + trial_end, + trial_from_plan, }) } } @@ -116,15 +137,11 @@ const _: () = { let mut b = SubscriptionsResourcePendingUpdateBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "billing_cycle_anchor" => { - b.billing_cycle_anchor = Some(FromValueOpt::from_value(v)?) - } - "expires_at" => b.expires_at = Some(FromValueOpt::from_value(v)?), - "subscription_items" => { - b.subscription_items = Some(FromValueOpt::from_value(v)?) - } - "trial_end" => b.trial_end = Some(FromValueOpt::from_value(v)?), - "trial_from_plan" => b.trial_from_plan = Some(FromValueOpt::from_value(v)?), + "billing_cycle_anchor" => b.billing_cycle_anchor = FromValueOpt::from_value(v), + "expires_at" => b.expires_at = FromValueOpt::from_value(v), + "subscription_items" => b.subscription_items = FromValueOpt::from_value(v), + "trial_end" => b.trial_end = FromValueOpt::from_value(v), + "trial_from_plan" => b.trial_from_plan = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/subscriptions_trials_resource_end_behavior.rs b/generated/async-stripe-shared/src/subscriptions_trials_resource_end_behavior.rs index 8bf693698..44b67839e 100644 --- a/generated/async-stripe-shared/src/subscriptions_trials_resource_end_behavior.rs +++ b/generated/async-stripe-shared/src/subscriptions_trials_resource_end_behavior.rs @@ -11,7 +11,12 @@ pub struct SubscriptionsTrialsResourceEndBehaviorBuilder { missing_payment_method: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { missing_payment_method: self.missing_payment_method? }) + let (Some(missing_payment_method),) = (self.missing_payment_method,) else { + return None; + }; + Some(Self::Out { missing_payment_method }) } } @@ -84,7 +92,7 @@ const _: () = { for (k, v) in obj { match k.as_str() { "missing_payment_method" => { - b.missing_payment_method = Some(FromValueOpt::from_value(v)?) + b.missing_payment_method = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/subscriptions_trials_resource_trial_settings.rs b/generated/async-stripe-shared/src/subscriptions_trials_resource_trial_settings.rs index 703f1a69d..883a43022 100644 --- a/generated/async-stripe-shared/src/subscriptions_trials_resource_trial_settings.rs +++ b/generated/async-stripe-shared/src/subscriptions_trials_resource_trial_settings.rs @@ -10,7 +10,12 @@ pub struct SubscriptionsTrialsResourceTrialSettingsBuilder { end_behavior: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { end_behavior: self.end_behavior? }) + let (Some(end_behavior),) = (self.end_behavior,) else { + return None; + }; + Some(Self::Out { end_behavior }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = SubscriptionsTrialsResourceTrialSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "end_behavior" => b.end_behavior = Some(FromValueOpt::from_value(v)?), + "end_behavior" => b.end_behavior = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/tax_code.rs b/generated/async-stripe-shared/src/tax_code.rs index b52ffdc4f..c6a106c1b 100644 --- a/generated/async-stripe-shared/src/tax_code.rs +++ b/generated/async-stripe-shared/src/tax_code.rs @@ -18,7 +18,12 @@ pub struct TaxCodeBuilder { name: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -66,11 +71,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - description: self.description.take()?, - id: self.id.take()?, - name: self.name.take()?, - }) + let (Some(description), Some(id), Some(name)) = + (self.description.take(), self.id.take(), self.name.take()) + else { + return None; + }; + Some(Self::Out { description, id, name }) } } @@ -97,9 +103,9 @@ const _: () = { let mut b = TaxCodeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), + "description" => b.description = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), _ => {} } 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..092666059 100644 --- a/generated/async-stripe-shared/src/tax_deducted_at_source.rs +++ b/generated/async-stripe-shared/src/tax_deducted_at_source.rs @@ -20,7 +20,12 @@ pub struct TaxDeductedAtSourceBuilder { tax_deduction_account_number: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -75,12 +80,21 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - id: self.id.take()?, - period_end: self.period_end?, - period_start: self.period_start?, - tax_deduction_account_number: self.tax_deduction_account_number.take()?, - }) + let ( + Some(id), + Some(period_end), + Some(period_start), + Some(tax_deduction_account_number), + ) = ( + self.id.take(), + self.period_end, + self.period_start, + self.tax_deduction_account_number.take(), + ) + else { + return None; + }; + Some(Self::Out { id, period_end, period_start, tax_deduction_account_number }) } } @@ -107,11 +121,11 @@ const _: () = { let mut b = TaxDeductedAtSourceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "period_end" => b.period_end = Some(FromValueOpt::from_value(v)?), - "period_start" => b.period_start = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "period_end" => b.period_end = FromValueOpt::from_value(v), + "period_start" => b.period_start = FromValueOpt::from_value(v), "tax_deduction_account_number" => { - b.tax_deduction_account_number = Some(FromValueOpt::from_value(v)?) + b.tax_deduction_account_number = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-shared/src/tax_i_ds_owner.rs b/generated/async-stripe-shared/src/tax_i_ds_owner.rs index e21a0ea4f..c91965762 100644 --- a/generated/async-stripe-shared/src/tax_i_ds_owner.rs +++ b/generated/async-stripe-shared/src/tax_i_ds_owner.rs @@ -20,7 +20,12 @@ pub struct TaxIDsOwnerBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,12 +78,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - account: self.account.take()?, - application: self.application.take()?, - customer: self.customer.take()?, - type_: self.type_?, - }) + let (Some(account), Some(application), Some(customer), Some(type_)) = + (self.account.take(), self.application.take(), self.customer.take(), self.type_) + else { + return None; + }; + Some(Self::Out { account, application, customer, type_ }) } } @@ -105,10 +110,10 @@ const _: () = { let mut b = TaxIDsOwnerBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account" => b.account = Some(FromValueOpt::from_value(v)?), - "application" => b.application = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "account" => b.account = FromValueOpt::from_value(v), + "application" => b.application = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/tax_id.rs b/generated/async-stripe-shared/src/tax_id.rs index dff946c1f..9eb95982a 100644 --- a/generated/async-stripe-shared/src/tax_id.rs +++ b/generated/async-stripe-shared/src/tax_id.rs @@ -41,7 +41,12 @@ pub struct TaxIdBuilder { verification: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -101,16 +106,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(country), + Some(created), + Some(customer), + Some(id), + Some(livemode), + Some(owner), + Some(type_), + Some(value), + Some(verification), + ) = ( + self.country.take(), + self.created, + self.customer.take(), + self.id.take(), + self.livemode, + self.owner.take(), + self.type_, + self.value.take(), + self.verification.take(), + ) + else { + return None; + }; Some(Self::Out { - country: self.country.take()?, - created: self.created?, - customer: self.customer.take()?, - id: self.id.take()?, - livemode: self.livemode?, - owner: self.owner.take()?, - type_: self.type_?, - value: self.value.take()?, - verification: self.verification.take()?, + country, + created, + customer, + id, + livemode, + owner, + type_, + value, + verification, }) } } @@ -138,15 +167,15 @@ const _: () = { let mut b = TaxIdBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "owner" => b.owner = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "value" => b.value = Some(FromValueOpt::from_value(v)?), - "verification" => b.verification = Some(FromValueOpt::from_value(v)?), + "country" => b.country = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "owner" => b.owner = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "value" => b.value = FromValueOpt::from_value(v), + "verification" => b.verification = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/tax_id_verification.rs b/generated/async-stripe-shared/src/tax_id_verification.rs index eeb8e24fa..eace9a983 100644 --- a/generated/async-stripe-shared/src/tax_id_verification.rs +++ b/generated/async-stripe-shared/src/tax_id_verification.rs @@ -16,7 +16,12 @@ pub struct TaxIdVerificationBuilder { verified_name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - status: self.status?, - verified_address: self.verified_address.take()?, - verified_name: self.verified_name.take()?, - }) + let (Some(status), Some(verified_address), Some(verified_name)) = + (self.status, self.verified_address.take(), self.verified_name.take()) + else { + return None; + }; + Some(Self::Out { status, verified_address, verified_name }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = TaxIdVerificationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "verified_address" => b.verified_address = Some(FromValueOpt::from_value(v)?), - "verified_name" => b.verified_name = Some(FromValueOpt::from_value(v)?), + "status" => b.status = FromValueOpt::from_value(v), + "verified_address" => b.verified_address = FromValueOpt::from_value(v), + "verified_name" => b.verified_name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/tax_rate.rs b/generated/async-stripe-shared/src/tax_rate.rs index d53ef0696..0d2f8b1f5 100644 --- a/generated/async-stripe-shared/src/tax_rate.rs +++ b/generated/async-stripe-shared/src/tax_rate.rs @@ -67,7 +67,12 @@ pub struct TaxRateBuilder { tax_type: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -139,22 +144,58 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(active), + Some(country), + Some(created), + Some(description), + Some(display_name), + Some(effective_percentage), + Some(id), + Some(inclusive), + Some(jurisdiction), + Some(jurisdiction_level), + Some(livemode), + Some(metadata), + Some(percentage), + Some(state), + Some(tax_type), + ) = ( + self.active, + self.country.take(), + self.created, + self.description.take(), + self.display_name.take(), + self.effective_percentage, + self.id.take(), + self.inclusive, + self.jurisdiction.take(), + self.jurisdiction_level, + self.livemode, + self.metadata.take(), + self.percentage, + self.state.take(), + self.tax_type, + ) + else { + return None; + }; Some(Self::Out { - active: self.active?, - country: self.country.take()?, - created: self.created?, - description: self.description.take()?, - display_name: self.display_name.take()?, - effective_percentage: self.effective_percentage?, - id: self.id.take()?, - inclusive: self.inclusive?, - jurisdiction: self.jurisdiction.take()?, - jurisdiction_level: self.jurisdiction_level?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - percentage: self.percentage?, - state: self.state.take()?, - tax_type: self.tax_type?, + active, + country, + created, + description, + display_name, + effective_percentage, + id, + inclusive, + jurisdiction, + jurisdiction_level, + livemode, + metadata, + percentage, + state, + tax_type, }) } } @@ -182,25 +223,21 @@ const _: () = { let mut b = TaxRateBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "active" => b.active = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "display_name" => b.display_name = Some(FromValueOpt::from_value(v)?), - "effective_percentage" => { - b.effective_percentage = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "inclusive" => b.inclusive = Some(FromValueOpt::from_value(v)?), - "jurisdiction" => b.jurisdiction = Some(FromValueOpt::from_value(v)?), - "jurisdiction_level" => { - b.jurisdiction_level = Some(FromValueOpt::from_value(v)?) - } - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "percentage" => b.percentage = Some(FromValueOpt::from_value(v)?), - "state" => b.state = Some(FromValueOpt::from_value(v)?), - "tax_type" => b.tax_type = Some(FromValueOpt::from_value(v)?), + "active" => b.active = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "display_name" => b.display_name = FromValueOpt::from_value(v), + "effective_percentage" => b.effective_percentage = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "inclusive" => b.inclusive = FromValueOpt::from_value(v), + "jurisdiction" => b.jurisdiction = FromValueOpt::from_value(v), + "jurisdiction_level" => b.jurisdiction_level = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "percentage" => b.percentage = FromValueOpt::from_value(v), + "state" => b.state = FromValueOpt::from_value(v), + "tax_type" => b.tax_type = FromValueOpt::from_value(v), _ => {} } 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..700fae9ac 100644 --- a/generated/async-stripe-shared/src/test_helpers_test_clock.rs +++ b/generated/async-stripe-shared/src/test_helpers_test_clock.rs @@ -32,7 +32,12 @@ pub struct TestHelpersTestClockBuilder { status: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -91,15 +96,27 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - created: self.created?, - deletes_after: self.deletes_after?, - frozen_time: self.frozen_time?, - id: self.id.take()?, - livemode: self.livemode?, - name: self.name.take()?, - status: self.status?, - }) + let ( + Some(created), + Some(deletes_after), + Some(frozen_time), + Some(id), + Some(livemode), + Some(name), + Some(status), + ) = ( + self.created, + self.deletes_after, + self.frozen_time, + self.id.take(), + self.livemode, + self.name.take(), + self.status, + ) + else { + return None; + }; + Some(Self::Out { created, deletes_after, frozen_time, id, livemode, name, status }) } } @@ -126,13 +143,13 @@ const _: () = { let mut b = TestHelpersTestClockBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "deletes_after" => b.deletes_after = Some(FromValueOpt::from_value(v)?), - "frozen_time" => b.frozen_time = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "created" => b.created = FromValueOpt::from_value(v), + "deletes_after" => b.deletes_after = FromValueOpt::from_value(v), + "frozen_time" => b.frozen_time = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/three_d_secure_details.rs b/generated/async-stripe-shared/src/three_d_secure_details.rs index 7699ae360..63e304cdf 100644 --- a/generated/async-stripe-shared/src/three_d_secure_details.rs +++ b/generated/async-stripe-shared/src/three_d_secure_details.rs @@ -29,7 +29,12 @@ pub struct ThreeDSecureDetailsBuilder { version: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -88,13 +93,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(authentication_flow), + Some(electronic_commerce_indicator), + Some(result), + Some(result_reason), + Some(transaction_id), + Some(version), + ) = ( + self.authentication_flow, + self.electronic_commerce_indicator, + self.result, + self.result_reason, + self.transaction_id.take(), + self.version, + ) + else { + return None; + }; Some(Self::Out { - authentication_flow: self.authentication_flow?, - electronic_commerce_indicator: self.electronic_commerce_indicator?, - result: self.result?, - result_reason: self.result_reason?, - transaction_id: self.transaction_id.take()?, - version: self.version?, + authentication_flow, + electronic_commerce_indicator, + result, + result_reason, + transaction_id, + version, }) } } @@ -122,16 +145,14 @@ const _: () = { let mut b = ThreeDSecureDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "authentication_flow" => { - b.authentication_flow = Some(FromValueOpt::from_value(v)?) - } + "authentication_flow" => b.authentication_flow = FromValueOpt::from_value(v), "electronic_commerce_indicator" => { - b.electronic_commerce_indicator = Some(FromValueOpt::from_value(v)?) + b.electronic_commerce_indicator = FromValueOpt::from_value(v) } - "result" => b.result = Some(FromValueOpt::from_value(v)?), - "result_reason" => b.result_reason = Some(FromValueOpt::from_value(v)?), - "transaction_id" => b.transaction_id = Some(FromValueOpt::from_value(v)?), - "version" => b.version = Some(FromValueOpt::from_value(v)?), + "result" => b.result = FromValueOpt::from_value(v), + "result_reason" => b.result_reason = FromValueOpt::from_value(v), + "transaction_id" => b.transaction_id = FromValueOpt::from_value(v), + "version" => b.version = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/three_d_secure_details_charge.rs b/generated/async-stripe-shared/src/three_d_secure_details_charge.rs index 0f2e9a3fd..2c8d73c85 100644 --- a/generated/async-stripe-shared/src/three_d_secure_details_charge.rs +++ b/generated/async-stripe-shared/src/three_d_secure_details_charge.rs @@ -37,7 +37,12 @@ pub struct ThreeDSecureDetailsChargeBuilder { version: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -102,15 +107,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(authentication_flow), + Some(electronic_commerce_indicator), + Some(exemption_indicator), + Some(exemption_indicator_applied), + Some(result), + Some(result_reason), + Some(transaction_id), + Some(version), + ) = ( + self.authentication_flow, + self.electronic_commerce_indicator, + self.exemption_indicator, + self.exemption_indicator_applied, + self.result, + self.result_reason, + self.transaction_id.take(), + self.version, + ) + else { + return None; + }; Some(Self::Out { - authentication_flow: self.authentication_flow?, - electronic_commerce_indicator: self.electronic_commerce_indicator?, - exemption_indicator: self.exemption_indicator?, - exemption_indicator_applied: self.exemption_indicator_applied?, - result: self.result?, - result_reason: self.result_reason?, - transaction_id: self.transaction_id.take()?, - version: self.version?, + authentication_flow, + electronic_commerce_indicator, + exemption_indicator, + exemption_indicator_applied, + result, + result_reason, + transaction_id, + version, }) } } @@ -138,22 +165,18 @@ const _: () = { let mut b = ThreeDSecureDetailsChargeBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "authentication_flow" => { - b.authentication_flow = Some(FromValueOpt::from_value(v)?) - } + "authentication_flow" => b.authentication_flow = FromValueOpt::from_value(v), "electronic_commerce_indicator" => { - b.electronic_commerce_indicator = Some(FromValueOpt::from_value(v)?) - } - "exemption_indicator" => { - b.exemption_indicator = Some(FromValueOpt::from_value(v)?) + b.electronic_commerce_indicator = FromValueOpt::from_value(v) } + "exemption_indicator" => b.exemption_indicator = FromValueOpt::from_value(v), "exemption_indicator_applied" => { - b.exemption_indicator_applied = Some(FromValueOpt::from_value(v)?) + b.exemption_indicator_applied = FromValueOpt::from_value(v) } - "result" => b.result = Some(FromValueOpt::from_value(v)?), - "result_reason" => b.result_reason = Some(FromValueOpt::from_value(v)?), - "transaction_id" => b.transaction_id = Some(FromValueOpt::from_value(v)?), - "version" => b.version = Some(FromValueOpt::from_value(v)?), + "result" => b.result = FromValueOpt::from_value(v), + "result_reason" => b.result_reason = FromValueOpt::from_value(v), + "transaction_id" => b.transaction_id = FromValueOpt::from_value(v), + "version" => b.version = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/three_d_secure_usage.rs b/generated/async-stripe-shared/src/three_d_secure_usage.rs index d3497677c..3a997d397 100644 --- a/generated/async-stripe-shared/src/three_d_secure_usage.rs +++ b/generated/async-stripe-shared/src/three_d_secure_usage.rs @@ -10,7 +10,12 @@ pub struct ThreeDSecureUsageBuilder { supported: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { supported: self.supported? }) + let (Some(supported),) = (self.supported,) else { + return None; + }; + Some(Self::Out { supported }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = ThreeDSecureUsageBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "supported" => b.supported = Some(FromValueOpt::from_value(v)?), + "supported" => b.supported = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/token_card_networks.rs b/generated/async-stripe-shared/src/token_card_networks.rs index 9c0ed7ee0..5faffce75 100644 --- a/generated/async-stripe-shared/src/token_card_networks.rs +++ b/generated/async-stripe-shared/src/token_card_networks.rs @@ -11,7 +11,12 @@ pub struct TokenCardNetworksBuilder { preferred: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { preferred: self.preferred.take()? }) + let (Some(preferred),) = (self.preferred.take(),) else { + return None; + }; + Some(Self::Out { preferred }) } } @@ -83,7 +91,7 @@ const _: () = { let mut b = TokenCardNetworksBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "preferred" => b.preferred = Some(FromValueOpt::from_value(v)?), + "preferred" => b.preferred = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/topup.rs b/generated/async-stripe-shared/src/topup.rs index a7f1bb1f3..95712c8bb 100644 --- a/generated/async-stripe-shared/src/topup.rs +++ b/generated/async-stripe-shared/src/topup.rs @@ -66,7 +66,12 @@ pub struct TopupBuilder { transfer_group: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -140,22 +145,58 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(balance_transaction), + Some(created), + Some(currency), + Some(description), + Some(expected_availability_date), + Some(failure_code), + Some(failure_message), + Some(id), + Some(livemode), + Some(metadata), + Some(source), + Some(statement_descriptor), + Some(status), + Some(transfer_group), + ) = ( + self.amount, + self.balance_transaction.take(), + self.created, + self.currency, + self.description.take(), + self.expected_availability_date, + self.failure_code.take(), + self.failure_message.take(), + self.id.take(), + self.livemode, + self.metadata.take(), + self.source.take(), + self.statement_descriptor.take(), + self.status, + self.transfer_group.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - balance_transaction: self.balance_transaction.take()?, - created: self.created?, - currency: self.currency?, - description: self.description.take()?, - expected_availability_date: self.expected_availability_date?, - failure_code: self.failure_code.take()?, - failure_message: self.failure_message.take()?, - id: self.id.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - source: self.source.take()?, - statement_descriptor: self.statement_descriptor.take()?, - status: self.status?, - transfer_group: self.transfer_group.take()?, + amount, + balance_transaction, + created, + currency, + description, + expected_availability_date, + failure_code, + failure_message, + id, + livemode, + metadata, + source, + statement_descriptor, + status, + transfer_group, }) } } @@ -183,27 +224,23 @@ const _: () = { let mut b = TopupBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "balance_transaction" => { - b.balance_transaction = Some(FromValueOpt::from_value(v)?) - } - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "balance_transaction" => b.balance_transaction = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), "expected_availability_date" => { - b.expected_availability_date = Some(FromValueOpt::from_value(v)?) - } - "failure_code" => b.failure_code = Some(FromValueOpt::from_value(v)?), - "failure_message" => b.failure_message = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "source" => b.source = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) + b.expected_availability_date = FromValueOpt::from_value(v) } - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "transfer_group" => b.transfer_group = Some(FromValueOpt::from_value(v)?), + "failure_code" => b.failure_code = FromValueOpt::from_value(v), + "failure_message" => b.failure_message = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "source" => b.source = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "transfer_group" => b.transfer_group = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/transfer.rs b/generated/async-stripe-shared/src/transfer.rs index e67a240f2..9d9eeefc1 100644 --- a/generated/async-stripe-shared/src/transfer.rs +++ b/generated/async-stripe-shared/src/transfer.rs @@ -73,7 +73,12 @@ pub struct TransferBuilder { transfer_group: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -147,23 +152,61 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(amount_reversed), + Some(balance_transaction), + Some(created), + Some(currency), + Some(description), + Some(destination), + Some(destination_payment), + Some(id), + Some(livemode), + Some(metadata), + Some(reversals), + Some(reversed), + Some(source_transaction), + Some(source_type), + Some(transfer_group), + ) = ( + self.amount, + self.amount_reversed, + self.balance_transaction.take(), + self.created, + self.currency, + self.description.take(), + self.destination.take(), + self.destination_payment.take(), + self.id.take(), + self.livemode, + self.metadata.take(), + self.reversals.take(), + self.reversed, + self.source_transaction.take(), + self.source_type.take(), + self.transfer_group.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - amount_reversed: self.amount_reversed?, - balance_transaction: self.balance_transaction.take()?, - created: self.created?, - currency: self.currency?, - description: self.description.take()?, - destination: self.destination.take()?, - destination_payment: self.destination_payment.take()?, - id: self.id.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - reversals: self.reversals.take()?, - reversed: self.reversed?, - source_transaction: self.source_transaction.take()?, - source_type: self.source_type.take()?, - transfer_group: self.transfer_group.take()?, + amount, + amount_reversed, + balance_transaction, + created, + currency, + description, + destination, + destination_payment, + id, + livemode, + metadata, + reversals, + reversed, + source_transaction, + source_type, + transfer_group, }) } } @@ -191,28 +234,22 @@ const _: () = { let mut b = TransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "amount_reversed" => b.amount_reversed = Some(FromValueOpt::from_value(v)?), - "balance_transaction" => { - b.balance_transaction = Some(FromValueOpt::from_value(v)?) - } - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "destination" => b.destination = Some(FromValueOpt::from_value(v)?), - "destination_payment" => { - b.destination_payment = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "reversals" => b.reversals = Some(FromValueOpt::from_value(v)?), - "reversed" => b.reversed = Some(FromValueOpt::from_value(v)?), - "source_transaction" => { - b.source_transaction = Some(FromValueOpt::from_value(v)?) - } - "source_type" => b.source_type = Some(FromValueOpt::from_value(v)?), - "transfer_group" => b.transfer_group = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "amount_reversed" => b.amount_reversed = FromValueOpt::from_value(v), + "balance_transaction" => b.balance_transaction = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "destination" => b.destination = FromValueOpt::from_value(v), + "destination_payment" => b.destination_payment = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "reversals" => b.reversals = FromValueOpt::from_value(v), + "reversed" => b.reversed = FromValueOpt::from_value(v), + "source_transaction" => b.source_transaction = FromValueOpt::from_value(v), + "source_type" => b.source_type = FromValueOpt::from_value(v), + "transfer_group" => b.transfer_group = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/transfer_data.rs b/generated/async-stripe-shared/src/transfer_data.rs index 9bbc90d55..748b15753 100644 --- a/generated/async-stripe-shared/src/transfer_data.rs +++ b/generated/async-stripe-shared/src/transfer_data.rs @@ -18,7 +18,12 @@ pub struct TransferDataBuilder { destination: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -64,7 +69,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { amount: self.amount?, destination: self.destination.take()? }) + let (Some(amount), Some(destination)) = (self.amount, self.destination.take()) else { + return None; + }; + Some(Self::Out { amount, destination }) } } @@ -91,8 +99,8 @@ const _: () = { let mut b = TransferDataBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "destination" => b.destination = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "destination" => b.destination = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/transfer_reversal.rs b/generated/async-stripe-shared/src/transfer_reversal.rs index 8fe054f9e..8912d275b 100644 --- a/generated/async-stripe-shared/src/transfer_reversal.rs +++ b/generated/async-stripe-shared/src/transfer_reversal.rs @@ -51,7 +51,12 @@ pub struct TransferReversalBuilder { transfer: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -116,16 +121,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(balance_transaction), + Some(created), + Some(currency), + Some(destination_payment_refund), + Some(id), + Some(metadata), + Some(source_refund), + Some(transfer), + ) = ( + self.amount, + self.balance_transaction.take(), + self.created, + self.currency, + self.destination_payment_refund.take(), + self.id.take(), + self.metadata.take(), + self.source_refund.take(), + self.transfer.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - balance_transaction: self.balance_transaction.take()?, - created: self.created?, - currency: self.currency?, - destination_payment_refund: self.destination_payment_refund.take()?, - id: self.id.take()?, - metadata: self.metadata.take()?, - source_refund: self.source_refund.take()?, - transfer: self.transfer.take()?, + amount, + balance_transaction, + created, + currency, + destination_payment_refund, + id, + metadata, + source_refund, + transfer, }) } } @@ -153,19 +182,17 @@ const _: () = { let mut b = TransferReversalBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "balance_transaction" => { - b.balance_transaction = Some(FromValueOpt::from_value(v)?) - } - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "balance_transaction" => b.balance_transaction = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), "destination_payment_refund" => { - b.destination_payment_refund = Some(FromValueOpt::from_value(v)?) + b.destination_payment_refund = FromValueOpt::from_value(v) } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "source_refund" => b.source_refund = Some(FromValueOpt::from_value(v)?), - "transfer" => b.transfer = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "source_refund" => b.source_refund = FromValueOpt::from_value(v), + "transfer" => b.transfer = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/transfer_schedule.rs b/generated/async-stripe-shared/src/transfer_schedule.rs index 74b4502fa..5c017dd6e 100644 --- a/generated/async-stripe-shared/src/transfer_schedule.rs +++ b/generated/async-stripe-shared/src/transfer_schedule.rs @@ -23,7 +23,12 @@ pub struct TransferScheduleBuilder { weekly_anchor: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -76,12 +81,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - delay_days: self.delay_days?, - interval: self.interval.take()?, - monthly_anchor: self.monthly_anchor?, - weekly_anchor: self.weekly_anchor.take()?, - }) + let (Some(delay_days), Some(interval), Some(monthly_anchor), Some(weekly_anchor)) = ( + self.delay_days, + self.interval.take(), + self.monthly_anchor, + self.weekly_anchor.take(), + ) else { + return None; + }; + Some(Self::Out { delay_days, interval, monthly_anchor, weekly_anchor }) } } @@ -108,10 +116,10 @@ const _: () = { let mut b = TransferScheduleBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "delay_days" => b.delay_days = Some(FromValueOpt::from_value(v)?), - "interval" => b.interval = Some(FromValueOpt::from_value(v)?), - "monthly_anchor" => b.monthly_anchor = Some(FromValueOpt::from_value(v)?), - "weekly_anchor" => b.weekly_anchor = Some(FromValueOpt::from_value(v)?), + "delay_days" => b.delay_days = FromValueOpt::from_value(v), + "interval" => b.interval = FromValueOpt::from_value(v), + "monthly_anchor" => b.monthly_anchor = FromValueOpt::from_value(v), + "weekly_anchor" => b.weekly_anchor = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/transform_quantity.rs b/generated/async-stripe-shared/src/transform_quantity.rs index 0fe2f9d20..c4617f9f5 100644 --- a/generated/async-stripe-shared/src/transform_quantity.rs +++ b/generated/async-stripe-shared/src/transform_quantity.rs @@ -13,7 +13,12 @@ pub struct TransformQuantityBuilder { round: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { divide_by: self.divide_by?, round: self.round? }) + let (Some(divide_by), Some(round)) = (self.divide_by, self.round) else { + return None; + }; + Some(Self::Out { divide_by, round }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = TransformQuantityBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "divide_by" => b.divide_by = Some(FromValueOpt::from_value(v)?), - "round" => b.round = Some(FromValueOpt::from_value(v)?), + "divide_by" => b.divide_by = FromValueOpt::from_value(v), + "round" => b.round = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/transform_usage.rs b/generated/async-stripe-shared/src/transform_usage.rs index 5e31d158e..60783c422 100644 --- a/generated/async-stripe-shared/src/transform_usage.rs +++ b/generated/async-stripe-shared/src/transform_usage.rs @@ -13,7 +13,12 @@ pub struct TransformUsageBuilder { round: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { divide_by: self.divide_by?, round: self.round? }) + let (Some(divide_by), Some(round)) = (self.divide_by, self.round) else { + return None; + }; + Some(Self::Out { divide_by, round }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = TransformUsageBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "divide_by" => b.divide_by = Some(FromValueOpt::from_value(v)?), - "round" => b.round = Some(FromValueOpt::from_value(v)?), + "divide_by" => b.divide_by = FromValueOpt::from_value(v), + "round" => b.round = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/us_bank_account_networks.rs b/generated/async-stripe-shared/src/us_bank_account_networks.rs index 8247bb940..5c7375a6e 100644 --- a/generated/async-stripe-shared/src/us_bank_account_networks.rs +++ b/generated/async-stripe-shared/src/us_bank_account_networks.rs @@ -13,7 +13,12 @@ pub struct UsBankAccountNetworksBuilder { supported: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { preferred: self.preferred.take()?, supported: self.supported.take()? }) + let (Some(preferred), Some(supported)) = (self.preferred.take(), self.supported.take()) + else { + return None; + }; + Some(Self::Out { preferred, supported }) } } @@ -86,8 +95,8 @@ const _: () = { let mut b = UsBankAccountNetworksBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "preferred" => b.preferred = Some(FromValueOpt::from_value(v)?), - "supported" => b.supported = Some(FromValueOpt::from_value(v)?), + "preferred" => b.preferred = FromValueOpt::from_value(v), + "supported" => b.supported = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-shared/src/usage_record_summary.rs b/generated/async-stripe-shared/src/usage_record_summary.rs index 50ba33530..1b80d9b9d 100644 --- a/generated/async-stripe-shared/src/usage_record_summary.rs +++ b/generated/async-stripe-shared/src/usage_record_summary.rs @@ -23,7 +23,12 @@ pub struct UsageRecordSummaryBuilder { total_usage: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -80,14 +85,25 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - id: self.id.take()?, - invoice: self.invoice.take()?, - livemode: self.livemode?, - period: self.period?, - subscription_item: self.subscription_item.take()?, - total_usage: self.total_usage?, - }) + let ( + Some(id), + Some(invoice), + Some(livemode), + Some(period), + Some(subscription_item), + Some(total_usage), + ) = ( + self.id.take(), + self.invoice.take(), + self.livemode, + self.period, + self.subscription_item.take(), + self.total_usage, + ) + else { + return None; + }; + Some(Self::Out { id, invoice, livemode, period, subscription_item, total_usage }) } } @@ -114,12 +130,12 @@ const _: () = { let mut b = UsageRecordSummaryBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "invoice" => b.invoice = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "period" => b.period = Some(FromValueOpt::from_value(v)?), - "subscription_item" => b.subscription_item = Some(FromValueOpt::from_value(v)?), - "total_usage" => b.total_usage = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "invoice" => b.invoice = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "period" => b.period = FromValueOpt::from_value(v), + "subscription_item" => b.subscription_item = FromValueOpt::from_value(v), + "total_usage" => b.total_usage = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/deleted_terminal_configuration.rs b/generated/async-stripe-terminal/src/deleted_terminal_configuration.rs index 29b8745ff..a72aba8f1 100644 --- a/generated/async-stripe-terminal/src/deleted_terminal_configuration.rs +++ b/generated/async-stripe-terminal/src/deleted_terminal_configuration.rs @@ -12,7 +12,12 @@ pub struct DeletedTerminalConfigurationBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedTerminalConfigurationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/deleted_terminal_location.rs b/generated/async-stripe-terminal/src/deleted_terminal_location.rs index 0e0c61dca..9bd6de5b3 100644 --- a/generated/async-stripe-terminal/src/deleted_terminal_location.rs +++ b/generated/async-stripe-terminal/src/deleted_terminal_location.rs @@ -12,7 +12,12 @@ pub struct DeletedTerminalLocationBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedTerminalLocationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/deleted_terminal_reader.rs b/generated/async-stripe-terminal/src/deleted_terminal_reader.rs index 494f3a098..52aab6cc1 100644 --- a/generated/async-stripe-terminal/src/deleted_terminal_reader.rs +++ b/generated/async-stripe-terminal/src/deleted_terminal_reader.rs @@ -12,7 +12,12 @@ pub struct DeletedTerminalReaderBuilder { id: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deleted: self.deleted?, id: self.id.take()? }) + let (Some(deleted), Some(id)) = (self.deleted, self.id.take()) else { + return None; + }; + Some(Self::Out { deleted, id }) } } @@ -85,8 +93,8 @@ const _: () = { let mut b = DeletedTerminalReaderBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deleted" => b.deleted = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "deleted" => b.deleted = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_configuration/types.rs b/generated/async-stripe-terminal/src/terminal_configuration/types.rs index 8d31e863f..61e7098cc 100644 --- a/generated/async-stripe-terminal/src/terminal_configuration/types.rs +++ b/generated/async-stripe-terminal/src/terminal_configuration/types.rs @@ -36,7 +36,12 @@ pub struct TerminalConfigurationBuilder { >, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -97,15 +102,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(bbpos_wisepos_e), + Some(id), + Some(is_account_default), + Some(livemode), + Some(name), + Some(offline), + Some(tipping), + Some(verifone_p400), + ) = ( + self.bbpos_wisepos_e.take(), + self.id.take(), + self.is_account_default, + self.livemode, + self.name.take(), + self.offline, + self.tipping.take(), + self.verifone_p400.take(), + ) + else { + return None; + }; Some(Self::Out { - bbpos_wisepos_e: self.bbpos_wisepos_e.take()?, - id: self.id.take()?, - is_account_default: self.is_account_default?, - livemode: self.livemode?, - name: self.name.take()?, - offline: self.offline?, - tipping: self.tipping.take()?, - verifone_p400: self.verifone_p400.take()?, + bbpos_wisepos_e, + id, + is_account_default, + livemode, + name, + offline, + tipping, + verifone_p400, }) } } @@ -133,16 +160,14 @@ const _: () = { let mut b = TerminalConfigurationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bbpos_wisepos_e" => b.bbpos_wisepos_e = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "is_account_default" => { - b.is_account_default = Some(FromValueOpt::from_value(v)?) - } - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), - "offline" => b.offline = Some(FromValueOpt::from_value(v)?), - "tipping" => b.tipping = Some(FromValueOpt::from_value(v)?), - "verifone_p400" => b.verifone_p400 = Some(FromValueOpt::from_value(v)?), + "bbpos_wisepos_e" => b.bbpos_wisepos_e = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "is_account_default" => b.is_account_default = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), + "offline" => b.offline = FromValueOpt::from_value(v), + "tipping" => b.tipping = FromValueOpt::from_value(v), + "verifone_p400" => b.verifone_p400 = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_currency_specific_config.rs b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_currency_specific_config.rs index 60f03e4d6..5da10d4ec 100644 --- a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_currency_specific_config.rs +++ b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_currency_specific_config.rs @@ -16,7 +16,12 @@ pub struct TerminalConfigurationConfigurationResourceCurrencySpecificConfigBuild smart_tip_threshold: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - fixed_amounts: self.fixed_amounts.take()?, - percentages: self.percentages.take()?, - smart_tip_threshold: self.smart_tip_threshold?, - }) + let (Some(fixed_amounts), Some(percentages), Some(smart_tip_threshold)) = + (self.fixed_amounts.take(), self.percentages.take(), self.smart_tip_threshold) + else { + return None; + }; + Some(Self::Out { fixed_amounts, percentages, smart_tip_threshold }) } } @@ -98,11 +104,9 @@ const _: () = { let mut b = TerminalConfigurationConfigurationResourceCurrencySpecificConfigBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "fixed_amounts" => b.fixed_amounts = Some(FromValueOpt::from_value(v)?), - "percentages" => b.percentages = Some(FromValueOpt::from_value(v)?), - "smart_tip_threshold" => { - b.smart_tip_threshold = Some(FromValueOpt::from_value(v)?) - } + "fixed_amounts" => b.fixed_amounts = FromValueOpt::from_value(v), + "percentages" => b.percentages = FromValueOpt::from_value(v), + "smart_tip_threshold" => b.smart_tip_threshold = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_device_type_specific_config.rs b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_device_type_specific_config.rs index ac9e050a8..2680209f9 100644 --- a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_device_type_specific_config.rs +++ b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_device_type_specific_config.rs @@ -10,7 +10,12 @@ pub struct TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigBui splashscreen: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { splashscreen: self.splashscreen.take()? }) + let (Some(splashscreen),) = (self.splashscreen.take(),) else { + return None; + }; + Some(Self::Out { splashscreen }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "splashscreen" => b.splashscreen = Some(FromValueOpt::from_value(v)?), + "splashscreen" => b.splashscreen = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_offline_config.rs b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_offline_config.rs index 8204a0d5b..9a319cf51 100644 --- a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_offline_config.rs +++ b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_offline_config.rs @@ -11,7 +11,12 @@ pub struct TerminalConfigurationConfigurationResourceOfflineConfigBuilder { enabled: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -57,7 +62,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enabled: self.enabled? }) + let (Some(enabled),) = (self.enabled,) else { + return None; + }; + Some(Self::Out { enabled }) } } @@ -85,7 +93,7 @@ const _: () = { TerminalConfigurationConfigurationResourceOfflineConfigBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "enabled" => b.enabled = Some(FromValueOpt::from_value(v)?), + "enabled" => b.enabled = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_tipping.rs b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_tipping.rs index eca407953..68f864a6a 100644 --- a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_tipping.rs +++ b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_tipping.rs @@ -77,7 +77,12 @@ pub struct TerminalConfigurationConfigurationResourceTippingBuilder { >, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -150,22 +155,41 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - aud: self.aud.take()?, - cad: self.cad.take()?, - chf: self.chf.take()?, - czk: self.czk.take()?, - dkk: self.dkk.take()?, - eur: self.eur.take()?, - gbp: self.gbp.take()?, - hkd: self.hkd.take()?, - myr: self.myr.take()?, - nok: self.nok.take()?, - nzd: self.nzd.take()?, - sek: self.sek.take()?, - sgd: self.sgd.take()?, - usd: self.usd.take()?, - }) + let ( + Some(aud), + Some(cad), + Some(chf), + Some(czk), + Some(dkk), + Some(eur), + Some(gbp), + Some(hkd), + Some(myr), + Some(nok), + Some(nzd), + Some(sek), + Some(sgd), + Some(usd), + ) = ( + self.aud.take(), + self.cad.take(), + self.chf.take(), + self.czk.take(), + self.dkk.take(), + self.eur.take(), + self.gbp.take(), + self.hkd.take(), + self.myr.take(), + self.nok.take(), + self.nzd.take(), + self.sek.take(), + self.sgd.take(), + self.usd.take(), + ) + else { + return None; + }; + Some(Self::Out { aud, cad, chf, czk, dkk, eur, gbp, hkd, myr, nok, nzd, sek, sgd, usd }) } } @@ -192,20 +216,20 @@ const _: () = { let mut b = TerminalConfigurationConfigurationResourceTippingBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "aud" => b.aud = Some(FromValueOpt::from_value(v)?), - "cad" => b.cad = Some(FromValueOpt::from_value(v)?), - "chf" => b.chf = Some(FromValueOpt::from_value(v)?), - "czk" => b.czk = Some(FromValueOpt::from_value(v)?), - "dkk" => b.dkk = Some(FromValueOpt::from_value(v)?), - "eur" => b.eur = Some(FromValueOpt::from_value(v)?), - "gbp" => b.gbp = Some(FromValueOpt::from_value(v)?), - "hkd" => b.hkd = Some(FromValueOpt::from_value(v)?), - "myr" => b.myr = Some(FromValueOpt::from_value(v)?), - "nok" => b.nok = Some(FromValueOpt::from_value(v)?), - "nzd" => b.nzd = Some(FromValueOpt::from_value(v)?), - "sek" => b.sek = Some(FromValueOpt::from_value(v)?), - "sgd" => b.sgd = Some(FromValueOpt::from_value(v)?), - "usd" => b.usd = Some(FromValueOpt::from_value(v)?), + "aud" => b.aud = FromValueOpt::from_value(v), + "cad" => b.cad = FromValueOpt::from_value(v), + "chf" => b.chf = FromValueOpt::from_value(v), + "czk" => b.czk = FromValueOpt::from_value(v), + "dkk" => b.dkk = FromValueOpt::from_value(v), + "eur" => b.eur = FromValueOpt::from_value(v), + "gbp" => b.gbp = FromValueOpt::from_value(v), + "hkd" => b.hkd = FromValueOpt::from_value(v), + "myr" => b.myr = FromValueOpt::from_value(v), + "nok" => b.nok = FromValueOpt::from_value(v), + "nzd" => b.nzd = FromValueOpt::from_value(v), + "sek" => b.sek = FromValueOpt::from_value(v), + "sgd" => b.sgd = FromValueOpt::from_value(v), + "usd" => b.usd = FromValueOpt::from_value(v), _ => {} } 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..019cf6b60 100644 --- a/generated/async-stripe-terminal/src/terminal_connection_token/types.rs +++ b/generated/async-stripe-terminal/src/terminal_connection_token/types.rs @@ -19,7 +19,12 @@ pub struct TerminalConnectionTokenBuilder { secret: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -65,7 +70,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { location: self.location.take()?, secret: self.secret.take()? }) + let (Some(location), Some(secret)) = (self.location.take(), self.secret.take()) else { + return None; + }; + Some(Self::Out { location, secret }) } } @@ -92,8 +100,8 @@ const _: () = { let mut b = TerminalConnectionTokenBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "location" => b.location = Some(FromValueOpt::from_value(v)?), - "secret" => b.secret = Some(FromValueOpt::from_value(v)?), + "location" => b.location = FromValueOpt::from_value(v), + "secret" => b.secret = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_location/types.rs b/generated/async-stripe-terminal/src/terminal_location/types.rs index 6876656e4..d253e8cbc 100644 --- a/generated/async-stripe-terminal/src/terminal_location/types.rs +++ b/generated/async-stripe-terminal/src/terminal_location/types.rs @@ -29,7 +29,12 @@ pub struct TerminalLocationBuilder { metadata: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -86,13 +91,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(address), + Some(configuration_overrides), + Some(display_name), + Some(id), + Some(livemode), + Some(metadata), + ) = ( + self.address.take(), + self.configuration_overrides.take(), + self.display_name.take(), + self.id.take(), + self.livemode, + self.metadata.take(), + ) + else { + return None; + }; Some(Self::Out { - address: self.address.take()?, - configuration_overrides: self.configuration_overrides.take()?, - display_name: self.display_name.take()?, - id: self.id.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, + address, + configuration_overrides, + display_name, + id, + livemode, + metadata, }) } } @@ -120,14 +143,14 @@ const _: () = { let mut b = TerminalLocationBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), "configuration_overrides" => { - b.configuration_overrides = Some(FromValueOpt::from_value(v)?) + b.configuration_overrides = FromValueOpt::from_value(v) } - "display_name" => b.display_name = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), + "display_name" => b.display_name = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_reader/types.rs b/generated/async-stripe-terminal/src/terminal_reader/types.rs index 824fecc19..fa5d2227a 100644 --- a/generated/async-stripe-terminal/src/terminal_reader/types.rs +++ b/generated/async-stripe-terminal/src/terminal_reader/types.rs @@ -45,7 +45,12 @@ pub struct TerminalReaderBuilder { status: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -112,18 +117,46 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(action), + Some(device_sw_version), + Some(device_type), + Some(id), + Some(ip_address), + Some(label), + Some(livemode), + Some(location), + Some(metadata), + Some(serial_number), + Some(status), + ) = ( + self.action.take(), + self.device_sw_version.take(), + self.device_type, + self.id.take(), + self.ip_address.take(), + self.label.take(), + self.livemode, + self.location.take(), + self.metadata.take(), + self.serial_number.take(), + self.status, + ) + else { + return None; + }; Some(Self::Out { - action: self.action.take()?, - device_sw_version: self.device_sw_version.take()?, - device_type: self.device_type?, - id: self.id.take()?, - ip_address: self.ip_address.take()?, - label: self.label.take()?, - livemode: self.livemode?, - location: self.location.take()?, - metadata: self.metadata.take()?, - serial_number: self.serial_number.take()?, - status: self.status?, + action, + device_sw_version, + device_type, + id, + ip_address, + label, + livemode, + location, + metadata, + serial_number, + status, }) } } @@ -151,17 +184,17 @@ const _: () = { let mut b = TerminalReaderBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "action" => b.action = Some(FromValueOpt::from_value(v)?), - "device_sw_version" => b.device_sw_version = Some(FromValueOpt::from_value(v)?), - "device_type" => b.device_type = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "ip_address" => b.ip_address = Some(FromValueOpt::from_value(v)?), - "label" => b.label = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "location" => b.location = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "serial_number" => b.serial_number = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), + "action" => b.action = FromValueOpt::from_value(v), + "device_sw_version" => b.device_sw_version = FromValueOpt::from_value(v), + "device_type" => b.device_type = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "ip_address" => b.ip_address = FromValueOpt::from_value(v), + "label" => b.label = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "location" => b.location = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "serial_number" => b.serial_number = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_cart.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_cart.rs index 43317394e..3035b0242 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_cart.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_cart.rs @@ -23,7 +23,12 @@ pub struct TerminalReaderReaderResourceCartBuilder { total: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -76,12 +81,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - currency: self.currency?, - line_items: self.line_items.take()?, - tax: self.tax?, - total: self.total?, - }) + let (Some(currency), Some(line_items), Some(tax), Some(total)) = + (self.currency, self.line_items.take(), self.tax, self.total) + else { + return None; + }; + Some(Self::Out { currency, line_items, tax, total }) } } @@ -108,10 +113,10 @@ const _: () = { let mut b = TerminalReaderReaderResourceCartBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "line_items" => b.line_items = Some(FromValueOpt::from_value(v)?), - "tax" => b.tax = Some(FromValueOpt::from_value(v)?), - "total" => b.total = Some(FromValueOpt::from_value(v)?), + "currency" => b.currency = FromValueOpt::from_value(v), + "line_items" => b.line_items = FromValueOpt::from_value(v), + "tax" => b.tax = FromValueOpt::from_value(v), + "total" => b.total = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_line_item.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_line_item.rs index df42a0e12..dc6521717 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_line_item.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_line_item.rs @@ -18,7 +18,12 @@ pub struct TerminalReaderReaderResourceLineItemBuilder { quantity: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - amount: self.amount?, - description: self.description.take()?, - quantity: self.quantity?, - }) + let (Some(amount), Some(description), Some(quantity)) = + (self.amount, self.description.take(), self.quantity) + else { + return None; + }; + Some(Self::Out { amount, description, quantity }) } } @@ -100,9 +106,9 @@ const _: () = { let mut b = TerminalReaderReaderResourceLineItemBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "quantity" => b.quantity = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "quantity" => b.quantity = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_config.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_config.rs index 705720c87..d8ea1ee2e 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_config.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_config.rs @@ -16,7 +16,12 @@ pub struct TerminalReaderReaderResourceProcessConfigBuilder { tipping: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - enable_customer_cancellation: self.enable_customer_cancellation?, - skip_tipping: self.skip_tipping?, - tipping: self.tipping?, - }) + let (Some(enable_customer_cancellation), Some(skip_tipping), Some(tipping)) = + (self.enable_customer_cancellation, self.skip_tipping, self.tipping) + else { + return None; + }; + Some(Self::Out { enable_customer_cancellation, skip_tipping, tipping }) } } @@ -101,10 +107,10 @@ const _: () = { for (k, v) in obj { match k.as_str() { "enable_customer_cancellation" => { - b.enable_customer_cancellation = Some(FromValueOpt::from_value(v)?) + b.enable_customer_cancellation = FromValueOpt::from_value(v) } - "skip_tipping" => b.skip_tipping = Some(FromValueOpt::from_value(v)?), - "tipping" => b.tipping = Some(FromValueOpt::from_value(v)?), + "skip_tipping" => b.skip_tipping = FromValueOpt::from_value(v), + "tipping" => b.tipping = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_payment_intent_action.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_payment_intent_action.rs index 276455ba1..ace4d252e 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_payment_intent_action.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_payment_intent_action.rs @@ -13,7 +13,12 @@ pub struct TerminalReaderReaderResourceProcessPaymentIntentActionBuilder { process_config: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,10 +65,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - payment_intent: self.payment_intent.take()?, - process_config: self.process_config?, - }) + let (Some(payment_intent), Some(process_config)) = + (self.payment_intent.take(), self.process_config) + else { + return None; + }; + Some(Self::Out { payment_intent, process_config }) } } @@ -91,8 +98,8 @@ const _: () = { TerminalReaderReaderResourceProcessPaymentIntentActionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "payment_intent" => b.payment_intent = Some(FromValueOpt::from_value(v)?), - "process_config" => b.process_config = Some(FromValueOpt::from_value(v)?), + "payment_intent" => b.payment_intent = FromValueOpt::from_value(v), + "process_config" => b.process_config = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_config.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_config.rs index 347f89420..619de4526 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_config.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_config.rs @@ -11,7 +11,12 @@ pub struct TerminalReaderReaderResourceProcessSetupConfigBuilder { enable_customer_cancellation: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enable_customer_cancellation: self.enable_customer_cancellation? }) + let (Some(enable_customer_cancellation),) = (self.enable_customer_cancellation,) else { + return None; + }; + Some(Self::Out { enable_customer_cancellation }) } } @@ -86,7 +94,7 @@ const _: () = { for (k, v) in obj { match k.as_str() { "enable_customer_cancellation" => { - b.enable_customer_cancellation = Some(FromValueOpt::from_value(v)?) + b.enable_customer_cancellation = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_intent_action.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_intent_action.rs index 4e01ae96c..d3fbd488c 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_intent_action.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_intent_action.rs @@ -17,7 +17,12 @@ pub struct TerminalReaderReaderResourceProcessSetupIntentActionBuilder { setup_intent: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -69,11 +74,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - generated_card: self.generated_card.take()?, - process_config: self.process_config?, - setup_intent: self.setup_intent.take()?, - }) + let (Some(generated_card), Some(process_config), Some(setup_intent)) = + (self.generated_card.take(), self.process_config, self.setup_intent.take()) + else { + return None; + }; + Some(Self::Out { generated_card, process_config, setup_intent }) } } @@ -101,9 +107,9 @@ const _: () = { TerminalReaderReaderResourceProcessSetupIntentActionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "generated_card" => b.generated_card = Some(FromValueOpt::from_value(v)?), - "process_config" => b.process_config = Some(FromValueOpt::from_value(v)?), - "setup_intent" => b.setup_intent = Some(FromValueOpt::from_value(v)?), + "generated_card" => b.generated_card = FromValueOpt::from_value(v), + "process_config" => b.process_config = FromValueOpt::from_value(v), + "setup_intent" => b.setup_intent = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_reader_action.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_reader_action.rs index 5d5469b28..713b4e7aa 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_reader_action.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_reader_action.rs @@ -36,7 +36,12 @@ pub struct TerminalReaderReaderResourceReaderActionBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -97,15 +102,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(failure_code), + Some(failure_message), + Some(process_payment_intent), + Some(process_setup_intent), + Some(refund_payment), + Some(set_reader_display), + Some(status), + Some(type_), + ) = ( + self.failure_code.take(), + self.failure_message.take(), + self.process_payment_intent.take(), + self.process_setup_intent.take(), + self.refund_payment.take(), + self.set_reader_display.take(), + self.status, + self.type_, + ) + else { + return None; + }; Some(Self::Out { - failure_code: self.failure_code.take()?, - failure_message: self.failure_message.take()?, - process_payment_intent: self.process_payment_intent.take()?, - process_setup_intent: self.process_setup_intent.take()?, - refund_payment: self.refund_payment.take()?, - set_reader_display: self.set_reader_display.take()?, - status: self.status?, - type_: self.type_?, + failure_code, + failure_message, + process_payment_intent, + process_setup_intent, + refund_payment, + set_reader_display, + status, + type_, }) } } @@ -133,20 +160,16 @@ const _: () = { let mut b = TerminalReaderReaderResourceReaderActionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "failure_code" => b.failure_code = Some(FromValueOpt::from_value(v)?), - "failure_message" => b.failure_message = Some(FromValueOpt::from_value(v)?), + "failure_code" => b.failure_code = FromValueOpt::from_value(v), + "failure_message" => b.failure_message = FromValueOpt::from_value(v), "process_payment_intent" => { - b.process_payment_intent = Some(FromValueOpt::from_value(v)?) - } - "process_setup_intent" => { - b.process_setup_intent = Some(FromValueOpt::from_value(v)?) - } - "refund_payment" => b.refund_payment = Some(FromValueOpt::from_value(v)?), - "set_reader_display" => { - b.set_reader_display = Some(FromValueOpt::from_value(v)?) + b.process_payment_intent = FromValueOpt::from_value(v) } - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "process_setup_intent" => b.process_setup_intent = FromValueOpt::from_value(v), + "refund_payment" => b.refund_payment = FromValueOpt::from_value(v), + "set_reader_display" => b.set_reader_display = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_action.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_action.rs index bcf110292..e899a96ee 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_action.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_action.rs @@ -42,7 +42,12 @@ pub struct TerminalReaderReaderResourceRefundPaymentActionBuilder { reverse_transfer: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -105,16 +110,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(charge), + Some(metadata), + Some(payment_intent), + Some(reason), + Some(refund), + Some(refund_application_fee), + Some(refund_payment_config), + Some(reverse_transfer), + ) = ( + self.amount, + self.charge.take(), + self.metadata.take(), + self.payment_intent.take(), + self.reason, + self.refund.take(), + self.refund_application_fee, + self.refund_payment_config, + self.reverse_transfer, + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - charge: self.charge.take()?, - metadata: self.metadata.take()?, - payment_intent: self.payment_intent.take()?, - reason: self.reason?, - refund: self.refund.take()?, - refund_application_fee: self.refund_application_fee?, - refund_payment_config: self.refund_payment_config?, - reverse_transfer: self.reverse_transfer?, + amount, + charge, + metadata, + payment_intent, + reason, + refund, + refund_application_fee, + refund_payment_config, + reverse_transfer, }) } } @@ -142,19 +171,19 @@ const _: () = { let mut b = TerminalReaderReaderResourceRefundPaymentActionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "charge" => b.charge = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "payment_intent" => b.payment_intent = Some(FromValueOpt::from_value(v)?), - "reason" => b.reason = Some(FromValueOpt::from_value(v)?), - "refund" => b.refund = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "charge" => b.charge = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "payment_intent" => b.payment_intent = FromValueOpt::from_value(v), + "reason" => b.reason = FromValueOpt::from_value(v), + "refund" => b.refund = FromValueOpt::from_value(v), "refund_application_fee" => { - b.refund_application_fee = Some(FromValueOpt::from_value(v)?) + b.refund_application_fee = FromValueOpt::from_value(v) } "refund_payment_config" => { - b.refund_payment_config = Some(FromValueOpt::from_value(v)?) + b.refund_payment_config = FromValueOpt::from_value(v) } - "reverse_transfer" => b.reverse_transfer = Some(FromValueOpt::from_value(v)?), + "reverse_transfer" => b.reverse_transfer = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_config.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_config.rs index 79ddffc12..ccc74e468 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_config.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_config.rs @@ -11,7 +11,12 @@ pub struct TerminalReaderReaderResourceRefundPaymentConfigBuilder { enable_customer_cancellation: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -58,7 +63,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { enable_customer_cancellation: self.enable_customer_cancellation? }) + let (Some(enable_customer_cancellation),) = (self.enable_customer_cancellation,) else { + return None; + }; + Some(Self::Out { enable_customer_cancellation }) } } @@ -86,7 +94,7 @@ const _: () = { for (k, v) in obj { match k.as_str() { "enable_customer_cancellation" => { - b.enable_customer_cancellation = Some(FromValueOpt::from_value(v)?) + b.enable_customer_cancellation = FromValueOpt::from_value(v) } _ => {} diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_set_reader_display_action.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_set_reader_display_action.rs index 18e936561..0acdde1da 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_set_reader_display_action.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_set_reader_display_action.rs @@ -15,7 +15,12 @@ pub struct TerminalReaderReaderResourceSetReaderDisplayActionBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -61,7 +66,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { cart: self.cart.take()?, type_: self.type_? }) + let (Some(cart), Some(type_)) = (self.cart.take(), self.type_) else { + return None; + }; + Some(Self::Out { cart, type_ }) } } @@ -88,8 +96,8 @@ const _: () = { let mut b = TerminalReaderReaderResourceSetReaderDisplayActionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "cart" => b.cart = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "cart" => b.cart = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_tipping_config.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_tipping_config.rs index 9df0d773d..37833aa10 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_tipping_config.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_tipping_config.rs @@ -12,7 +12,12 @@ pub struct TerminalReaderReaderResourceTippingConfigBuilder { amount_eligible: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -57,7 +62,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { amount_eligible: self.amount_eligible? }) + let (Some(amount_eligible),) = (self.amount_eligible,) else { + return None; + }; + Some(Self::Out { amount_eligible }) } } @@ -84,7 +92,7 @@ const _: () = { let mut b = TerminalReaderReaderResourceTippingConfigBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount_eligible" => b.amount_eligible = Some(FromValueOpt::from_value(v)?), + "amount_eligible" => b.amount_eligible = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/inbound_transfers.rs b/generated/async-stripe-treasury/src/inbound_transfers.rs index 06cfd3769..46be79d03 100644 --- a/generated/async-stripe-treasury/src/inbound_transfers.rs +++ b/generated/async-stripe-treasury/src/inbound_transfers.rs @@ -17,7 +17,12 @@ pub struct InboundTransfersBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - billing_details: self.billing_details.take()?, - type_: self.type_?, - us_bank_account: self.us_bank_account.take()?, - }) + let (Some(billing_details), Some(type_), Some(us_bank_account)) = + (self.billing_details.take(), self.type_, self.us_bank_account.take()) + else { + return None; + }; + Some(Self::Out { billing_details, type_, us_bank_account }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = InboundTransfersBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "billing_details" => b.billing_details = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "us_bank_account" => b.us_bank_account = Some(FromValueOpt::from_value(v)?), + "billing_details" => b.billing_details = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "us_bank_account" => b.us_bank_account = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/inbound_transfers_payment_method_details_us_bank_account.rs b/generated/async-stripe-treasury/src/inbound_transfers_payment_method_details_us_bank_account.rs index 6548fa370..e0ae8474c 100644 --- a/generated/async-stripe-treasury/src/inbound_transfers_payment_method_details_us_bank_account.rs +++ b/generated/async-stripe-treasury/src/inbound_transfers_payment_method_details_us_bank_account.rs @@ -35,7 +35,12 @@ pub struct InboundTransfersPaymentMethodDetailsUsBankAccountBuilder { routing_number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -96,15 +101,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_holder_type), + Some(account_type), + Some(bank_name), + Some(fingerprint), + Some(last4), + Some(mandate), + Some(network), + Some(routing_number), + ) = ( + self.account_holder_type, + self.account_type, + self.bank_name.take(), + self.fingerprint.take(), + self.last4.take(), + self.mandate.take(), + self.network, + self.routing_number.take(), + ) + else { + return None; + }; Some(Self::Out { - account_holder_type: self.account_holder_type?, - account_type: self.account_type?, - bank_name: self.bank_name.take()?, - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - mandate: self.mandate.take()?, - network: self.network?, - routing_number: self.routing_number.take()?, + account_holder_type, + account_type, + bank_name, + fingerprint, + last4, + mandate, + network, + routing_number, }) } } @@ -132,16 +159,14 @@ const _: () = { let mut b = InboundTransfersPaymentMethodDetailsUsBankAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_holder_type" => { - b.account_holder_type = Some(FromValueOpt::from_value(v)?) - } - "account_type" => b.account_type = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "mandate" => b.mandate = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), - "routing_number" => b.routing_number = Some(FromValueOpt::from_value(v)?), + "account_holder_type" => b.account_holder_type = FromValueOpt::from_value(v), + "account_type" => b.account_type = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "mandate" => b.mandate = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), + "routing_number" => b.routing_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/outbound_payments_payment_method_details.rs b/generated/async-stripe-treasury/src/outbound_payments_payment_method_details.rs index 5dcbf34fd..ace03ebe2 100644 --- a/generated/async-stripe-treasury/src/outbound_payments_payment_method_details.rs +++ b/generated/async-stripe-treasury/src/outbound_payments_payment_method_details.rs @@ -20,7 +20,12 @@ pub struct OutboundPaymentsPaymentMethodDetailsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -73,12 +78,21 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - billing_details: self.billing_details.take()?, - financial_account: self.financial_account.take()?, - type_: self.type_?, - us_bank_account: self.us_bank_account.take()?, - }) + let ( + Some(billing_details), + Some(financial_account), + Some(type_), + Some(us_bank_account), + ) = ( + self.billing_details.take(), + self.financial_account.take(), + self.type_, + self.us_bank_account.take(), + ) + else { + return None; + }; + Some(Self::Out { billing_details, financial_account, type_, us_bank_account }) } } @@ -105,10 +119,10 @@ const _: () = { let mut b = OutboundPaymentsPaymentMethodDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "billing_details" => b.billing_details = Some(FromValueOpt::from_value(v)?), - "financial_account" => b.financial_account = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "us_bank_account" => b.us_bank_account = Some(FromValueOpt::from_value(v)?), + "billing_details" => b.billing_details = FromValueOpt::from_value(v), + "financial_account" => b.financial_account = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "us_bank_account" => b.us_bank_account = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_financial_account.rs b/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_financial_account.rs index d4c81156e..95009f162 100644 --- a/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_financial_account.rs +++ b/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_financial_account.rs @@ -13,7 +13,12 @@ pub struct OutboundPaymentsPaymentMethodDetailsFinancialAccountBuilder { network: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { id: self.id.take()?, network: self.network? }) + let (Some(id), Some(network)) = (self.id.take(), self.network) else { + return None; + }; + Some(Self::Out { id, network }) } } @@ -88,8 +96,8 @@ const _: () = { OutboundPaymentsPaymentMethodDetailsFinancialAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_us_bank_account.rs b/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_us_bank_account.rs index 7dc10ffaf..ab11370db 100644 --- a/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_us_bank_account.rs +++ b/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_us_bank_account.rs @@ -35,7 +35,12 @@ pub struct OutboundPaymentsPaymentMethodDetailsUsBankAccountBuilder { routing_number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -96,15 +101,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_holder_type), + Some(account_type), + Some(bank_name), + Some(fingerprint), + Some(last4), + Some(mandate), + Some(network), + Some(routing_number), + ) = ( + self.account_holder_type, + self.account_type, + self.bank_name.take(), + self.fingerprint.take(), + self.last4.take(), + self.mandate.take(), + self.network, + self.routing_number.take(), + ) + else { + return None; + }; Some(Self::Out { - account_holder_type: self.account_holder_type?, - account_type: self.account_type?, - bank_name: self.bank_name.take()?, - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - mandate: self.mandate.take()?, - network: self.network?, - routing_number: self.routing_number.take()?, + account_holder_type, + account_type, + bank_name, + fingerprint, + last4, + mandate, + network, + routing_number, }) } } @@ -132,16 +159,14 @@ const _: () = { let mut b = OutboundPaymentsPaymentMethodDetailsUsBankAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_holder_type" => { - b.account_holder_type = Some(FromValueOpt::from_value(v)?) - } - "account_type" => b.account_type = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "mandate" => b.mandate = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), - "routing_number" => b.routing_number = Some(FromValueOpt::from_value(v)?), + "account_holder_type" => b.account_holder_type = FromValueOpt::from_value(v), + "account_type" => b.account_type = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "mandate" => b.mandate = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), + "routing_number" => b.routing_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details.rs b/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details.rs index fb2ed237a..fdb62dcee 100644 --- a/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details.rs +++ b/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details.rs @@ -17,7 +17,12 @@ pub struct OutboundTransfersPaymentMethodDetailsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - billing_details: self.billing_details.take()?, - type_: self.type_?, - us_bank_account: self.us_bank_account.take()?, - }) + let (Some(billing_details), Some(type_), Some(us_bank_account)) = + (self.billing_details.take(), self.type_, self.us_bank_account.take()) + else { + return None; + }; + Some(Self::Out { billing_details, type_, us_bank_account }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = OutboundTransfersPaymentMethodDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "billing_details" => b.billing_details = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "us_bank_account" => b.us_bank_account = Some(FromValueOpt::from_value(v)?), + "billing_details" => b.billing_details = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "us_bank_account" => b.us_bank_account = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details_us_bank_account.rs b/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details_us_bank_account.rs index 0a1e98e61..e459b0f7f 100644 --- a/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details_us_bank_account.rs +++ b/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details_us_bank_account.rs @@ -35,7 +35,12 @@ pub struct OutboundTransfersPaymentMethodDetailsUsBankAccountBuilder { routing_number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -96,15 +101,37 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_holder_type), + Some(account_type), + Some(bank_name), + Some(fingerprint), + Some(last4), + Some(mandate), + Some(network), + Some(routing_number), + ) = ( + self.account_holder_type, + self.account_type, + self.bank_name.take(), + self.fingerprint.take(), + self.last4.take(), + self.mandate.take(), + self.network, + self.routing_number.take(), + ) + else { + return None; + }; Some(Self::Out { - account_holder_type: self.account_holder_type?, - account_type: self.account_type?, - bank_name: self.bank_name.take()?, - fingerprint: self.fingerprint.take()?, - last4: self.last4.take()?, - mandate: self.mandate.take()?, - network: self.network?, - routing_number: self.routing_number.take()?, + account_holder_type, + account_type, + bank_name, + fingerprint, + last4, + mandate, + network, + routing_number, }) } } @@ -132,16 +159,14 @@ const _: () = { let mut b = OutboundTransfersPaymentMethodDetailsUsBankAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_holder_type" => { - b.account_holder_type = Some(FromValueOpt::from_value(v)?) - } - "account_type" => b.account_type = Some(FromValueOpt::from_value(v)?), - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "fingerprint" => b.fingerprint = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "mandate" => b.mandate = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), - "routing_number" => b.routing_number = Some(FromValueOpt::from_value(v)?), + "account_holder_type" => b.account_holder_type = FromValueOpt::from_value(v), + "account_type" => b.account_type = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "fingerprint" => b.fingerprint = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "mandate" => b.mandate = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), + "routing_number" => b.routing_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/received_payment_method_details_financial_account.rs b/generated/async-stripe-treasury/src/received_payment_method_details_financial_account.rs index 7fbf9d584..7cc2236f1 100644 --- a/generated/async-stripe-treasury/src/received_payment_method_details_financial_account.rs +++ b/generated/async-stripe-treasury/src/received_payment_method_details_financial_account.rs @@ -13,7 +13,12 @@ pub struct ReceivedPaymentMethodDetailsFinancialAccountBuilder { network: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { id: self.id.take()?, network: self.network? }) + let (Some(id), Some(network)) = (self.id.take(), self.network) else { + return None; + }; + Some(Self::Out { id, network }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = ReceivedPaymentMethodDetailsFinancialAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), _ => {} } 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..24c2f5c4e 100644 --- a/generated/async-stripe-treasury/src/treasury_credit_reversal/types.rs +++ b/generated/async-stripe-treasury/src/treasury_credit_reversal/types.rs @@ -48,7 +48,12 @@ pub struct TreasuryCreditReversalBuilder { transaction: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -121,20 +126,52 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(created), + Some(currency), + Some(financial_account), + Some(hosted_regulatory_receipt_url), + Some(id), + Some(livemode), + Some(metadata), + Some(network), + Some(received_credit), + Some(status), + Some(status_transitions), + Some(transaction), + ) = ( + self.amount, + self.created, + self.currency, + self.financial_account.take(), + self.hosted_regulatory_receipt_url.take(), + self.id.take(), + self.livemode, + self.metadata.take(), + self.network, + self.received_credit.take(), + self.status, + self.status_transitions, + self.transaction.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - created: self.created?, - currency: self.currency?, - financial_account: self.financial_account.take()?, - hosted_regulatory_receipt_url: self.hosted_regulatory_receipt_url.take()?, - id: self.id.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - network: self.network?, - received_credit: self.received_credit.take()?, - status: self.status?, - status_transitions: self.status_transitions?, - transaction: self.transaction.take()?, + amount, + created, + currency, + financial_account, + hosted_regulatory_receipt_url, + id, + livemode, + metadata, + network, + received_credit, + status, + status_transitions, + transaction, }) } } @@ -162,23 +199,21 @@ const _: () = { let mut b = TreasuryCreditReversalBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "financial_account" => b.financial_account = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "financial_account" => b.financial_account = FromValueOpt::from_value(v), "hosted_regulatory_receipt_url" => { - b.hosted_regulatory_receipt_url = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), - "received_credit" => b.received_credit = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_transitions" => { - b.status_transitions = Some(FromValueOpt::from_value(v)?) + b.hosted_regulatory_receipt_url = FromValueOpt::from_value(v) } - "transaction" => b.transaction = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), + "received_credit" => b.received_credit = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "status_transitions" => b.status_transitions = FromValueOpt::from_value(v), + "transaction" => b.transaction = FromValueOpt::from_value(v), _ => {} } 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..d008348a2 100644 --- a/generated/async-stripe-treasury/src/treasury_debit_reversal/types.rs +++ b/generated/async-stripe-treasury/src/treasury_debit_reversal/types.rs @@ -53,7 +53,12 @@ pub struct TreasuryDebitReversalBuilder { transaction: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -128,21 +133,55 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(created), + Some(currency), + Some(financial_account), + Some(hosted_regulatory_receipt_url), + Some(id), + Some(linked_flows), + Some(livemode), + Some(metadata), + Some(network), + Some(received_debit), + Some(status), + Some(status_transitions), + Some(transaction), + ) = ( + self.amount, + self.created, + self.currency, + self.financial_account.take(), + self.hosted_regulatory_receipt_url.take(), + self.id.take(), + self.linked_flows.take(), + self.livemode, + self.metadata.take(), + self.network, + self.received_debit.take(), + self.status, + self.status_transitions, + self.transaction.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - created: self.created?, - currency: self.currency?, - financial_account: self.financial_account.take()?, - hosted_regulatory_receipt_url: self.hosted_regulatory_receipt_url.take()?, - id: self.id.take()?, - linked_flows: self.linked_flows.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - network: self.network?, - received_debit: self.received_debit.take()?, - status: self.status?, - status_transitions: self.status_transitions?, - transaction: self.transaction.take()?, + amount, + created, + currency, + financial_account, + hosted_regulatory_receipt_url, + id, + linked_flows, + livemode, + metadata, + network, + received_debit, + status, + status_transitions, + transaction, }) } } @@ -170,24 +209,22 @@ const _: () = { let mut b = TreasuryDebitReversalBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "financial_account" => b.financial_account = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "financial_account" => b.financial_account = FromValueOpt::from_value(v), "hosted_regulatory_receipt_url" => { - b.hosted_regulatory_receipt_url = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "linked_flows" => b.linked_flows = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), - "received_debit" => b.received_debit = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_transitions" => { - b.status_transitions = Some(FromValueOpt::from_value(v)?) + b.hosted_regulatory_receipt_url = FromValueOpt::from_value(v) } - "transaction" => b.transaction = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "linked_flows" => b.linked_flows = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), + "received_debit" => b.received_debit = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "status_transitions" => b.status_transitions = FromValueOpt::from_value(v), + "transaction" => b.transaction = FromValueOpt::from_value(v), _ => {} } 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..8a42dc53d 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_account/types.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_account/types.rs @@ -56,7 +56,12 @@ pub struct TreasuryFinancialAccountBuilder { supported_currencies: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -131,22 +136,58 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(active_features), + Some(balance), + Some(country), + Some(created), + Some(features), + Some(financial_addresses), + Some(id), + Some(livemode), + Some(metadata), + Some(pending_features), + Some(platform_restrictions), + Some(restricted_features), + Some(status), + Some(status_details), + Some(supported_currencies), + ) = ( + self.active_features.take(), + self.balance.take(), + self.country.take(), + self.created, + self.features.take(), + self.financial_addresses.take(), + self.id.take(), + self.livemode, + self.metadata.take(), + self.pending_features.take(), + self.platform_restrictions, + self.restricted_features.take(), + self.status, + self.status_details.take(), + self.supported_currencies.take(), + ) + else { + return None; + }; Some(Self::Out { - active_features: self.active_features.take()?, - balance: self.balance.take()?, - country: self.country.take()?, - created: self.created?, - features: self.features.take()?, - financial_addresses: self.financial_addresses.take()?, - id: self.id.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - pending_features: self.pending_features.take()?, - platform_restrictions: self.platform_restrictions?, - restricted_features: self.restricted_features.take()?, - status: self.status?, - status_details: self.status_details.take()?, - supported_currencies: self.supported_currencies.take()?, + active_features, + balance, + country, + created, + features, + financial_addresses, + id, + livemode, + metadata, + pending_features, + platform_restrictions, + restricted_features, + status, + status_details, + supported_currencies, }) } } @@ -174,29 +215,23 @@ const _: () = { let mut b = TreasuryFinancialAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "active_features" => b.active_features = Some(FromValueOpt::from_value(v)?), - "balance" => b.balance = Some(FromValueOpt::from_value(v)?), - "country" => b.country = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "features" => b.features = Some(FromValueOpt::from_value(v)?), - "financial_addresses" => { - b.financial_addresses = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "pending_features" => b.pending_features = Some(FromValueOpt::from_value(v)?), + "active_features" => b.active_features = FromValueOpt::from_value(v), + "balance" => b.balance = FromValueOpt::from_value(v), + "country" => b.country = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "features" => b.features = FromValueOpt::from_value(v), + "financial_addresses" => b.financial_addresses = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "pending_features" => b.pending_features = FromValueOpt::from_value(v), "platform_restrictions" => { - b.platform_restrictions = Some(FromValueOpt::from_value(v)?) - } - "restricted_features" => { - b.restricted_features = Some(FromValueOpt::from_value(v)?) - } - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_details" => b.status_details = Some(FromValueOpt::from_value(v)?), - "supported_currencies" => { - b.supported_currencies = Some(FromValueOpt::from_value(v)?) + b.platform_restrictions = FromValueOpt::from_value(v) } + "restricted_features" => b.restricted_features = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "status_details" => b.status_details = FromValueOpt::from_value(v), + "supported_currencies" => b.supported_currencies = FromValueOpt::from_value(v), _ => {} } 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..2fe03a0e6 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_account_features.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_account_features.rs @@ -34,7 +34,12 @@ pub struct TreasuryFinancialAccountFeaturesBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -93,14 +98,34 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(card_issuing), + Some(deposit_insurance), + Some(financial_addresses), + Some(inbound_transfers), + Some(intra_stripe_flows), + Some(outbound_payments), + Some(outbound_transfers), + ) = ( + self.card_issuing.take(), + self.deposit_insurance.take(), + self.financial_addresses.take(), + self.inbound_transfers.take(), + self.intra_stripe_flows.take(), + self.outbound_payments.take(), + self.outbound_transfers.take(), + ) + else { + return None; + }; Some(Self::Out { - card_issuing: self.card_issuing.take()?, - deposit_insurance: self.deposit_insurance.take()?, - financial_addresses: self.financial_addresses.take()?, - inbound_transfers: self.inbound_transfers.take()?, - intra_stripe_flows: self.intra_stripe_flows.take()?, - outbound_payments: self.outbound_payments.take()?, - outbound_transfers: self.outbound_transfers.take()?, + card_issuing, + deposit_insurance, + financial_addresses, + inbound_transfers, + intra_stripe_flows, + outbound_payments, + outbound_transfers, }) } } @@ -128,19 +153,13 @@ const _: () = { let mut b = TreasuryFinancialAccountFeaturesBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "card_issuing" => b.card_issuing = Some(FromValueOpt::from_value(v)?), - "deposit_insurance" => b.deposit_insurance = Some(FromValueOpt::from_value(v)?), - "financial_addresses" => { - b.financial_addresses = Some(FromValueOpt::from_value(v)?) - } - "inbound_transfers" => b.inbound_transfers = Some(FromValueOpt::from_value(v)?), - "intra_stripe_flows" => { - b.intra_stripe_flows = Some(FromValueOpt::from_value(v)?) - } - "outbound_payments" => b.outbound_payments = Some(FromValueOpt::from_value(v)?), - "outbound_transfers" => { - b.outbound_transfers = Some(FromValueOpt::from_value(v)?) - } + "card_issuing" => b.card_issuing = FromValueOpt::from_value(v), + "deposit_insurance" => b.deposit_insurance = FromValueOpt::from_value(v), + "financial_addresses" => b.financial_addresses = FromValueOpt::from_value(v), + "inbound_transfers" => b.inbound_transfers = FromValueOpt::from_value(v), + "intra_stripe_flows" => b.intra_stripe_flows = FromValueOpt::from_value(v), + "outbound_payments" => b.outbound_payments = FromValueOpt::from_value(v), + "outbound_transfers" => b.outbound_transfers = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_record.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_record.rs index 36e52e96a..342b79056 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_record.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_record.rs @@ -23,7 +23,12 @@ pub struct TreasuryFinancialAccountsResourceAbaRecordBuilder { routing_number: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -78,12 +83,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(account_holder_name), + Some(account_number), + Some(account_number_last4), + Some(bank_name), + Some(routing_number), + ) = ( + self.account_holder_name.take(), + self.account_number.take(), + self.account_number_last4.take(), + self.bank_name.take(), + self.routing_number.take(), + ) + else { + return None; + }; Some(Self::Out { - account_holder_name: self.account_holder_name.take()?, - account_number: self.account_number.take()?, - account_number_last4: self.account_number_last4.take()?, - bank_name: self.bank_name.take()?, - routing_number: self.routing_number.take()?, + account_holder_name, + account_number, + account_number_last4, + bank_name, + routing_number, }) } } @@ -111,15 +132,11 @@ const _: () = { let mut b = TreasuryFinancialAccountsResourceAbaRecordBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "account_holder_name" => { - b.account_holder_name = Some(FromValueOpt::from_value(v)?) - } - "account_number" => b.account_number = Some(FromValueOpt::from_value(v)?), - "account_number_last4" => { - b.account_number_last4 = Some(FromValueOpt::from_value(v)?) - } - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "routing_number" => b.routing_number = Some(FromValueOpt::from_value(v)?), + "account_holder_name" => b.account_holder_name = FromValueOpt::from_value(v), + "account_number" => b.account_number = FromValueOpt::from_value(v), + "account_number_last4" => b.account_number_last4 = FromValueOpt::from_value(v), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "routing_number" => b.routing_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_toggle_settings.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_toggle_settings.rs index 7540328e2..207da7e9f 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_toggle_settings.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_toggle_settings.rs @@ -19,7 +19,12 @@ pub struct TreasuryFinancialAccountsResourceAbaToggleSettingsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,11 +75,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - requested: self.requested?, - status: self.status?, - status_details: self.status_details.take()?, - }) + let (Some(requested), Some(status), Some(status_details)) = + (self.requested, self.status, self.status_details.take()) + else { + return None; + }; + Some(Self::Out { requested, status, status_details }) } } @@ -101,9 +107,9 @@ const _: () = { let mut b = TreasuryFinancialAccountsResourceAbaToggleSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "requested" => b.requested = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_details" => b.status_details = Some(FromValueOpt::from_value(v)?), + "requested" => b.requested = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "status_details" => b.status_details = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_ach_toggle_settings.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_ach_toggle_settings.rs index e2e526e7b..173a282d7 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_ach_toggle_settings.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_ach_toggle_settings.rs @@ -19,7 +19,12 @@ pub struct TreasuryFinancialAccountsResourceAchToggleSettingsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,11 +75,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - requested: self.requested?, - status: self.status?, - status_details: self.status_details.take()?, - }) + let (Some(requested), Some(status), Some(status_details)) = + (self.requested, self.status, self.status_details.take()) + else { + return None; + }; + Some(Self::Out { requested, status, status_details }) } } @@ -101,9 +107,9 @@ const _: () = { let mut b = TreasuryFinancialAccountsResourceAchToggleSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "requested" => b.requested = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_details" => b.status_details = Some(FromValueOpt::from_value(v)?), + "requested" => b.requested = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "status_details" => b.status_details = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_balance.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_balance.rs index 6e68a8c00..ade12af14 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_balance.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_balance.rs @@ -17,7 +17,12 @@ pub struct TreasuryFinancialAccountsResourceBalanceBuilder { outbound_pending: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - cash: self.cash.take()?, - inbound_pending: self.inbound_pending.take()?, - outbound_pending: self.outbound_pending.take()?, - }) + let (Some(cash), Some(inbound_pending), Some(outbound_pending)) = + (self.cash.take(), self.inbound_pending.take(), self.outbound_pending.take()) + else { + return None; + }; + Some(Self::Out { cash, inbound_pending, outbound_pending }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = TreasuryFinancialAccountsResourceBalanceBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "cash" => b.cash = Some(FromValueOpt::from_value(v)?), - "inbound_pending" => b.inbound_pending = Some(FromValueOpt::from_value(v)?), - "outbound_pending" => b.outbound_pending = Some(FromValueOpt::from_value(v)?), + "cash" => b.cash = FromValueOpt::from_value(v), + "inbound_pending" => b.inbound_pending = FromValueOpt::from_value(v), + "outbound_pending" => b.outbound_pending = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_closed_status_details.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_closed_status_details.rs index 7dbfc0f09..91c386b1e 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_closed_status_details.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_closed_status_details.rs @@ -10,7 +10,12 @@ pub struct TreasuryFinancialAccountsResourceClosedStatusDetailsBuilder { reasons: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { reasons: self.reasons.take()? }) + let (Some(reasons),) = (self.reasons.take(),) else { + return None; + }; + Some(Self::Out { reasons }) } } @@ -84,7 +92,7 @@ const _: () = { TreasuryFinancialAccountsResourceClosedStatusDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "reasons" => b.reasons = Some(FromValueOpt::from_value(v)?), + "reasons" => b.reasons = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_address.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_address.rs index 28f745977..b6a45f20a 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_address.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_address.rs @@ -19,7 +19,12 @@ pub struct TreasuryFinancialAccountsResourceFinancialAddressBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,11 +75,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - aba: self.aba.take()?, - supported_networks: self.supported_networks.take()?, - type_: self.type_?, - }) + let (Some(aba), Some(supported_networks), Some(type_)) = + (self.aba.take(), self.supported_networks.take(), self.type_) + else { + return None; + }; + Some(Self::Out { aba, supported_networks, type_ }) } } @@ -101,11 +107,9 @@ const _: () = { let mut b = TreasuryFinancialAccountsResourceFinancialAddressBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "aba" => b.aba = Some(FromValueOpt::from_value(v)?), - "supported_networks" => { - b.supported_networks = Some(FromValueOpt::from_value(v)?) - } - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "aba" => b.aba = FromValueOpt::from_value(v), + "supported_networks" => b.supported_networks = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_addresses_features.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_addresses_features.rs index 88ffc9d68..a6976e8cb 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_addresses_features.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_addresses_features.rs @@ -10,7 +10,12 @@ pub struct TreasuryFinancialAccountsResourceFinancialAddressesFeaturesBuilder { aba: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { aba: self.aba.take()? }) + let (Some(aba),) = (self.aba.take(),) else { + return None; + }; + Some(Self::Out { aba }) } } @@ -83,7 +91,7 @@ const _: () = { TreasuryFinancialAccountsResourceFinancialAddressesFeaturesBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "aba" => b.aba = Some(FromValueOpt::from_value(v)?), + "aba" => b.aba = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_inbound_transfers.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_inbound_transfers.rs index 08ba994c9..09e5836bd 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_inbound_transfers.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_inbound_transfers.rs @@ -10,7 +10,12 @@ pub struct TreasuryFinancialAccountsResourceInboundTransfersBuilder { ach: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { ach: self.ach.take()? }) + let (Some(ach),) = (self.ach.take(),) else { + return None; + }; + Some(Self::Out { ach }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = TreasuryFinancialAccountsResourceInboundTransfersBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "ach" => b.ach = Some(FromValueOpt::from_value(v)?), + "ach" => b.ach = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_payments.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_payments.rs index 2c46157c6..7b44fb2bc 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_payments.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_payments.rs @@ -13,7 +13,12 @@ pub struct TreasuryFinancialAccountsResourceOutboundPaymentsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - ach: self.ach.take()?, - us_domestic_wire: self.us_domestic_wire.take()?, - }) + let (Some(ach), Some(us_domestic_wire)) = + (self.ach.take(), self.us_domestic_wire.take()) + else { + return None; + }; + Some(Self::Out { ach, us_domestic_wire }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = TreasuryFinancialAccountsResourceOutboundPaymentsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "ach" => b.ach = Some(FromValueOpt::from_value(v)?), - "us_domestic_wire" => b.us_domestic_wire = Some(FromValueOpt::from_value(v)?), + "ach" => b.ach = FromValueOpt::from_value(v), + "us_domestic_wire" => b.us_domestic_wire = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_transfers.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_transfers.rs index fd313fe07..2ff86d140 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_transfers.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_transfers.rs @@ -13,7 +13,12 @@ pub struct TreasuryFinancialAccountsResourceOutboundTransfersBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,10 +64,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - ach: self.ach.take()?, - us_domestic_wire: self.us_domestic_wire.take()?, - }) + let (Some(ach), Some(us_domestic_wire)) = + (self.ach.take(), self.us_domestic_wire.take()) + else { + return None; + }; + Some(Self::Out { ach, us_domestic_wire }) } } @@ -89,8 +96,8 @@ const _: () = { let mut b = TreasuryFinancialAccountsResourceOutboundTransfersBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "ach" => b.ach = Some(FromValueOpt::from_value(v)?), - "us_domestic_wire" => b.us_domestic_wire = Some(FromValueOpt::from_value(v)?), + "ach" => b.ach = FromValueOpt::from_value(v), + "us_domestic_wire" => b.us_domestic_wire = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_platform_restrictions.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_platform_restrictions.rs index 3687b8bba..95055ba1c 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_platform_restrictions.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_platform_restrictions.rs @@ -16,7 +16,12 @@ pub struct TreasuryFinancialAccountsResourcePlatformRestrictionsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -63,10 +68,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - inbound_flows: self.inbound_flows?, - outbound_flows: self.outbound_flows?, - }) + let (Some(inbound_flows), Some(outbound_flows)) = + (self.inbound_flows, self.outbound_flows) + else { + return None; + }; + Some(Self::Out { inbound_flows, outbound_flows }) } } @@ -94,8 +101,8 @@ const _: () = { TreasuryFinancialAccountsResourcePlatformRestrictionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "inbound_flows" => b.inbound_flows = Some(FromValueOpt::from_value(v)?), - "outbound_flows" => b.outbound_flows = Some(FromValueOpt::from_value(v)?), + "inbound_flows" => b.inbound_flows = FromValueOpt::from_value(v), + "outbound_flows" => b.outbound_flows = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_status_details.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_status_details.rs index 880697043..a532e7645 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_status_details.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_status_details.rs @@ -10,7 +10,12 @@ pub struct TreasuryFinancialAccountsResourceStatusDetailsBuilder { closed: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { closed: self.closed.take()? }) + let (Some(closed),) = (self.closed.take(),) else { + return None; + }; + Some(Self::Out { closed }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = TreasuryFinancialAccountsResourceStatusDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "closed" => b.closed = Some(FromValueOpt::from_value(v)?), + "closed" => b.closed = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggle_settings.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggle_settings.rs index d1da5eb8e..93e82e6e9 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggle_settings.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggle_settings.rs @@ -19,7 +19,12 @@ pub struct TreasuryFinancialAccountsResourceToggleSettingsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,11 +75,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - requested: self.requested?, - status: self.status?, - status_details: self.status_details.take()?, - }) + let (Some(requested), Some(status), Some(status_details)) = + (self.requested, self.status, self.status_details.take()) + else { + return None; + }; + Some(Self::Out { requested, status, status_details }) } } @@ -101,9 +107,9 @@ const _: () = { let mut b = TreasuryFinancialAccountsResourceToggleSettingsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "requested" => b.requested = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_details" => b.status_details = Some(FromValueOpt::from_value(v)?), + "requested" => b.requested = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "status_details" => b.status_details = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggles_setting_status_details.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggles_setting_status_details.rs index b492190e6..5bead4fe1 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggles_setting_status_details.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggles_setting_status_details.rs @@ -20,7 +20,12 @@ pub struct TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -71,11 +76,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - code: self.code?, - resolution: self.resolution?, - restriction: self.restriction?, - }) + let (Some(code), Some(resolution), Some(restriction)) = + (self.code, self.resolution, self.restriction) + else { + return None; + }; + Some(Self::Out { code, resolution, restriction }) } } @@ -104,9 +110,9 @@ const _: () = { ); for (k, v) in obj { match k.as_str() { - "code" => b.code = Some(FromValueOpt::from_value(v)?), - "resolution" => b.resolution = Some(FromValueOpt::from_value(v)?), - "restriction" => b.restriction = Some(FromValueOpt::from_value(v)?), + "code" => b.code = FromValueOpt::from_value(v), + "resolution" => b.resolution = FromValueOpt::from_value(v), + "restriction" => b.restriction = FromValueOpt::from_value(v), _ => {} } 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..4e363a951 100644 --- a/generated/async-stripe-treasury/src/treasury_inbound_transfer/types.rs +++ b/generated/async-stripe-treasury/src/treasury_inbound_transfer/types.rs @@ -75,7 +75,12 @@ pub struct TreasuryInboundTransferBuilder { transaction: Option>>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -162,26 +167,70 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(cancelable), + Some(created), + Some(currency), + Some(description), + Some(failure_details), + Some(financial_account), + Some(hosted_regulatory_receipt_url), + Some(id), + Some(linked_flows), + Some(livemode), + Some(metadata), + Some(origin_payment_method), + Some(origin_payment_method_details), + Some(returned), + Some(statement_descriptor), + Some(status), + Some(status_transitions), + Some(transaction), + ) = ( + self.amount, + self.cancelable, + self.created, + self.currency, + self.description.take(), + self.failure_details, + self.financial_account.take(), + self.hosted_regulatory_receipt_url.take(), + self.id.take(), + self.linked_flows.take(), + self.livemode, + self.metadata.take(), + self.origin_payment_method.take(), + self.origin_payment_method_details.take(), + self.returned, + self.statement_descriptor.take(), + self.status, + self.status_transitions, + self.transaction.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - cancelable: self.cancelable?, - created: self.created?, - currency: self.currency?, - description: self.description.take()?, - failure_details: self.failure_details?, - financial_account: self.financial_account.take()?, - hosted_regulatory_receipt_url: self.hosted_regulatory_receipt_url.take()?, - id: self.id.take()?, - linked_flows: self.linked_flows.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - origin_payment_method: self.origin_payment_method.take()?, - origin_payment_method_details: self.origin_payment_method_details.take()?, - returned: self.returned?, - statement_descriptor: self.statement_descriptor.take()?, - status: self.status?, - status_transitions: self.status_transitions?, - transaction: self.transaction.take()?, + amount, + cancelable, + created, + currency, + description, + failure_details, + financial_account, + hosted_regulatory_receipt_url, + id, + linked_flows, + livemode, + metadata, + origin_payment_method, + origin_payment_method_details, + returned, + statement_descriptor, + status, + status_transitions, + transaction, }) } } @@ -209,35 +258,31 @@ const _: () = { let mut b = TreasuryInboundTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "cancelable" => b.cancelable = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "failure_details" => b.failure_details = Some(FromValueOpt::from_value(v)?), - "financial_account" => b.financial_account = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "cancelable" => b.cancelable = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "failure_details" => b.failure_details = FromValueOpt::from_value(v), + "financial_account" => b.financial_account = FromValueOpt::from_value(v), "hosted_regulatory_receipt_url" => { - b.hosted_regulatory_receipt_url = Some(FromValueOpt::from_value(v)?) + b.hosted_regulatory_receipt_url = FromValueOpt::from_value(v) } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "linked_flows" => b.linked_flows = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "linked_flows" => b.linked_flows = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), "origin_payment_method" => { - b.origin_payment_method = Some(FromValueOpt::from_value(v)?) + b.origin_payment_method = FromValueOpt::from_value(v) } "origin_payment_method_details" => { - b.origin_payment_method_details = Some(FromValueOpt::from_value(v)?) - } - "returned" => b.returned = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_transitions" => { - b.status_transitions = Some(FromValueOpt::from_value(v)?) + b.origin_payment_method_details = FromValueOpt::from_value(v) } - "transaction" => b.transaction = Some(FromValueOpt::from_value(v)?), + "returned" => b.returned = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "status_transitions" => b.status_transitions = FromValueOpt::from_value(v), + "transaction" => b.transaction = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_failure_details.rs b/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_failure_details.rs index 2c80b49fc..359c8f6c5 100644 --- a/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_failure_details.rs +++ b/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_failure_details.rs @@ -10,7 +10,12 @@ pub struct TreasuryInboundTransfersResourceFailureDetailsBuilder { code: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { code: self.code? }) + let (Some(code),) = (self.code,) else { + return None; + }; + Some(Self::Out { code }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = TreasuryInboundTransfersResourceFailureDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "code" => b.code = Some(FromValueOpt::from_value(v)?), + "code" => b.code = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows.rs b/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows.rs index c55ab50b1..be1eb9925 100644 --- a/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows.rs +++ b/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows.rs @@ -10,7 +10,12 @@ pub struct TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlowsBui received_debit: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { received_debit: self.received_debit.take()? }) + let (Some(received_debit),) = (self.received_debit.take(),) else { + return None; + }; + Some(Self::Out { received_debit }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlowsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "received_debit" => b.received_debit = Some(FromValueOpt::from_value(v)?), + "received_debit" => b.received_debit = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions.rs b/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions.rs index 2a42d4c20..84318b093 100644 --- a/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions.rs +++ b/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions.rs @@ -16,7 +16,12 @@ pub struct TreasuryInboundTransfersResourceInboundTransferResourceStatusTransiti succeeded_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -71,11 +76,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - canceled_at: self.canceled_at?, - failed_at: self.failed_at?, - succeeded_at: self.succeeded_at?, - }) + let (Some(canceled_at), Some(failed_at), Some(succeeded_at)) = + (self.canceled_at, self.failed_at, self.succeeded_at) + else { + return None; + }; + Some(Self::Out { canceled_at, failed_at, succeeded_at }) } } @@ -103,9 +109,9 @@ const _: () = { let mut b = TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "canceled_at" => b.canceled_at = Some(FromValueOpt::from_value(v)?), - "failed_at" => b.failed_at = Some(FromValueOpt::from_value(v)?), - "succeeded_at" => b.succeeded_at = Some(FromValueOpt::from_value(v)?), + "canceled_at" => b.canceled_at = FromValueOpt::from_value(v), + "failed_at" => b.failed_at = FromValueOpt::from_value(v), + "succeeded_at" => b.succeeded_at = FromValueOpt::from_value(v), _ => {} } 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..110db9f84 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_payment/types.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_payment/types.rs @@ -88,7 +88,12 @@ pub struct TreasuryOutboundPaymentBuilder { transaction: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -179,29 +184,73 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(cancelable), + Some(created), + Some(currency), + Some(customer), + Some(description), + Some(destination_payment_method), + Some(destination_payment_method_details), + Some(end_user_details), + Some(expected_arrival_date), + Some(financial_account), + Some(hosted_regulatory_receipt_url), + Some(id), + Some(livemode), + Some(metadata), + Some(returned_details), + Some(statement_descriptor), + Some(status), + Some(status_transitions), + Some(transaction), + ) = ( + self.amount, + self.cancelable, + self.created, + self.currency, + self.customer.take(), + self.description.take(), + self.destination_payment_method.take(), + self.destination_payment_method_details.take(), + self.end_user_details.take(), + self.expected_arrival_date, + self.financial_account.take(), + self.hosted_regulatory_receipt_url.take(), + self.id.take(), + self.livemode, + self.metadata.take(), + self.returned_details.take(), + self.statement_descriptor.take(), + self.status, + self.status_transitions, + self.transaction.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - cancelable: self.cancelable?, - created: self.created?, - currency: self.currency?, - customer: self.customer.take()?, - description: self.description.take()?, - destination_payment_method: self.destination_payment_method.take()?, - destination_payment_method_details: self - .destination_payment_method_details - .take()?, - end_user_details: self.end_user_details.take()?, - expected_arrival_date: self.expected_arrival_date?, - financial_account: self.financial_account.take()?, - hosted_regulatory_receipt_url: self.hosted_regulatory_receipt_url.take()?, - id: self.id.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - returned_details: self.returned_details.take()?, - statement_descriptor: self.statement_descriptor.take()?, - status: self.status?, - status_transitions: self.status_transitions?, - transaction: self.transaction.take()?, + amount, + cancelable, + created, + currency, + customer, + description, + destination_payment_method, + destination_payment_method_details, + end_user_details, + expected_arrival_date, + financial_account, + hosted_regulatory_receipt_url, + id, + livemode, + metadata, + returned_details, + statement_descriptor, + status, + status_transitions, + transaction, }) } } @@ -229,38 +278,34 @@ const _: () = { let mut b = TreasuryOutboundPaymentBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "cancelable" => b.cancelable = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "customer" => b.customer = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "cancelable" => b.cancelable = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "customer" => b.customer = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), "destination_payment_method" => { - b.destination_payment_method = Some(FromValueOpt::from_value(v)?) + b.destination_payment_method = FromValueOpt::from_value(v) } "destination_payment_method_details" => { - b.destination_payment_method_details = Some(FromValueOpt::from_value(v)?) + b.destination_payment_method_details = FromValueOpt::from_value(v) } - "end_user_details" => b.end_user_details = Some(FromValueOpt::from_value(v)?), + "end_user_details" => b.end_user_details = FromValueOpt::from_value(v), "expected_arrival_date" => { - b.expected_arrival_date = Some(FromValueOpt::from_value(v)?) + b.expected_arrival_date = FromValueOpt::from_value(v) } - "financial_account" => b.financial_account = Some(FromValueOpt::from_value(v)?), + "financial_account" => b.financial_account = FromValueOpt::from_value(v), "hosted_regulatory_receipt_url" => { - b.hosted_regulatory_receipt_url = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "returned_details" => b.returned_details = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_transitions" => { - b.status_transitions = Some(FromValueOpt::from_value(v)?) + b.hosted_regulatory_receipt_url = FromValueOpt::from_value(v) } - "transaction" => b.transaction = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "returned_details" => b.returned_details = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "status_transitions" => b.status_transitions = FromValueOpt::from_value(v), + "transaction" => b.transaction = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_end_user_details.rs b/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_end_user_details.rs index 80d3f4ec9..7d443a9ae 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_end_user_details.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_end_user_details.rs @@ -17,7 +17,12 @@ pub struct TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetails present: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -63,7 +68,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { ip_address: self.ip_address.take()?, present: self.present? }) + let (Some(ip_address), Some(present)) = (self.ip_address.take(), self.present) else { + return None; + }; + Some(Self::Out { ip_address, present }) } } @@ -90,8 +98,8 @@ const _: () = { let mut b = TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "ip_address" => b.ip_address = Some(FromValueOpt::from_value(v)?), - "present" => b.present = Some(FromValueOpt::from_value(v)?), + "ip_address" => b.ip_address = FromValueOpt::from_value(v), + "present" => b.present = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_status_transitions.rs b/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_status_transitions.rs index 0f8287d93..76723adb8 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_status_transitions.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_status_transitions.rs @@ -19,7 +19,12 @@ pub struct TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransiti returned_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -76,12 +81,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - canceled_at: self.canceled_at?, - failed_at: self.failed_at?, - posted_at: self.posted_at?, - returned_at: self.returned_at?, - }) + let (Some(canceled_at), Some(failed_at), Some(posted_at), Some(returned_at)) = + (self.canceled_at, self.failed_at, self.posted_at, self.returned_at) + else { + return None; + }; + Some(Self::Out { canceled_at, failed_at, posted_at, returned_at }) } } @@ -109,10 +114,10 @@ const _: () = { let mut b = TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "canceled_at" => b.canceled_at = Some(FromValueOpt::from_value(v)?), - "failed_at" => b.failed_at = Some(FromValueOpt::from_value(v)?), - "posted_at" => b.posted_at = Some(FromValueOpt::from_value(v)?), - "returned_at" => b.returned_at = Some(FromValueOpt::from_value(v)?), + "canceled_at" => b.canceled_at = FromValueOpt::from_value(v), + "failed_at" => b.failed_at = FromValueOpt::from_value(v), + "posted_at" => b.posted_at = FromValueOpt::from_value(v), + "returned_at" => b.returned_at = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_returned_status.rs b/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_returned_status.rs index 201b60b02..5f1813f1d 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_returned_status.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_returned_status.rs @@ -13,7 +13,12 @@ pub struct TreasuryOutboundPaymentsResourceReturnedStatusBuilder { transaction: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { code: self.code?, transaction: self.transaction.take()? }) + let (Some(code), Some(transaction)) = (self.code, self.transaction.take()) else { + return None; + }; + Some(Self::Out { code, transaction }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = TreasuryOutboundPaymentsResourceReturnedStatusBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "code" => b.code = Some(FromValueOpt::from_value(v)?), - "transaction" => b.transaction = Some(FromValueOpt::from_value(v)?), + "code" => b.code = FromValueOpt::from_value(v), + "transaction" => b.transaction = FromValueOpt::from_value(v), _ => {} } 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..2073cfe77 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_transfer/types.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_transfer/types.rs @@ -71,7 +71,12 @@ pub struct TreasuryOutboundTransferBuilder { transaction: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -158,27 +163,67 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(cancelable), + Some(created), + Some(currency), + Some(description), + Some(destination_payment_method), + Some(destination_payment_method_details), + Some(expected_arrival_date), + Some(financial_account), + Some(hosted_regulatory_receipt_url), + Some(id), + Some(livemode), + Some(metadata), + Some(returned_details), + Some(statement_descriptor), + Some(status), + Some(status_transitions), + Some(transaction), + ) = ( + self.amount, + self.cancelable, + self.created, + self.currency, + self.description.take(), + self.destination_payment_method.take(), + self.destination_payment_method_details.take(), + self.expected_arrival_date, + self.financial_account.take(), + self.hosted_regulatory_receipt_url.take(), + self.id.take(), + self.livemode, + self.metadata.take(), + self.returned_details.take(), + self.statement_descriptor.take(), + self.status, + self.status_transitions, + self.transaction.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - cancelable: self.cancelable?, - created: self.created?, - currency: self.currency?, - description: self.description.take()?, - destination_payment_method: self.destination_payment_method.take()?, - destination_payment_method_details: self - .destination_payment_method_details - .take()?, - expected_arrival_date: self.expected_arrival_date?, - financial_account: self.financial_account.take()?, - hosted_regulatory_receipt_url: self.hosted_regulatory_receipt_url.take()?, - id: self.id.take()?, - livemode: self.livemode?, - metadata: self.metadata.take()?, - returned_details: self.returned_details.take()?, - statement_descriptor: self.statement_descriptor.take()?, - status: self.status?, - status_transitions: self.status_transitions?, - transaction: self.transaction.take()?, + amount, + cancelable, + created, + currency, + description, + destination_payment_method, + destination_payment_method_details, + expected_arrival_date, + financial_account, + hosted_regulatory_receipt_url, + id, + livemode, + metadata, + returned_details, + statement_descriptor, + status, + status_transitions, + transaction, }) } } @@ -206,36 +251,32 @@ const _: () = { let mut b = TreasuryOutboundTransferBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "cancelable" => b.cancelable = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "cancelable" => b.cancelable = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), "destination_payment_method" => { - b.destination_payment_method = Some(FromValueOpt::from_value(v)?) + b.destination_payment_method = FromValueOpt::from_value(v) } "destination_payment_method_details" => { - b.destination_payment_method_details = Some(FromValueOpt::from_value(v)?) + b.destination_payment_method_details = FromValueOpt::from_value(v) } "expected_arrival_date" => { - b.expected_arrival_date = Some(FromValueOpt::from_value(v)?) + b.expected_arrival_date = FromValueOpt::from_value(v) } - "financial_account" => b.financial_account = Some(FromValueOpt::from_value(v)?), + "financial_account" => b.financial_account = FromValueOpt::from_value(v), "hosted_regulatory_receipt_url" => { - b.hosted_regulatory_receipt_url = Some(FromValueOpt::from_value(v)?) - } - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "metadata" => b.metadata = Some(FromValueOpt::from_value(v)?), - "returned_details" => b.returned_details = Some(FromValueOpt::from_value(v)?), - "statement_descriptor" => { - b.statement_descriptor = Some(FromValueOpt::from_value(v)?) - } - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_transitions" => { - b.status_transitions = Some(FromValueOpt::from_value(v)?) + b.hosted_regulatory_receipt_url = FromValueOpt::from_value(v) } - "transaction" => b.transaction = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "metadata" => b.metadata = FromValueOpt::from_value(v), + "returned_details" => b.returned_details = FromValueOpt::from_value(v), + "statement_descriptor" => b.statement_descriptor = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "status_transitions" => b.status_transitions = FromValueOpt::from_value(v), + "transaction" => b.transaction = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_returned_details.rs b/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_returned_details.rs index 92942bd5d..c6b0d9a80 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_returned_details.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_returned_details.rs @@ -13,7 +13,12 @@ pub struct TreasuryOutboundTransfersResourceReturnedDetailsBuilder { transaction: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -59,7 +64,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { code: self.code?, transaction: self.transaction.take()? }) + let (Some(code), Some(transaction)) = (self.code, self.transaction.take()) else { + return None; + }; + Some(Self::Out { code, transaction }) } } @@ -86,8 +94,8 @@ const _: () = { let mut b = TreasuryOutboundTransfersResourceReturnedDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "code" => b.code = Some(FromValueOpt::from_value(v)?), - "transaction" => b.transaction = Some(FromValueOpt::from_value(v)?), + "code" => b.code = FromValueOpt::from_value(v), + "transaction" => b.transaction = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_status_transitions.rs b/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_status_transitions.rs index 5b21902d8..937183c2e 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_status_transitions.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_status_transitions.rs @@ -19,7 +19,12 @@ pub struct TreasuryOutboundTransfersResourceStatusTransitionsBuilder { returned_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -72,12 +77,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - canceled_at: self.canceled_at?, - failed_at: self.failed_at?, - posted_at: self.posted_at?, - returned_at: self.returned_at?, - }) + let (Some(canceled_at), Some(failed_at), Some(posted_at), Some(returned_at)) = + (self.canceled_at, self.failed_at, self.posted_at, self.returned_at) + else { + return None; + }; + Some(Self::Out { canceled_at, failed_at, posted_at, returned_at }) } } @@ -104,10 +109,10 @@ const _: () = { let mut b = TreasuryOutboundTransfersResourceStatusTransitionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "canceled_at" => b.canceled_at = Some(FromValueOpt::from_value(v)?), - "failed_at" => b.failed_at = Some(FromValueOpt::from_value(v)?), - "posted_at" => b.posted_at = Some(FromValueOpt::from_value(v)?), - "returned_at" => b.returned_at = Some(FromValueOpt::from_value(v)?), + "canceled_at" => b.canceled_at = FromValueOpt::from_value(v), + "failed_at" => b.failed_at = FromValueOpt::from_value(v), + "posted_at" => b.posted_at = FromValueOpt::from_value(v), + "returned_at" => b.returned_at = FromValueOpt::from_value(v), _ => {} } 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..b5241708c 100644 --- a/generated/async-stripe-treasury/src/treasury_received_credit/types.rs +++ b/generated/async-stripe-treasury/src/treasury_received_credit/types.rs @@ -57,7 +57,12 @@ transaction: Option Option { + let ( + Some(amount), + Some(created), + Some(currency), + Some(description), + Some(failure_code), + Some(financial_account), + Some(hosted_regulatory_receipt_url), + Some(id), + Some(initiating_payment_method_details), + Some(linked_flows), + Some(livemode), + Some(network), + Some(reversal_details), + Some(status), + Some(transaction), + ) = ( + self.amount, + self.created, + self.currency, + self.description.take(), + self.failure_code, + self.financial_account.take(), + self.hosted_regulatory_receipt_url.take(), + self.id.take(), + self.initiating_payment_method_details.take(), + self.linked_flows.take(), + self.livemode, + self.network, + self.reversal_details, + self.status, + self.transaction.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - created: self.created?, - currency: self.currency?, - description: self.description.take()?, - failure_code: self.failure_code?, - financial_account: self.financial_account.take()?, - hosted_regulatory_receipt_url: self.hosted_regulatory_receipt_url.take()?, - id: self.id.take()?, - initiating_payment_method_details: self.initiating_payment_method_details.take()?, - linked_flows: self.linked_flows.take()?, - livemode: self.livemode?, - network: self.network?, - reversal_details: self.reversal_details?, - status: self.status?, - transaction: self.transaction.take()?, + amount, + created, + currency, + description, + failure_code, + financial_account, + hosted_regulatory_receipt_url, + id, + initiating_payment_method_details, + linked_flows, + livemode, + network, + reversal_details, + status, + transaction, }) } } @@ -179,25 +220,25 @@ const _: () = { let mut b = TreasuryReceivedCreditBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "failure_code" => b.failure_code = Some(FromValueOpt::from_value(v)?), - "financial_account" => b.financial_account = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "failure_code" => b.failure_code = FromValueOpt::from_value(v), + "financial_account" => b.financial_account = FromValueOpt::from_value(v), "hosted_regulatory_receipt_url" => { - b.hosted_regulatory_receipt_url = Some(FromValueOpt::from_value(v)?) + b.hosted_regulatory_receipt_url = FromValueOpt::from_value(v) } - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), "initiating_payment_method_details" => { - b.initiating_payment_method_details = Some(FromValueOpt::from_value(v)?) + b.initiating_payment_method_details = FromValueOpt::from_value(v) } - "linked_flows" => b.linked_flows = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), - "reversal_details" => b.reversal_details = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "transaction" => b.transaction = Some(FromValueOpt::from_value(v)?), + "linked_flows" => b.linked_flows = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), + "reversal_details" => b.reversal_details = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "transaction" => b.transaction = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_received_credits_resource_linked_flows.rs b/generated/async-stripe-treasury/src/treasury_received_credits_resource_linked_flows.rs index c5791316c..30c6e34c0 100644 --- a/generated/async-stripe-treasury/src/treasury_received_credits_resource_linked_flows.rs +++ b/generated/async-stripe-treasury/src/treasury_received_credits_resource_linked_flows.rs @@ -29,7 +29,12 @@ pub struct TreasuryReceivedCreditsResourceLinkedFlowsBuilder { source_flow_type: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -86,13 +91,31 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(credit_reversal), + Some(issuing_authorization), + Some(issuing_transaction), + Some(source_flow), + Some(source_flow_details), + Some(source_flow_type), + ) = ( + self.credit_reversal.take(), + self.issuing_authorization.take(), + self.issuing_transaction.take(), + self.source_flow.take(), + self.source_flow_details.take(), + self.source_flow_type.take(), + ) + else { + return None; + }; Some(Self::Out { - credit_reversal: self.credit_reversal.take()?, - issuing_authorization: self.issuing_authorization.take()?, - issuing_transaction: self.issuing_transaction.take()?, - source_flow: self.source_flow.take()?, - source_flow_details: self.source_flow_details.take()?, - source_flow_type: self.source_flow_type.take()?, + credit_reversal, + issuing_authorization, + issuing_transaction, + source_flow, + source_flow_details, + source_flow_type, }) } } @@ -120,18 +143,14 @@ const _: () = { let mut b = TreasuryReceivedCreditsResourceLinkedFlowsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "credit_reversal" => b.credit_reversal = Some(FromValueOpt::from_value(v)?), + "credit_reversal" => b.credit_reversal = FromValueOpt::from_value(v), "issuing_authorization" => { - b.issuing_authorization = Some(FromValueOpt::from_value(v)?) - } - "issuing_transaction" => { - b.issuing_transaction = Some(FromValueOpt::from_value(v)?) - } - "source_flow" => b.source_flow = Some(FromValueOpt::from_value(v)?), - "source_flow_details" => { - b.source_flow_details = Some(FromValueOpt::from_value(v)?) + b.issuing_authorization = FromValueOpt::from_value(v) } - "source_flow_type" => b.source_flow_type = Some(FromValueOpt::from_value(v)?), + "issuing_transaction" => b.issuing_transaction = FromValueOpt::from_value(v), + "source_flow" => b.source_flow = FromValueOpt::from_value(v), + "source_flow_details" => b.source_flow_details = FromValueOpt::from_value(v), + "source_flow_type" => b.source_flow_type = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_received_credits_resource_reversal_details.rs b/generated/async-stripe-treasury/src/treasury_received_credits_resource_reversal_details.rs index 863d5148d..a2d28a845 100644 --- a/generated/async-stripe-treasury/src/treasury_received_credits_resource_reversal_details.rs +++ b/generated/async-stripe-treasury/src/treasury_received_credits_resource_reversal_details.rs @@ -14,7 +14,12 @@ pub struct TreasuryReceivedCreditsResourceReversalDetailsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deadline: self.deadline?, restricted_reason: self.restricted_reason? }) + let (Some(deadline), Some(restricted_reason)) = (self.deadline, self.restricted_reason) + else { + return None; + }; + Some(Self::Out { deadline, restricted_reason }) } } @@ -87,8 +96,8 @@ const _: () = { let mut b = TreasuryReceivedCreditsResourceReversalDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deadline" => b.deadline = Some(FromValueOpt::from_value(v)?), - "restricted_reason" => b.restricted_reason = Some(FromValueOpt::from_value(v)?), + "deadline" => b.deadline = FromValueOpt::from_value(v), + "restricted_reason" => b.restricted_reason = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_received_credits_resource_source_flows_details.rs b/generated/async-stripe-treasury/src/treasury_received_credits_resource_source_flows_details.rs index 9336a0e50..6b7c10e0e 100644 --- a/generated/async-stripe-treasury/src/treasury_received_credits_resource_source_flows_details.rs +++ b/generated/async-stripe-treasury/src/treasury_received_credits_resource_source_flows_details.rs @@ -17,7 +17,12 @@ pub struct TreasuryReceivedCreditsResourceSourceFlowsDetailsBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -70,12 +75,15 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - credit_reversal: self.credit_reversal.take()?, - outbound_payment: self.outbound_payment.take()?, - payout: self.payout.take()?, - type_: self.type_?, - }) + let (Some(credit_reversal), Some(outbound_payment), Some(payout), Some(type_)) = ( + self.credit_reversal.take(), + self.outbound_payment.take(), + self.payout.take(), + self.type_, + ) else { + return None; + }; + Some(Self::Out { credit_reversal, outbound_payment, payout, type_ }) } } @@ -102,10 +110,10 @@ const _: () = { let mut b = TreasuryReceivedCreditsResourceSourceFlowsDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "credit_reversal" => b.credit_reversal = Some(FromValueOpt::from_value(v)?), - "outbound_payment" => b.outbound_payment = Some(FromValueOpt::from_value(v)?), - "payout" => b.payout = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "credit_reversal" => b.credit_reversal = FromValueOpt::from_value(v), + "outbound_payment" => b.outbound_payment = FromValueOpt::from_value(v), + "payout" => b.payout = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_received_credits_resource_status_transitions.rs b/generated/async-stripe-treasury/src/treasury_received_credits_resource_status_transitions.rs index 04ba0a5bd..3286984e2 100644 --- a/generated/async-stripe-treasury/src/treasury_received_credits_resource_status_transitions.rs +++ b/generated/async-stripe-treasury/src/treasury_received_credits_resource_status_transitions.rs @@ -10,7 +10,12 @@ pub struct TreasuryReceivedCreditsResourceStatusTransitionsBuilder { posted_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { posted_at: self.posted_at? }) + let (Some(posted_at),) = (self.posted_at,) else { + return None; + }; + Some(Self::Out { posted_at }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = TreasuryReceivedCreditsResourceStatusTransitionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "posted_at" => b.posted_at = Some(FromValueOpt::from_value(v)?), + "posted_at" => b.posted_at = FromValueOpt::from_value(v), _ => {} } 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..a0d61bd00 100644 --- a/generated/async-stripe-treasury/src/treasury_received_debit/types.rs +++ b/generated/async-stripe-treasury/src/treasury_received_debit/types.rs @@ -57,7 +57,12 @@ transaction: Option Option { + let ( + Some(amount), + Some(created), + Some(currency), + Some(description), + Some(failure_code), + Some(financial_account), + Some(hosted_regulatory_receipt_url), + Some(id), + Some(initiating_payment_method_details), + Some(linked_flows), + Some(livemode), + Some(network), + Some(reversal_details), + Some(status), + Some(transaction), + ) = ( + self.amount, + self.created, + self.currency, + self.description.take(), + self.failure_code, + self.financial_account.take(), + self.hosted_regulatory_receipt_url.take(), + self.id.take(), + self.initiating_payment_method_details.take(), + self.linked_flows.take(), + self.livemode, + self.network, + self.reversal_details, + self.status, + self.transaction.take(), + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - created: self.created?, - currency: self.currency?, - description: self.description.take()?, - failure_code: self.failure_code?, - financial_account: self.financial_account.take()?, - hosted_regulatory_receipt_url: self.hosted_regulatory_receipt_url.take()?, - id: self.id.take()?, - initiating_payment_method_details: self.initiating_payment_method_details.take()?, - linked_flows: self.linked_flows.take()?, - livemode: self.livemode?, - network: self.network?, - reversal_details: self.reversal_details?, - status: self.status?, - transaction: self.transaction.take()?, + amount, + created, + currency, + description, + failure_code, + financial_account, + hosted_regulatory_receipt_url, + id, + initiating_payment_method_details, + linked_flows, + livemode, + network, + reversal_details, + status, + transaction, }) } } @@ -179,25 +220,25 @@ const _: () = { let mut b = TreasuryReceivedDebitBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "failure_code" => b.failure_code = Some(FromValueOpt::from_value(v)?), - "financial_account" => b.financial_account = Some(FromValueOpt::from_value(v)?), + "amount" => b.amount = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "failure_code" => b.failure_code = FromValueOpt::from_value(v), + "financial_account" => b.financial_account = FromValueOpt::from_value(v), "hosted_regulatory_receipt_url" => { - b.hosted_regulatory_receipt_url = Some(FromValueOpt::from_value(v)?) + b.hosted_regulatory_receipt_url = FromValueOpt::from_value(v) } - "id" => b.id = Some(FromValueOpt::from_value(v)?), + "id" => b.id = FromValueOpt::from_value(v), "initiating_payment_method_details" => { - b.initiating_payment_method_details = Some(FromValueOpt::from_value(v)?) + b.initiating_payment_method_details = FromValueOpt::from_value(v) } - "linked_flows" => b.linked_flows = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "network" => b.network = Some(FromValueOpt::from_value(v)?), - "reversal_details" => b.reversal_details = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "transaction" => b.transaction = Some(FromValueOpt::from_value(v)?), + "linked_flows" => b.linked_flows = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "network" => b.network = FromValueOpt::from_value(v), + "reversal_details" => b.reversal_details = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "transaction" => b.transaction = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_received_debits_resource_debit_reversal_linked_flows.rs b/generated/async-stripe-treasury/src/treasury_received_debits_resource_debit_reversal_linked_flows.rs index 98ae360f0..a86a5c3d4 100644 --- a/generated/async-stripe-treasury/src/treasury_received_debits_resource_debit_reversal_linked_flows.rs +++ b/generated/async-stripe-treasury/src/treasury_received_debits_resource_debit_reversal_linked_flows.rs @@ -10,7 +10,12 @@ pub struct TreasuryReceivedDebitsResourceDebitReversalLinkedFlowsBuilder { issuing_dispute: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -56,7 +61,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { issuing_dispute: self.issuing_dispute.take()? }) + let (Some(issuing_dispute),) = (self.issuing_dispute.take(),) else { + return None; + }; + Some(Self::Out { issuing_dispute }) } } @@ -84,7 +92,7 @@ const _: () = { TreasuryReceivedDebitsResourceDebitReversalLinkedFlowsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "issuing_dispute" => b.issuing_dispute = Some(FromValueOpt::from_value(v)?), + "issuing_dispute" => b.issuing_dispute = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_received_debits_resource_linked_flows.rs b/generated/async-stripe-treasury/src/treasury_received_debits_resource_linked_flows.rs index 0d4987495..03835f12f 100644 --- a/generated/async-stripe-treasury/src/treasury_received_debits_resource_linked_flows.rs +++ b/generated/async-stripe-treasury/src/treasury_received_debits_resource_linked_flows.rs @@ -22,7 +22,12 @@ pub struct TreasuryReceivedDebitsResourceLinkedFlowsBuilder { payout: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -77,12 +82,28 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(debit_reversal), + Some(inbound_transfer), + Some(issuing_authorization), + Some(issuing_transaction), + Some(payout), + ) = ( + self.debit_reversal.take(), + self.inbound_transfer.take(), + self.issuing_authorization.take(), + self.issuing_transaction.take(), + self.payout.take(), + ) + else { + return None; + }; Some(Self::Out { - debit_reversal: self.debit_reversal.take()?, - inbound_transfer: self.inbound_transfer.take()?, - issuing_authorization: self.issuing_authorization.take()?, - issuing_transaction: self.issuing_transaction.take()?, - payout: self.payout.take()?, + debit_reversal, + inbound_transfer, + issuing_authorization, + issuing_transaction, + payout, }) } } @@ -110,15 +131,13 @@ const _: () = { let mut b = TreasuryReceivedDebitsResourceLinkedFlowsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "debit_reversal" => b.debit_reversal = Some(FromValueOpt::from_value(v)?), - "inbound_transfer" => b.inbound_transfer = Some(FromValueOpt::from_value(v)?), + "debit_reversal" => b.debit_reversal = FromValueOpt::from_value(v), + "inbound_transfer" => b.inbound_transfer = FromValueOpt::from_value(v), "issuing_authorization" => { - b.issuing_authorization = Some(FromValueOpt::from_value(v)?) - } - "issuing_transaction" => { - b.issuing_transaction = Some(FromValueOpt::from_value(v)?) + b.issuing_authorization = FromValueOpt::from_value(v) } - "payout" => b.payout = Some(FromValueOpt::from_value(v)?), + "issuing_transaction" => b.issuing_transaction = FromValueOpt::from_value(v), + "payout" => b.payout = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_received_debits_resource_reversal_details.rs b/generated/async-stripe-treasury/src/treasury_received_debits_resource_reversal_details.rs index 30e5a3722..1c23d9cf7 100644 --- a/generated/async-stripe-treasury/src/treasury_received_debits_resource_reversal_details.rs +++ b/generated/async-stripe-treasury/src/treasury_received_debits_resource_reversal_details.rs @@ -14,7 +14,12 @@ pub struct TreasuryReceivedDebitsResourceReversalDetailsBuilder { Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -60,7 +65,11 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { deadline: self.deadline?, restricted_reason: self.restricted_reason? }) + let (Some(deadline), Some(restricted_reason)) = (self.deadline, self.restricted_reason) + else { + return None; + }; + Some(Self::Out { deadline, restricted_reason }) } } @@ -87,8 +96,8 @@ const _: () = { let mut b = TreasuryReceivedDebitsResourceReversalDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "deadline" => b.deadline = Some(FromValueOpt::from_value(v)?), - "restricted_reason" => b.restricted_reason = Some(FromValueOpt::from_value(v)?), + "deadline" => b.deadline = FromValueOpt::from_value(v), + "restricted_reason" => b.restricted_reason = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_received_debits_resource_status_transitions.rs b/generated/async-stripe-treasury/src/treasury_received_debits_resource_status_transitions.rs index 360c03cf0..1f323b26a 100644 --- a/generated/async-stripe-treasury/src/treasury_received_debits_resource_status_transitions.rs +++ b/generated/async-stripe-treasury/src/treasury_received_debits_resource_status_transitions.rs @@ -10,7 +10,12 @@ pub struct TreasuryReceivedDebitsResourceStatusTransitionsBuilder { completed_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -55,7 +60,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { completed_at: self.completed_at? }) + let (Some(completed_at),) = (self.completed_at,) else { + return None; + }; + Some(Self::Out { completed_at }) } } @@ -82,7 +90,7 @@ const _: () = { let mut b = TreasuryReceivedDebitsResourceStatusTransitionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "completed_at" => b.completed_at = Some(FromValueOpt::from_value(v)?), + "completed_at" => b.completed_at = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_shared_resource_billing_details.rs b/generated/async-stripe-treasury/src/treasury_shared_resource_billing_details.rs index cb542fc50..c986d72f7 100644 --- a/generated/async-stripe-treasury/src/treasury_shared_resource_billing_details.rs +++ b/generated/async-stripe-treasury/src/treasury_shared_resource_billing_details.rs @@ -15,7 +15,12 @@ pub struct TreasurySharedResourceBillingDetailsBuilder { name: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -66,11 +71,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - address: self.address.take()?, - email: self.email.take()?, - name: self.name.take()?, - }) + let (Some(address), Some(email), Some(name)) = + (self.address.take(), self.email.take(), self.name.take()) + else { + return None; + }; + Some(Self::Out { address, email, name }) } } @@ -97,9 +103,9 @@ const _: () = { let mut b = TreasurySharedResourceBillingDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "address" => b.address = Some(FromValueOpt::from_value(v)?), - "email" => b.email = Some(FromValueOpt::from_value(v)?), - "name" => b.name = Some(FromValueOpt::from_value(v)?), + "address" => b.address = FromValueOpt::from_value(v), + "email" => b.email = FromValueOpt::from_value(v), + "name" => b.name = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details.rs b/generated/async-stripe-treasury/src/treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details.rs index 3958453a8..a3b725720 100644 --- a/generated/async-stripe-treasury/src/treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details.rs +++ b/generated/async-stripe-treasury/src/treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details.rs @@ -30,7 +30,12 @@ us_bank_account: Option Option { - Some(Self::Out { balance: self.balance?, -billing_details: self.billing_details.take()?, -financial_account: self.financial_account.take()?, -issuing_card: self.issuing_card.take()?, -type_: self.type_?, -us_bank_account: self.us_bank_account.take()?, - }) + let (Some(balance), +Some(billing_details), +Some(financial_account), +Some(issuing_card), +Some(type_), +Some(us_bank_account), +) = (self.balance, +self.billing_details.take(), +self.financial_account.take(), +self.issuing_card.take(), +self.type_, +self.us_bank_account.take(), +) else { + return None; + }; + Some(Self::Out { balance,billing_details,financial_account,issuing_card,type_,us_bank_account }) } } @@ -131,12 +145,12 @@ us_bank_account: self.us_bank_account.take()?, let mut b = TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "balance" => b.balance = Some(FromValueOpt::from_value(v)?), - "billing_details" => b.billing_details = Some(FromValueOpt::from_value(v)?), - "financial_account" => b.financial_account = Some(FromValueOpt::from_value(v)?), - "issuing_card" => b.issuing_card = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), - "us_bank_account" => b.us_bank_account = Some(FromValueOpt::from_value(v)?), + "balance" => b.balance = FromValueOpt::from_value(v), + "billing_details" => b.billing_details = FromValueOpt::from_value(v), + "financial_account" => b.financial_account = FromValueOpt::from_value(v), + "issuing_card" => b.issuing_card = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), + "us_bank_account" => b.us_bank_account = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_shared_resource_initiating_payment_method_details_us_bank_account.rs b/generated/async-stripe-treasury/src/treasury_shared_resource_initiating_payment_method_details_us_bank_account.rs index 0659768e3..dd8bf5377 100644 --- a/generated/async-stripe-treasury/src/treasury_shared_resource_initiating_payment_method_details_us_bank_account.rs +++ b/generated/async-stripe-treasury/src/treasury_shared_resource_initiating_payment_method_details_us_bank_account.rs @@ -16,7 +16,12 @@ pub struct TreasurySharedResourceInitiatingPaymentMethodDetailsUsBankAccountBuil routing_number: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -67,11 +72,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - bank_name: self.bank_name.take()?, - last4: self.last4.take()?, - routing_number: self.routing_number.take()?, - }) + let (Some(bank_name), Some(last4), Some(routing_number)) = + (self.bank_name.take(), self.last4.take(), self.routing_number.take()) + else { + return None; + }; + Some(Self::Out { bank_name, last4, routing_number }) } } @@ -98,9 +104,9 @@ const _: () = { let mut b = TreasurySharedResourceInitiatingPaymentMethodDetailsUsBankAccountBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "bank_name" => b.bank_name = Some(FromValueOpt::from_value(v)?), - "last4" => b.last4 = Some(FromValueOpt::from_value(v)?), - "routing_number" => b.routing_number = Some(FromValueOpt::from_value(v)?), + "bank_name" => b.bank_name = FromValueOpt::from_value(v), + "last4" => b.last4 = FromValueOpt::from_value(v), + "routing_number" => b.routing_number = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_transaction/types.rs b/generated/async-stripe-treasury/src/treasury_transaction/types.rs index f455f7a16..7731f526f 100644 --- a/generated/async-stripe-treasury/src/treasury_transaction/types.rs +++ b/generated/async-stripe-treasury/src/treasury_transaction/types.rs @@ -52,7 +52,12 @@ pub struct TreasuryTransactionBuilder { >, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -125,21 +130,55 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(amount), + Some(balance_impact), + Some(created), + Some(currency), + Some(description), + Some(entries), + Some(financial_account), + Some(flow), + Some(flow_details), + Some(flow_type), + Some(id), + Some(livemode), + Some(status), + Some(status_transitions), + ) = ( + self.amount, + self.balance_impact, + self.created, + self.currency, + self.description.take(), + self.entries.take(), + self.financial_account.take(), + self.flow.take(), + self.flow_details.take(), + self.flow_type, + self.id.take(), + self.livemode, + self.status, + self.status_transitions, + ) + else { + return None; + }; Some(Self::Out { - amount: self.amount?, - balance_impact: self.balance_impact?, - created: self.created?, - currency: self.currency?, - description: self.description.take()?, - entries: self.entries.take()?, - financial_account: self.financial_account.take()?, - flow: self.flow.take()?, - flow_details: self.flow_details.take()?, - flow_type: self.flow_type?, - id: self.id.take()?, - livemode: self.livemode?, - status: self.status?, - status_transitions: self.status_transitions?, + amount, + balance_impact, + created, + currency, + description, + entries, + financial_account, + flow, + flow_details, + flow_type, + id, + livemode, + status, + status_transitions, }) } } @@ -167,22 +206,20 @@ const _: () = { let mut b = TreasuryTransactionBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "amount" => b.amount = Some(FromValueOpt::from_value(v)?), - "balance_impact" => b.balance_impact = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "description" => b.description = Some(FromValueOpt::from_value(v)?), - "entries" => b.entries = Some(FromValueOpt::from_value(v)?), - "financial_account" => b.financial_account = Some(FromValueOpt::from_value(v)?), - "flow" => b.flow = Some(FromValueOpt::from_value(v)?), - "flow_details" => b.flow_details = Some(FromValueOpt::from_value(v)?), - "flow_type" => b.flow_type = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "status" => b.status = Some(FromValueOpt::from_value(v)?), - "status_transitions" => { - b.status_transitions = Some(FromValueOpt::from_value(v)?) - } + "amount" => b.amount = FromValueOpt::from_value(v), + "balance_impact" => b.balance_impact = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "description" => b.description = FromValueOpt::from_value(v), + "entries" => b.entries = FromValueOpt::from_value(v), + "financial_account" => b.financial_account = FromValueOpt::from_value(v), + "flow" => b.flow = FromValueOpt::from_value(v), + "flow_details" => b.flow_details = FromValueOpt::from_value(v), + "flow_type" => b.flow_type = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "status" => b.status = FromValueOpt::from_value(v), + "status_transitions" => b.status_transitions = FromValueOpt::from_value(v), _ => {} } 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..bbc310ca0 100644 --- a/generated/async-stripe-treasury/src/treasury_transaction_entry/types.rs +++ b/generated/async-stripe-treasury/src/treasury_transaction_entry/types.rs @@ -44,7 +44,12 @@ pub struct TreasuryTransactionEntryBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -113,19 +118,49 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(balance_impact), + Some(created), + Some(currency), + Some(effective_at), + Some(financial_account), + Some(flow), + Some(flow_details), + Some(flow_type), + Some(id), + Some(livemode), + Some(transaction), + Some(type_), + ) = ( + self.balance_impact, + self.created, + self.currency, + self.effective_at, + self.financial_account.take(), + self.flow.take(), + self.flow_details.take(), + self.flow_type, + self.id.take(), + self.livemode, + self.transaction.take(), + self.type_, + ) + else { + return None; + }; Some(Self::Out { - balance_impact: self.balance_impact?, - created: self.created?, - currency: self.currency?, - effective_at: self.effective_at?, - financial_account: self.financial_account.take()?, - flow: self.flow.take()?, - flow_details: self.flow_details.take()?, - flow_type: self.flow_type?, - id: self.id.take()?, - livemode: self.livemode?, - transaction: self.transaction.take()?, - type_: self.type_?, + balance_impact, + created, + currency, + effective_at, + financial_account, + flow, + flow_details, + flow_type, + id, + livemode, + transaction, + type_, }) } } @@ -153,18 +188,18 @@ const _: () = { let mut b = TreasuryTransactionEntryBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "balance_impact" => b.balance_impact = Some(FromValueOpt::from_value(v)?), - "created" => b.created = Some(FromValueOpt::from_value(v)?), - "currency" => b.currency = Some(FromValueOpt::from_value(v)?), - "effective_at" => b.effective_at = Some(FromValueOpt::from_value(v)?), - "financial_account" => b.financial_account = Some(FromValueOpt::from_value(v)?), - "flow" => b.flow = Some(FromValueOpt::from_value(v)?), - "flow_details" => b.flow_details = Some(FromValueOpt::from_value(v)?), - "flow_type" => b.flow_type = Some(FromValueOpt::from_value(v)?), - "id" => b.id = Some(FromValueOpt::from_value(v)?), - "livemode" => b.livemode = Some(FromValueOpt::from_value(v)?), - "transaction" => b.transaction = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "balance_impact" => b.balance_impact = FromValueOpt::from_value(v), + "created" => b.created = FromValueOpt::from_value(v), + "currency" => b.currency = FromValueOpt::from_value(v), + "effective_at" => b.effective_at = FromValueOpt::from_value(v), + "financial_account" => b.financial_account = FromValueOpt::from_value(v), + "flow" => b.flow = FromValueOpt::from_value(v), + "flow_details" => b.flow_details = FromValueOpt::from_value(v), + "flow_type" => b.flow_type = FromValueOpt::from_value(v), + "id" => b.id = FromValueOpt::from_value(v), + "livemode" => b.livemode = FromValueOpt::from_value(v), + "transaction" => b.transaction = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_transactions_resource_abstract_transaction_resource_status_transitions.rs b/generated/async-stripe-treasury/src/treasury_transactions_resource_abstract_transaction_resource_status_transitions.rs index 306216088..cfc7bd1b9 100644 --- a/generated/async-stripe-treasury/src/treasury_transactions_resource_abstract_transaction_resource_status_transitions.rs +++ b/generated/async-stripe-treasury/src/treasury_transactions_resource_abstract_transaction_resource_status_transitions.rs @@ -13,7 +13,12 @@ pub struct TreasuryTransactionsResourceAbstractTransactionResourceStatusTransiti void_at: Option>, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -63,7 +68,10 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { posted_at: self.posted_at?, void_at: self.void_at? }) + let (Some(posted_at), Some(void_at)) = (self.posted_at, self.void_at) else { + return None; + }; + Some(Self::Out { posted_at, void_at }) } } @@ -91,8 +99,8 @@ const _: () = { let mut b = TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitionsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "posted_at" => b.posted_at = Some(FromValueOpt::from_value(v)?), - "void_at" => b.void_at = Some(FromValueOpt::from_value(v)?), + "posted_at" => b.posted_at = FromValueOpt::from_value(v), + "void_at" => b.void_at = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_transactions_resource_balance_impact.rs b/generated/async-stripe-treasury/src/treasury_transactions_resource_balance_impact.rs index 6bb637fe8..8259c685d 100644 --- a/generated/async-stripe-treasury/src/treasury_transactions_resource_balance_impact.rs +++ b/generated/async-stripe-treasury/src/treasury_transactions_resource_balance_impact.rs @@ -17,7 +17,12 @@ pub struct TreasuryTransactionsResourceBalanceImpactBuilder { outbound_pending: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -68,11 +73,12 @@ const _: () = { } fn take_out(&mut self) -> Option { - Some(Self::Out { - cash: self.cash?, - inbound_pending: self.inbound_pending?, - outbound_pending: self.outbound_pending?, - }) + let (Some(cash), Some(inbound_pending), Some(outbound_pending)) = + (self.cash, self.inbound_pending, self.outbound_pending) + else { + return None; + }; + Some(Self::Out { cash, inbound_pending, outbound_pending }) } } @@ -99,9 +105,9 @@ const _: () = { let mut b = TreasuryTransactionsResourceBalanceImpactBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "cash" => b.cash = Some(FromValueOpt::from_value(v)?), - "inbound_pending" => b.inbound_pending = Some(FromValueOpt::from_value(v)?), - "outbound_pending" => b.outbound_pending = Some(FromValueOpt::from_value(v)?), + "cash" => b.cash = FromValueOpt::from_value(v), + "inbound_pending" => b.inbound_pending = FromValueOpt::from_value(v), + "outbound_pending" => b.outbound_pending = FromValueOpt::from_value(v), _ => {} } diff --git a/generated/async-stripe-treasury/src/treasury_transactions_resource_flow_details.rs b/generated/async-stripe-treasury/src/treasury_transactions_resource_flow_details.rs index af5414e37..4c90d7a5c 100644 --- a/generated/async-stripe-treasury/src/treasury_transactions_resource_flow_details.rs +++ b/generated/async-stripe-treasury/src/treasury_transactions_resource_flow_details.rs @@ -27,7 +27,12 @@ pub struct TreasuryTransactionsResourceFlowDetailsBuilder { type_: Option, } -#[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] +#[allow( + unused_variables, + irrefutable_let_patterns, + clippy::match_single_binding, + clippy::single_match +)] const _: () = { use miniserde::de::{Map, Visitor}; use miniserde::json::Value; @@ -90,16 +95,40 @@ const _: () = { } fn take_out(&mut self) -> Option { + let ( + Some(credit_reversal), + Some(debit_reversal), + Some(inbound_transfer), + Some(issuing_authorization), + Some(outbound_payment), + Some(outbound_transfer), + Some(received_credit), + Some(received_debit), + Some(type_), + ) = ( + self.credit_reversal.take(), + self.debit_reversal.take(), + self.inbound_transfer.take(), + self.issuing_authorization.take(), + self.outbound_payment.take(), + self.outbound_transfer.take(), + self.received_credit.take(), + self.received_debit.take(), + self.type_, + ) + else { + return None; + }; Some(Self::Out { - credit_reversal: self.credit_reversal.take()?, - debit_reversal: self.debit_reversal.take()?, - inbound_transfer: self.inbound_transfer.take()?, - issuing_authorization: self.issuing_authorization.take()?, - outbound_payment: self.outbound_payment.take()?, - outbound_transfer: self.outbound_transfer.take()?, - received_credit: self.received_credit.take()?, - received_debit: self.received_debit.take()?, - type_: self.type_?, + credit_reversal, + debit_reversal, + inbound_transfer, + issuing_authorization, + outbound_payment, + outbound_transfer, + received_credit, + received_debit, + type_, }) } } @@ -127,17 +156,17 @@ const _: () = { let mut b = TreasuryTransactionsResourceFlowDetailsBuilder::deser_default(); for (k, v) in obj { match k.as_str() { - "credit_reversal" => b.credit_reversal = Some(FromValueOpt::from_value(v)?), - "debit_reversal" => b.debit_reversal = Some(FromValueOpt::from_value(v)?), - "inbound_transfer" => b.inbound_transfer = Some(FromValueOpt::from_value(v)?), + "credit_reversal" => b.credit_reversal = FromValueOpt::from_value(v), + "debit_reversal" => b.debit_reversal = FromValueOpt::from_value(v), + "inbound_transfer" => b.inbound_transfer = FromValueOpt::from_value(v), "issuing_authorization" => { - b.issuing_authorization = Some(FromValueOpt::from_value(v)?) + b.issuing_authorization = FromValueOpt::from_value(v) } - "outbound_payment" => b.outbound_payment = Some(FromValueOpt::from_value(v)?), - "outbound_transfer" => b.outbound_transfer = Some(FromValueOpt::from_value(v)?), - "received_credit" => b.received_credit = Some(FromValueOpt::from_value(v)?), - "received_debit" => b.received_debit = Some(FromValueOpt::from_value(v)?), - "type" => b.type_ = Some(FromValueOpt::from_value(v)?), + "outbound_payment" => b.outbound_payment = FromValueOpt::from_value(v), + "outbound_transfer" => b.outbound_transfer = FromValueOpt::from_value(v), + "received_credit" => b.received_credit = FromValueOpt::from_value(v), + "received_debit" => b.received_debit = FromValueOpt::from_value(v), + "type" => b.type_ = FromValueOpt::from_value(v), _ => {} } diff --git a/openapi/src/templates/miniserde.rs b/openapi/src/templates/miniserde.rs index 8cff7e997..c88de55d4 100644 --- a/openapi/src/templates/miniserde.rs +++ b/openapi/src/templates/miniserde.rs @@ -170,7 +170,7 @@ impl<'a> ObjectWriter<'a> { {builder_inner} }} - #[allow(unused_variables, clippy::match_single_binding, clippy::single_match)] + #[allow(unused_variables, irrefutable_let_patterns, clippy::match_single_binding, clippy::single_match)] const _: () = {{ use miniserde::de::{{Map, Visitor}}; use miniserde::json::Value; @@ -193,30 +193,29 @@ fn miniserde_struct_inner( fields: &[StructField], components: &Components, ) -> String { - let mut finish_inner = String::new(); let mut key_inner = String::new(); let mut builder_new_inner = String::new(); let mut from_obj_inner = String::new(); + + let mut take_out_left = String::new(); + let mut take_out_right = String::new(); for field in fields { let f_name = &field.field_name; + let wire_name = field.wire_name(); - let _ = writeln!( - key_inner, - r#""{}" => Deserialize::begin(&mut self.{f_name}),"#, - field.wire_name() - ); + let _ = writeln!(key_inner, r#""{wire_name}" => Deserialize::begin(&mut self.{f_name}),"#); let _ = writeln!( from_obj_inner, - r#""{}" => b.{f_name} = Some(FromValueOpt::from_value(v)?),"#, - field.wire_name() + r#""{wire_name}" => b.{f_name} = FromValueOpt::from_value(v),"# ); let is_copy = field.rust_type.is_copy(components); + let _ = writeln!(take_out_left, "Some({f_name}),"); // For types which implement `Copy`, we don't need to call `.take()`. Does not affect // behavior, but helps a bit according to `llvm-lines` and binary size, so may as well since // unnecessary `take()` is not optimized out let take = if is_copy { "" } else { ".take()" }; - let _ = writeln!(finish_inner, "{f_name}: self.{f_name}{take}?,"); + let _ = writeln!(take_out_right, "self.{f_name}{take},"); // NB: using miniserde::Deserialize::default() instead of `None` is very important - this copies // the miniserde derives in defaulting `Option>` to `Ok(Some)` so that missing @@ -224,6 +223,9 @@ fn miniserde_struct_inner( let _ = writeln!(builder_new_inner, "{f_name}: Deserialize::default(),"); } + let comma_sep_fields = + fields.iter().map(|f| f.field_name.clone()).collect::>().join(","); + formatdoc! {r#" impl Deserialize for {ident} {{ fn begin(out: &mut Option) -> &mut dyn Visitor {{ @@ -261,7 +263,10 @@ fn miniserde_struct_inner( }} fn take_out(&mut self) -> Option {{ - Some(Self::Out {{ {finish_inner} }}) + let ({take_out_left}) = ({take_out_right}) else {{ + return None; + }}; + Some(Self::Out {{ {comma_sep_fields} }}) }} }} From fba30c32b3f62eee69847098f9b57f4bf421c034 Mon Sep 17 00:00:00 2001 From: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com> Date: Sun, 1 Sep 2024 19:49:21 -0400 Subject: [PATCH 2/2] Pin stripe mock --- .github/workflows/async-stripe.yml | 2 +- CONTRIBUTING.md | 2 +- generated/async-stripe-billing/src/billing_meter/types.rs | 1 + generated/async-stripe-billing/src/billing_meter_event/types.rs | 1 + .../src/billing_meter_event_adjustment/types.rs | 1 + .../src/billing_meter_event_summary/types.rs | 1 + .../src/billing_meter_resource_aggregation_settings.rs | 1 + ...ling_meter_resource_billing_meter_event_adjustment_cancel.rs | 1 + .../billing_meter_resource_billing_meter_status_transitions.rs | 1 + .../src/billing_meter_resource_billing_meter_value.rs | 1 + .../src/billing_meter_resource_customer_mapping_settings.rs | 1 + .../src/billing_portal_configuration/types.rs | 1 + .../async-stripe-billing/src/billing_portal_session/types.rs | 1 + generated/async-stripe-billing/src/portal_business_profile.rs | 1 + generated/async-stripe-billing/src/portal_customer_update.rs | 1 + generated/async-stripe-billing/src/portal_features.rs | 1 + .../src/portal_flows_after_completion_hosted_confirmation.rs | 1 + .../src/portal_flows_after_completion_redirect.rs | 1 + generated/async-stripe-billing/src/portal_flows_coupon_offer.rs | 1 + generated/async-stripe-billing/src/portal_flows_flow.rs | 1 + .../src/portal_flows_flow_after_completion.rs | 1 + .../src/portal_flows_flow_subscription_cancel.rs | 1 + .../src/portal_flows_flow_subscription_update.rs | 1 + .../src/portal_flows_flow_subscription_update_confirm.rs | 1 + generated/async-stripe-billing/src/portal_flows_retention.rs | 1 + .../src/portal_flows_subscription_update_confirm_discount.rs | 1 + .../src/portal_flows_subscription_update_confirm_item.rs | 1 + generated/async-stripe-billing/src/portal_invoice_list.rs | 1 + generated/async-stripe-billing/src/portal_login_page.rs | 1 + .../async-stripe-billing/src/portal_payment_method_update.rs | 1 + .../async-stripe-billing/src/portal_subscription_cancel.rs | 1 + .../src/portal_subscription_cancellation_reason.rs | 1 + .../async-stripe-billing/src/portal_subscription_update.rs | 1 + .../src/portal_subscription_update_product.rs | 1 + generated/async-stripe-billing/src/usage_record/types.rs | 1 + .../src/checkout_acss_debit_mandate_options.rs | 1 + .../src/checkout_acss_debit_payment_method_options.rs | 1 + .../src/checkout_affirm_payment_method_options.rs | 1 + .../src/checkout_afterpay_clearpay_payment_method_options.rs | 1 + .../src/checkout_alipay_payment_method_options.rs | 1 + .../src/checkout_amazon_pay_payment_method_options.rs | 1 + .../src/checkout_au_becs_debit_payment_method_options.rs | 1 + .../src/checkout_bacs_debit_payment_method_options.rs | 1 + .../src/checkout_bancontact_payment_method_options.rs | 1 + .../src/checkout_boleto_payment_method_options.rs | 1 + .../src/checkout_card_installments_options.rs | 1 + .../src/checkout_card_payment_method_options.rs | 1 + .../src/checkout_cashapp_payment_method_options.rs | 1 + ...out_customer_balance_bank_transfer_payment_method_options.rs | 1 + .../src/checkout_customer_balance_payment_method_options.rs | 1 + .../src/checkout_eps_payment_method_options.rs | 1 + .../src/checkout_fpx_payment_method_options.rs | 1 + .../src/checkout_giropay_payment_method_options.rs | 1 + .../src/checkout_grab_pay_payment_method_options.rs | 1 + .../src/checkout_ideal_payment_method_options.rs | 1 + .../src/checkout_klarna_payment_method_options.rs | 1 + .../src/checkout_konbini_payment_method_options.rs | 1 + .../src/checkout_link_payment_method_options.rs | 1 + .../src/checkout_mobilepay_payment_method_options.rs | 1 + .../src/checkout_oxxo_payment_method_options.rs | 1 + .../src/checkout_p24_payment_method_options.rs | 1 + .../src/checkout_paynow_payment_method_options.rs | 1 + .../src/checkout_paypal_payment_method_options.rs | 1 + .../src/checkout_pix_payment_method_options.rs | 1 + .../src/checkout_revolut_pay_payment_method_options.rs | 1 + .../src/checkout_sepa_debit_payment_method_options.rs | 1 + generated/async-stripe-checkout/src/checkout_session/types.rs | 1 + .../src/checkout_session_payment_method_options.rs | 1 + .../src/checkout_sofort_payment_method_options.rs | 1 + .../src/checkout_swish_payment_method_options.rs | 1 + .../src/checkout_us_bank_account_payment_method_options.rs | 1 + .../src/payment_pages_checkout_session_after_expiration.rs | 1 + .../payment_pages_checkout_session_after_expiration_recovery.rs | 1 + .../src/payment_pages_checkout_session_automatic_tax.rs | 1 + .../src/payment_pages_checkout_session_consent.rs | 1 + .../src/payment_pages_checkout_session_consent_collection.rs | 1 + .../src/payment_pages_checkout_session_currency_conversion.rs | 1 + .../src/payment_pages_checkout_session_custom_fields.rs | 1 + .../payment_pages_checkout_session_custom_fields_dropdown.rs | 1 + .../src/payment_pages_checkout_session_custom_fields_label.rs | 1 + .../src/payment_pages_checkout_session_custom_fields_numeric.rs | 1 + .../src/payment_pages_checkout_session_custom_fields_option.rs | 1 + .../src/payment_pages_checkout_session_custom_fields_text.rs | 1 + .../src/payment_pages_checkout_session_custom_text.rs | 1 + .../src/payment_pages_checkout_session_custom_text_position.rs | 1 + .../src/payment_pages_checkout_session_customer_details.rs | 1 + .../src/payment_pages_checkout_session_invoice_creation.rs | 1 + .../src/payment_pages_checkout_session_invoice_settings.rs | 1 + ...ent_pages_checkout_session_payment_method_reuse_agreement.rs | 1 + .../payment_pages_checkout_session_phone_number_collection.rs | 1 + ...yment_pages_checkout_session_saved_payment_method_options.rs | 1 + ...ayment_pages_checkout_session_shipping_address_collection.rs | 1 + .../src/payment_pages_checkout_session_shipping_cost.rs | 1 + .../src/payment_pages_checkout_session_shipping_option.rs | 1 + .../src/payment_pages_checkout_session_tax_id.rs | 1 + .../src/payment_pages_checkout_session_tax_id_collection.rs | 1 + .../src/payment_pages_checkout_session_total_details.rs | 1 + ...t_pages_checkout_session_total_details_resource_breakdown.rs | 1 + generated/async-stripe-connect/src/account_link/types.rs | 1 + generated/async-stripe-connect/src/account_session/types.rs | 1 + generated/async-stripe-connect/src/apps_secret/types.rs | 1 + .../src/connect_embedded_account_config_claim.rs | 1 + .../src/connect_embedded_account_features_claim.rs | 1 + .../src/connect_embedded_account_session_create_components.rs | 1 + .../src/connect_embedded_base_config_claim.rs | 1 + .../async-stripe-connect/src/connect_embedded_base_features.rs | 1 + .../src/connect_embedded_payments_config_claim.rs | 1 + .../src/connect_embedded_payments_features.rs | 1 + .../src/connect_embedded_payouts_config_claim.rs | 1 + .../src/connect_embedded_payouts_features.rs | 1 + generated/async-stripe-connect/src/country_spec/types.rs | 1 + .../src/country_spec_verification_field_details.rs | 1 + .../src/country_spec_verification_fields.rs | 1 + generated/async-stripe-connect/src/login_link/types.rs | 1 + .../async-stripe-connect/src/secret_service_resource_scope.rs | 1 + generated/async-stripe-core/src/balance/types.rs | 1 + generated/async-stripe-core/src/balance_amount.rs | 1 + .../async-stripe-core/src/balance_amount_by_source_type.rs | 1 + generated/async-stripe-core/src/balance_amount_net.rs | 1 + generated/async-stripe-core/src/balance_detail.rs | 1 + generated/async-stripe-core/src/customer_session/types.rs | 1 + .../src/customer_session_resource_components.rs | 1 + .../customer_session_resource_components_resource_buy_button.rs | 1 + ...stomer_session_resource_components_resource_pricing_table.rs | 1 + generated/async-stripe-core/src/token/types.rs | 1 + generated/async-stripe-fraud/src/deleted_radar_value_list.rs | 1 + .../async-stripe-fraud/src/deleted_radar_value_list_item.rs | 1 + .../async-stripe-fraud/src/radar_early_fraud_warning/types.rs | 1 + generated/async-stripe-fraud/src/radar_value_list/types.rs | 1 + generated/async-stripe-fraud/src/radar_value_list_item/types.rs | 1 + generated/async-stripe-misc/src/apple_pay_domain/types.rs | 1 + .../src/bank_connections_resource_accountholder.rs | 1 + .../async-stripe-misc/src/bank_connections_resource_balance.rs | 1 + ...nk_connections_resource_balance_api_resource_cash_balance.rs | 1 + ..._connections_resource_balance_api_resource_credit_balance.rs | 1 + .../src/bank_connections_resource_balance_refresh.rs | 1 + .../bank_connections_resource_link_account_session_filters.rs | 1 + .../src/bank_connections_resource_ownership_refresh.rs | 1 + .../src/bank_connections_resource_transaction_refresh.rs | 1 + ...nections_resource_transaction_resource_status_transitions.rs | 1 + generated/async-stripe-misc/src/climate_order/types.rs | 1 + generated/async-stripe-misc/src/climate_product/types.rs | 1 + generated/async-stripe-misc/src/climate_removals_beneficiary.rs | 1 + generated/async-stripe-misc/src/climate_removals_location.rs | 1 + .../async-stripe-misc/src/climate_removals_order_deliveries.rs | 1 + .../async-stripe-misc/src/climate_removals_products_price.rs | 1 + generated/async-stripe-misc/src/climate_supplier/types.rs | 1 + generated/async-stripe-misc/src/deleted_apple_pay_domain.rs | 1 + generated/async-stripe-misc/src/deleted_webhook_endpoint.rs | 1 + .../src/entitlements_active_entitlement/types.rs | 1 + .../src/entitlements_active_entitlement_summary.rs | 1 + generated/async-stripe-misc/src/ephemeral_key/types.rs | 1 + generated/async-stripe-misc/src/exchange_rate/types.rs | 1 + .../src/financial_connections_account/types.rs | 1 + .../src/financial_connections_account_owner.rs | 1 + .../src/financial_connections_account_ownership.rs | 1 + .../src/financial_connections_session/types.rs | 1 + .../src/financial_connections_transaction/types.rs | 1 + .../financial_reporting_finance_report_run_run_parameters.rs | 1 + generated/async-stripe-misc/src/forwarded_request_context.rs | 1 + generated/async-stripe-misc/src/forwarded_request_details.rs | 1 + generated/async-stripe-misc/src/forwarded_request_header.rs | 1 + generated/async-stripe-misc/src/forwarded_response_details.rs | 1 + generated/async-stripe-misc/src/forwarding_request/types.rs | 1 + .../src/gelato_data_document_report_date_of_birth.rs | 1 + .../src/gelato_data_document_report_expiration_date.rs | 1 + .../src/gelato_data_document_report_issued_date.rs | 1 + .../async-stripe-misc/src/gelato_data_id_number_report_date.rs | 1 + .../async-stripe-misc/src/gelato_data_verified_outputs_date.rs | 1 + generated/async-stripe-misc/src/gelato_document_report.rs | 1 + generated/async-stripe-misc/src/gelato_document_report_error.rs | 1 + generated/async-stripe-misc/src/gelato_email_report.rs | 1 + generated/async-stripe-misc/src/gelato_email_report_error.rs | 1 + generated/async-stripe-misc/src/gelato_id_number_report.rs | 1 + .../async-stripe-misc/src/gelato_id_number_report_error.rs | 1 + generated/async-stripe-misc/src/gelato_phone_report.rs | 1 + generated/async-stripe-misc/src/gelato_phone_report_error.rs | 1 + generated/async-stripe-misc/src/gelato_provided_details.rs | 1 + .../async-stripe-misc/src/gelato_report_document_options.rs | 1 + .../async-stripe-misc/src/gelato_report_id_number_options.rs | 1 + generated/async-stripe-misc/src/gelato_selfie_report.rs | 1 + generated/async-stripe-misc/src/gelato_selfie_report_error.rs | 1 + .../async-stripe-misc/src/gelato_session_document_options.rs | 1 + generated/async-stripe-misc/src/gelato_session_email_options.rs | 1 + .../async-stripe-misc/src/gelato_session_id_number_options.rs | 1 + generated/async-stripe-misc/src/gelato_session_last_error.rs | 1 + generated/async-stripe-misc/src/gelato_session_phone_options.rs | 1 + .../async-stripe-misc/src/gelato_verification_report_options.rs | 1 + .../src/gelato_verification_session_options.rs | 1 + generated/async-stripe-misc/src/gelato_verified_outputs.rs | 1 + .../async-stripe-misc/src/identity_verification_report/types.rs | 1 + .../src/identity_verification_session/types.rs | 1 + generated/async-stripe-misc/src/reporting_report_run/types.rs | 1 + generated/async-stripe-misc/src/reporting_report_type/types.rs | 1 + generated/async-stripe-misc/src/scheduled_query_run/types.rs | 1 + .../async-stripe-misc/src/sigma_scheduled_query_run_error.rs | 1 + generated/async-stripe-misc/src/tax_calculation/types.rs | 1 + generated/async-stripe-misc/src/tax_calculation_line_item.rs | 1 + .../src/tax_product_registrations_resource_country_options.rs | 1 + ...gistrations_resource_country_options_ca_province_standard.rs | 1 + ...tax_product_registrations_resource_country_options_canada.rs | 1 + ...ax_product_registrations_resource_country_options_default.rs | 1 + ...roduct_registrations_resource_country_options_eu_standard.rs | 1 + ...tax_product_registrations_resource_country_options_europe.rs | 1 + ...product_registrations_resource_country_options_simplified.rs | 1 + ...duct_registrations_resource_country_options_united_states.rs | 1 + ...strations_resource_country_options_us_local_amusement_tax.rs | 1 + ...registrations_resource_country_options_us_local_lease_tax.rs | 1 + .../src/tax_product_resource_customer_details.rs | 1 + .../tax_product_resource_customer_details_resource_tax_id.rs | 1 + .../async-stripe-misc/src/tax_product_resource_jurisdiction.rs | 1 + .../src/tax_product_resource_line_item_tax_breakdown.rs | 1 + .../src/tax_product_resource_line_item_tax_rate_details.rs | 1 + .../src/tax_product_resource_postal_address.rs | 1 + .../src/tax_product_resource_ship_from_details.rs | 1 + .../async-stripe-misc/src/tax_product_resource_tax_breakdown.rs | 1 + .../src/tax_product_resource_tax_calculation_shipping_cost.rs | 1 + .../src/tax_product_resource_tax_rate_details.rs | 1 + .../src/tax_product_resource_tax_settings_defaults.rs | 1 + .../src/tax_product_resource_tax_settings_head_office.rs | 1 + .../src/tax_product_resource_tax_settings_status_details.rs | 1 + ...duct_resource_tax_settings_status_details_resource_active.rs | 1 + ...uct_resource_tax_settings_status_details_resource_pending.rs | 1 + ...duct_resource_tax_transaction_line_item_resource_reversal.rs | 1 + .../tax_product_resource_tax_transaction_resource_reversal.rs | 1 + .../src/tax_product_resource_tax_transaction_shipping_cost.rs | 1 + generated/async-stripe-misc/src/tax_registration/types.rs | 1 + generated/async-stripe-misc/src/tax_settings/types.rs | 1 + generated/async-stripe-misc/src/tax_transaction/types.rs | 1 + generated/async-stripe-misc/src/tax_transaction_line_item.rs | 1 + .../async-stripe-misc/src/verification_session_redaction.rs | 1 + generated/async-stripe-misc/src/webhook_endpoint/types.rs | 1 + generated/async-stripe-payment/src/confirmation_token/types.rs | 1 + .../src/confirmation_tokens_resource_mandate_data.rs | 1 + ...tokens_resource_mandate_data_resource_customer_acceptance.rs | 1 + ...mandate_data_resource_customer_acceptance_resource_online.rs | 1 + .../src/confirmation_tokens_resource_payment_method_preview.rs | 1 + .../src/confirmation_tokens_resource_shipping.rs | 1 + .../src/payment_method_config_resource_display_preference.rs | 1 + .../payment_method_config_resource_payment_method_properties.rs | 1 + .../src/payment_method_configuration/types.rs | 1 + .../async-stripe-payment/src/payment_method_domain/types.rs | 1 + .../src/payment_method_domain_resource_payment_method_status.rs | 1 + ...ment_method_domain_resource_payment_method_status_details.rs | 1 + .../async-stripe-payment/src/source_mandate_notification.rs | 1 + .../src/source_mandate_notification_acss_debit_data.rs | 1 + .../src/source_mandate_notification_bacs_debit_data.rs | 1 + .../src/source_mandate_notification_sepa_debit_data.rs | 1 + generated/async-stripe-product/src/deleted_product_feature.rs | 1 + generated/async-stripe-product/src/product_feature/types.rs | 1 + generated/async-stripe-shared/src/account.rs | 1 + generated/async-stripe-shared/src/account_annual_revenue.rs | 1 + .../src/account_bacs_debit_payments_settings.rs | 1 + generated/async-stripe-shared/src/account_branding_settings.rs | 1 + generated/async-stripe-shared/src/account_business_profile.rs | 1 + generated/async-stripe-shared/src/account_capabilities.rs | 1 + .../src/account_capability_future_requirements.rs | 1 + .../async-stripe-shared/src/account_capability_requirements.rs | 1 + .../async-stripe-shared/src/account_card_issuing_settings.rs | 1 + .../async-stripe-shared/src/account_card_payments_settings.rs | 1 + generated/async-stripe-shared/src/account_dashboard_settings.rs | 1 + generated/async-stripe-shared/src/account_decline_charge_on.rs | 1 + .../async-stripe-shared/src/account_future_requirements.rs | 1 + generated/async-stripe-shared/src/account_invoices_settings.rs | 1 + .../src/account_monthly_estimated_revenue.rs | 1 + generated/async-stripe-shared/src/account_payments_settings.rs | 1 + generated/async-stripe-shared/src/account_payout_settings.rs | 1 + generated/async-stripe-shared/src/account_requirements.rs | 1 + .../async-stripe-shared/src/account_requirements_alternative.rs | 1 + generated/async-stripe-shared/src/account_requirements_error.rs | 1 + .../src/account_sepa_debit_payments_settings.rs | 1 + generated/async-stripe-shared/src/account_settings.rs | 1 + generated/async-stripe-shared/src/account_terms_of_service.rs | 1 + generated/async-stripe-shared/src/account_tos_acceptance.rs | 1 + generated/async-stripe-shared/src/account_treasury_settings.rs | 1 + .../src/account_unification_account_controller.rs | 1 + .../src/account_unification_account_controller_fees.rs | 1 + .../src/account_unification_account_controller_losses.rs | 1 + .../account_unification_account_controller_stripe_dashboard.rs | 1 + generated/async-stripe-shared/src/address.rs | 1 + generated/async-stripe-shared/src/api_errors.rs | 1 + generated/async-stripe-shared/src/application.rs | 1 + generated/async-stripe-shared/src/application_fee.rs | 1 + generated/async-stripe-shared/src/application_fee_refund.rs | 1 + generated/async-stripe-shared/src/automatic_tax.rs | 1 + generated/async-stripe-shared/src/balance_transaction.rs | 1 + generated/async-stripe-shared/src/bank_account.rs | 1 + generated/async-stripe-shared/src/billing_details.rs | 1 + generated/async-stripe-shared/src/cancellation_details.rs | 1 + generated/async-stripe-shared/src/capability.rs | 1 + generated/async-stripe-shared/src/card.rs | 1 + .../src/card_issuing_account_terms_of_service.rs | 1 + .../src/card_mandate_payment_method_details.rs | 1 + generated/async-stripe-shared/src/cash_balance.rs | 1 + generated/async-stripe-shared/src/charge.rs | 1 + generated/async-stripe-shared/src/charge_fraud_details.rs | 1 + generated/async-stripe-shared/src/charge_outcome.rs | 1 + generated/async-stripe-shared/src/charge_transfer_data.rs | 1 + generated/async-stripe-shared/src/checkout_session_item.rs | 1 + generated/async-stripe-shared/src/connect_account_reference.rs | 1 + .../async-stripe-shared/src/connect_collection_transfer.rs | 1 + generated/async-stripe-shared/src/coupon.rs | 1 + generated/async-stripe-shared/src/coupon_applies_to.rs | 1 + generated/async-stripe-shared/src/coupon_currency_option.rs | 1 + generated/async-stripe-shared/src/credit_note.rs | 1 + generated/async-stripe-shared/src/credit_note_line_item.rs | 1 + generated/async-stripe-shared/src/credit_note_tax_amount.rs | 1 + generated/async-stripe-shared/src/currency_option.rs | 1 + generated/async-stripe-shared/src/custom_unit_amount.rs | 1 + generated/async-stripe-shared/src/customer.rs | 1 + generated/async-stripe-shared/src/customer_acceptance.rs | 1 + .../src/customer_balance_customer_balance_settings.rs | 1 + ..._cash_balance_transaction_resource_adjusted_for_overdraft.rs | 1 + ...lance_transaction_resource_applied_to_payment_transaction.rs | 1 + ...urce_cash_balance_transaction_resource_funded_transaction.rs | 1 + ...action_resource_funded_transaction_resource_bank_transfer.rs | 1 + ...nsaction_resource_bank_transfer_resource_eu_bank_transfer.rs | 1 + ...nsaction_resource_bank_transfer_resource_gb_bank_transfer.rs | 1 + ...nsaction_resource_bank_transfer_resource_jp_bank_transfer.rs | 1 + ...nsaction_resource_bank_transfer_resource_us_bank_transfer.rs | 1 + ...ce_transaction_resource_refunded_from_payment_transaction.rs | 1 + ..._cash_balance_transaction_resource_transferred_to_balance.rs | 1 + ...e_transaction_resource_unapplied_from_payment_transaction.rs | 1 + .../async-stripe-shared/src/customer_balance_transaction.rs | 1 + .../src/customer_cash_balance_transaction.rs | 1 + generated/async-stripe-shared/src/customer_tax.rs | 1 + generated/async-stripe-shared/src/customer_tax_location.rs | 1 + generated/async-stripe-shared/src/deleted_account.rs | 1 + generated/async-stripe-shared/src/deleted_bank_account.rs | 1 + generated/async-stripe-shared/src/deleted_card.rs | 1 + generated/async-stripe-shared/src/deleted_coupon.rs | 1 + generated/async-stripe-shared/src/deleted_customer.rs | 1 + generated/async-stripe-shared/src/deleted_discount.rs | 1 + generated/async-stripe-shared/src/deleted_invoice.rs | 1 + generated/async-stripe-shared/src/deleted_invoiceitem.rs | 1 + generated/async-stripe-shared/src/deleted_person.rs | 1 + generated/async-stripe-shared/src/deleted_plan.rs | 1 + generated/async-stripe-shared/src/deleted_product.rs | 1 + generated/async-stripe-shared/src/deleted_subscription_item.rs | 1 + generated/async-stripe-shared/src/deleted_tax_id.rs | 1 + .../async-stripe-shared/src/deleted_test_helpers_test_clock.rs | 1 + .../src/destination_details_unimplemented.rs | 1 + generated/async-stripe-shared/src/discount.rs | 1 + .../src/discounts_resource_discount_amount.rs | 1 + .../src/discounts_resource_stackable_discount.rs | 1 + generated/async-stripe-shared/src/dispute.rs | 1 + generated/async-stripe-shared/src/dispute_evidence.rs | 1 + generated/async-stripe-shared/src/dispute_evidence_details.rs | 1 + .../async-stripe-shared/src/dispute_payment_method_details.rs | 1 + .../src/dispute_payment_method_details_card.rs | 1 + generated/async-stripe-shared/src/email_sent.rs | 1 + generated/async-stripe-shared/src/entitlements_feature.rs | 1 + generated/async-stripe-shared/src/error.rs | 1 + generated/async-stripe-shared/src/event.rs | 1 + .../async-stripe-shared/src/external_account_requirements.rs | 1 + generated/async-stripe-shared/src/fee.rs | 1 + generated/async-stripe-shared/src/file.rs | 1 + generated/async-stripe-shared/src/file_link.rs | 1 + generated/async-stripe-shared/src/funding_instructions.rs | 1 + .../src/funding_instructions_bank_transfer.rs | 1 + .../src/funding_instructions_bank_transfer_aba_record.rs | 1 + .../src/funding_instructions_bank_transfer_financial_address.rs | 1 + .../src/funding_instructions_bank_transfer_iban_record.rs | 1 + .../src/funding_instructions_bank_transfer_sort_code_record.rs | 1 + .../src/funding_instructions_bank_transfer_spei_record.rs | 1 + .../src/funding_instructions_bank_transfer_swift_record.rs | 1 + .../src/funding_instructions_bank_transfer_zengin_record.rs | 1 + generated/async-stripe-shared/src/internal_card.rs | 1 + generated/async-stripe-shared/src/invoice.rs | 1 + generated/async-stripe-shared/src/invoice_installments_card.rs | 1 + generated/async-stripe-shared/src/invoice_item.rs | 1 + .../async-stripe-shared/src/invoice_item_threshold_reason.rs | 1 + generated/async-stripe-shared/src/invoice_line_item.rs | 1 + generated/async-stripe-shared/src/invoice_line_item_period.rs | 1 + .../async-stripe-shared/src/invoice_mandate_options_card.rs | 1 + .../src/invoice_payment_method_options_acss_debit.rs | 1 + ...invoice_payment_method_options_acss_debit_mandate_options.rs | 1 + .../src/invoice_payment_method_options_bancontact.rs | 1 + .../src/invoice_payment_method_options_card.rs | 1 + .../src/invoice_payment_method_options_customer_balance.rs | 1 + ...ice_payment_method_options_customer_balance_bank_transfer.rs | 1 + ...d_options_customer_balance_bank_transfer_eu_bank_transfer.rs | 1 + .../src/invoice_payment_method_options_konbini.rs | 1 + .../src/invoice_payment_method_options_sepa_debit.rs | 1 + .../src/invoice_payment_method_options_us_bank_account.rs | 1 + ...ent_method_options_us_bank_account_linked_account_options.rs | 1 + generated/async-stripe-shared/src/invoice_rendering_pdf.rs | 1 + .../async-stripe-shared/src/invoice_setting_custom_field.rs | 1 + .../src/invoice_setting_customer_rendering_options.rs | 1 + .../async-stripe-shared/src/invoice_setting_customer_setting.rs | 1 + .../async-stripe-shared/src/invoice_setting_quote_setting.rs | 1 + .../src/invoice_setting_rendering_options.rs | 1 + .../src/invoice_setting_subscription_schedule_phase_setting.rs | 1 + .../src/invoice_setting_subscription_schedule_setting.rs | 1 + generated/async-stripe-shared/src/invoice_tax_amount.rs | 1 + generated/async-stripe-shared/src/invoice_threshold_reason.rs | 1 + generated/async-stripe-shared/src/invoice_transfer_data.rs | 1 + .../async-stripe-shared/src/invoices_payment_method_options.rs | 1 + generated/async-stripe-shared/src/invoices_payment_settings.rs | 1 + .../async-stripe-shared/src/invoices_resource_from_invoice.rs | 1 + .../src/invoices_resource_invoice_rendering.rs | 1 + .../async-stripe-shared/src/invoices_resource_invoice_tax_id.rs | 1 + .../src/invoices_resource_line_items_credited_items.rs | 1 + .../src/invoices_resource_line_items_proration_details.rs | 1 + .../async-stripe-shared/src/invoices_resource_shipping_cost.rs | 1 + .../src/invoices_resource_status_transitions.rs | 1 + generated/async-stripe-shared/src/issuing_authorization.rs | 1 + .../src/issuing_authorization_amount_details.rs | 1 + .../src/issuing_authorization_authentication_exemption.rs | 1 + .../src/issuing_authorization_merchant_data.rs | 1 + .../src/issuing_authorization_network_data.rs | 1 + .../src/issuing_authorization_pending_request.rs | 1 + .../async-stripe-shared/src/issuing_authorization_request.rs | 1 + .../src/issuing_authorization_three_d_secure.rs | 1 + .../async-stripe-shared/src/issuing_authorization_treasury.rs | 1 + .../src/issuing_authorization_verification_data.rs | 1 + generated/async-stripe-shared/src/issuing_card.rs | 1 + generated/async-stripe-shared/src/issuing_card_apple_pay.rs | 1 + .../src/issuing_card_authorization_controls.rs | 1 + generated/async-stripe-shared/src/issuing_card_google_pay.rs | 1 + generated/async-stripe-shared/src/issuing_card_shipping.rs | 1 + .../async-stripe-shared/src/issuing_card_shipping_customs.rs | 1 + .../async-stripe-shared/src/issuing_card_spending_limit.rs | 1 + generated/async-stripe-shared/src/issuing_card_wallets.rs | 1 + generated/async-stripe-shared/src/issuing_cardholder.rs | 1 + generated/async-stripe-shared/src/issuing_cardholder_address.rs | 1 + .../src/issuing_cardholder_authorization_controls.rs | 1 + .../async-stripe-shared/src/issuing_cardholder_card_issuing.rs | 1 + generated/async-stripe-shared/src/issuing_cardholder_company.rs | 1 + .../async-stripe-shared/src/issuing_cardholder_id_document.rs | 1 + .../async-stripe-shared/src/issuing_cardholder_individual.rs | 1 + .../src/issuing_cardholder_individual_dob.rs | 1 + .../async-stripe-shared/src/issuing_cardholder_requirements.rs | 1 + .../src/issuing_cardholder_spending_limit.rs | 1 + .../src/issuing_cardholder_user_terms_acceptance.rs | 1 + .../async-stripe-shared/src/issuing_cardholder_verification.rs | 1 + generated/async-stripe-shared/src/issuing_dispute.rs | 1 + .../src/issuing_dispute_canceled_evidence.rs | 1 + .../src/issuing_dispute_duplicate_evidence.rs | 1 + generated/async-stripe-shared/src/issuing_dispute_evidence.rs | 1 + .../src/issuing_dispute_fraudulent_evidence.rs | 1 + .../issuing_dispute_merchandise_not_as_described_evidence.rs | 1 + .../src/issuing_dispute_not_received_evidence.rs | 1 + .../async-stripe-shared/src/issuing_dispute_other_evidence.rs | 1 + .../src/issuing_dispute_service_not_as_described_evidence.rs | 1 + generated/async-stripe-shared/src/issuing_dispute_treasury.rs | 1 + .../async-stripe-shared/src/issuing_network_token_address.rs | 1 + .../async-stripe-shared/src/issuing_network_token_device.rs | 1 + .../async-stripe-shared/src/issuing_network_token_mastercard.rs | 1 + .../src/issuing_network_token_network_data.rs | 1 + generated/async-stripe-shared/src/issuing_network_token_visa.rs | 1 + .../src/issuing_network_token_wallet_provider.rs | 1 + .../async-stripe-shared/src/issuing_personalization_design.rs | 1 + .../src/issuing_personalization_design_carrier_text.rs | 1 + .../src/issuing_personalization_design_preferences.rs | 1 + .../src/issuing_personalization_design_rejection_reasons.rs | 1 + generated/async-stripe-shared/src/issuing_physical_bundle.rs | 1 + .../async-stripe-shared/src/issuing_physical_bundle_features.rs | 1 + generated/async-stripe-shared/src/issuing_token.rs | 1 + generated/async-stripe-shared/src/issuing_transaction.rs | 1 + .../src/issuing_transaction_amount_details.rs | 1 + .../async-stripe-shared/src/issuing_transaction_flight_data.rs | 1 + .../src/issuing_transaction_flight_data_leg.rs | 1 + .../async-stripe-shared/src/issuing_transaction_fuel_data.rs | 1 + .../async-stripe-shared/src/issuing_transaction_lodging_data.rs | 1 + .../async-stripe-shared/src/issuing_transaction_network_data.rs | 1 + .../src/issuing_transaction_purchase_details.rs | 1 + .../async-stripe-shared/src/issuing_transaction_receipt_data.rs | 1 + .../async-stripe-shared/src/issuing_transaction_treasury.rs | 1 + generated/async-stripe-shared/src/legal_entity_company.rs | 1 + .../src/legal_entity_company_verification.rs | 1 + .../src/legal_entity_company_verification_document.rs | 1 + generated/async-stripe-shared/src/legal_entity_dob.rs | 1 + generated/async-stripe-shared/src/legal_entity_japan_address.rs | 1 + .../async-stripe-shared/src/legal_entity_person_verification.rs | 1 + .../src/legal_entity_person_verification_document.rs | 1 + .../async-stripe-shared/src/legal_entity_ubo_declaration.rs | 1 + generated/async-stripe-shared/src/level3.rs | 1 + generated/async-stripe-shared/src/level3_line_items.rs | 1 + generated/async-stripe-shared/src/line_items_discount_amount.rs | 1 + generated/async-stripe-shared/src/line_items_tax_amount.rs | 1 + .../src/linked_account_options_us_bank_account.rs | 1 + generated/async-stripe-shared/src/mandate.rs | 1 + generated/async-stripe-shared/src/mandate_acss_debit.rs | 1 + generated/async-stripe-shared/src/mandate_amazon_pay.rs | 1 + generated/async-stripe-shared/src/mandate_au_becs_debit.rs | 1 + generated/async-stripe-shared/src/mandate_bacs_debit.rs | 1 + generated/async-stripe-shared/src/mandate_cashapp.rs | 1 + generated/async-stripe-shared/src/mandate_link.rs | 1 + generated/async-stripe-shared/src/mandate_multi_use.rs | 1 + .../async-stripe-shared/src/mandate_payment_method_details.rs | 1 + generated/async-stripe-shared/src/mandate_paypal.rs | 1 + generated/async-stripe-shared/src/mandate_revolut_pay.rs | 1 + generated/async-stripe-shared/src/mandate_sepa_debit.rs | 1 + generated/async-stripe-shared/src/mandate_single_use.rs | 1 + generated/async-stripe-shared/src/mandate_us_bank_account.rs | 1 + generated/async-stripe-shared/src/networks.rs | 1 + generated/async-stripe-shared/src/notification_event_data.rs | 1 + generated/async-stripe-shared/src/notification_event_request.rs | 1 + generated/async-stripe-shared/src/offline_acceptance.rs | 1 + generated/async-stripe-shared/src/online_acceptance.rs | 1 + generated/async-stripe-shared/src/package_dimensions.rs | 1 + .../async-stripe-shared/src/payment_flows_amount_details.rs | 1 + .../src/payment_flows_amount_details_resource_tip.rs | 1 + .../payment_flows_automatic_payment_methods_payment_intent.rs | 1 + .../src/payment_flows_automatic_payment_methods_setup_intent.rs | 1 + .../src/payment_flows_private_payment_methods_alipay.rs | 1 + .../src/payment_flows_private_payment_methods_alipay_details.rs | 1 + ...se_features_extended_authorization_extended_authorization.rs | 1 + ...tures_incremental_authorization_incremental_authorization.rs | 1 + ..._api_resource_enterprise_features_overcapture_overcapture.rs | 1 + ...te_payment_methods_card_details_api_resource_multicapture.rs | 1 + .../src/payment_flows_private_payment_methods_klarna_dob.rs | 1 + generated/async-stripe-shared/src/payment_intent.rs | 1 + .../async-stripe-shared/src/payment_intent_card_processing.rs | 1 + generated/async-stripe-shared/src/payment_intent_next_action.rs | 1 + .../src/payment_intent_next_action_alipay_handle_redirect.rs | 1 + .../src/payment_intent_next_action_boleto.rs | 1 + .../src/payment_intent_next_action_card_await_notification.rs | 1 + ...nt_next_action_cashapp_handle_redirect_or_display_qr_code.rs | 1 + .../src/payment_intent_next_action_cashapp_qr_code.rs | 1 + ...ent_intent_next_action_display_bank_transfer_instructions.rs | 1 + .../src/payment_intent_next_action_display_oxxo_details.rs | 1 + .../src/payment_intent_next_action_konbini.rs | 1 + .../src/payment_intent_next_action_konbini_familymart.rs | 1 + .../src/payment_intent_next_action_konbini_lawson.rs | 1 + .../src/payment_intent_next_action_konbini_ministop.rs | 1 + .../src/payment_intent_next_action_konbini_seicomart.rs | 1 + .../src/payment_intent_next_action_konbini_stores.rs | 1 + .../src/payment_intent_next_action_paynow_display_qr_code.rs | 1 + .../src/payment_intent_next_action_pix_display_qr_code.rs | 1 + .../src/payment_intent_next_action_promptpay_display_qr_code.rs | 1 + .../src/payment_intent_next_action_redirect_to_url.rs | 1 + ...tent_next_action_swish_handle_redirect_or_display_qr_code.rs | 1 + .../src/payment_intent_next_action_swish_qr_code.rs | 1 + .../src/payment_intent_next_action_verify_with_microdeposits.rs | 1 + .../payment_intent_next_action_wechat_pay_display_qr_code.rs | 1 + ...ent_intent_next_action_wechat_pay_redirect_to_android_app.rs | 1 + ...payment_intent_next_action_wechat_pay_redirect_to_ios_app.rs | 1 + .../src/payment_intent_payment_method_options.rs | 1 + .../src/payment_intent_payment_method_options_acss_debit.rs | 1 + .../src/payment_intent_payment_method_options_au_becs_debit.rs | 1 + .../src/payment_intent_payment_method_options_blik.rs | 1 + .../src/payment_intent_payment_method_options_card.rs | 1 + .../src/payment_intent_payment_method_options_eps.rs | 1 + .../src/payment_intent_payment_method_options_link.rs | 1 + ..._intent_payment_method_options_mandate_options_acss_debit.rs | 1 + ..._intent_payment_method_options_mandate_options_sepa_debit.rs | 1 + .../src/payment_intent_payment_method_options_mobilepay.rs | 1 + .../src/payment_intent_payment_method_options_sepa_debit.rs | 1 + .../src/payment_intent_payment_method_options_swish.rs | 1 + .../payment_intent_payment_method_options_us_bank_account.rs | 1 + generated/async-stripe-shared/src/payment_intent_processing.rs | 1 + .../src/payment_intent_processing_customer_notification.rs | 1 + generated/async-stripe-shared/src/payment_link.rs | 1 + .../src/payment_links_resource_after_completion.rs | 1 + .../src/payment_links_resource_automatic_tax.rs | 1 + .../src/payment_links_resource_completed_sessions.rs | 1 + ...ment_links_resource_completion_behavior_confirmation_page.rs | 1 + .../src/payment_links_resource_completion_behavior_redirect.rs | 1 + .../src/payment_links_resource_consent_collection.rs | 1 + .../src/payment_links_resource_custom_fields.rs | 1 + .../src/payment_links_resource_custom_fields_dropdown.rs | 1 + .../src/payment_links_resource_custom_fields_dropdown_option.rs | 1 + .../src/payment_links_resource_custom_fields_label.rs | 1 + .../src/payment_links_resource_custom_fields_numeric.rs | 1 + .../src/payment_links_resource_custom_fields_text.rs | 1 + .../src/payment_links_resource_custom_text.rs | 1 + .../src/payment_links_resource_custom_text_position.rs | 1 + .../src/payment_links_resource_invoice_creation.rs | 1 + .../src/payment_links_resource_invoice_settings.rs | 1 + .../src/payment_links_resource_payment_intent_data.rs | 1 + .../payment_links_resource_payment_method_reuse_agreement.rs | 1 + .../src/payment_links_resource_phone_number_collection.rs | 1 + .../src/payment_links_resource_restrictions.rs | 1 + .../src/payment_links_resource_shipping_address_collection.rs | 1 + .../src/payment_links_resource_shipping_option.rs | 1 + .../src/payment_links_resource_subscription_data.rs | 1 + ...payment_links_resource_subscription_data_invoice_settings.rs | 1 + .../src/payment_links_resource_tax_id_collection.rs | 1 + .../src/payment_links_resource_transfer_data.rs | 1 + generated/async-stripe-shared/src/payment_method.rs | 1 + generated/async-stripe-shared/src/payment_method_acss_debit.rs | 1 + generated/async-stripe-shared/src/payment_method_affirm.rs | 1 + .../async-stripe-shared/src/payment_method_afterpay_clearpay.rs | 1 + generated/async-stripe-shared/src/payment_method_amazon_pay.rs | 1 + .../async-stripe-shared/src/payment_method_au_becs_debit.rs | 1 + generated/async-stripe-shared/src/payment_method_bacs_debit.rs | 1 + generated/async-stripe-shared/src/payment_method_bancontact.rs | 1 + generated/async-stripe-shared/src/payment_method_blik.rs | 1 + generated/async-stripe-shared/src/payment_method_boleto.rs | 1 + generated/async-stripe-shared/src/payment_method_card.rs | 1 + generated/async-stripe-shared/src/payment_method_card_checks.rs | 1 + .../async-stripe-shared/src/payment_method_card_present.rs | 1 + .../src/payment_method_card_present_networks.rs | 1 + generated/async-stripe-shared/src/payment_method_card_wallet.rs | 1 + .../src/payment_method_card_wallet_amex_express_checkout.rs | 1 + .../src/payment_method_card_wallet_apple_pay.rs | 1 + .../src/payment_method_card_wallet_google_pay.rs | 1 + .../async-stripe-shared/src/payment_method_card_wallet_link.rs | 1 + .../src/payment_method_card_wallet_masterpass.rs | 1 + .../src/payment_method_card_wallet_samsung_pay.rs | 1 + .../src/payment_method_card_wallet_visa_checkout.rs | 1 + generated/async-stripe-shared/src/payment_method_cashapp.rs | 1 + ...nt_method_config_biz_payment_method_configuration_details.rs | 1 + .../async-stripe-shared/src/payment_method_customer_balance.rs | 1 + generated/async-stripe-shared/src/payment_method_details.rs | 1 + .../src/payment_method_details_ach_credit_transfer.rs | 1 + .../async-stripe-shared/src/payment_method_details_ach_debit.rs | 1 + .../src/payment_method_details_acss_debit.rs | 1 + .../async-stripe-shared/src/payment_method_details_affirm.rs | 1 + .../src/payment_method_details_afterpay_clearpay.rs | 1 + .../src/payment_method_details_amazon_pay.rs | 1 + .../src/payment_method_details_au_becs_debit.rs | 1 + .../src/payment_method_details_bacs_debit.rs | 1 + .../src/payment_method_details_bancontact.rs | 1 + .../async-stripe-shared/src/payment_method_details_blik.rs | 1 + .../async-stripe-shared/src/payment_method_details_boleto.rs | 1 + .../async-stripe-shared/src/payment_method_details_card.rs | 1 + .../src/payment_method_details_card_checks.rs | 1 + .../src/payment_method_details_card_installments.rs | 1 + .../src/payment_method_details_card_installments_plan.rs | 1 + .../src/payment_method_details_card_network_token.rs | 1 + .../src/payment_method_details_card_present.rs | 1 + .../src/payment_method_details_card_present_offline.rs | 1 + .../src/payment_method_details_card_present_receipt.rs | 1 + .../src/payment_method_details_card_wallet.rs | 1 + .../payment_method_details_card_wallet_amex_express_checkout.rs | 1 + .../src/payment_method_details_card_wallet_apple_pay.rs | 1 + .../src/payment_method_details_card_wallet_google_pay.rs | 1 + .../src/payment_method_details_card_wallet_link.rs | 1 + .../src/payment_method_details_card_wallet_masterpass.rs | 1 + .../src/payment_method_details_card_wallet_samsung_pay.rs | 1 + .../src/payment_method_details_card_wallet_visa_checkout.rs | 1 + .../async-stripe-shared/src/payment_method_details_cashapp.rs | 1 + .../src/payment_method_details_customer_balance.rs | 1 + generated/async-stripe-shared/src/payment_method_details_eps.rs | 1 + generated/async-stripe-shared/src/payment_method_details_fpx.rs | 1 + .../async-stripe-shared/src/payment_method_details_giropay.rs | 1 + .../async-stripe-shared/src/payment_method_details_grabpay.rs | 1 + .../async-stripe-shared/src/payment_method_details_ideal.rs | 1 + .../src/payment_method_details_interac_present.rs | 1 + .../src/payment_method_details_interac_present_receipt.rs | 1 + .../async-stripe-shared/src/payment_method_details_klarna.rs | 1 + .../async-stripe-shared/src/payment_method_details_konbini.rs | 1 + .../src/payment_method_details_konbini_store.rs | 1 + .../async-stripe-shared/src/payment_method_details_link.rs | 1 + .../async-stripe-shared/src/payment_method_details_mobilepay.rs | 1 + .../src/payment_method_details_multibanco.rs | 1 + .../async-stripe-shared/src/payment_method_details_oxxo.rs | 1 + generated/async-stripe-shared/src/payment_method_details_p24.rs | 1 + .../async-stripe-shared/src/payment_method_details_paynow.rs | 1 + .../async-stripe-shared/src/payment_method_details_paypal.rs | 1 + generated/async-stripe-shared/src/payment_method_details_pix.rs | 1 + .../async-stripe-shared/src/payment_method_details_promptpay.rs | 1 + .../src/payment_method_details_revolut_pay.rs | 1 + .../src/payment_method_details_sepa_credit_transfer.rs | 1 + .../src/payment_method_details_sepa_debit.rs | 1 + .../async-stripe-shared/src/payment_method_details_sofort.rs | 1 + .../src/payment_method_details_stripe_account.rs | 1 + .../async-stripe-shared/src/payment_method_details_swish.rs | 1 + .../src/payment_method_details_us_bank_account.rs | 1 + .../async-stripe-shared/src/payment_method_details_wechat.rs | 1 + .../src/payment_method_details_wechat_pay.rs | 1 + generated/async-stripe-shared/src/payment_method_details_zip.rs | 1 + generated/async-stripe-shared/src/payment_method_eps.rs | 1 + generated/async-stripe-shared/src/payment_method_fpx.rs | 1 + generated/async-stripe-shared/src/payment_method_giropay.rs | 1 + generated/async-stripe-shared/src/payment_method_grabpay.rs | 1 + generated/async-stripe-shared/src/payment_method_ideal.rs | 1 + .../async-stripe-shared/src/payment_method_interac_present.rs | 1 + generated/async-stripe-shared/src/payment_method_klarna.rs | 1 + generated/async-stripe-shared/src/payment_method_konbini.rs | 1 + generated/async-stripe-shared/src/payment_method_link.rs | 1 + generated/async-stripe-shared/src/payment_method_mobilepay.rs | 1 + .../async-stripe-shared/src/payment_method_options_affirm.rs | 1 + .../src/payment_method_options_afterpay_clearpay.rs | 1 + .../async-stripe-shared/src/payment_method_options_alipay.rs | 1 + .../src/payment_method_options_amazon_pay.rs | 1 + .../src/payment_method_options_bacs_debit.rs | 1 + .../src/payment_method_options_bancontact.rs | 1 + .../async-stripe-shared/src/payment_method_options_boleto.rs | 1 + .../src/payment_method_options_card_installments.rs | 1 + .../src/payment_method_options_card_mandate_options.rs | 1 + .../src/payment_method_options_card_present.rs | 1 + .../async-stripe-shared/src/payment_method_options_cashapp.rs | 1 + .../src/payment_method_options_customer_balance.rs | 1 + .../payment_method_options_customer_balance_bank_transfer.rs | 1 + .../payment_method_options_customer_balance_eu_bank_account.rs | 1 + generated/async-stripe-shared/src/payment_method_options_fpx.rs | 1 + .../async-stripe-shared/src/payment_method_options_giropay.rs | 1 + .../async-stripe-shared/src/payment_method_options_grabpay.rs | 1 + .../async-stripe-shared/src/payment_method_options_ideal.rs | 1 + .../src/payment_method_options_interac_present.rs | 1 + .../async-stripe-shared/src/payment_method_options_klarna.rs | 1 + .../async-stripe-shared/src/payment_method_options_konbini.rs | 1 + .../async-stripe-shared/src/payment_method_options_oxxo.rs | 1 + generated/async-stripe-shared/src/payment_method_options_p24.rs | 1 + .../async-stripe-shared/src/payment_method_options_paynow.rs | 1 + .../async-stripe-shared/src/payment_method_options_paypal.rs | 1 + generated/async-stripe-shared/src/payment_method_options_pix.rs | 1 + .../async-stripe-shared/src/payment_method_options_promptpay.rs | 1 + .../src/payment_method_options_revolut_pay.rs | 1 + .../async-stripe-shared/src/payment_method_options_sofort.rs | 1 + .../payment_method_options_us_bank_account_mandate_options.rs | 1 + .../src/payment_method_options_wechat_pay.rs | 1 + generated/async-stripe-shared/src/payment_method_options_zip.rs | 1 + generated/async-stripe-shared/src/payment_method_oxxo.rs | 1 + generated/async-stripe-shared/src/payment_method_p24.rs | 1 + generated/async-stripe-shared/src/payment_method_paynow.rs | 1 + generated/async-stripe-shared/src/payment_method_paypal.rs | 1 + generated/async-stripe-shared/src/payment_method_pix.rs | 1 + generated/async-stripe-shared/src/payment_method_promptpay.rs | 1 + generated/async-stripe-shared/src/payment_method_revolut_pay.rs | 1 + generated/async-stripe-shared/src/payment_method_sepa_debit.rs | 1 + generated/async-stripe-shared/src/payment_method_sofort.rs | 1 + generated/async-stripe-shared/src/payment_method_swish.rs | 1 + .../async-stripe-shared/src/payment_method_us_bank_account.rs | 1 + .../src/payment_method_us_bank_account_blocked.rs | 1 + .../src/payment_method_us_bank_account_status_details.rs | 1 + generated/async-stripe-shared/src/payment_method_wechat_pay.rs | 1 + generated/async-stripe-shared/src/payment_method_zip.rs | 1 + generated/async-stripe-shared/src/payout.rs | 1 + generated/async-stripe-shared/src/paypal_seller_protection.rs | 1 + generated/async-stripe-shared/src/period.rs | 1 + generated/async-stripe-shared/src/person.rs | 1 + .../async-stripe-shared/src/person_additional_tos_acceptance.rs | 1 + .../src/person_additional_tos_acceptances.rs | 1 + generated/async-stripe-shared/src/person_future_requirements.rs | 1 + generated/async-stripe-shared/src/person_relationship.rs | 1 + generated/async-stripe-shared/src/person_requirements.rs | 1 + generated/async-stripe-shared/src/plan.rs | 1 + generated/async-stripe-shared/src/plan_tier.rs | 1 + generated/async-stripe-shared/src/platform_tax_fee.rs | 1 + generated/async-stripe-shared/src/price.rs | 1 + generated/async-stripe-shared/src/price_tier.rs | 1 + generated/async-stripe-shared/src/product.rs | 1 + generated/async-stripe-shared/src/product_marketing_feature.rs | 1 + generated/async-stripe-shared/src/promotion_code.rs | 1 + .../async-stripe-shared/src/promotion_code_currency_option.rs | 1 + .../src/promotion_codes_resource_restrictions.rs | 1 + generated/async-stripe-shared/src/quote.rs | 1 + .../async-stripe-shared/src/quotes_resource_automatic_tax.rs | 1 + generated/async-stripe-shared/src/quotes_resource_computed.rs | 1 + generated/async-stripe-shared/src/quotes_resource_from_quote.rs | 1 + generated/async-stripe-shared/src/quotes_resource_recurring.rs | 1 + .../src/quotes_resource_status_transitions.rs | 1 + .../src/quotes_resource_subscription_data_subscription_data.rs | 1 + .../async-stripe-shared/src/quotes_resource_total_details.rs | 1 + .../src/quotes_resource_total_details_resource_breakdown.rs | 1 + .../async-stripe-shared/src/quotes_resource_transfer_data.rs | 1 + generated/async-stripe-shared/src/quotes_resource_upfront.rs | 1 + generated/async-stripe-shared/src/radar_radar_options.rs | 1 + .../async-stripe-shared/src/radar_review_resource_location.rs | 1 + .../async-stripe-shared/src/radar_review_resource_session.rs | 1 + generated/async-stripe-shared/src/recurring.rs | 1 + generated/async-stripe-shared/src/refund.rs | 1 + generated/async-stripe-shared/src/refund_destination_details.rs | 1 + .../async-stripe-shared/src/refund_destination_details_card.rs | 1 + .../src/refund_destination_details_generic.rs | 1 + generated/async-stripe-shared/src/refund_next_action.rs | 1 + .../src/refund_next_action_display_details.rs | 1 + generated/async-stripe-shared/src/reserve_transaction.rs | 1 + generated/async-stripe-shared/src/review.rs | 1 + generated/async-stripe-shared/src/rule.rs | 1 + .../async-stripe-shared/src/schedules_phase_automatic_tax.rs | 1 + generated/async-stripe-shared/src/sepa_debit_generated_from.rs | 1 + generated/async-stripe-shared/src/setup_attempt.rs | 1 + .../src/setup_attempt_payment_method_details.rs | 1 + .../src/setup_attempt_payment_method_details_acss_debit.rs | 1 + .../src/setup_attempt_payment_method_details_amazon_pay.rs | 1 + .../src/setup_attempt_payment_method_details_au_becs_debit.rs | 1 + .../src/setup_attempt_payment_method_details_bacs_debit.rs | 1 + .../src/setup_attempt_payment_method_details_bancontact.rs | 1 + .../src/setup_attempt_payment_method_details_boleto.rs | 1 + .../src/setup_attempt_payment_method_details_card.rs | 1 + .../src/setup_attempt_payment_method_details_card_checks.rs | 1 + .../src/setup_attempt_payment_method_details_card_present.rs | 1 + .../src/setup_attempt_payment_method_details_card_wallet.rs | 1 + .../src/setup_attempt_payment_method_details_cashapp.rs | 1 + .../src/setup_attempt_payment_method_details_ideal.rs | 1 + .../src/setup_attempt_payment_method_details_klarna.rs | 1 + .../src/setup_attempt_payment_method_details_link.rs | 1 + .../src/setup_attempt_payment_method_details_paypal.rs | 1 + .../src/setup_attempt_payment_method_details_revolut_pay.rs | 1 + .../src/setup_attempt_payment_method_details_sepa_debit.rs | 1 + .../src/setup_attempt_payment_method_details_sofort.rs | 1 + .../src/setup_attempt_payment_method_details_us_bank_account.rs | 1 + generated/async-stripe-shared/src/setup_intent.rs | 1 + generated/async-stripe-shared/src/setup_intent_next_action.rs | 1 + .../src/setup_intent_next_action_redirect_to_url.rs | 1 + .../src/setup_intent_next_action_verify_with_microdeposits.rs | 1 + .../src/setup_intent_payment_method_options.rs | 1 + .../src/setup_intent_payment_method_options_acss_debit.rs | 1 + .../src/setup_intent_payment_method_options_amazon_pay.rs | 1 + .../src/setup_intent_payment_method_options_card.rs | 1 + .../setup_intent_payment_method_options_card_mandate_options.rs | 1 + .../src/setup_intent_payment_method_options_card_present.rs | 1 + .../src/setup_intent_payment_method_options_link.rs | 1 + ..._intent_payment_method_options_mandate_options_acss_debit.rs | 1 + ..._intent_payment_method_options_mandate_options_sepa_debit.rs | 1 + .../src/setup_intent_payment_method_options_paypal.rs | 1 + .../src/setup_intent_payment_method_options_sepa_debit.rs | 1 + .../src/setup_intent_payment_method_options_us_bank_account.rs | 1 + generated/async-stripe-shared/src/shipping.rs | 1 + generated/async-stripe-shared/src/shipping_rate.rs | 1 + .../async-stripe-shared/src/shipping_rate_currency_option.rs | 1 + .../async-stripe-shared/src/shipping_rate_delivery_estimate.rs | 1 + .../src/shipping_rate_delivery_estimate_bound.rs | 1 + generated/async-stripe-shared/src/shipping_rate_fixed_amount.rs | 1 + generated/async-stripe-shared/src/source.rs | 1 + .../async-stripe-shared/src/source_code_verification_flow.rs | 1 + generated/async-stripe-shared/src/source_order.rs | 1 + generated/async-stripe-shared/src/source_order_item.rs | 1 + generated/async-stripe-shared/src/source_owner.rs | 1 + generated/async-stripe-shared/src/source_receiver_flow.rs | 1 + generated/async-stripe-shared/src/source_redirect_flow.rs | 1 + generated/async-stripe-shared/src/source_transaction.rs | 1 + .../src/source_transaction_ach_credit_transfer_data.rs | 1 + .../src/source_transaction_chf_credit_transfer_data.rs | 1 + .../src/source_transaction_gbp_credit_transfer_data.rs | 1 + .../src/source_transaction_paper_check_data.rs | 1 + .../src/source_transaction_sepa_credit_transfer_data.rs | 1 + .../async-stripe-shared/src/source_type_ach_credit_transfer.rs | 1 + generated/async-stripe-shared/src/source_type_ach_debit.rs | 1 + generated/async-stripe-shared/src/source_type_acss_debit.rs | 1 + generated/async-stripe-shared/src/source_type_alipay.rs | 1 + generated/async-stripe-shared/src/source_type_au_becs_debit.rs | 1 + generated/async-stripe-shared/src/source_type_bancontact.rs | 1 + generated/async-stripe-shared/src/source_type_card.rs | 1 + generated/async-stripe-shared/src/source_type_card_present.rs | 1 + generated/async-stripe-shared/src/source_type_eps.rs | 1 + generated/async-stripe-shared/src/source_type_giropay.rs | 1 + generated/async-stripe-shared/src/source_type_ideal.rs | 1 + generated/async-stripe-shared/src/source_type_klarna.rs | 1 + generated/async-stripe-shared/src/source_type_multibanco.rs | 1 + generated/async-stripe-shared/src/source_type_p24.rs | 1 + .../async-stripe-shared/src/source_type_sepa_credit_transfer.rs | 1 + generated/async-stripe-shared/src/source_type_sepa_debit.rs | 1 + generated/async-stripe-shared/src/source_type_sofort.rs | 1 + generated/async-stripe-shared/src/source_type_three_d_secure.rs | 1 + generated/async-stripe-shared/src/source_type_wechat.rs | 1 + generated/async-stripe-shared/src/subscription.rs | 1 + generated/async-stripe-shared/src/subscription_automatic_tax.rs | 1 + .../async-stripe-shared/src/subscription_billing_thresholds.rs | 1 + generated/async-stripe-shared/src/subscription_details_data.rs | 1 + generated/async-stripe-shared/src/subscription_item.rs | 1 + .../src/subscription_item_billing_thresholds.rs | 1 + .../src/subscription_payment_method_options_card.rs | 1 + .../src/subscription_pending_invoice_item_interval.rs | 1 + generated/async-stripe-shared/src/subscription_schedule.rs | 1 + .../src/subscription_schedule_add_invoice_item.rs | 1 + .../src/subscription_schedule_configuration_item.rs | 1 + .../src/subscription_schedule_current_phase.rs | 1 + .../src/subscription_schedule_phase_configuration.rs | 1 + .../src/subscription_schedules_resource_default_settings.rs | 1 + ...ription_schedules_resource_default_settings_automatic_tax.rs | 1 + generated/async-stripe-shared/src/subscription_transfer_data.rs | 1 + .../src/subscriptions_resource_billing_cycle_anchor_config.rs | 1 + .../src/subscriptions_resource_pause_collection.rs | 1 + .../src/subscriptions_resource_payment_method_options.rs | 1 + .../src/subscriptions_resource_payment_settings.rs | 1 + .../src/subscriptions_resource_pending_update.rs | 1 + .../src/subscriptions_trials_resource_end_behavior.rs | 1 + .../src/subscriptions_trials_resource_trial_settings.rs | 1 + generated/async-stripe-shared/src/tax_code.rs | 1 + generated/async-stripe-shared/src/tax_deducted_at_source.rs | 1 + generated/async-stripe-shared/src/tax_i_ds_owner.rs | 1 + generated/async-stripe-shared/src/tax_id.rs | 1 + generated/async-stripe-shared/src/tax_id_verification.rs | 1 + generated/async-stripe-shared/src/tax_rate.rs | 1 + generated/async-stripe-shared/src/test_helpers_test_clock.rs | 1 + generated/async-stripe-shared/src/three_d_secure_details.rs | 1 + .../async-stripe-shared/src/three_d_secure_details_charge.rs | 1 + generated/async-stripe-shared/src/three_d_secure_usage.rs | 1 + generated/async-stripe-shared/src/token_card_networks.rs | 1 + generated/async-stripe-shared/src/topup.rs | 1 + generated/async-stripe-shared/src/transfer.rs | 1 + generated/async-stripe-shared/src/transfer_data.rs | 1 + generated/async-stripe-shared/src/transfer_reversal.rs | 1 + generated/async-stripe-shared/src/transfer_schedule.rs | 1 + generated/async-stripe-shared/src/transform_quantity.rs | 1 + generated/async-stripe-shared/src/transform_usage.rs | 1 + generated/async-stripe-shared/src/us_bank_account_networks.rs | 1 + generated/async-stripe-shared/src/usage_record_summary.rs | 1 + .../async-stripe-terminal/src/deleted_terminal_configuration.rs | 1 + .../async-stripe-terminal/src/deleted_terminal_location.rs | 1 + generated/async-stripe-terminal/src/deleted_terminal_reader.rs | 1 + .../async-stripe-terminal/src/terminal_configuration/types.rs | 1 + ...iguration_configuration_resource_currency_specific_config.rs | 1 + ...ration_configuration_resource_device_type_specific_config.rs | 1 + ...minal_configuration_configuration_resource_offline_config.rs | 1 + .../terminal_configuration_configuration_resource_tipping.rs | 1 + .../src/terminal_connection_token/types.rs | 1 + generated/async-stripe-terminal/src/terminal_location/types.rs | 1 + generated/async-stripe-terminal/src/terminal_reader/types.rs | 1 + .../src/terminal_reader_reader_resource_cart.rs | 1 + .../src/terminal_reader_reader_resource_line_item.rs | 1 + .../src/terminal_reader_reader_resource_process_config.rs | 1 + ...inal_reader_reader_resource_process_payment_intent_action.rs | 1 + .../src/terminal_reader_reader_resource_process_setup_config.rs | 1 + ...rminal_reader_reader_resource_process_setup_intent_action.rs | 1 + .../src/terminal_reader_reader_resource_reader_action.rs | 1 + .../terminal_reader_reader_resource_refund_payment_action.rs | 1 + .../terminal_reader_reader_resource_refund_payment_config.rs | 1 + ...terminal_reader_reader_resource_set_reader_display_action.rs | 1 + .../src/terminal_reader_reader_resource_tipping_config.rs | 1 + generated/async-stripe-treasury/src/inbound_transfers.rs | 1 + .../inbound_transfers_payment_method_details_us_bank_account.rs | 1 + .../src/outbound_payments_payment_method_details.rs | 1 + ...utbound_payments_payment_method_details_financial_account.rs | 1 + .../outbound_payments_payment_method_details_us_bank_account.rs | 1 + .../src/outbound_transfers_payment_method_details.rs | 1 + ...outbound_transfers_payment_method_details_us_bank_account.rs | 1 + .../src/received_payment_method_details_financial_account.rs | 1 + .../async-stripe-treasury/src/treasury_credit_reversal/types.rs | 1 + .../async-stripe-treasury/src/treasury_debit_reversal/types.rs | 1 + .../src/treasury_financial_account/types.rs | 1 + .../src/treasury_financial_account_features.rs | 1 + .../src/treasury_financial_accounts_resource_aba_record.rs | 1 + .../treasury_financial_accounts_resource_aba_toggle_settings.rs | 1 + .../treasury_financial_accounts_resource_ach_toggle_settings.rs | 1 + .../src/treasury_financial_accounts_resource_balance.rs | 1 + ...reasury_financial_accounts_resource_closed_status_details.rs | 1 + .../treasury_financial_accounts_resource_financial_address.rs | 1 + ..._financial_accounts_resource_financial_addresses_features.rs | 1 + .../treasury_financial_accounts_resource_inbound_transfers.rs | 1 + .../treasury_financial_accounts_resource_outbound_payments.rs | 1 + .../treasury_financial_accounts_resource_outbound_transfers.rs | 1 + ...reasury_financial_accounts_resource_platform_restrictions.rs | 1 + .../src/treasury_financial_accounts_resource_status_details.rs | 1 + .../src/treasury_financial_accounts_resource_toggle_settings.rs | 1 + ...inancial_accounts_resource_toggles_setting_status_details.rs | 1 + .../src/treasury_inbound_transfer/types.rs | 1 + .../src/treasury_inbound_transfers_resource_failure_details.rs | 1 + ...transfers_resource_inbound_transfer_resource_linked_flows.rs | 1 + ...ers_resource_inbound_transfer_resource_status_transitions.rs | 1 + .../src/treasury_outbound_payment/types.rs | 1 + ...ments_resource_outbound_payment_resource_end_user_details.rs | 1 + ...nts_resource_outbound_payment_resource_status_transitions.rs | 1 + .../src/treasury_outbound_payments_resource_returned_status.rs | 1 + .../src/treasury_outbound_transfer/types.rs | 1 + .../treasury_outbound_transfers_resource_returned_details.rs | 1 + .../treasury_outbound_transfers_resource_status_transitions.rs | 1 + .../async-stripe-treasury/src/treasury_received_credit/types.rs | 1 + .../src/treasury_received_credits_resource_linked_flows.rs | 1 + .../src/treasury_received_credits_resource_reversal_details.rs | 1 + .../treasury_received_credits_resource_source_flows_details.rs | 1 + .../treasury_received_credits_resource_status_transitions.rs | 1 + .../async-stripe-treasury/src/treasury_received_debit/types.rs | 1 + ...sury_received_debits_resource_debit_reversal_linked_flows.rs | 1 + .../src/treasury_received_debits_resource_linked_flows.rs | 1 + .../src/treasury_received_debits_resource_reversal_details.rs | 1 + .../src/treasury_received_debits_resource_status_transitions.rs | 1 + .../src/treasury_shared_resource_billing_details.rs | 1 + ..._payment_method_details_initiating_payment_method_details.rs | 1 + ...esource_initiating_payment_method_details_us_bank_account.rs | 1 + .../async-stripe-treasury/src/treasury_transaction/types.rs | 1 + .../src/treasury_transaction_entry/types.rs | 1 + ...resource_abstract_transaction_resource_status_transitions.rs | 1 + .../src/treasury_transactions_resource_balance_impact.rs | 1 + .../src/treasury_transactions_resource_flow_details.rs | 1 + openapi/src/templates/miniserde.rs | 2 +- 963 files changed, 963 insertions(+), 3 deletions(-) diff --git a/.github/workflows/async-stripe.yml b/.github/workflows/async-stripe.yml index 977418aa7..aab9588d7 100644 --- a/.github/workflows/async-stripe.yml +++ b/.github/workflows/async-stripe.yml @@ -138,7 +138,7 @@ jobs: ] services: stripe-mock: - image: stripe/stripe-mock + image: stripe/stripe-mock:v0.185.0 ports: - 12111:12111 - 12112:12112 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 72e8ee012..b4cc33c81 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -75,7 +75,7 @@ To run the tests, you will need to run a [`stripe-mock`](https://github.com/stripe/stripe-mock) server and select a runtime. CI runs tests against all runtimes, but it is encouraged you test your changes locally against a few runtimes first. ```sh -docker run --rm -d -it -p 12111-12112:12111-12112 stripe/stripe-mock:latest +docker run --rm -d -it -p 12111-12112:12111-12112 stripe/stripe-mock:v0.185.0 cargo test --features runtime-blocking ``` diff --git a/generated/async-stripe-billing/src/billing_meter/types.rs b/generated/async-stripe-billing/src/billing_meter/types.rs index e35b3e895..696a375dc 100644 --- a/generated/async-stripe-billing/src/billing_meter/types.rs +++ b/generated/async-stripe-billing/src/billing_meter/types.rs @@ -45,6 +45,7 @@ pub struct BillingMeterBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 a0f9ae116..fe878c32a 100644 --- a/generated/async-stripe-billing/src/billing_meter_event/types.rs +++ b/generated/async-stripe-billing/src/billing_meter_event/types.rs @@ -32,6 +32,7 @@ pub struct BillingMeterEventBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 a05e6d578..af55f2891 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 @@ -28,6 +28,7 @@ pub struct BillingMeterEventAdjustmentBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 ff49a6c23..cf57b5f7b 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 @@ -31,6 +31,7 @@ pub struct BillingMeterEventSummaryBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/billing_meter_resource_aggregation_settings.rs b/generated/async-stripe-billing/src/billing_meter_resource_aggregation_settings.rs index d3e85b1a0..0877b74db 100644 --- a/generated/async-stripe-billing/src/billing_meter_resource_aggregation_settings.rs +++ b/generated/async-stripe-billing/src/billing_meter_resource_aggregation_settings.rs @@ -13,6 +13,7 @@ pub struct BillingMeterResourceAggregationSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_event_adjustment_cancel.rs b/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_event_adjustment_cancel.rs index cf7513851..d1fadb4cc 100644 --- a/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_event_adjustment_cancel.rs +++ b/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_event_adjustment_cancel.rs @@ -13,6 +13,7 @@ pub struct BillingMeterResourceBillingMeterEventAdjustmentCancelBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_status_transitions.rs b/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_status_transitions.rs index 259411c85..821fa3238 100644 --- a/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_status_transitions.rs +++ b/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_status_transitions.rs @@ -13,6 +13,7 @@ pub struct BillingMeterResourceBillingMeterStatusTransitionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_value.rs b/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_value.rs index 8fd4b41cf..1763e657e 100644 --- a/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_value.rs +++ b/generated/async-stripe-billing/src/billing_meter_resource_billing_meter_value.rs @@ -13,6 +13,7 @@ pub struct BillingMeterResourceBillingMeterValueBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/billing_meter_resource_customer_mapping_settings.rs b/generated/async-stripe-billing/src/billing_meter_resource_customer_mapping_settings.rs index 4a27c2218..75cf4c596 100644 --- a/generated/async-stripe-billing/src/billing_meter_resource_customer_mapping_settings.rs +++ b/generated/async-stripe-billing/src/billing_meter_resource_customer_mapping_settings.rs @@ -17,6 +17,7 @@ pub struct BillingMeterResourceCustomerMappingSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 4a7819839..5467ae260 100644 --- a/generated/async-stripe-billing/src/billing_portal_configuration/types.rs +++ b/generated/async-stripe-billing/src/billing_portal_configuration/types.rs @@ -46,6 +46,7 @@ pub struct BillingPortalConfigurationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 7b23c3bb0..ee31443e5 100644 --- a/generated/async-stripe-billing/src/billing_portal_session/types.rs +++ b/generated/async-stripe-billing/src/billing_portal_session/types.rs @@ -58,6 +58,7 @@ pub struct BillingPortalSessionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_business_profile.rs b/generated/async-stripe-billing/src/portal_business_profile.rs index 6348365ad..c4a726d6c 100644 --- a/generated/async-stripe-billing/src/portal_business_profile.rs +++ b/generated/async-stripe-billing/src/portal_business_profile.rs @@ -19,6 +19,7 @@ pub struct PortalBusinessProfileBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_customer_update.rs b/generated/async-stripe-billing/src/portal_customer_update.rs index 7ae53e7e2..7445cd8ea 100644 --- a/generated/async-stripe-billing/src/portal_customer_update.rs +++ b/generated/async-stripe-billing/src/portal_customer_update.rs @@ -16,6 +16,7 @@ pub struct PortalCustomerUpdateBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_features.rs b/generated/async-stripe-billing/src/portal_features.rs index 67f645eb8..5330296a2 100644 --- a/generated/async-stripe-billing/src/portal_features.rs +++ b/generated/async-stripe-billing/src/portal_features.rs @@ -20,6 +20,7 @@ pub struct PortalFeaturesBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_flows_after_completion_hosted_confirmation.rs b/generated/async-stripe-billing/src/portal_flows_after_completion_hosted_confirmation.rs index 8ab4425e4..7100d8105 100644 --- a/generated/async-stripe-billing/src/portal_flows_after_completion_hosted_confirmation.rs +++ b/generated/async-stripe-billing/src/portal_flows_after_completion_hosted_confirmation.rs @@ -13,6 +13,7 @@ pub struct PortalFlowsAfterCompletionHostedConfirmationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_flows_after_completion_redirect.rs b/generated/async-stripe-billing/src/portal_flows_after_completion_redirect.rs index f4f9fc18a..c6c0f2227 100644 --- a/generated/async-stripe-billing/src/portal_flows_after_completion_redirect.rs +++ b/generated/async-stripe-billing/src/portal_flows_after_completion_redirect.rs @@ -13,6 +13,7 @@ pub struct PortalFlowsAfterCompletionRedirectBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_flows_coupon_offer.rs b/generated/async-stripe-billing/src/portal_flows_coupon_offer.rs index 16187d7f8..577f006e0 100644 --- a/generated/async-stripe-billing/src/portal_flows_coupon_offer.rs +++ b/generated/async-stripe-billing/src/portal_flows_coupon_offer.rs @@ -13,6 +13,7 @@ pub struct PortalFlowsCouponOfferBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_flows_flow.rs b/generated/async-stripe-billing/src/portal_flows_flow.rs index 508b5b677..3cfb87a6a 100644 --- a/generated/async-stripe-billing/src/portal_flows_flow.rs +++ b/generated/async-stripe-billing/src/portal_flows_flow.rs @@ -27,6 +27,7 @@ pub struct PortalFlowsFlowBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_flows_flow_after_completion.rs b/generated/async-stripe-billing/src/portal_flows_flow_after_completion.rs index db3735cdb..eef971475 100644 --- a/generated/async-stripe-billing/src/portal_flows_flow_after_completion.rs +++ b/generated/async-stripe-billing/src/portal_flows_flow_after_completion.rs @@ -21,6 +21,7 @@ pub struct PortalFlowsFlowAfterCompletionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_flows_flow_subscription_cancel.rs b/generated/async-stripe-billing/src/portal_flows_flow_subscription_cancel.rs index faff70715..aae2f5d80 100644 --- a/generated/async-stripe-billing/src/portal_flows_flow_subscription_cancel.rs +++ b/generated/async-stripe-billing/src/portal_flows_flow_subscription_cancel.rs @@ -16,6 +16,7 @@ pub struct PortalFlowsFlowSubscriptionCancelBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_flows_flow_subscription_update.rs b/generated/async-stripe-billing/src/portal_flows_flow_subscription_update.rs index 9ddfbc553..a2310ab44 100644 --- a/generated/async-stripe-billing/src/portal_flows_flow_subscription_update.rs +++ b/generated/async-stripe-billing/src/portal_flows_flow_subscription_update.rs @@ -13,6 +13,7 @@ pub struct PortalFlowsFlowSubscriptionUpdateBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_flows_flow_subscription_update_confirm.rs b/generated/async-stripe-billing/src/portal_flows_flow_subscription_update_confirm.rs index 1ffbff8a1..980821adf 100644 --- a/generated/async-stripe-billing/src/portal_flows_flow_subscription_update_confirm.rs +++ b/generated/async-stripe-billing/src/portal_flows_flow_subscription_update_confirm.rs @@ -21,6 +21,7 @@ pub struct PortalFlowsFlowSubscriptionUpdateConfirmBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_flows_retention.rs b/generated/async-stripe-billing/src/portal_flows_retention.rs index 1fe8d14cb..42486f0b7 100644 --- a/generated/async-stripe-billing/src/portal_flows_retention.rs +++ b/generated/async-stripe-billing/src/portal_flows_retention.rs @@ -17,6 +17,7 @@ pub struct PortalFlowsRetentionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_discount.rs b/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_discount.rs index 47916787a..e348cc8cb 100644 --- a/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_discount.rs +++ b/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_discount.rs @@ -16,6 +16,7 @@ pub struct PortalFlowsSubscriptionUpdateConfirmDiscountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_item.rs b/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_item.rs index 2f11b4907..97a269a5e 100644 --- a/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_item.rs +++ b/generated/async-stripe-billing/src/portal_flows_subscription_update_confirm_item.rs @@ -20,6 +20,7 @@ pub struct PortalFlowsSubscriptionUpdateConfirmItemBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_invoice_list.rs b/generated/async-stripe-billing/src/portal_invoice_list.rs index d2f67d2d0..576b7b99a 100644 --- a/generated/async-stripe-billing/src/portal_invoice_list.rs +++ b/generated/async-stripe-billing/src/portal_invoice_list.rs @@ -13,6 +13,7 @@ pub struct PortalInvoiceListBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_login_page.rs b/generated/async-stripe-billing/src/portal_login_page.rs index 6cb48c9ba..a9f373b54 100644 --- a/generated/async-stripe-billing/src/portal_login_page.rs +++ b/generated/async-stripe-billing/src/portal_login_page.rs @@ -19,6 +19,7 @@ pub struct PortalLoginPageBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_payment_method_update.rs b/generated/async-stripe-billing/src/portal_payment_method_update.rs index b8af92007..0c7dcaef2 100644 --- a/generated/async-stripe-billing/src/portal_payment_method_update.rs +++ b/generated/async-stripe-billing/src/portal_payment_method_update.rs @@ -13,6 +13,7 @@ pub struct PortalPaymentMethodUpdateBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_subscription_cancel.rs b/generated/async-stripe-billing/src/portal_subscription_cancel.rs index 8b71fbff0..c28cb2aca 100644 --- a/generated/async-stripe-billing/src/portal_subscription_cancel.rs +++ b/generated/async-stripe-billing/src/portal_subscription_cancel.rs @@ -22,6 +22,7 @@ pub struct PortalSubscriptionCancelBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_subscription_cancellation_reason.rs b/generated/async-stripe-billing/src/portal_subscription_cancellation_reason.rs index 91cab1cb4..d2bdc98d6 100644 --- a/generated/async-stripe-billing/src/portal_subscription_cancellation_reason.rs +++ b/generated/async-stripe-billing/src/portal_subscription_cancellation_reason.rs @@ -16,6 +16,7 @@ pub struct PortalSubscriptionCancellationReasonBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_subscription_update.rs b/generated/async-stripe-billing/src/portal_subscription_update.rs index 7d509ad2b..dfb654d3e 100644 --- a/generated/async-stripe-billing/src/portal_subscription_update.rs +++ b/generated/async-stripe-billing/src/portal_subscription_update.rs @@ -25,6 +25,7 @@ pub struct PortalSubscriptionUpdateBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/portal_subscription_update_product.rs b/generated/async-stripe-billing/src/portal_subscription_update_product.rs index 2b43dbd97..9875eb281 100644 --- a/generated/async-stripe-billing/src/portal_subscription_update_product.rs +++ b/generated/async-stripe-billing/src/portal_subscription_update_product.rs @@ -16,6 +16,7 @@ pub struct PortalSubscriptionUpdateProductBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-billing/src/usage_record/types.rs b/generated/async-stripe-billing/src/usage_record/types.rs index 62bcf5e30..e2a2b6848 100644 --- a/generated/async-stripe-billing/src/usage_record/types.rs +++ b/generated/async-stripe-billing/src/usage_record/types.rs @@ -33,6 +33,7 @@ pub struct UsageRecordBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_acss_debit_mandate_options.rs b/generated/async-stripe-checkout/src/checkout_acss_debit_mandate_options.rs index b53e044ca..a27d20d5f 100644 --- a/generated/async-stripe-checkout/src/checkout_acss_debit_mandate_options.rs +++ b/generated/async-stripe-checkout/src/checkout_acss_debit_mandate_options.rs @@ -27,6 +27,7 @@ pub struct CheckoutAcssDebitMandateOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_acss_debit_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_acss_debit_payment_method_options.rs index f60b435e4..e4179b1ee 100644 --- a/generated/async-stripe-checkout/src/checkout_acss_debit_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_acss_debit_payment_method_options.rs @@ -26,6 +26,7 @@ pub struct CheckoutAcssDebitPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_affirm_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_affirm_payment_method_options.rs index 2ece4ef57..a8cbe548b 100644 --- a/generated/async-stripe-checkout/src/checkout_affirm_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_affirm_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutAffirmPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_afterpay_clearpay_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_afterpay_clearpay_payment_method_options.rs index 7ff25037b..ad7c7ab70 100644 --- a/generated/async-stripe-checkout/src/checkout_afterpay_clearpay_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_afterpay_clearpay_payment_method_options.rs @@ -19,6 +19,7 @@ pub struct CheckoutAfterpayClearpayPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_alipay_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_alipay_payment_method_options.rs index 935303423..30fd6d623 100644 --- a/generated/async-stripe-checkout/src/checkout_alipay_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_alipay_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutAlipayPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_amazon_pay_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_amazon_pay_payment_method_options.rs index 461a3019a..7596dfaa9 100644 --- a/generated/async-stripe-checkout/src/checkout_amazon_pay_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_amazon_pay_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutAmazonPayPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_au_becs_debit_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_au_becs_debit_payment_method_options.rs index f316c6443..45ceb8779 100644 --- a/generated/async-stripe-checkout/src/checkout_au_becs_debit_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_au_becs_debit_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutAuBecsDebitPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_bacs_debit_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_bacs_debit_payment_method_options.rs index 47b100dc5..81d720e07 100644 --- a/generated/async-stripe-checkout/src/checkout_bacs_debit_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_bacs_debit_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutBacsDebitPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_bancontact_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_bancontact_payment_method_options.rs index 2215131b8..b0b5e1f9a 100644 --- a/generated/async-stripe-checkout/src/checkout_bancontact_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_bancontact_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutBancontactPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_boleto_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_boleto_payment_method_options.rs index 249d63f4c..59cdeb304 100644 --- a/generated/async-stripe-checkout/src/checkout_boleto_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_boleto_payment_method_options.rs @@ -22,6 +22,7 @@ pub struct CheckoutBoletoPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_card_installments_options.rs b/generated/async-stripe-checkout/src/checkout_card_installments_options.rs index 8c1a6caf4..3ded19164 100644 --- a/generated/async-stripe-checkout/src/checkout_card_installments_options.rs +++ b/generated/async-stripe-checkout/src/checkout_card_installments_options.rs @@ -13,6 +13,7 @@ pub struct CheckoutCardInstallmentsOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_card_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_card_payment_method_options.rs index 69cdc4ca1..6cf512332 100644 --- a/generated/async-stripe-checkout/src/checkout_card_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_card_payment_method_options.rs @@ -38,6 +38,7 @@ pub struct CheckoutCardPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_cashapp_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_cashapp_payment_method_options.rs index fd1f3b98f..06c448a01 100644 --- a/generated/async-stripe-checkout/src/checkout_cashapp_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_cashapp_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutCashappPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_customer_balance_bank_transfer_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_customer_balance_bank_transfer_payment_method_options.rs index 2ca236205..36f994202 100644 --- a/generated/async-stripe-checkout/src/checkout_customer_balance_bank_transfer_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_customer_balance_bank_transfer_payment_method_options.rs @@ -26,6 +26,7 @@ pub struct CheckoutCustomerBalanceBankTransferPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_customer_balance_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_customer_balance_payment_method_options.rs index a09d98033..03e931162 100644 --- a/generated/async-stripe-checkout/src/checkout_customer_balance_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_customer_balance_payment_method_options.rs @@ -26,6 +26,7 @@ pub struct CheckoutCustomerBalancePaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_eps_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_eps_payment_method_options.rs index 37eddd0d1..eb9c4223f 100644 --- a/generated/async-stripe-checkout/src/checkout_eps_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_eps_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutEpsPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_fpx_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_fpx_payment_method_options.rs index 933a37c87..9eda55b0d 100644 --- a/generated/async-stripe-checkout/src/checkout_fpx_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_fpx_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutFpxPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_giropay_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_giropay_payment_method_options.rs index 667fc6ce4..954294c70 100644 --- a/generated/async-stripe-checkout/src/checkout_giropay_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_giropay_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutGiropayPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_grab_pay_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_grab_pay_payment_method_options.rs index 5b6aec161..658238a68 100644 --- a/generated/async-stripe-checkout/src/checkout_grab_pay_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_grab_pay_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutGrabPayPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_ideal_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_ideal_payment_method_options.rs index 7d4396d84..18c29b8f3 100644 --- a/generated/async-stripe-checkout/src/checkout_ideal_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_ideal_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutIdealPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_klarna_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_klarna_payment_method_options.rs index 848c4cd81..4b1448be8 100644 --- a/generated/async-stripe-checkout/src/checkout_klarna_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_klarna_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutKlarnaPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_konbini_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_konbini_payment_method_options.rs index 15d1efd5c..fc3bb1b57 100644 --- a/generated/async-stripe-checkout/src/checkout_konbini_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_konbini_payment_method_options.rs @@ -22,6 +22,7 @@ pub struct CheckoutKonbiniPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_link_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_link_payment_method_options.rs index b0caab968..e6a07ff1f 100644 --- a/generated/async-stripe-checkout/src/checkout_link_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_link_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutLinkPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_mobilepay_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_mobilepay_payment_method_options.rs index 09e687efd..fbf627715 100644 --- a/generated/async-stripe-checkout/src/checkout_mobilepay_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_mobilepay_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutMobilepayPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_oxxo_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_oxxo_payment_method_options.rs index 586ba145f..c98a18e24 100644 --- a/generated/async-stripe-checkout/src/checkout_oxxo_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_oxxo_payment_method_options.rs @@ -22,6 +22,7 @@ pub struct CheckoutOxxoPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_p24_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_p24_payment_method_options.rs index f8a46f84c..e387c539d 100644 --- a/generated/async-stripe-checkout/src/checkout_p24_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_p24_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutP24PaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_paynow_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_paynow_payment_method_options.rs index d9fc1ab75..09677d25d 100644 --- a/generated/async-stripe-checkout/src/checkout_paynow_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_paynow_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutPaynowPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_paypal_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_paypal_payment_method_options.rs index ea4aa1151..453c227f5 100644 --- a/generated/async-stripe-checkout/src/checkout_paypal_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_paypal_payment_method_options.rs @@ -28,6 +28,7 @@ pub struct CheckoutPaypalPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_pix_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_pix_payment_method_options.rs index b87e2a155..57459fab3 100644 --- a/generated/async-stripe-checkout/src/checkout_pix_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_pix_payment_method_options.rs @@ -13,6 +13,7 @@ pub struct CheckoutPixPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_revolut_pay_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_revolut_pay_payment_method_options.rs index 78823b6dd..ab99ac9b0 100644 --- a/generated/async-stripe-checkout/src/checkout_revolut_pay_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_revolut_pay_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutRevolutPayPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_sepa_debit_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_sepa_debit_payment_method_options.rs index 6b993c39b..5c1f113ef 100644 --- a/generated/async-stripe-checkout/src/checkout_sepa_debit_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_sepa_debit_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutSepaDebitPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_session/types.rs b/generated/async-stripe-checkout/src/checkout_session/types.rs index e9e043635..8430d19e3 100644 --- a/generated/async-stripe-checkout/src/checkout_session/types.rs +++ b/generated/async-stripe-checkout/src/checkout_session/types.rs @@ -223,6 +223,7 @@ pub struct CheckoutSessionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_session_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_session_payment_method_options.rs index c8590e898..8c30f33be 100644 --- a/generated/async-stripe-checkout/src/checkout_session_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_session_payment_method_options.rs @@ -73,6 +73,7 @@ pub struct CheckoutSessionPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_sofort_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_sofort_payment_method_options.rs index 4db778b7f..ac7e8e327 100644 --- a/generated/async-stripe-checkout/src/checkout_sofort_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_sofort_payment_method_options.rs @@ -18,6 +18,7 @@ pub struct CheckoutSofortPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_swish_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_swish_payment_method_options.rs index 1fbb511ba..0e69449da 100644 --- a/generated/async-stripe-checkout/src/checkout_swish_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_swish_payment_method_options.rs @@ -14,6 +14,7 @@ pub struct CheckoutSwishPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/checkout_us_bank_account_payment_method_options.rs b/generated/async-stripe-checkout/src/checkout_us_bank_account_payment_method_options.rs index 535f96435..216d2666b 100644 --- a/generated/async-stripe-checkout/src/checkout_us_bank_account_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/checkout_us_bank_account_payment_method_options.rs @@ -24,6 +24,7 @@ pub struct CheckoutUsBankAccountPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration.rs index eda7e6eeb..db6538f55 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration.rs @@ -13,6 +13,7 @@ pub struct PaymentPagesCheckoutSessionAfterExpirationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration_recovery.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration_recovery.rs index 0e7f058d4..9a9771f9f 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration_recovery.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_after_expiration_recovery.rs @@ -24,6 +24,7 @@ pub struct PaymentPagesCheckoutSessionAfterExpirationRecoveryBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_automatic_tax.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_automatic_tax.rs index 6b1336170..5b5f5cff3 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_automatic_tax.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_automatic_tax.rs @@ -21,6 +21,7 @@ pub struct PaymentPagesCheckoutSessionAutomaticTaxBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent.rs index c239293b2..a75f08f4a 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent.rs @@ -17,6 +17,7 @@ pub struct PaymentPagesCheckoutSessionConsentBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent_collection.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent_collection.rs index 53b157171..50db2eb05 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent_collection.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_consent_collection.rs @@ -24,6 +24,7 @@ pub struct PaymentPagesCheckoutSessionConsentCollectionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_currency_conversion.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_currency_conversion.rs index 02b95e995..26fc5e3f9 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_currency_conversion.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_currency_conversion.rs @@ -22,6 +22,7 @@ pub struct PaymentPagesCheckoutSessionCurrencyConversionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields.rs index 003fbed14..e1b547f23 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields.rs @@ -30,6 +30,7 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_dropdown.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_dropdown.rs index a500f17b0..ca7a15f73 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_dropdown.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_dropdown.rs @@ -16,6 +16,7 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsDropdownBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_label.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_label.rs index f4589bd93..6bd57953d 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_label.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_label.rs @@ -17,6 +17,7 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsLabelBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_numeric.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_numeric.rs index bc1b73354..be36704ca 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_numeric.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_numeric.rs @@ -19,6 +19,7 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsNumericBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_option.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_option.rs index aced03735..3289f1ba5 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_option.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_option.rs @@ -17,6 +17,7 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsOptionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_text.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_text.rs index 81fce4281..d64757029 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_text.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_fields_text.rs @@ -19,6 +19,7 @@ pub struct PaymentPagesCheckoutSessionCustomFieldsTextBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text.rs index 541df0b64..2a6feaf9e 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text.rs @@ -25,6 +25,7 @@ pub struct PaymentPagesCheckoutSessionCustomTextBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text_position.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text_position.rs index 2e7253272..0b75f5c5c 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text_position.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_custom_text_position.rs @@ -13,6 +13,7 @@ pub struct PaymentPagesCheckoutSessionCustomTextPositionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_customer_details.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_customer_details.rs index d5280b7b9..bdfdde185 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_customer_details.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_customer_details.rs @@ -31,6 +31,7 @@ pub struct PaymentPagesCheckoutSessionCustomerDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_creation.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_creation.rs index c5bb35659..cbc15f82d 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_creation.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_creation.rs @@ -15,6 +15,7 @@ pub struct PaymentPagesCheckoutSessionInvoiceCreationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_settings.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_settings.rs index 3403be5e6..f161ab96c 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_settings.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_invoice_settings.rs @@ -33,6 +33,7 @@ pub struct PaymentPagesCheckoutSessionInvoiceSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_payment_method_reuse_agreement.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_payment_method_reuse_agreement.rs index cedebdf25..9d15f1256 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_payment_method_reuse_agreement.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_payment_method_reuse_agreement.rs @@ -16,6 +16,7 @@ pub struct PaymentPagesCheckoutSessionPaymentMethodReuseAgreementBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_phone_number_collection.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_phone_number_collection.rs index 0f5546c0a..9f1b20248 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_phone_number_collection.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_phone_number_collection.rs @@ -13,6 +13,7 @@ pub struct PaymentPagesCheckoutSessionPhoneNumberCollectionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_saved_payment_method_options.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_saved_payment_method_options.rs index 38db2987a..c07ee6065 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_saved_payment_method_options.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_saved_payment_method_options.rs @@ -22,6 +22,7 @@ pub struct PaymentPagesCheckoutSessionSavedPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_address_collection.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_address_collection.rs index bd4e735d3..d93d82684 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_address_collection.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_address_collection.rs @@ -17,6 +17,7 @@ pub struct PaymentPagesCheckoutSessionShippingAddressCollectionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_cost.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_cost.rs index 77574d99d..652cebd41 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_cost.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_cost.rs @@ -25,6 +25,7 @@ pub struct PaymentPagesCheckoutSessionShippingCostBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_option.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_option.rs index 545ca48f7..42334db26 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_option.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_shipping_option.rs @@ -16,6 +16,7 @@ pub struct PaymentPagesCheckoutSessionShippingOptionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id.rs index 005348749..2341bdc3b 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id.rs @@ -17,6 +17,7 @@ pub struct PaymentPagesCheckoutSessionTaxIdBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id_collection.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id_collection.rs index fd8b1019e..9858a0d52 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id_collection.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_tax_id_collection.rs @@ -13,6 +13,7 @@ pub struct PaymentPagesCheckoutSessionTaxIdCollectionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details.rs index 788ce7754..e33888ded 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details.rs @@ -23,6 +23,7 @@ pub struct PaymentPagesCheckoutSessionTotalDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details_resource_breakdown.rs b/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details_resource_breakdown.rs index ff4611c5c..65d81c60c 100644 --- a/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details_resource_breakdown.rs +++ b/generated/async-stripe-checkout/src/payment_pages_checkout_session_total_details_resource_breakdown.rs @@ -16,6 +16,7 @@ pub struct PaymentPagesCheckoutSessionTotalDetailsResourceBreakdownBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/account_link/types.rs b/generated/async-stripe-connect/src/account_link/types.rs index b34dc6562..661e12453 100644 --- a/generated/async-stripe-connect/src/account_link/types.rs +++ b/generated/async-stripe-connect/src/account_link/types.rs @@ -24,6 +24,7 @@ pub struct AccountLinkBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/account_session/types.rs b/generated/async-stripe-connect/src/account_session/types.rs index 38e1dec67..0091111f0 100644 --- a/generated/async-stripe-connect/src/account_session/types.rs +++ b/generated/async-stripe-connect/src/account_session/types.rs @@ -39,6 +39,7 @@ pub struct AccountSessionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/apps_secret/types.rs b/generated/async-stripe-connect/src/apps_secret/types.rs index 546a5e08a..4f8cd2373 100644 --- a/generated/async-stripe-connect/src/apps_secret/types.rs +++ b/generated/async-stripe-connect/src/apps_secret/types.rs @@ -45,6 +45,7 @@ pub struct AppsSecretBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/connect_embedded_account_config_claim.rs b/generated/async-stripe-connect/src/connect_embedded_account_config_claim.rs index 8bc747524..d3ca6ccd4 100644 --- a/generated/async-stripe-connect/src/connect_embedded_account_config_claim.rs +++ b/generated/async-stripe-connect/src/connect_embedded_account_config_claim.rs @@ -15,6 +15,7 @@ pub struct ConnectEmbeddedAccountConfigClaimBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/connect_embedded_account_features_claim.rs b/generated/async-stripe-connect/src/connect_embedded_account_features_claim.rs index d64eb6b79..c1aea2e95 100644 --- a/generated/async-stripe-connect/src/connect_embedded_account_features_claim.rs +++ b/generated/async-stripe-connect/src/connect_embedded_account_features_claim.rs @@ -15,6 +15,7 @@ pub struct ConnectEmbeddedAccountFeaturesClaimBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/connect_embedded_account_session_create_components.rs b/generated/async-stripe-connect/src/connect_embedded_account_session_create_components.rs index 3150daebf..08b3a7bcf 100644 --- a/generated/async-stripe-connect/src/connect_embedded_account_session_create_components.rs +++ b/generated/async-stripe-connect/src/connect_embedded_account_session_create_components.rs @@ -28,6 +28,7 @@ pub struct ConnectEmbeddedAccountSessionCreateComponentsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/connect_embedded_base_config_claim.rs b/generated/async-stripe-connect/src/connect_embedded_base_config_claim.rs index 194fc692b..bee8ae09a 100644 --- a/generated/async-stripe-connect/src/connect_embedded_base_config_claim.rs +++ b/generated/async-stripe-connect/src/connect_embedded_base_config_claim.rs @@ -15,6 +15,7 @@ pub struct ConnectEmbeddedBaseConfigClaimBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/connect_embedded_base_features.rs b/generated/async-stripe-connect/src/connect_embedded_base_features.rs index 513011c0c..79895e19c 100644 --- a/generated/async-stripe-connect/src/connect_embedded_base_features.rs +++ b/generated/async-stripe-connect/src/connect_embedded_base_features.rs @@ -8,6 +8,7 @@ pub struct ConnectEmbeddedBaseFeaturesBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/connect_embedded_payments_config_claim.rs b/generated/async-stripe-connect/src/connect_embedded_payments_config_claim.rs index 9ac787fac..d9dca3ffc 100644 --- a/generated/async-stripe-connect/src/connect_embedded_payments_config_claim.rs +++ b/generated/async-stripe-connect/src/connect_embedded_payments_config_claim.rs @@ -15,6 +15,7 @@ pub struct ConnectEmbeddedPaymentsConfigClaimBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/connect_embedded_payments_features.rs b/generated/async-stripe-connect/src/connect_embedded_payments_features.rs index e262f690e..a3f79a286 100644 --- a/generated/async-stripe-connect/src/connect_embedded_payments_features.rs +++ b/generated/async-stripe-connect/src/connect_embedded_payments_features.rs @@ -24,6 +24,7 @@ pub struct ConnectEmbeddedPaymentsFeaturesBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/connect_embedded_payouts_config_claim.rs b/generated/async-stripe-connect/src/connect_embedded_payouts_config_claim.rs index b732b9c6e..341bd7dea 100644 --- a/generated/async-stripe-connect/src/connect_embedded_payouts_config_claim.rs +++ b/generated/async-stripe-connect/src/connect_embedded_payouts_config_claim.rs @@ -15,6 +15,7 @@ pub struct ConnectEmbeddedPayoutsConfigClaimBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/connect_embedded_payouts_features.rs b/generated/async-stripe-connect/src/connect_embedded_payouts_features.rs index f27c3b5e0..414e58ec5 100644 --- a/generated/async-stripe-connect/src/connect_embedded_payouts_features.rs +++ b/generated/async-stripe-connect/src/connect_embedded_payouts_features.rs @@ -22,6 +22,7 @@ pub struct ConnectEmbeddedPayoutsFeaturesBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/country_spec/types.rs b/generated/async-stripe-connect/src/country_spec/types.rs index 6ebddcf5f..a9df34140 100644 --- a/generated/async-stripe-connect/src/country_spec/types.rs +++ b/generated/async-stripe-connect/src/country_spec/types.rs @@ -39,6 +39,7 @@ pub struct CountrySpecBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/country_spec_verification_field_details.rs b/generated/async-stripe-connect/src/country_spec_verification_field_details.rs index 0450fd3a2..2cfb79516 100644 --- a/generated/async-stripe-connect/src/country_spec_verification_field_details.rs +++ b/generated/async-stripe-connect/src/country_spec_verification_field_details.rs @@ -16,6 +16,7 @@ pub struct CountrySpecVerificationFieldDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/country_spec_verification_fields.rs b/generated/async-stripe-connect/src/country_spec_verification_fields.rs index 6004fa8c1..bb59f6784 100644 --- a/generated/async-stripe-connect/src/country_spec_verification_fields.rs +++ b/generated/async-stripe-connect/src/country_spec_verification_fields.rs @@ -14,6 +14,7 @@ pub struct CountrySpecVerificationFieldsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/login_link/types.rs b/generated/async-stripe-connect/src/login_link/types.rs index d3ac1a17f..b10e555ee 100644 --- a/generated/async-stripe-connect/src/login_link/types.rs +++ b/generated/async-stripe-connect/src/login_link/types.rs @@ -19,6 +19,7 @@ pub struct LoginLinkBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-connect/src/secret_service_resource_scope.rs b/generated/async-stripe-connect/src/secret_service_resource_scope.rs index bfecc7586..a1194e707 100644 --- a/generated/async-stripe-connect/src/secret_service_resource_scope.rs +++ b/generated/async-stripe-connect/src/secret_service_resource_scope.rs @@ -17,6 +17,7 @@ pub struct SecretServiceResourceScopeBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-core/src/balance/types.rs b/generated/async-stripe-core/src/balance/types.rs index 9ff30a079..a9839d9e7 100644 --- a/generated/async-stripe-core/src/balance/types.rs +++ b/generated/async-stripe-core/src/balance/types.rs @@ -42,6 +42,7 @@ pub struct BalanceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-core/src/balance_amount.rs b/generated/async-stripe-core/src/balance_amount.rs index 996a1de64..1e6ee2c02 100644 --- a/generated/async-stripe-core/src/balance_amount.rs +++ b/generated/async-stripe-core/src/balance_amount.rs @@ -19,6 +19,7 @@ pub struct BalanceAmountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-core/src/balance_amount_by_source_type.rs b/generated/async-stripe-core/src/balance_amount_by_source_type.rs index a4fad7a88..3ff95e602 100644 --- a/generated/async-stripe-core/src/balance_amount_by_source_type.rs +++ b/generated/async-stripe-core/src/balance_amount_by_source_type.rs @@ -19,6 +19,7 @@ pub struct BalanceAmountBySourceTypeBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-core/src/balance_amount_net.rs b/generated/async-stripe-core/src/balance_amount_net.rs index f200208c8..b3a0d0e97 100644 --- a/generated/async-stripe-core/src/balance_amount_net.rs +++ b/generated/async-stripe-core/src/balance_amount_net.rs @@ -19,6 +19,7 @@ pub struct BalanceAmountNetBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-core/src/balance_detail.rs b/generated/async-stripe-core/src/balance_detail.rs index b29999a30..9aed0beb4 100644 --- a/generated/async-stripe-core/src/balance_detail.rs +++ b/generated/async-stripe-core/src/balance_detail.rs @@ -13,6 +13,7 @@ pub struct BalanceDetailBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-core/src/customer_session/types.rs b/generated/async-stripe-core/src/customer_session/types.rs index 2c6a9a8fb..6c7ec2655 100644 --- a/generated/async-stripe-core/src/customer_session/types.rs +++ b/generated/async-stripe-core/src/customer_session/types.rs @@ -33,6 +33,7 @@ pub struct CustomerSessionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-core/src/customer_session_resource_components.rs b/generated/async-stripe-core/src/customer_session_resource_components.rs index 9b84e5386..2cfcb1b3e 100644 --- a/generated/async-stripe-core/src/customer_session_resource_components.rs +++ b/generated/async-stripe-core/src/customer_session_resource_components.rs @@ -15,6 +15,7 @@ pub struct CustomerSessionResourceComponentsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-core/src/customer_session_resource_components_resource_buy_button.rs b/generated/async-stripe-core/src/customer_session_resource_components_resource_buy_button.rs index febf82495..a1cb6f191 100644 --- a/generated/async-stripe-core/src/customer_session_resource_components_resource_buy_button.rs +++ b/generated/async-stripe-core/src/customer_session_resource_components_resource_buy_button.rs @@ -14,6 +14,7 @@ pub struct CustomerSessionResourceComponentsResourceBuyButtonBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-core/src/customer_session_resource_components_resource_pricing_table.rs b/generated/async-stripe-core/src/customer_session_resource_components_resource_pricing_table.rs index 907136118..ffc87ce9e 100644 --- a/generated/async-stripe-core/src/customer_session_resource_components_resource_pricing_table.rs +++ b/generated/async-stripe-core/src/customer_session_resource_components_resource_pricing_table.rs @@ -14,6 +14,7 @@ pub struct CustomerSessionResourceComponentsResourcePricingTableBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-core/src/token/types.rs b/generated/async-stripe-core/src/token/types.rs index 06b6b8c7a..686415ba9 100644 --- a/generated/async-stripe-core/src/token/types.rs +++ b/generated/async-stripe-core/src/token/types.rs @@ -54,6 +54,7 @@ pub struct TokenBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 35e6a047f..b5dcd0188 100644 --- a/generated/async-stripe-fraud/src/deleted_radar_value_list.rs +++ b/generated/async-stripe-fraud/src/deleted_radar_value_list.rs @@ -15,6 +15,7 @@ pub struct DeletedRadarValueListBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 d8be7431b..f9939a5be 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 @@ -15,6 +15,7 @@ pub struct DeletedRadarValueListItemBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 aadabef81..dfdeed445 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 @@ -36,6 +36,7 @@ pub struct RadarEarlyFraudWarningBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 efdf65d05..716b378dc 100644 --- a/generated/async-stripe-fraud/src/radar_value_list/types.rs +++ b/generated/async-stripe-fraud/src/radar_value_list/types.rs @@ -43,6 +43,7 @@ pub struct RadarValueListBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 ddae963a0..58b258244 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 @@ -32,6 +32,7 @@ pub struct RadarValueListItemBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 ba4ab216f..2a5f023a3 100644 --- a/generated/async-stripe-misc/src/apple_pay_domain/types.rs +++ b/generated/async-stripe-misc/src/apple_pay_domain/types.rs @@ -20,6 +20,7 @@ pub struct ApplePayDomainBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/bank_connections_resource_accountholder.rs b/generated/async-stripe-misc/src/bank_connections_resource_accountholder.rs index 710b2a5ba..788d9792d 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_accountholder.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_accountholder.rs @@ -22,6 +22,7 @@ pub struct BankConnectionsResourceAccountholderBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/bank_connections_resource_balance.rs b/generated/async-stripe-misc/src/bank_connections_resource_balance.rs index 29d280539..abdceff4d 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_balance.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_balance.rs @@ -32,6 +32,7 @@ pub struct BankConnectionsResourceBalanceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_cash_balance.rs b/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_cash_balance.rs index ab4c1fe00..5f180b07e 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_cash_balance.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_cash_balance.rs @@ -19,6 +19,7 @@ pub struct BankConnectionsResourceBalanceApiResourceCashBalanceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_credit_balance.rs b/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_credit_balance.rs index 776ece284..b98e87839 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_credit_balance.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_balance_api_resource_credit_balance.rs @@ -19,6 +19,7 @@ pub struct BankConnectionsResourceBalanceApiResourceCreditBalanceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/bank_connections_resource_balance_refresh.rs b/generated/async-stripe-misc/src/bank_connections_resource_balance_refresh.rs index 14fbc564a..041f42afd 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_balance_refresh.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_balance_refresh.rs @@ -21,6 +21,7 @@ pub struct BankConnectionsResourceBalanceRefreshBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/bank_connections_resource_link_account_session_filters.rs b/generated/async-stripe-misc/src/bank_connections_resource_link_account_session_filters.rs index 53b82f16b..905cbb5a5 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_link_account_session_filters.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_link_account_session_filters.rs @@ -13,6 +13,7 @@ pub struct BankConnectionsResourceLinkAccountSessionFiltersBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/bank_connections_resource_ownership_refresh.rs b/generated/async-stripe-misc/src/bank_connections_resource_ownership_refresh.rs index 6853e291c..d5538cd8f 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_ownership_refresh.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_ownership_refresh.rs @@ -21,6 +21,7 @@ pub struct BankConnectionsResourceOwnershipRefreshBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/bank_connections_resource_transaction_refresh.rs b/generated/async-stripe-misc/src/bank_connections_resource_transaction_refresh.rs index 9e94ffac4..0d4840335 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_transaction_refresh.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_transaction_refresh.rs @@ -24,6 +24,7 @@ pub struct BankConnectionsResourceTransactionRefreshBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/bank_connections_resource_transaction_resource_status_transitions.rs b/generated/async-stripe-misc/src/bank_connections_resource_transaction_resource_status_transitions.rs index f53bbb14a..25dcff8f7 100644 --- a/generated/async-stripe-misc/src/bank_connections_resource_transaction_resource_status_transitions.rs +++ b/generated/async-stripe-misc/src/bank_connections_resource_transaction_resource_status_transitions.rs @@ -16,6 +16,7 @@ pub struct BankConnectionsResourceTransactionResourceStatusTransitionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/climate_order/types.rs b/generated/async-stripe-misc/src/climate_order/types.rs index c68b6f985..edad2e6bf 100644 --- a/generated/async-stripe-misc/src/climate_order/types.rs +++ b/generated/async-stripe-misc/src/climate_order/types.rs @@ -77,6 +77,7 @@ pub struct ClimateOrderBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/climate_product/types.rs b/generated/async-stripe-misc/src/climate_product/types.rs index 3c4578cb3..23c16bdbf 100644 --- a/generated/async-stripe-misc/src/climate_product/types.rs +++ b/generated/async-stripe-misc/src/climate_product/types.rs @@ -40,6 +40,7 @@ pub struct ClimateProductBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/climate_removals_beneficiary.rs b/generated/async-stripe-misc/src/climate_removals_beneficiary.rs index 23cea8488..d95a43c4f 100644 --- a/generated/async-stripe-misc/src/climate_removals_beneficiary.rs +++ b/generated/async-stripe-misc/src/climate_removals_beneficiary.rs @@ -13,6 +13,7 @@ pub struct ClimateRemovalsBeneficiaryBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/climate_removals_location.rs b/generated/async-stripe-misc/src/climate_removals_location.rs index 0241c631c..d2b1b5fd2 100644 --- a/generated/async-stripe-misc/src/climate_removals_location.rs +++ b/generated/async-stripe-misc/src/climate_removals_location.rs @@ -25,6 +25,7 @@ pub struct ClimateRemovalsLocationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/climate_removals_order_deliveries.rs b/generated/async-stripe-misc/src/climate_removals_order_deliveries.rs index a68f019bb..984c63fb5 100644 --- a/generated/async-stripe-misc/src/climate_removals_order_deliveries.rs +++ b/generated/async-stripe-misc/src/climate_removals_order_deliveries.rs @@ -25,6 +25,7 @@ pub struct ClimateRemovalsOrderDeliveriesBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/climate_removals_products_price.rs b/generated/async-stripe-misc/src/climate_removals_products_price.rs index 0ae981dbe..d122b0a31 100644 --- a/generated/async-stripe-misc/src/climate_removals_products_price.rs +++ b/generated/async-stripe-misc/src/climate_removals_products_price.rs @@ -19,6 +19,7 @@ pub struct ClimateRemovalsProductsPriceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/climate_supplier/types.rs b/generated/async-stripe-misc/src/climate_supplier/types.rs index 4ff6aac82..76ca245e9 100644 --- a/generated/async-stripe-misc/src/climate_supplier/types.rs +++ b/generated/async-stripe-misc/src/climate_supplier/types.rs @@ -28,6 +28,7 @@ pub struct ClimateSupplierBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 1ec301162..ff4c567da 100644 --- a/generated/async-stripe-misc/src/deleted_apple_pay_domain.rs +++ b/generated/async-stripe-misc/src/deleted_apple_pay_domain.rs @@ -15,6 +15,7 @@ pub struct DeletedApplePayDomainBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/deleted_webhook_endpoint.rs b/generated/async-stripe-misc/src/deleted_webhook_endpoint.rs index 2f550bc58..15a5f9704 100644 --- a/generated/async-stripe-misc/src/deleted_webhook_endpoint.rs +++ b/generated/async-stripe-misc/src/deleted_webhook_endpoint.rs @@ -15,6 +15,7 @@ pub struct DeletedWebhookEndpointBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 137191c39..a52c79d9b 100644 --- a/generated/async-stripe-misc/src/entitlements_active_entitlement/types.rs +++ b/generated/async-stripe-misc/src/entitlements_active_entitlement/types.rs @@ -22,6 +22,7 @@ pub struct EntitlementsActiveEntitlementBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 bbaa4da09..8a8bf2275 100644 --- a/generated/async-stripe-misc/src/entitlements_active_entitlement_summary.rs +++ b/generated/async-stripe-misc/src/entitlements_active_entitlement_summary.rs @@ -19,6 +19,7 @@ pub struct EntitlementsActiveEntitlementSummaryBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/ephemeral_key/types.rs b/generated/async-stripe-misc/src/ephemeral_key/types.rs index 2b5e9d870..5f1c04082 100644 --- a/generated/async-stripe-misc/src/ephemeral_key/types.rs +++ b/generated/async-stripe-misc/src/ephemeral_key/types.rs @@ -24,6 +24,7 @@ pub struct EphemeralKeyBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/exchange_rate/types.rs b/generated/async-stripe-misc/src/exchange_rate/types.rs index 4995f7669..4249d11a0 100644 --- a/generated/async-stripe-misc/src/exchange_rate/types.rs +++ b/generated/async-stripe-misc/src/exchange_rate/types.rs @@ -44,6 +44,7 @@ pub struct ExchangeRateBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 1f2f2624f..03d013d05 100644 --- a/generated/async-stripe-misc/src/financial_connections_account/types.rs +++ b/generated/async-stripe-misc/src/financial_connections_account/types.rs @@ -82,6 +82,7 @@ pub struct FinancialConnectionsAccountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 db78aaf1d..fb2172e0c 100644 --- a/generated/async-stripe-misc/src/financial_connections_account_owner.rs +++ b/generated/async-stripe-misc/src/financial_connections_account_owner.rs @@ -31,6 +31,7 @@ pub struct FinancialConnectionsAccountOwnerBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 01bd5ed66..3e3762b18 100644 --- a/generated/async-stripe-misc/src/financial_connections_account_ownership.rs +++ b/generated/async-stripe-misc/src/financial_connections_account_ownership.rs @@ -19,6 +19,7 @@ pub struct FinancialConnectionsAccountOwnershipBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 b79a60dc3..c799c6cf3 100644 --- a/generated/async-stripe-misc/src/financial_connections_session/types.rs +++ b/generated/async-stripe-misc/src/financial_connections_session/types.rs @@ -39,6 +39,7 @@ pub struct FinancialConnectionsSessionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 0948dbb91..c1768045c 100644 --- a/generated/async-stripe-misc/src/financial_connections_transaction/types.rs +++ b/generated/async-stripe-misc/src/financial_connections_transaction/types.rs @@ -45,6 +45,7 @@ pub struct FinancialConnectionsTransactionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/financial_reporting_finance_report_run_run_parameters.rs b/generated/async-stripe-misc/src/financial_reporting_finance_report_run_run_parameters.rs index 0c85d456c..7d4d4c2a4 100644 --- a/generated/async-stripe-misc/src/financial_reporting_finance_report_run_run_parameters.rs +++ b/generated/async-stripe-misc/src/financial_reporting_finance_report_run_run_parameters.rs @@ -39,6 +39,7 @@ pub struct FinancialReportingFinanceReportRunRunParametersBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/forwarded_request_context.rs b/generated/async-stripe-misc/src/forwarded_request_context.rs index b62438fac..6f1751323 100644 --- a/generated/async-stripe-misc/src/forwarded_request_context.rs +++ b/generated/async-stripe-misc/src/forwarded_request_context.rs @@ -17,6 +17,7 @@ pub struct ForwardedRequestContextBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/forwarded_request_details.rs b/generated/async-stripe-misc/src/forwarded_request_details.rs index 6875e4fce..e0bb0b9d9 100644 --- a/generated/async-stripe-misc/src/forwarded_request_details.rs +++ b/generated/async-stripe-misc/src/forwarded_request_details.rs @@ -21,6 +21,7 @@ pub struct ForwardedRequestDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/forwarded_request_header.rs b/generated/async-stripe-misc/src/forwarded_request_header.rs index e36227184..fdfadf93c 100644 --- a/generated/async-stripe-misc/src/forwarded_request_header.rs +++ b/generated/async-stripe-misc/src/forwarded_request_header.rs @@ -17,6 +17,7 @@ pub struct ForwardedRequestHeaderBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/forwarded_response_details.rs b/generated/async-stripe-misc/src/forwarded_response_details.rs index ba317d710..e242c16e7 100644 --- a/generated/async-stripe-misc/src/forwarded_response_details.rs +++ b/generated/async-stripe-misc/src/forwarded_response_details.rs @@ -20,6 +20,7 @@ pub struct ForwardedResponseDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/forwarding_request/types.rs b/generated/async-stripe-misc/src/forwarding_request/types.rs index a842aca0d..6617af30b 100644 --- a/generated/async-stripe-misc/src/forwarding_request/types.rs +++ b/generated/async-stripe-misc/src/forwarding_request/types.rs @@ -54,6 +54,7 @@ pub struct ForwardingRequestBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_data_document_report_date_of_birth.rs b/generated/async-stripe-misc/src/gelato_data_document_report_date_of_birth.rs index b2e54d8ae..7ec64eaf5 100644 --- a/generated/async-stripe-misc/src/gelato_data_document_report_date_of_birth.rs +++ b/generated/async-stripe-misc/src/gelato_data_document_report_date_of_birth.rs @@ -20,6 +20,7 @@ pub struct GelatoDataDocumentReportDateOfBirthBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_data_document_report_expiration_date.rs b/generated/async-stripe-misc/src/gelato_data_document_report_expiration_date.rs index 812f840ab..9212115ae 100644 --- a/generated/async-stripe-misc/src/gelato_data_document_report_expiration_date.rs +++ b/generated/async-stripe-misc/src/gelato_data_document_report_expiration_date.rs @@ -20,6 +20,7 @@ pub struct GelatoDataDocumentReportExpirationDateBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_data_document_report_issued_date.rs b/generated/async-stripe-misc/src/gelato_data_document_report_issued_date.rs index 6e0071aca..cd58e5aac 100644 --- a/generated/async-stripe-misc/src/gelato_data_document_report_issued_date.rs +++ b/generated/async-stripe-misc/src/gelato_data_document_report_issued_date.rs @@ -20,6 +20,7 @@ pub struct GelatoDataDocumentReportIssuedDateBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_data_id_number_report_date.rs b/generated/async-stripe-misc/src/gelato_data_id_number_report_date.rs index 9bb72e9a3..bd3578b08 100644 --- a/generated/async-stripe-misc/src/gelato_data_id_number_report_date.rs +++ b/generated/async-stripe-misc/src/gelato_data_id_number_report_date.rs @@ -20,6 +20,7 @@ pub struct GelatoDataIdNumberReportDateBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_data_verified_outputs_date.rs b/generated/async-stripe-misc/src/gelato_data_verified_outputs_date.rs index 60b910222..ea0aa8da7 100644 --- a/generated/async-stripe-misc/src/gelato_data_verified_outputs_date.rs +++ b/generated/async-stripe-misc/src/gelato_data_verified_outputs_date.rs @@ -20,6 +20,7 @@ pub struct GelatoDataVerifiedOutputsDateBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_document_report.rs b/generated/async-stripe-misc/src/gelato_document_report.rs index 40dbe10e2..5d4d56e2c 100644 --- a/generated/async-stripe-misc/src/gelato_document_report.rs +++ b/generated/async-stripe-misc/src/gelato_document_report.rs @@ -48,6 +48,7 @@ pub struct GelatoDocumentReportBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_document_report_error.rs b/generated/async-stripe-misc/src/gelato_document_report_error.rs index 145792c86..75416b2c5 100644 --- a/generated/async-stripe-misc/src/gelato_document_report_error.rs +++ b/generated/async-stripe-misc/src/gelato_document_report_error.rs @@ -17,6 +17,7 @@ pub struct GelatoDocumentReportErrorBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_email_report.rs b/generated/async-stripe-misc/src/gelato_email_report.rs index 0a4383371..ccf9829c7 100644 --- a/generated/async-stripe-misc/src/gelato_email_report.rs +++ b/generated/async-stripe-misc/src/gelato_email_report.rs @@ -20,6 +20,7 @@ pub struct GelatoEmailReportBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_email_report_error.rs b/generated/async-stripe-misc/src/gelato_email_report_error.rs index 7eb159b09..ae158766c 100644 --- a/generated/async-stripe-misc/src/gelato_email_report_error.rs +++ b/generated/async-stripe-misc/src/gelato_email_report_error.rs @@ -17,6 +17,7 @@ pub struct GelatoEmailReportErrorBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_id_number_report.rs b/generated/async-stripe-misc/src/gelato_id_number_report.rs index 96b100e71..cd0b55ead 100644 --- a/generated/async-stripe-misc/src/gelato_id_number_report.rs +++ b/generated/async-stripe-misc/src/gelato_id_number_report.rs @@ -32,6 +32,7 @@ pub struct GelatoIdNumberReportBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_id_number_report_error.rs b/generated/async-stripe-misc/src/gelato_id_number_report_error.rs index 91e1cddcc..0b9f93e48 100644 --- a/generated/async-stripe-misc/src/gelato_id_number_report_error.rs +++ b/generated/async-stripe-misc/src/gelato_id_number_report_error.rs @@ -17,6 +17,7 @@ pub struct GelatoIdNumberReportErrorBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_phone_report.rs b/generated/async-stripe-misc/src/gelato_phone_report.rs index 65ff9509e..4e797a3c6 100644 --- a/generated/async-stripe-misc/src/gelato_phone_report.rs +++ b/generated/async-stripe-misc/src/gelato_phone_report.rs @@ -20,6 +20,7 @@ pub struct GelatoPhoneReportBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_phone_report_error.rs b/generated/async-stripe-misc/src/gelato_phone_report_error.rs index 6b120a1ef..d3312e7ff 100644 --- a/generated/async-stripe-misc/src/gelato_phone_report_error.rs +++ b/generated/async-stripe-misc/src/gelato_phone_report_error.rs @@ -17,6 +17,7 @@ pub struct GelatoPhoneReportErrorBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_provided_details.rs b/generated/async-stripe-misc/src/gelato_provided_details.rs index 6f44435a2..e7808b5c5 100644 --- a/generated/async-stripe-misc/src/gelato_provided_details.rs +++ b/generated/async-stripe-misc/src/gelato_provided_details.rs @@ -16,6 +16,7 @@ pub struct GelatoProvidedDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_report_document_options.rs b/generated/async-stripe-misc/src/gelato_report_document_options.rs index d0e257f67..fbcbefad8 100644 --- a/generated/async-stripe-misc/src/gelato_report_document_options.rs +++ b/generated/async-stripe-misc/src/gelato_report_document_options.rs @@ -24,6 +24,7 @@ pub struct GelatoReportDocumentOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_report_id_number_options.rs b/generated/async-stripe-misc/src/gelato_report_id_number_options.rs index 4d81d6737..8bffd49f4 100644 --- a/generated/async-stripe-misc/src/gelato_report_id_number_options.rs +++ b/generated/async-stripe-misc/src/gelato_report_id_number_options.rs @@ -8,6 +8,7 @@ pub struct GelatoReportIdNumberOptionsBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_selfie_report.rs b/generated/async-stripe-misc/src/gelato_selfie_report.rs index 98fca3cf9..fc4eb9e61 100644 --- a/generated/async-stripe-misc/src/gelato_selfie_report.rs +++ b/generated/async-stripe-misc/src/gelato_selfie_report.rs @@ -23,6 +23,7 @@ pub struct GelatoSelfieReportBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_selfie_report_error.rs b/generated/async-stripe-misc/src/gelato_selfie_report_error.rs index 3b51929fc..dd9deb910 100644 --- a/generated/async-stripe-misc/src/gelato_selfie_report_error.rs +++ b/generated/async-stripe-misc/src/gelato_selfie_report_error.rs @@ -17,6 +17,7 @@ pub struct GelatoSelfieReportErrorBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_session_document_options.rs b/generated/async-stripe-misc/src/gelato_session_document_options.rs index 74f5b006b..67cbb1898 100644 --- a/generated/async-stripe-misc/src/gelato_session_document_options.rs +++ b/generated/async-stripe-misc/src/gelato_session_document_options.rs @@ -24,6 +24,7 @@ pub struct GelatoSessionDocumentOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_session_email_options.rs b/generated/async-stripe-misc/src/gelato_session_email_options.rs index 8b68a5b86..9ac1f1b20 100644 --- a/generated/async-stripe-misc/src/gelato_session_email_options.rs +++ b/generated/async-stripe-misc/src/gelato_session_email_options.rs @@ -13,6 +13,7 @@ pub struct GelatoSessionEmailOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_session_id_number_options.rs b/generated/async-stripe-misc/src/gelato_session_id_number_options.rs index a1520c544..3981bf4ea 100644 --- a/generated/async-stripe-misc/src/gelato_session_id_number_options.rs +++ b/generated/async-stripe-misc/src/gelato_session_id_number_options.rs @@ -8,6 +8,7 @@ pub struct GelatoSessionIdNumberOptionsBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_session_last_error.rs b/generated/async-stripe-misc/src/gelato_session_last_error.rs index ac328453b..d948f0ef7 100644 --- a/generated/async-stripe-misc/src/gelato_session_last_error.rs +++ b/generated/async-stripe-misc/src/gelato_session_last_error.rs @@ -17,6 +17,7 @@ pub struct GelatoSessionLastErrorBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_session_phone_options.rs b/generated/async-stripe-misc/src/gelato_session_phone_options.rs index ac9310b1e..afe55faa8 100644 --- a/generated/async-stripe-misc/src/gelato_session_phone_options.rs +++ b/generated/async-stripe-misc/src/gelato_session_phone_options.rs @@ -13,6 +13,7 @@ pub struct GelatoSessionPhoneOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_verification_report_options.rs b/generated/async-stripe-misc/src/gelato_verification_report_options.rs index 6c8fd9432..bffa3a881 100644 --- a/generated/async-stripe-misc/src/gelato_verification_report_options.rs +++ b/generated/async-stripe-misc/src/gelato_verification_report_options.rs @@ -14,6 +14,7 @@ pub struct GelatoVerificationReportOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_verification_session_options.rs b/generated/async-stripe-misc/src/gelato_verification_session_options.rs index ace6c0571..c6399f44e 100644 --- a/generated/async-stripe-misc/src/gelato_verification_session_options.rs +++ b/generated/async-stripe-misc/src/gelato_verification_session_options.rs @@ -18,6 +18,7 @@ pub struct GelatoVerificationSessionOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/gelato_verified_outputs.rs b/generated/async-stripe-misc/src/gelato_verified_outputs.rs index 8096b7e9a..fcf6603bb 100644 --- a/generated/async-stripe-misc/src/gelato_verified_outputs.rs +++ b/generated/async-stripe-misc/src/gelato_verified_outputs.rs @@ -34,6 +34,7 @@ pub struct GelatoVerifiedOutputsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 938243937..9acb9f279 100644 --- a/generated/async-stripe-misc/src/identity_verification_report/types.rs +++ b/generated/async-stripe-misc/src/identity_verification_report/types.rs @@ -57,6 +57,7 @@ pub struct IdentityVerificationReportBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 2bb678e50..5622721ed 100644 --- a/generated/async-stripe-misc/src/identity_verification_session/types.rs +++ b/generated/async-stripe-misc/src/identity_verification_session/types.rs @@ -85,6 +85,7 @@ pub struct IdentityVerificationSessionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 4d3a37cb4..ebb5a080b 100644 --- a/generated/async-stripe-misc/src/reporting_report_run/types.rs +++ b/generated/async-stripe-misc/src/reporting_report_run/types.rs @@ -50,6 +50,7 @@ pub struct ReportingReportRunBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 0c97f5a74..9867ddbde 100644 --- a/generated/async-stripe-misc/src/reporting_report_type/types.rs +++ b/generated/async-stripe-misc/src/reporting_report_type/types.rs @@ -45,6 +45,7 @@ pub struct ReportingReportTypeBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 3386d680f..40d1905c1 100644 --- a/generated/async-stripe-misc/src/scheduled_query_run/types.rs +++ b/generated/async-stripe-misc/src/scheduled_query_run/types.rs @@ -44,6 +44,7 @@ pub struct ScheduledQueryRunBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/sigma_scheduled_query_run_error.rs b/generated/async-stripe-misc/src/sigma_scheduled_query_run_error.rs index 3de038482..628f75d45 100644 --- a/generated/async-stripe-misc/src/sigma_scheduled_query_run_error.rs +++ b/generated/async-stripe-misc/src/sigma_scheduled_query_run_error.rs @@ -13,6 +13,7 @@ pub struct SigmaScheduledQueryRunErrorBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_calculation/types.rs b/generated/async-stripe-misc/src/tax_calculation/types.rs index 5bce63bf2..d4a1d566b 100644 --- a/generated/async-stripe-misc/src/tax_calculation/types.rs +++ b/generated/async-stripe-misc/src/tax_calculation/types.rs @@ -56,6 +56,7 @@ pub struct TaxCalculationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 3b1cee82f..e42d43b4a 100644 --- a/generated/async-stripe-misc/src/tax_calculation_line_item.rs +++ b/generated/async-stripe-misc/src/tax_calculation_line_item.rs @@ -42,6 +42,7 @@ pub struct TaxCalculationLineItemBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options.rs index 4f44bcdc6..6425d9820 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options.rs @@ -108,6 +108,7 @@ pub struct TaxProductRegistrationsResourceCountryOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_ca_province_standard.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_ca_province_standard.rs index f9d769ae7..65f44ef53 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_ca_province_standard.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_ca_province_standard.rs @@ -13,6 +13,7 @@ pub struct TaxProductRegistrationsResourceCountryOptionsCaProvinceStandardBuilde #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_canada.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_canada.rs index 571d1b9f4..a27f75205 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_canada.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_canada.rs @@ -19,6 +19,7 @@ pub struct TaxProductRegistrationsResourceCountryOptionsCanadaBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_default.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_default.rs index 87eb5c646..cda8703e6 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_default.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_default.rs @@ -14,6 +14,7 @@ pub struct TaxProductRegistrationsResourceCountryOptionsDefaultBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_eu_standard.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_eu_standard.rs index aa26d4f21..019a74fac 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_eu_standard.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_eu_standard.rs @@ -15,6 +15,7 @@ pub struct TaxProductRegistrationsResourceCountryOptionsEuStandardBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_europe.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_europe.rs index c63ed3451..aa09c3341 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_europe.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_europe.rs @@ -16,6 +16,7 @@ pub struct TaxProductRegistrationsResourceCountryOptionsEuropeBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_simplified.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_simplified.rs index b7755f841..d9adeefcb 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_simplified.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_simplified.rs @@ -14,6 +14,7 @@ pub struct TaxProductRegistrationsResourceCountryOptionsSimplifiedBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_united_states.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_united_states.rs index acaf75329..a57825b4c 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_united_states.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_united_states.rs @@ -26,6 +26,7 @@ pub struct TaxProductRegistrationsResourceCountryOptionsUnitedStatesBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_amusement_tax.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_amusement_tax.rs index 751f4c663..aa09e0d57 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_amusement_tax.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_amusement_tax.rs @@ -13,6 +13,7 @@ pub struct TaxProductRegistrationsResourceCountryOptionsUsLocalAmusementTaxBuild #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_lease_tax.rs b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_lease_tax.rs index fd74a02ae..861750d92 100644 --- a/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_lease_tax.rs +++ b/generated/async-stripe-misc/src/tax_product_registrations_resource_country_options_us_local_lease_tax.rs @@ -13,6 +13,7 @@ pub struct TaxProductRegistrationsResourceCountryOptionsUsLocalLeaseTaxBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_customer_details.rs b/generated/async-stripe-misc/src/tax_product_resource_customer_details.rs index 051a60d53..bdfb38400 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_customer_details.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_customer_details.rs @@ -25,6 +25,7 @@ pub struct TaxProductResourceCustomerDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_customer_details_resource_tax_id.rs b/generated/async-stripe-misc/src/tax_product_resource_customer_details_resource_tax_id.rs index 54d67f2f0..d747533d7 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_customer_details_resource_tax_id.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_customer_details_resource_tax_id.rs @@ -17,6 +17,7 @@ pub struct TaxProductResourceCustomerDetailsResourceTaxIdBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_jurisdiction.rs b/generated/async-stripe-misc/src/tax_product_resource_jurisdiction.rs index 49ca2d38b..724337c41 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_jurisdiction.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_jurisdiction.rs @@ -23,6 +23,7 @@ pub struct TaxProductResourceJurisdictionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_breakdown.rs b/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_breakdown.rs index 47cb2a0b1..cdb77bf23 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_breakdown.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_breakdown.rs @@ -29,6 +29,7 @@ pub struct TaxProductResourceLineItemTaxBreakdownBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_rate_details.rs b/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_rate_details.rs index c3f6f5e03..ee114fdff 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_rate_details.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_line_item_tax_rate_details.rs @@ -20,6 +20,7 @@ pub struct TaxProductResourceLineItemTaxRateDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_postal_address.rs b/generated/async-stripe-misc/src/tax_product_resource_postal_address.rs index 8f98aebed..e90b1904b 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_postal_address.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_postal_address.rs @@ -29,6 +29,7 @@ pub struct TaxProductResourcePostalAddressBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_ship_from_details.rs b/generated/async-stripe-misc/src/tax_product_resource_ship_from_details.rs index 3f4f25fcc..b2bad81ed 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_ship_from_details.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_ship_from_details.rs @@ -12,6 +12,7 @@ pub struct TaxProductResourceShipFromDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_breakdown.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_breakdown.rs index 6c6a48f45..bd5bfcac7 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_breakdown.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_breakdown.rs @@ -25,6 +25,7 @@ pub struct TaxProductResourceTaxBreakdownBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_calculation_shipping_cost.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_calculation_shipping_cost.rs index aa56ba1ac..bba7e99a9 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_calculation_shipping_cost.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_calculation_shipping_cost.rs @@ -31,6 +31,7 @@ pub struct TaxProductResourceTaxCalculationShippingCostBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_rate_details.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_rate_details.rs index 8870461f0..d194159ce 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_rate_details.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_rate_details.rs @@ -22,6 +22,7 @@ pub struct TaxProductResourceTaxRateDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_defaults.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_defaults.rs index e2fd23902..6c987cb83 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_defaults.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_defaults.rs @@ -17,6 +17,7 @@ pub struct TaxProductResourceTaxSettingsDefaultsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_head_office.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_head_office.rs index 56eb0af1f..1baafe435 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_head_office.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_head_office.rs @@ -12,6 +12,7 @@ pub struct TaxProductResourceTaxSettingsHeadOfficeBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details.rs index 476df1f3f..5a3499570 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details.rs @@ -14,6 +14,7 @@ pub struct TaxProductResourceTaxSettingsStatusDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_active.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_active.rs index d2cea6d55..0ed8c0ac9 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_active.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_active.rs @@ -8,6 +8,7 @@ pub struct TaxProductResourceTaxSettingsStatusDetailsResourceActiveBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_pending.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_pending.rs index c1c01f236..74cee50fe 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_pending.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_settings_status_details_resource_pending.rs @@ -16,6 +16,7 @@ pub struct TaxProductResourceTaxSettingsStatusDetailsResourcePendingBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_line_item_resource_reversal.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_line_item_resource_reversal.rs index 84f7b32f8..ad43c844e 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_line_item_resource_reversal.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_line_item_resource_reversal.rs @@ -13,6 +13,7 @@ pub struct TaxProductResourceTaxTransactionLineItemResourceReversalBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_resource_reversal.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_resource_reversal.rs index 4223c6b75..88342c0c6 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_resource_reversal.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_resource_reversal.rs @@ -13,6 +13,7 @@ pub struct TaxProductResourceTaxTransactionResourceReversalBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_shipping_cost.rs b/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_shipping_cost.rs index f11ee4191..78f7dc61e 100644 --- a/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_shipping_cost.rs +++ b/generated/async-stripe-misc/src/tax_product_resource_tax_transaction_shipping_cost.rs @@ -32,6 +32,7 @@ pub struct TaxProductResourceTaxTransactionShippingCostBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_registration/types.rs b/generated/async-stripe-misc/src/tax_registration/types.rs index 675564836..2678d5c95 100644 --- a/generated/async-stripe-misc/src/tax_registration/types.rs +++ b/generated/async-stripe-misc/src/tax_registration/types.rs @@ -41,6 +41,7 @@ pub struct TaxRegistrationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_settings/types.rs b/generated/async-stripe-misc/src/tax_settings/types.rs index 5a93d03ef..63188874b 100644 --- a/generated/async-stripe-misc/src/tax_settings/types.rs +++ b/generated/async-stripe-misc/src/tax_settings/types.rs @@ -28,6 +28,7 @@ pub struct TaxSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/tax_transaction/types.rs b/generated/async-stripe-misc/src/tax_transaction/types.rs index 98d2b8e9e..8067cbcc7 100644 --- a/generated/async-stripe-misc/src/tax_transaction/types.rs +++ b/generated/async-stripe-misc/src/tax_transaction/types.rs @@ -58,6 +58,7 @@ pub struct TaxTransactionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 887dc758a..4c2d922e5 100644 --- a/generated/async-stripe-misc/src/tax_transaction_line_item.rs +++ b/generated/async-stripe-misc/src/tax_transaction_line_item.rs @@ -50,6 +50,7 @@ pub struct TaxTransactionLineItemBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/verification_session_redaction.rs b/generated/async-stripe-misc/src/verification_session_redaction.rs index 3a3dc1c80..6e76a3a7f 100644 --- a/generated/async-stripe-misc/src/verification_session_redaction.rs +++ b/generated/async-stripe-misc/src/verification_session_redaction.rs @@ -13,6 +13,7 @@ pub struct VerificationSessionRedactionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-misc/src/webhook_endpoint/types.rs b/generated/async-stripe-misc/src/webhook_endpoint/types.rs index 635b9d980..c0c9d3dd9 100644 --- a/generated/async-stripe-misc/src/webhook_endpoint/types.rs +++ b/generated/async-stripe-misc/src/webhook_endpoint/types.rs @@ -54,6 +54,7 @@ pub struct WebhookEndpointBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-payment/src/confirmation_token/types.rs b/generated/async-stripe-payment/src/confirmation_token/types.rs index 9316b9bdb..c663359fd 100644 --- a/generated/async-stripe-payment/src/confirmation_token/types.rs +++ b/generated/async-stripe-payment/src/confirmation_token/types.rs @@ -57,6 +57,7 @@ pub struct ConfirmationTokenBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data.rs b/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data.rs index 62206a127..4709bb1c2 100644 --- a/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data.rs +++ b/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data.rs @@ -15,6 +15,7 @@ pub struct ConfirmationTokensResourceMandateDataBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance.rs b/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance.rs index 6af548bc0..0a2c1b623 100644 --- a/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance.rs +++ b/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance.rs @@ -20,6 +20,7 @@ type_: Option, #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online.rs b/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online.rs index b64231ed6..7fefa175f 100644 --- a/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online.rs +++ b/generated/async-stripe-payment/src/confirmation_tokens_resource_mandate_data_resource_customer_acceptance_resource_online.rs @@ -17,6 +17,7 @@ pub struct ConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResour #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-payment/src/confirmation_tokens_resource_payment_method_preview.rs b/generated/async-stripe-payment/src/confirmation_tokens_resource_payment_method_preview.rs index a3d02038d..b241787f6 100644 --- a/generated/async-stripe-payment/src/confirmation_tokens_resource_payment_method_preview.rs +++ b/generated/async-stripe-payment/src/confirmation_tokens_resource_payment_method_preview.rs @@ -93,6 +93,7 @@ pub struct ConfirmationTokensResourcePaymentMethodPreviewBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-payment/src/confirmation_tokens_resource_shipping.rs b/generated/async-stripe-payment/src/confirmation_tokens_resource_shipping.rs index eb18cb3e1..5c55acb13 100644 --- a/generated/async-stripe-payment/src/confirmation_tokens_resource_shipping.rs +++ b/generated/async-stripe-payment/src/confirmation_tokens_resource_shipping.rs @@ -18,6 +18,7 @@ pub struct ConfirmationTokensResourceShippingBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-payment/src/payment_method_config_resource_display_preference.rs b/generated/async-stripe-payment/src/payment_method_config_resource_display_preference.rs index 2cd4c2e2b..0e2db8cfe 100644 --- a/generated/async-stripe-payment/src/payment_method_config_resource_display_preference.rs +++ b/generated/async-stripe-payment/src/payment_method_config_resource_display_preference.rs @@ -20,6 +20,7 @@ pub struct PaymentMethodConfigResourceDisplayPreferenceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-payment/src/payment_method_config_resource_payment_method_properties.rs b/generated/async-stripe-payment/src/payment_method_config_resource_payment_method_properties.rs index b76d5fe3b..4295f3c8a 100644 --- a/generated/async-stripe-payment/src/payment_method_config_resource_payment_method_properties.rs +++ b/generated/async-stripe-payment/src/payment_method_config_resource_payment_method_properties.rs @@ -16,6 +16,7 @@ pub struct PaymentMethodConfigResourcePaymentMethodPropertiesBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 be28702d6..8ff86034e 100644 --- a/generated/async-stripe-payment/src/payment_method_configuration/types.rs +++ b/generated/async-stripe-payment/src/payment_method_configuration/types.rs @@ -137,6 +137,7 @@ pub struct PaymentMethodConfigurationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 f031280f6..542f7b54b 100644 --- a/generated/async-stripe-payment/src/payment_method_domain/types.rs +++ b/generated/async-stripe-payment/src/payment_method_domain/types.rs @@ -39,6 +39,7 @@ pub struct PaymentMethodDomainBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status.rs b/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status.rs index 44277e585..c48c0916f 100644 --- a/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status.rs +++ b/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status.rs @@ -18,6 +18,7 @@ pub struct PaymentMethodDomainResourcePaymentMethodStatusBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status_details.rs b/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status_details.rs index 593ed3163..659133a16 100644 --- a/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status_details.rs +++ b/generated/async-stripe-payment/src/payment_method_domain_resource_payment_method_status_details.rs @@ -14,6 +14,7 @@ pub struct PaymentMethodDomainResourcePaymentMethodStatusDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-payment/src/source_mandate_notification.rs b/generated/async-stripe-payment/src/source_mandate_notification.rs index c7c9f7d0e..76e4cbc4a 100644 --- a/generated/async-stripe-payment/src/source_mandate_notification.rs +++ b/generated/async-stripe-payment/src/source_mandate_notification.rs @@ -45,6 +45,7 @@ pub struct SourceMandateNotificationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-payment/src/source_mandate_notification_acss_debit_data.rs b/generated/async-stripe-payment/src/source_mandate_notification_acss_debit_data.rs index eb21fb24c..94022e2bf 100644 --- a/generated/async-stripe-payment/src/source_mandate_notification_acss_debit_data.rs +++ b/generated/async-stripe-payment/src/source_mandate_notification_acss_debit_data.rs @@ -13,6 +13,7 @@ pub struct SourceMandateNotificationAcssDebitDataBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-payment/src/source_mandate_notification_bacs_debit_data.rs b/generated/async-stripe-payment/src/source_mandate_notification_bacs_debit_data.rs index bf46ec2e4..b2a8381fd 100644 --- a/generated/async-stripe-payment/src/source_mandate_notification_bacs_debit_data.rs +++ b/generated/async-stripe-payment/src/source_mandate_notification_bacs_debit_data.rs @@ -13,6 +13,7 @@ pub struct SourceMandateNotificationBacsDebitDataBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-payment/src/source_mandate_notification_sepa_debit_data.rs b/generated/async-stripe-payment/src/source_mandate_notification_sepa_debit_data.rs index 0a0052df7..035d17c57 100644 --- a/generated/async-stripe-payment/src/source_mandate_notification_sepa_debit_data.rs +++ b/generated/async-stripe-payment/src/source_mandate_notification_sepa_debit_data.rs @@ -19,6 +19,7 @@ pub struct SourceMandateNotificationSepaDebitDataBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-product/src/deleted_product_feature.rs b/generated/async-stripe-product/src/deleted_product_feature.rs index 3c6834f93..d9785b557 100644 --- a/generated/async-stripe-product/src/deleted_product_feature.rs +++ b/generated/async-stripe-product/src/deleted_product_feature.rs @@ -15,6 +15,7 @@ pub struct DeletedProductFeatureBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-product/src/product_feature/types.rs b/generated/async-stripe-product/src/product_feature/types.rs index dd7128d57..c0d8007b3 100644 --- a/generated/async-stripe-product/src/product_feature/types.rs +++ b/generated/async-stripe-product/src/product_feature/types.rs @@ -19,6 +19,7 @@ pub struct ProductFeatureBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account.rs b/generated/async-stripe-shared/src/account.rs index 248a4d7b3..3555f9c47 100644 --- a/generated/async-stripe-shared/src/account.rs +++ b/generated/async-stripe-shared/src/account.rs @@ -86,6 +86,7 @@ pub struct AccountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_annual_revenue.rs b/generated/async-stripe-shared/src/account_annual_revenue.rs index e0741307f..68c500bb7 100644 --- a/generated/async-stripe-shared/src/account_annual_revenue.rs +++ b/generated/async-stripe-shared/src/account_annual_revenue.rs @@ -22,6 +22,7 @@ pub struct AccountAnnualRevenueBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_bacs_debit_payments_settings.rs b/generated/async-stripe-shared/src/account_bacs_debit_payments_settings.rs index 4be4dbce0..d10aaf13b 100644 --- a/generated/async-stripe-shared/src/account_bacs_debit_payments_settings.rs +++ b/generated/async-stripe-shared/src/account_bacs_debit_payments_settings.rs @@ -23,6 +23,7 @@ pub struct AccountBacsDebitPaymentsSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_branding_settings.rs b/generated/async-stripe-shared/src/account_branding_settings.rs index 1ef0299d8..bd721570e 100644 --- a/generated/async-stripe-shared/src/account_branding_settings.rs +++ b/generated/async-stripe-shared/src/account_branding_settings.rs @@ -24,6 +24,7 @@ pub struct AccountBrandingSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_business_profile.rs b/generated/async-stripe-shared/src/account_business_profile.rs index b7e6705e6..017ba5ff8 100644 --- a/generated/async-stripe-shared/src/account_business_profile.rs +++ b/generated/async-stripe-shared/src/account_business_profile.rs @@ -45,6 +45,7 @@ pub struct AccountBusinessProfileBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_capabilities.rs b/generated/async-stripe-shared/src/account_capabilities.rs index 2619c372b..cf8886d44 100644 --- a/generated/async-stripe-shared/src/account_capabilities.rs +++ b/generated/async-stripe-shared/src/account_capabilities.rs @@ -130,6 +130,7 @@ pub struct AccountCapabilitiesBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_capability_future_requirements.rs b/generated/async-stripe-shared/src/account_capability_future_requirements.rs index 0daebf7f7..368653c71 100644 --- a/generated/async-stripe-shared/src/account_capability_future_requirements.rs +++ b/generated/async-stripe-shared/src/account_capability_future_requirements.rs @@ -42,6 +42,7 @@ pub struct AccountCapabilityFutureRequirementsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_capability_requirements.rs b/generated/async-stripe-shared/src/account_capability_requirements.rs index 87132779f..c202aab32 100644 --- a/generated/async-stripe-shared/src/account_capability_requirements.rs +++ b/generated/async-stripe-shared/src/account_capability_requirements.rs @@ -51,6 +51,7 @@ pub struct AccountCapabilityRequirementsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_card_issuing_settings.rs b/generated/async-stripe-shared/src/account_card_issuing_settings.rs index bdabcd63a..7e9729f55 100644 --- a/generated/async-stripe-shared/src/account_card_issuing_settings.rs +++ b/generated/async-stripe-shared/src/account_card_issuing_settings.rs @@ -12,6 +12,7 @@ pub struct AccountCardIssuingSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_card_payments_settings.rs b/generated/async-stripe-shared/src/account_card_payments_settings.rs index 2354c16fe..8260aa011 100644 --- a/generated/async-stripe-shared/src/account_card_payments_settings.rs +++ b/generated/async-stripe-shared/src/account_card_payments_settings.rs @@ -27,6 +27,7 @@ pub struct AccountCardPaymentsSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_dashboard_settings.rs b/generated/async-stripe-shared/src/account_dashboard_settings.rs index 435bd3c62..4a252cb3e 100644 --- a/generated/async-stripe-shared/src/account_dashboard_settings.rs +++ b/generated/async-stripe-shared/src/account_dashboard_settings.rs @@ -18,6 +18,7 @@ pub struct AccountDashboardSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_decline_charge_on.rs b/generated/async-stripe-shared/src/account_decline_charge_on.rs index 5278d4bf1..7da9fc6f9 100644 --- a/generated/async-stripe-shared/src/account_decline_charge_on.rs +++ b/generated/async-stripe-shared/src/account_decline_charge_on.rs @@ -18,6 +18,7 @@ pub struct AccountDeclineChargeOnBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_future_requirements.rs b/generated/async-stripe-shared/src/account_future_requirements.rs index 68e159d47..5d4b253dd 100644 --- a/generated/async-stripe-shared/src/account_future_requirements.rs +++ b/generated/async-stripe-shared/src/account_future_requirements.rs @@ -42,6 +42,7 @@ pub struct AccountFutureRequirementsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_invoices_settings.rs b/generated/async-stripe-shared/src/account_invoices_settings.rs index 062ea66fc..7d862b15d 100644 --- a/generated/async-stripe-shared/src/account_invoices_settings.rs +++ b/generated/async-stripe-shared/src/account_invoices_settings.rs @@ -14,6 +14,7 @@ pub struct AccountInvoicesSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_monthly_estimated_revenue.rs b/generated/async-stripe-shared/src/account_monthly_estimated_revenue.rs index ffbfa7b16..50779649d 100644 --- a/generated/async-stripe-shared/src/account_monthly_estimated_revenue.rs +++ b/generated/async-stripe-shared/src/account_monthly_estimated_revenue.rs @@ -17,6 +17,7 @@ pub struct AccountMonthlyEstimatedRevenueBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_payments_settings.rs b/generated/async-stripe-shared/src/account_payments_settings.rs index 85c1c7c1d..ee3b02ab0 100644 --- a/generated/async-stripe-shared/src/account_payments_settings.rs +++ b/generated/async-stripe-shared/src/account_payments_settings.rs @@ -30,6 +30,7 @@ pub struct AccountPaymentsSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_payout_settings.rs b/generated/async-stripe-shared/src/account_payout_settings.rs index aecd4bc32..6210d1682 100644 --- a/generated/async-stripe-shared/src/account_payout_settings.rs +++ b/generated/async-stripe-shared/src/account_payout_settings.rs @@ -21,6 +21,7 @@ pub struct AccountPayoutSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_requirements.rs b/generated/async-stripe-shared/src/account_requirements.rs index 2f9c84d26..c1d891281 100644 --- a/generated/async-stripe-shared/src/account_requirements.rs +++ b/generated/async-stripe-shared/src/account_requirements.rs @@ -43,6 +43,7 @@ pub struct AccountRequirementsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_requirements_alternative.rs b/generated/async-stripe-shared/src/account_requirements_alternative.rs index a33954edc..01f94ead5 100644 --- a/generated/async-stripe-shared/src/account_requirements_alternative.rs +++ b/generated/async-stripe-shared/src/account_requirements_alternative.rs @@ -16,6 +16,7 @@ pub struct AccountRequirementsAlternativeBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_requirements_error.rs b/generated/async-stripe-shared/src/account_requirements_error.rs index e3db6000e..74f81b875 100644 --- a/generated/async-stripe-shared/src/account_requirements_error.rs +++ b/generated/async-stripe-shared/src/account_requirements_error.rs @@ -19,6 +19,7 @@ pub struct AccountRequirementsErrorBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_sepa_debit_payments_settings.rs b/generated/async-stripe-shared/src/account_sepa_debit_payments_settings.rs index d28289b75..ac248cb64 100644 --- a/generated/async-stripe-shared/src/account_sepa_debit_payments_settings.rs +++ b/generated/async-stripe-shared/src/account_sepa_debit_payments_settings.rs @@ -13,6 +13,7 @@ pub struct AccountSepaDebitPaymentsSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_settings.rs b/generated/async-stripe-shared/src/account_settings.rs index b43b7ece8..d505fe610 100644 --- a/generated/async-stripe-shared/src/account_settings.rs +++ b/generated/async-stripe-shared/src/account_settings.rs @@ -30,6 +30,7 @@ pub struct AccountSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_terms_of_service.rs b/generated/async-stripe-shared/src/account_terms_of_service.rs index 86102c45d..2937fc91a 100644 --- a/generated/async-stripe-shared/src/account_terms_of_service.rs +++ b/generated/async-stripe-shared/src/account_terms_of_service.rs @@ -19,6 +19,7 @@ pub struct AccountTermsOfServiceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_tos_acceptance.rs b/generated/async-stripe-shared/src/account_tos_acceptance.rs index 21267fad0..d8f78372e 100644 --- a/generated/async-stripe-shared/src/account_tos_acceptance.rs +++ b/generated/async-stripe-shared/src/account_tos_acceptance.rs @@ -22,6 +22,7 @@ pub struct AccountTosAcceptanceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_treasury_settings.rs b/generated/async-stripe-shared/src/account_treasury_settings.rs index 578be67b3..fda9a5453 100644 --- a/generated/async-stripe-shared/src/account_treasury_settings.rs +++ b/generated/async-stripe-shared/src/account_treasury_settings.rs @@ -12,6 +12,7 @@ pub struct AccountTreasurySettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_unification_account_controller.rs b/generated/async-stripe-shared/src/account_unification_account_controller.rs index a6a9b1865..e97240f00 100644 --- a/generated/async-stripe-shared/src/account_unification_account_controller.rs +++ b/generated/async-stripe-shared/src/account_unification_account_controller.rs @@ -31,6 +31,7 @@ pub struct AccountUnificationAccountControllerBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_unification_account_controller_fees.rs b/generated/async-stripe-shared/src/account_unification_account_controller_fees.rs index 54df02e6e..76a2beb24 100644 --- a/generated/async-stripe-shared/src/account_unification_account_controller_fees.rs +++ b/generated/async-stripe-shared/src/account_unification_account_controller_fees.rs @@ -14,6 +14,7 @@ pub struct AccountUnificationAccountControllerFeesBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_unification_account_controller_losses.rs b/generated/async-stripe-shared/src/account_unification_account_controller_losses.rs index 85e385267..883395f18 100644 --- a/generated/async-stripe-shared/src/account_unification_account_controller_losses.rs +++ b/generated/async-stripe-shared/src/account_unification_account_controller_losses.rs @@ -13,6 +13,7 @@ pub struct AccountUnificationAccountControllerLossesBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/account_unification_account_controller_stripe_dashboard.rs b/generated/async-stripe-shared/src/account_unification_account_controller_stripe_dashboard.rs index 0461ee595..cdf0e288c 100644 --- a/generated/async-stripe-shared/src/account_unification_account_controller_stripe_dashboard.rs +++ b/generated/async-stripe-shared/src/account_unification_account_controller_stripe_dashboard.rs @@ -14,6 +14,7 @@ pub struct AccountUnificationAccountControllerStripeDashboardBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/address.rs b/generated/async-stripe-shared/src/address.rs index 9911d5f83..3ac409e96 100644 --- a/generated/async-stripe-shared/src/address.rs +++ b/generated/async-stripe-shared/src/address.rs @@ -28,6 +28,7 @@ pub struct AddressBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/api_errors.rs b/generated/async-stripe-shared/src/api_errors.rs index 66496b3c7..e4d207753 100644 --- a/generated/async-stripe-shared/src/api_errors.rs +++ b/generated/async-stripe-shared/src/api_errors.rs @@ -50,6 +50,7 @@ pub struct ApiErrorsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/application.rs b/generated/async-stripe-shared/src/application.rs index cef86b6f6..47378fb8f 100644 --- a/generated/async-stripe-shared/src/application.rs +++ b/generated/async-stripe-shared/src/application.rs @@ -15,6 +15,7 @@ pub struct ApplicationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/application_fee.rs b/generated/async-stripe-shared/src/application_fee.rs index 5f8d079c7..b5d6814b0 100644 --- a/generated/async-stripe-shared/src/application_fee.rs +++ b/generated/async-stripe-shared/src/application_fee.rs @@ -52,6 +52,7 @@ pub struct ApplicationFeeBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/application_fee_refund.rs b/generated/async-stripe-shared/src/application_fee_refund.rs index 7452b1421..7a2c9e8a3 100644 --- a/generated/async-stripe-shared/src/application_fee_refund.rs +++ b/generated/async-stripe-shared/src/application_fee_refund.rs @@ -40,6 +40,7 @@ pub struct ApplicationFeeRefundBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/automatic_tax.rs b/generated/async-stripe-shared/src/automatic_tax.rs index bae6c4674..764a05ab4 100644 --- a/generated/async-stripe-shared/src/automatic_tax.rs +++ b/generated/async-stripe-shared/src/automatic_tax.rs @@ -22,6 +22,7 @@ pub struct AutomaticTaxBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/balance_transaction.rs b/generated/async-stripe-shared/src/balance_transaction.rs index 67abef312..05ae52da6 100644 --- a/generated/async-stripe-shared/src/balance_transaction.rs +++ b/generated/async-stripe-shared/src/balance_transaction.rs @@ -68,6 +68,7 @@ pub struct BalanceTransactionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/bank_account.rs b/generated/async-stripe-shared/src/bank_account.rs index 6db97c4a0..bfce9fb71 100644 --- a/generated/async-stripe-shared/src/bank_account.rs +++ b/generated/async-stripe-shared/src/bank_account.rs @@ -88,6 +88,7 @@ pub struct BankAccountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/billing_details.rs b/generated/async-stripe-shared/src/billing_details.rs index ab4886f8c..dbc5e32bb 100644 --- a/generated/async-stripe-shared/src/billing_details.rs +++ b/generated/async-stripe-shared/src/billing_details.rs @@ -22,6 +22,7 @@ pub struct BillingDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/cancellation_details.rs b/generated/async-stripe-shared/src/cancellation_details.rs index 0d8e7741d..c2dcbc8f2 100644 --- a/generated/async-stripe-shared/src/cancellation_details.rs +++ b/generated/async-stripe-shared/src/cancellation_details.rs @@ -19,6 +19,7 @@ pub struct CancellationDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/capability.rs b/generated/async-stripe-shared/src/capability.rs index 2801bc169..9fd01b947 100644 --- a/generated/async-stripe-shared/src/capability.rs +++ b/generated/async-stripe-shared/src/capability.rs @@ -33,6 +33,7 @@ pub struct CapabilityBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/card.rs b/generated/async-stripe-shared/src/card.rs index 37c4e32d5..aad3c9f1e 100644 --- a/generated/async-stripe-shared/src/card.rs +++ b/generated/async-stripe-shared/src/card.rs @@ -131,6 +131,7 @@ pub struct CardBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/card_issuing_account_terms_of_service.rs b/generated/async-stripe-shared/src/card_issuing_account_terms_of_service.rs index 1522220c6..61c8da3a1 100644 --- a/generated/async-stripe-shared/src/card_issuing_account_terms_of_service.rs +++ b/generated/async-stripe-shared/src/card_issuing_account_terms_of_service.rs @@ -19,6 +19,7 @@ pub struct CardIssuingAccountTermsOfServiceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/card_mandate_payment_method_details.rs b/generated/async-stripe-shared/src/card_mandate_payment_method_details.rs index ddd5dc08b..29a5f5378 100644 --- a/generated/async-stripe-shared/src/card_mandate_payment_method_details.rs +++ b/generated/async-stripe-shared/src/card_mandate_payment_method_details.rs @@ -8,6 +8,7 @@ pub struct CardMandatePaymentMethodDetailsBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/cash_balance.rs b/generated/async-stripe-shared/src/cash_balance.rs index ccb5d26f5..9e94b1438 100644 --- a/generated/async-stripe-shared/src/cash_balance.rs +++ b/generated/async-stripe-shared/src/cash_balance.rs @@ -27,6 +27,7 @@ pub struct CashBalanceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/charge.rs b/generated/async-stripe-shared/src/charge.rs index a2f5bc623..0edd84d19 100644 --- a/generated/async-stripe-shared/src/charge.rs +++ b/generated/async-stripe-shared/src/charge.rs @@ -180,6 +180,7 @@ pub struct ChargeBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/charge_fraud_details.rs b/generated/async-stripe-shared/src/charge_fraud_details.rs index cdb40b60a..4376c7430 100644 --- a/generated/async-stripe-shared/src/charge_fraud_details.rs +++ b/generated/async-stripe-shared/src/charge_fraud_details.rs @@ -16,6 +16,7 @@ pub struct ChargeFraudDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/charge_outcome.rs b/generated/async-stripe-shared/src/charge_outcome.rs index 81c524a54..0f0ebd7c5 100644 --- a/generated/async-stripe-shared/src/charge_outcome.rs +++ b/generated/async-stripe-shared/src/charge_outcome.rs @@ -45,6 +45,7 @@ pub struct ChargeOutcomeBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/charge_transfer_data.rs b/generated/async-stripe-shared/src/charge_transfer_data.rs index 6d758d56b..23fbdea0a 100644 --- a/generated/async-stripe-shared/src/charge_transfer_data.rs +++ b/generated/async-stripe-shared/src/charge_transfer_data.rs @@ -17,6 +17,7 @@ pub struct ChargeTransferDataBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/checkout_session_item.rs b/generated/async-stripe-shared/src/checkout_session_item.rs index 8057937e4..ad7db0673 100644 --- a/generated/async-stripe-shared/src/checkout_session_item.rs +++ b/generated/async-stripe-shared/src/checkout_session_item.rs @@ -46,6 +46,7 @@ pub struct CheckoutSessionItemBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/connect_account_reference.rs b/generated/async-stripe-shared/src/connect_account_reference.rs index ff2de5d72..157a95165 100644 --- a/generated/async-stripe-shared/src/connect_account_reference.rs +++ b/generated/async-stripe-shared/src/connect_account_reference.rs @@ -17,6 +17,7 @@ pub struct ConnectAccountReferenceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/connect_collection_transfer.rs b/generated/async-stripe-shared/src/connect_collection_transfer.rs index e476d6507..def02c36a 100644 --- a/generated/async-stripe-shared/src/connect_collection_transfer.rs +++ b/generated/async-stripe-shared/src/connect_collection_transfer.rs @@ -25,6 +25,7 @@ pub struct ConnectCollectionTransferBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/coupon.rs b/generated/async-stripe-shared/src/coupon.rs index a3205c7b9..81de6b9a5 100644 --- a/generated/async-stripe-shared/src/coupon.rs +++ b/generated/async-stripe-shared/src/coupon.rs @@ -74,6 +74,7 @@ pub struct CouponBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/coupon_applies_to.rs b/generated/async-stripe-shared/src/coupon_applies_to.rs index 90e0eb77b..f94269112 100644 --- a/generated/async-stripe-shared/src/coupon_applies_to.rs +++ b/generated/async-stripe-shared/src/coupon_applies_to.rs @@ -13,6 +13,7 @@ pub struct CouponAppliesToBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/coupon_currency_option.rs b/generated/async-stripe-shared/src/coupon_currency_option.rs index da19baf1a..c332c744c 100644 --- a/generated/async-stripe-shared/src/coupon_currency_option.rs +++ b/generated/async-stripe-shared/src/coupon_currency_option.rs @@ -13,6 +13,7 @@ pub struct CouponCurrencyOptionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/credit_note.rs b/generated/async-stripe-shared/src/credit_note.rs index 3d3c53c68..41dbb7511 100644 --- a/generated/async-stripe-shared/src/credit_note.rs +++ b/generated/async-stripe-shared/src/credit_note.rs @@ -111,6 +111,7 @@ pub struct CreditNoteBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 229c5262e..e062f75c9 100644 --- a/generated/async-stripe-shared/src/credit_note_line_item.rs +++ b/generated/async-stripe-shared/src/credit_note_line_item.rs @@ -59,6 +59,7 @@ pub struct CreditNoteLineItemBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/credit_note_tax_amount.rs b/generated/async-stripe-shared/src/credit_note_tax_amount.rs index b389dafe5..e79977da2 100644 --- a/generated/async-stripe-shared/src/credit_note_tax_amount.rs +++ b/generated/async-stripe-shared/src/credit_note_tax_amount.rs @@ -26,6 +26,7 @@ pub struct CreditNoteTaxAmountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/currency_option.rs b/generated/async-stripe-shared/src/currency_option.rs index 787a9f286..a7f01139c 100644 --- a/generated/async-stripe-shared/src/currency_option.rs +++ b/generated/async-stripe-shared/src/currency_option.rs @@ -32,6 +32,7 @@ pub struct CurrencyOptionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/custom_unit_amount.rs b/generated/async-stripe-shared/src/custom_unit_amount.rs index 45986f002..de6460aa0 100644 --- a/generated/async-stripe-shared/src/custom_unit_amount.rs +++ b/generated/async-stripe-shared/src/custom_unit_amount.rs @@ -20,6 +20,7 @@ pub struct CustomUnitAmountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/customer.rs b/generated/async-stripe-shared/src/customer.rs index 0d1225ad1..da20cbed3 100644 --- a/generated/async-stripe-shared/src/customer.rs +++ b/generated/async-stripe-shared/src/customer.rs @@ -117,6 +117,7 @@ pub struct CustomerBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/customer_acceptance.rs b/generated/async-stripe-shared/src/customer_acceptance.rs index 74bf44386..1da9d99da 100644 --- a/generated/async-stripe-shared/src/customer_acceptance.rs +++ b/generated/async-stripe-shared/src/customer_acceptance.rs @@ -21,6 +21,7 @@ pub struct CustomerAcceptanceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/customer_balance_customer_balance_settings.rs b/generated/async-stripe-shared/src/customer_balance_customer_balance_settings.rs index 726d03af1..9be03017e 100644 --- a/generated/async-stripe-shared/src/customer_balance_customer_balance_settings.rs +++ b/generated/async-stripe-shared/src/customer_balance_customer_balance_settings.rs @@ -16,6 +16,7 @@ pub struct CustomerBalanceCustomerBalanceSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft.rs index 9831bf6d6..d674943d0 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft.rs @@ -17,6 +17,7 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverd #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction.rs index 6035bde4c..d61c8ac57 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction.rs @@ -13,6 +13,7 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPayment #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction.rs index 1b840acb6..e97bc7d7d 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction.rs @@ -14,6 +14,7 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactio #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer.rs index b435e44ca..9b23f7af7 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer.rs @@ -28,6 +28,7 @@ us_bank_transfer: Option>, #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction.rs index b3dd52dd7..9aea31c2d 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction.rs @@ -14,6 +14,7 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaym #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance.rs index cdec70c71..dba73db38 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_transferred_to_balance.rs @@ -13,6 +13,7 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBal #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction.rs b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction.rs index a138ae0be..9b1f7bdad 100644 --- a/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction.rs +++ b/generated/async-stripe-shared/src/customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction.rs @@ -14,6 +14,7 @@ pub struct CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPay #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/customer_balance_transaction.rs b/generated/async-stripe-shared/src/customer_balance_transaction.rs index 3f2db124c..c420fe802 100644 --- a/generated/async-stripe-shared/src/customer_balance_transaction.rs +++ b/generated/async-stripe-shared/src/customer_balance_transaction.rs @@ -60,6 +60,7 @@ pub struct CustomerBalanceTransactionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 927463bc5..adb2ce1b3 100644 --- a/generated/async-stripe-shared/src/customer_cash_balance_transaction.rs +++ b/generated/async-stripe-shared/src/customer_cash_balance_transaction.rs @@ -61,6 +61,7 @@ unapplied_from_payment: Option>, #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_card_checks.rs b/generated/async-stripe-shared/src/payment_method_details_card_checks.rs index cfdbc93a9..656ed8083 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_checks.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_checks.rs @@ -19,6 +19,7 @@ pub struct PaymentMethodDetailsCardChecksBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_card_installments.rs b/generated/async-stripe-shared/src/payment_method_details_card_installments.rs index 3588bd4dc..b61530fe1 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_installments.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_installments.rs @@ -13,6 +13,7 @@ pub struct PaymentMethodDetailsCardInstallmentsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_card_installments_plan.rs b/generated/async-stripe-shared/src/payment_method_details_card_installments_plan.rs index f2bf2a48e..e28a873c5 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_installments_plan.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_installments_plan.rs @@ -21,6 +21,7 @@ pub struct PaymentMethodDetailsCardInstallmentsPlanBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_card_network_token.rs b/generated/async-stripe-shared/src/payment_method_details_card_network_token.rs index 740c9ef11..bf8e44581 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_network_token.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_network_token.rs @@ -13,6 +13,7 @@ pub struct PaymentMethodDetailsCardNetworkTokenBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_card_present.rs b/generated/async-stripe-shared/src/payment_method_details_card_present.rs index dc7a97f11..dac3787a1 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_present.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_present.rs @@ -88,6 +88,7 @@ pub struct PaymentMethodDetailsCardPresentBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_card_present_offline.rs b/generated/async-stripe-shared/src/payment_method_details_card_present_offline.rs index 965cbdbc5..676457dea 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_present_offline.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_present_offline.rs @@ -13,6 +13,7 @@ pub struct PaymentMethodDetailsCardPresentOfflineBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_card_present_receipt.rs b/generated/async-stripe-shared/src/payment_method_details_card_present_receipt.rs index ab9ee4d1d..5fc4d3257 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_present_receipt.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_present_receipt.rs @@ -38,6 +38,7 @@ pub struct PaymentMethodDetailsCardPresentReceiptBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet.rs index 329321bcb..9dacdf447 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet.rs @@ -35,6 +35,7 @@ pub struct PaymentMethodDetailsCardWalletBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet_amex_express_checkout.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet_amex_express_checkout.rs index fffb653cf..e64f5f503 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet_amex_express_checkout.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet_amex_express_checkout.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodDetailsCardWalletAmexExpressCheckoutBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet_apple_pay.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet_apple_pay.rs index 39cc004f7..d462c6bf5 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet_apple_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet_apple_pay.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodDetailsCardWalletApplePayBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet_google_pay.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet_google_pay.rs index f68a5674c..332e6875c 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet_google_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet_google_pay.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodDetailsCardWalletGooglePayBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet_link.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet_link.rs index f7c7f8d20..e5cf9f857 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet_link.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet_link.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodDetailsCardWalletLinkBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet_masterpass.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet_masterpass.rs index bece78569..7c56739ae 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet_masterpass.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet_masterpass.rs @@ -30,6 +30,7 @@ pub struct PaymentMethodDetailsCardWalletMasterpassBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet_samsung_pay.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet_samsung_pay.rs index 0823c8504..5bd7ac14e 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet_samsung_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet_samsung_pay.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodDetailsCardWalletSamsungPayBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_card_wallet_visa_checkout.rs b/generated/async-stripe-shared/src/payment_method_details_card_wallet_visa_checkout.rs index 9eb152d9c..3479c72a4 100644 --- a/generated/async-stripe-shared/src/payment_method_details_card_wallet_visa_checkout.rs +++ b/generated/async-stripe-shared/src/payment_method_details_card_wallet_visa_checkout.rs @@ -30,6 +30,7 @@ pub struct PaymentMethodDetailsCardWalletVisaCheckoutBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_cashapp.rs b/generated/async-stripe-shared/src/payment_method_details_cashapp.rs index f7e371aba..90d41cc76 100644 --- a/generated/async-stripe-shared/src/payment_method_details_cashapp.rs +++ b/generated/async-stripe-shared/src/payment_method_details_cashapp.rs @@ -16,6 +16,7 @@ pub struct PaymentMethodDetailsCashappBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_customer_balance.rs b/generated/async-stripe-shared/src/payment_method_details_customer_balance.rs index 748051577..b571bfe82 100644 --- a/generated/async-stripe-shared/src/payment_method_details_customer_balance.rs +++ b/generated/async-stripe-shared/src/payment_method_details_customer_balance.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodDetailsCustomerBalanceBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_eps.rs b/generated/async-stripe-shared/src/payment_method_details_eps.rs index be7108ed6..a880691d3 100644 --- a/generated/async-stripe-shared/src/payment_method_details_eps.rs +++ b/generated/async-stripe-shared/src/payment_method_details_eps.rs @@ -19,6 +19,7 @@ pub struct PaymentMethodDetailsEpsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_fpx.rs b/generated/async-stripe-shared/src/payment_method_details_fpx.rs index 0a6a9d75a..9360c3a44 100644 --- a/generated/async-stripe-shared/src/payment_method_details_fpx.rs +++ b/generated/async-stripe-shared/src/payment_method_details_fpx.rs @@ -20,6 +20,7 @@ pub struct PaymentMethodDetailsFpxBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_giropay.rs b/generated/async-stripe-shared/src/payment_method_details_giropay.rs index 96f05c58c..690e4246a 100644 --- a/generated/async-stripe-shared/src/payment_method_details_giropay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_giropay.rs @@ -24,6 +24,7 @@ pub struct PaymentMethodDetailsGiropayBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_grabpay.rs b/generated/async-stripe-shared/src/payment_method_details_grabpay.rs index ae63ae322..09a74e757 100644 --- a/generated/async-stripe-shared/src/payment_method_details_grabpay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_grabpay.rs @@ -13,6 +13,7 @@ pub struct PaymentMethodDetailsGrabpayBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_ideal.rs b/generated/async-stripe-shared/src/payment_method_details_ideal.rs index d10da151e..1d4b61bca 100644 --- a/generated/async-stripe-shared/src/payment_method_details_ideal.rs +++ b/generated/async-stripe-shared/src/payment_method_details_ideal.rs @@ -30,6 +30,7 @@ pub struct PaymentMethodDetailsIdealBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_interac_present.rs b/generated/async-stripe-shared/src/payment_method_details_interac_present.rs index c85cbc7ab..97e90619d 100644 --- a/generated/async-stripe-shared/src/payment_method_details_interac_present.rs +++ b/generated/async-stripe-shared/src/payment_method_details_interac_present.rs @@ -74,6 +74,7 @@ pub struct PaymentMethodDetailsInteracPresentBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_interac_present_receipt.rs b/generated/async-stripe-shared/src/payment_method_details_interac_present_receipt.rs index dd04ade53..10e073de5 100644 --- a/generated/async-stripe-shared/src/payment_method_details_interac_present_receipt.rs +++ b/generated/async-stripe-shared/src/payment_method_details_interac_present_receipt.rs @@ -38,6 +38,7 @@ pub struct PaymentMethodDetailsInteracPresentReceiptBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_klarna.rs b/generated/async-stripe-shared/src/payment_method_details_klarna.rs index 2ca1ad5a5..bd6d4632c 100644 --- a/generated/async-stripe-shared/src/payment_method_details_klarna.rs +++ b/generated/async-stripe-shared/src/payment_method_details_klarna.rs @@ -18,6 +18,7 @@ pub struct PaymentMethodDetailsKlarnaBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_konbini.rs b/generated/async-stripe-shared/src/payment_method_details_konbini.rs index e1af2ebaa..be2ace4ba 100644 --- a/generated/async-stripe-shared/src/payment_method_details_konbini.rs +++ b/generated/async-stripe-shared/src/payment_method_details_konbini.rs @@ -13,6 +13,7 @@ pub struct PaymentMethodDetailsKonbiniBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_konbini_store.rs b/generated/async-stripe-shared/src/payment_method_details_konbini_store.rs index abb4ddbce..d6908d7e6 100644 --- a/generated/async-stripe-shared/src/payment_method_details_konbini_store.rs +++ b/generated/async-stripe-shared/src/payment_method_details_konbini_store.rs @@ -13,6 +13,7 @@ pub struct PaymentMethodDetailsKonbiniStoreBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_link.rs b/generated/async-stripe-shared/src/payment_method_details_link.rs index 979298032..1b8a2a5b4 100644 --- a/generated/async-stripe-shared/src/payment_method_details_link.rs +++ b/generated/async-stripe-shared/src/payment_method_details_link.rs @@ -14,6 +14,7 @@ pub struct PaymentMethodDetailsLinkBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_mobilepay.rs b/generated/async-stripe-shared/src/payment_method_details_mobilepay.rs index 605cd9717..416f24b32 100644 --- a/generated/async-stripe-shared/src/payment_method_details_mobilepay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_mobilepay.rs @@ -12,6 +12,7 @@ pub struct PaymentMethodDetailsMobilepayBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_multibanco.rs b/generated/async-stripe-shared/src/payment_method_details_multibanco.rs index 96e732d06..a748d6e95 100644 --- a/generated/async-stripe-shared/src/payment_method_details_multibanco.rs +++ b/generated/async-stripe-shared/src/payment_method_details_multibanco.rs @@ -16,6 +16,7 @@ pub struct PaymentMethodDetailsMultibancoBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_oxxo.rs b/generated/async-stripe-shared/src/payment_method_details_oxxo.rs index eeb9bed00..8eee47642 100644 --- a/generated/async-stripe-shared/src/payment_method_details_oxxo.rs +++ b/generated/async-stripe-shared/src/payment_method_details_oxxo.rs @@ -13,6 +13,7 @@ pub struct PaymentMethodDetailsOxxoBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_p24.rs b/generated/async-stripe-shared/src/payment_method_details_p24.rs index 1dfea092d..0c29f3ef5 100644 --- a/generated/async-stripe-shared/src/payment_method_details_p24.rs +++ b/generated/async-stripe-shared/src/payment_method_details_p24.rs @@ -22,6 +22,7 @@ pub struct PaymentMethodDetailsP24Builder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_paynow.rs b/generated/async-stripe-shared/src/payment_method_details_paynow.rs index 3eb6fa518..35540193b 100644 --- a/generated/async-stripe-shared/src/payment_method_details_paynow.rs +++ b/generated/async-stripe-shared/src/payment_method_details_paynow.rs @@ -13,6 +13,7 @@ pub struct PaymentMethodDetailsPaynowBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_paypal.rs b/generated/async-stripe-shared/src/payment_method_details_paypal.rs index a0756de4f..f6294c7fb 100644 --- a/generated/async-stripe-shared/src/payment_method_details_paypal.rs +++ b/generated/async-stripe-shared/src/payment_method_details_paypal.rs @@ -27,6 +27,7 @@ pub struct PaymentMethodDetailsPaypalBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_pix.rs b/generated/async-stripe-shared/src/payment_method_details_pix.rs index 83d613ae9..268a2cba9 100644 --- a/generated/async-stripe-shared/src/payment_method_details_pix.rs +++ b/generated/async-stripe-shared/src/payment_method_details_pix.rs @@ -13,6 +13,7 @@ pub struct PaymentMethodDetailsPixBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_promptpay.rs b/generated/async-stripe-shared/src/payment_method_details_promptpay.rs index a01349bba..d9ab2b7da 100644 --- a/generated/async-stripe-shared/src/payment_method_details_promptpay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_promptpay.rs @@ -13,6 +13,7 @@ pub struct PaymentMethodDetailsPromptpayBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_revolut_pay.rs b/generated/async-stripe-shared/src/payment_method_details_revolut_pay.rs index cb25b6cdf..d6b1ac7f2 100644 --- a/generated/async-stripe-shared/src/payment_method_details_revolut_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_revolut_pay.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodDetailsRevolutPayBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_sepa_credit_transfer.rs b/generated/async-stripe-shared/src/payment_method_details_sepa_credit_transfer.rs index 57ee86151..1faf8b7da 100644 --- a/generated/async-stripe-shared/src/payment_method_details_sepa_credit_transfer.rs +++ b/generated/async-stripe-shared/src/payment_method_details_sepa_credit_transfer.rs @@ -19,6 +19,7 @@ pub struct PaymentMethodDetailsSepaCreditTransferBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_sepa_debit.rs b/generated/async-stripe-shared/src/payment_method_details_sepa_debit.rs index 36332ba72..919c0ded3 100644 --- a/generated/async-stripe-shared/src/payment_method_details_sepa_debit.rs +++ b/generated/async-stripe-shared/src/payment_method_details_sepa_debit.rs @@ -30,6 +30,7 @@ pub struct PaymentMethodDetailsSepaDebitBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_sofort.rs b/generated/async-stripe-shared/src/payment_method_details_sofort.rs index 80dc07a30..e0c2f91d5 100644 --- a/generated/async-stripe-shared/src/payment_method_details_sofort.rs +++ b/generated/async-stripe-shared/src/payment_method_details_sofort.rs @@ -39,6 +39,7 @@ pub struct PaymentMethodDetailsSofortBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_stripe_account.rs b/generated/async-stripe-shared/src/payment_method_details_stripe_account.rs index a5d76ef95..27ab3666d 100644 --- a/generated/async-stripe-shared/src/payment_method_details_stripe_account.rs +++ b/generated/async-stripe-shared/src/payment_method_details_stripe_account.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodDetailsStripeAccountBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_swish.rs b/generated/async-stripe-shared/src/payment_method_details_swish.rs index c70b853ef..9b04f0e7e 100644 --- a/generated/async-stripe-shared/src/payment_method_details_swish.rs +++ b/generated/async-stripe-shared/src/payment_method_details_swish.rs @@ -20,6 +20,7 @@ pub struct PaymentMethodDetailsSwishBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_us_bank_account.rs b/generated/async-stripe-shared/src/payment_method_details_us_bank_account.rs index 058baef5e..842cad1a8 100644 --- a/generated/async-stripe-shared/src/payment_method_details_us_bank_account.rs +++ b/generated/async-stripe-shared/src/payment_method_details_us_bank_account.rs @@ -35,6 +35,7 @@ pub struct PaymentMethodDetailsUsBankAccountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_wechat.rs b/generated/async-stripe-shared/src/payment_method_details_wechat.rs index 4acb49ffc..b4e90a485 100644 --- a/generated/async-stripe-shared/src/payment_method_details_wechat.rs +++ b/generated/async-stripe-shared/src/payment_method_details_wechat.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodDetailsWechatBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_wechat_pay.rs b/generated/async-stripe-shared/src/payment_method_details_wechat_pay.rs index 4efba718a..7c24b7ff6 100644 --- a/generated/async-stripe-shared/src/payment_method_details_wechat_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_details_wechat_pay.rs @@ -17,6 +17,7 @@ pub struct PaymentMethodDetailsWechatPayBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_details_zip.rs b/generated/async-stripe-shared/src/payment_method_details_zip.rs index bcbdd8b2f..178887daf 100644 --- a/generated/async-stripe-shared/src/payment_method_details_zip.rs +++ b/generated/async-stripe-shared/src/payment_method_details_zip.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodDetailsZipBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_eps.rs b/generated/async-stripe-shared/src/payment_method_eps.rs index 427371940..95d0c3ed0 100644 --- a/generated/async-stripe-shared/src/payment_method_eps.rs +++ b/generated/async-stripe-shared/src/payment_method_eps.rs @@ -14,6 +14,7 @@ pub struct PaymentMethodEpsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_fpx.rs b/generated/async-stripe-shared/src/payment_method_fpx.rs index b0173b7ce..06e14c9ac 100644 --- a/generated/async-stripe-shared/src/payment_method_fpx.rs +++ b/generated/async-stripe-shared/src/payment_method_fpx.rs @@ -17,6 +17,7 @@ pub struct PaymentMethodFpxBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_giropay.rs b/generated/async-stripe-shared/src/payment_method_giropay.rs index e5ab3ca0c..52121a882 100644 --- a/generated/async-stripe-shared/src/payment_method_giropay.rs +++ b/generated/async-stripe-shared/src/payment_method_giropay.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodGiropayBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_grabpay.rs b/generated/async-stripe-shared/src/payment_method_grabpay.rs index d5421cb5a..51a1b7caa 100644 --- a/generated/async-stripe-shared/src/payment_method_grabpay.rs +++ b/generated/async-stripe-shared/src/payment_method_grabpay.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodGrabpayBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_ideal.rs b/generated/async-stripe-shared/src/payment_method_ideal.rs index 724e2056b..8155e716e 100644 --- a/generated/async-stripe-shared/src/payment_method_ideal.rs +++ b/generated/async-stripe-shared/src/payment_method_ideal.rs @@ -17,6 +17,7 @@ pub struct PaymentMethodIdealBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_interac_present.rs b/generated/async-stripe-shared/src/payment_method_interac_present.rs index 1fdb3eafd..e113059b7 100644 --- a/generated/async-stripe-shared/src/payment_method_interac_present.rs +++ b/generated/async-stripe-shared/src/payment_method_interac_present.rs @@ -63,6 +63,7 @@ pub struct PaymentMethodInteracPresentBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_klarna.rs b/generated/async-stripe-shared/src/payment_method_klarna.rs index c2af88a7e..174114d67 100644 --- a/generated/async-stripe-shared/src/payment_method_klarna.rs +++ b/generated/async-stripe-shared/src/payment_method_klarna.rs @@ -13,6 +13,7 @@ pub struct PaymentMethodKlarnaBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_konbini.rs b/generated/async-stripe-shared/src/payment_method_konbini.rs index 541d14d1f..6080b1679 100644 --- a/generated/async-stripe-shared/src/payment_method_konbini.rs +++ b/generated/async-stripe-shared/src/payment_method_konbini.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodKonbiniBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_link.rs b/generated/async-stripe-shared/src/payment_method_link.rs index 4faaa59e0..a8ebc7f38 100644 --- a/generated/async-stripe-shared/src/payment_method_link.rs +++ b/generated/async-stripe-shared/src/payment_method_link.rs @@ -16,6 +16,7 @@ pub struct PaymentMethodLinkBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_mobilepay.rs b/generated/async-stripe-shared/src/payment_method_mobilepay.rs index e2f236b9f..a08d7f517 100644 --- a/generated/async-stripe-shared/src/payment_method_mobilepay.rs +++ b/generated/async-stripe-shared/src/payment_method_mobilepay.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodMobilepayBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_affirm.rs b/generated/async-stripe-shared/src/payment_method_options_affirm.rs index e6748a7b4..88d39afd6 100644 --- a/generated/async-stripe-shared/src/payment_method_options_affirm.rs +++ b/generated/async-stripe-shared/src/payment_method_options_affirm.rs @@ -24,6 +24,7 @@ pub struct PaymentMethodOptionsAffirmBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_afterpay_clearpay.rs b/generated/async-stripe-shared/src/payment_method_options_afterpay_clearpay.rs index 29af83b97..62cf9d845 100644 --- a/generated/async-stripe-shared/src/payment_method_options_afterpay_clearpay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_afterpay_clearpay.rs @@ -26,6 +26,7 @@ pub struct PaymentMethodOptionsAfterpayClearpayBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_alipay.rs b/generated/async-stripe-shared/src/payment_method_options_alipay.rs index 78afb9542..576c70c42 100644 --- a/generated/async-stripe-shared/src/payment_method_options_alipay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_alipay.rs @@ -18,6 +18,7 @@ pub struct PaymentMethodOptionsAlipayBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_amazon_pay.rs b/generated/async-stripe-shared/src/payment_method_options_amazon_pay.rs index 391425d31..eb76beb8e 100644 --- a/generated/async-stripe-shared/src/payment_method_options_amazon_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_amazon_pay.rs @@ -21,6 +21,7 @@ pub struct PaymentMethodOptionsAmazonPayBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_bacs_debit.rs b/generated/async-stripe-shared/src/payment_method_options_bacs_debit.rs index 5c8ddc26c..1f566821e 100644 --- a/generated/async-stripe-shared/src/payment_method_options_bacs_debit.rs +++ b/generated/async-stripe-shared/src/payment_method_options_bacs_debit.rs @@ -18,6 +18,7 @@ pub struct PaymentMethodOptionsBacsDebitBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_bancontact.rs b/generated/async-stripe-shared/src/payment_method_options_bancontact.rs index 6268502a6..ac2f2d8be 100644 --- a/generated/async-stripe-shared/src/payment_method_options_bancontact.rs +++ b/generated/async-stripe-shared/src/payment_method_options_bancontact.rs @@ -21,6 +21,7 @@ pub struct PaymentMethodOptionsBancontactBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_boleto.rs b/generated/async-stripe-shared/src/payment_method_options_boleto.rs index bddf44e8c..e06ab6360 100644 --- a/generated/async-stripe-shared/src/payment_method_options_boleto.rs +++ b/generated/async-stripe-shared/src/payment_method_options_boleto.rs @@ -22,6 +22,7 @@ pub struct PaymentMethodOptionsBoletoBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_card_installments.rs b/generated/async-stripe-shared/src/payment_method_options_card_installments.rs index b95939875..aff6ea788 100644 --- a/generated/async-stripe-shared/src/payment_method_options_card_installments.rs +++ b/generated/async-stripe-shared/src/payment_method_options_card_installments.rs @@ -19,6 +19,7 @@ pub struct PaymentMethodOptionsCardInstallmentsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_card_mandate_options.rs b/generated/async-stripe-shared/src/payment_method_options_card_mandate_options.rs index 1c9479ae4..45340e4d0 100644 --- a/generated/async-stripe-shared/src/payment_method_options_card_mandate_options.rs +++ b/generated/async-stripe-shared/src/payment_method_options_card_mandate_options.rs @@ -44,6 +44,7 @@ pub struct PaymentMethodOptionsCardMandateOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_card_present.rs b/generated/async-stripe-shared/src/payment_method_options_card_present.rs index 7bee7b45a..ce7e504c4 100644 --- a/generated/async-stripe-shared/src/payment_method_options_card_present.rs +++ b/generated/async-stripe-shared/src/payment_method_options_card_present.rs @@ -17,6 +17,7 @@ pub struct PaymentMethodOptionsCardPresentBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_cashapp.rs b/generated/async-stripe-shared/src/payment_method_options_cashapp.rs index e1fcfa822..8e21eb6a1 100644 --- a/generated/async-stripe-shared/src/payment_method_options_cashapp.rs +++ b/generated/async-stripe-shared/src/payment_method_options_cashapp.rs @@ -21,6 +21,7 @@ pub struct PaymentMethodOptionsCashappBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_customer_balance.rs b/generated/async-stripe-shared/src/payment_method_options_customer_balance.rs index 425bf832a..c1ecfb3c6 100644 --- a/generated/async-stripe-shared/src/payment_method_options_customer_balance.rs +++ b/generated/async-stripe-shared/src/payment_method_options_customer_balance.rs @@ -24,6 +24,7 @@ pub struct PaymentMethodOptionsCustomerBalanceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_customer_balance_bank_transfer.rs b/generated/async-stripe-shared/src/payment_method_options_customer_balance_bank_transfer.rs index f211069e2..1c42edf6d 100644 --- a/generated/async-stripe-shared/src/payment_method_options_customer_balance_bank_transfer.rs +++ b/generated/async-stripe-shared/src/payment_method_options_customer_balance_bank_transfer.rs @@ -25,6 +25,7 @@ pub struct PaymentMethodOptionsCustomerBalanceBankTransferBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_customer_balance_eu_bank_account.rs b/generated/async-stripe-shared/src/payment_method_options_customer_balance_eu_bank_account.rs index 8263c2c5b..d5a480829 100644 --- a/generated/async-stripe-shared/src/payment_method_options_customer_balance_eu_bank_account.rs +++ b/generated/async-stripe-shared/src/payment_method_options_customer_balance_eu_bank_account.rs @@ -14,6 +14,7 @@ pub struct PaymentMethodOptionsCustomerBalanceEuBankAccountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_fpx.rs b/generated/async-stripe-shared/src/payment_method_options_fpx.rs index 67dcf0400..5589969e0 100644 --- a/generated/async-stripe-shared/src/payment_method_options_fpx.rs +++ b/generated/async-stripe-shared/src/payment_method_options_fpx.rs @@ -18,6 +18,7 @@ pub struct PaymentMethodOptionsFpxBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_giropay.rs b/generated/async-stripe-shared/src/payment_method_options_giropay.rs index 72af8f6ee..db99115df 100644 --- a/generated/async-stripe-shared/src/payment_method_options_giropay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_giropay.rs @@ -18,6 +18,7 @@ pub struct PaymentMethodOptionsGiropayBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_grabpay.rs b/generated/async-stripe-shared/src/payment_method_options_grabpay.rs index 70134f686..fce3bdbce 100644 --- a/generated/async-stripe-shared/src/payment_method_options_grabpay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_grabpay.rs @@ -18,6 +18,7 @@ pub struct PaymentMethodOptionsGrabpayBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_ideal.rs b/generated/async-stripe-shared/src/payment_method_options_ideal.rs index adcdba4f3..adf37f0ab 100644 --- a/generated/async-stripe-shared/src/payment_method_options_ideal.rs +++ b/generated/async-stripe-shared/src/payment_method_options_ideal.rs @@ -18,6 +18,7 @@ pub struct PaymentMethodOptionsIdealBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_interac_present.rs b/generated/async-stripe-shared/src/payment_method_options_interac_present.rs index 68b19c8f6..647c6a384 100644 --- a/generated/async-stripe-shared/src/payment_method_options_interac_present.rs +++ b/generated/async-stripe-shared/src/payment_method_options_interac_present.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodOptionsInteracPresentBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_klarna.rs b/generated/async-stripe-shared/src/payment_method_options_klarna.rs index 6055ba674..7633b65bf 100644 --- a/generated/async-stripe-shared/src/payment_method_options_klarna.rs +++ b/generated/async-stripe-shared/src/payment_method_options_klarna.rs @@ -24,6 +24,7 @@ pub struct PaymentMethodOptionsKlarnaBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_konbini.rs b/generated/async-stripe-shared/src/payment_method_options_konbini.rs index 9a6e2b798..a804172e7 100644 --- a/generated/async-stripe-shared/src/payment_method_options_konbini.rs +++ b/generated/async-stripe-shared/src/payment_method_options_konbini.rs @@ -32,6 +32,7 @@ pub struct PaymentMethodOptionsKonbiniBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_oxxo.rs b/generated/async-stripe-shared/src/payment_method_options_oxxo.rs index 666107c8c..1698b74a0 100644 --- a/generated/async-stripe-shared/src/payment_method_options_oxxo.rs +++ b/generated/async-stripe-shared/src/payment_method_options_oxxo.rs @@ -22,6 +22,7 @@ pub struct PaymentMethodOptionsOxxoBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_p24.rs b/generated/async-stripe-shared/src/payment_method_options_p24.rs index 130373195..8c67da54e 100644 --- a/generated/async-stripe-shared/src/payment_method_options_p24.rs +++ b/generated/async-stripe-shared/src/payment_method_options_p24.rs @@ -18,6 +18,7 @@ pub struct PaymentMethodOptionsP24Builder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_paynow.rs b/generated/async-stripe-shared/src/payment_method_options_paynow.rs index fa0907ef7..c04101d68 100644 --- a/generated/async-stripe-shared/src/payment_method_options_paynow.rs +++ b/generated/async-stripe-shared/src/payment_method_options_paynow.rs @@ -18,6 +18,7 @@ pub struct PaymentMethodOptionsPaynowBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_paypal.rs b/generated/async-stripe-shared/src/payment_method_options_paypal.rs index 0b7e6e45d..3faeb9181 100644 --- a/generated/async-stripe-shared/src/payment_method_options_paypal.rs +++ b/generated/async-stripe-shared/src/payment_method_options_paypal.rs @@ -28,6 +28,7 @@ pub struct PaymentMethodOptionsPaypalBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_pix.rs b/generated/async-stripe-shared/src/payment_method_options_pix.rs index ff5da04e6..3230059c8 100644 --- a/generated/async-stripe-shared/src/payment_method_options_pix.rs +++ b/generated/async-stripe-shared/src/payment_method_options_pix.rs @@ -24,6 +24,7 @@ pub struct PaymentMethodOptionsPixBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_promptpay.rs b/generated/async-stripe-shared/src/payment_method_options_promptpay.rs index 3649ea434..c7d578d85 100644 --- a/generated/async-stripe-shared/src/payment_method_options_promptpay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_promptpay.rs @@ -18,6 +18,7 @@ pub struct PaymentMethodOptionsPromptpayBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_revolut_pay.rs b/generated/async-stripe-shared/src/payment_method_options_revolut_pay.rs index 369ca814b..f4aeafe00 100644 --- a/generated/async-stripe-shared/src/payment_method_options_revolut_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_revolut_pay.rs @@ -21,6 +21,7 @@ pub struct PaymentMethodOptionsRevolutPayBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_sofort.rs b/generated/async-stripe-shared/src/payment_method_options_sofort.rs index 7baf873ab..4dcddac41 100644 --- a/generated/async-stripe-shared/src/payment_method_options_sofort.rs +++ b/generated/async-stripe-shared/src/payment_method_options_sofort.rs @@ -21,6 +21,7 @@ pub struct PaymentMethodOptionsSofortBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_us_bank_account_mandate_options.rs b/generated/async-stripe-shared/src/payment_method_options_us_bank_account_mandate_options.rs index 397e62748..86224fa5d 100644 --- a/generated/async-stripe-shared/src/payment_method_options_us_bank_account_mandate_options.rs +++ b/generated/async-stripe-shared/src/payment_method_options_us_bank_account_mandate_options.rs @@ -14,6 +14,7 @@ pub struct PaymentMethodOptionsUsBankAccountMandateOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_wechat_pay.rs b/generated/async-stripe-shared/src/payment_method_options_wechat_pay.rs index f05d1c525..2b70956a9 100644 --- a/generated/async-stripe-shared/src/payment_method_options_wechat_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_options_wechat_pay.rs @@ -24,6 +24,7 @@ pub struct PaymentMethodOptionsWechatPayBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_options_zip.rs b/generated/async-stripe-shared/src/payment_method_options_zip.rs index a04215940..a8e9a385c 100644 --- a/generated/async-stripe-shared/src/payment_method_options_zip.rs +++ b/generated/async-stripe-shared/src/payment_method_options_zip.rs @@ -18,6 +18,7 @@ pub struct PaymentMethodOptionsZipBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_oxxo.rs b/generated/async-stripe-shared/src/payment_method_oxxo.rs index 033c8b3ef..78611f555 100644 --- a/generated/async-stripe-shared/src/payment_method_oxxo.rs +++ b/generated/async-stripe-shared/src/payment_method_oxxo.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodOxxoBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_p24.rs b/generated/async-stripe-shared/src/payment_method_p24.rs index 93dd863fe..d720d9cf6 100644 --- a/generated/async-stripe-shared/src/payment_method_p24.rs +++ b/generated/async-stripe-shared/src/payment_method_p24.rs @@ -13,6 +13,7 @@ pub struct PaymentMethodP24Builder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_paynow.rs b/generated/async-stripe-shared/src/payment_method_paynow.rs index f8d6c6df6..5365b683c 100644 --- a/generated/async-stripe-shared/src/payment_method_paynow.rs +++ b/generated/async-stripe-shared/src/payment_method_paynow.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodPaynowBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_paypal.rs b/generated/async-stripe-shared/src/payment_method_paypal.rs index 9aea8e6ea..71b2d47f6 100644 --- a/generated/async-stripe-shared/src/payment_method_paypal.rs +++ b/generated/async-stripe-shared/src/payment_method_paypal.rs @@ -17,6 +17,7 @@ pub struct PaymentMethodPaypalBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_pix.rs b/generated/async-stripe-shared/src/payment_method_pix.rs index d1cf45264..47e3c35ff 100644 --- a/generated/async-stripe-shared/src/payment_method_pix.rs +++ b/generated/async-stripe-shared/src/payment_method_pix.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodPixBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_promptpay.rs b/generated/async-stripe-shared/src/payment_method_promptpay.rs index b8e5b27f2..7ebdb1804 100644 --- a/generated/async-stripe-shared/src/payment_method_promptpay.rs +++ b/generated/async-stripe-shared/src/payment_method_promptpay.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodPromptpayBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_revolut_pay.rs b/generated/async-stripe-shared/src/payment_method_revolut_pay.rs index 8e093515e..f777a6c59 100644 --- a/generated/async-stripe-shared/src/payment_method_revolut_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_revolut_pay.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodRevolutPayBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_sepa_debit.rs b/generated/async-stripe-shared/src/payment_method_sepa_debit.rs index 8f28c8aaf..4ba2c692c 100644 --- a/generated/async-stripe-shared/src/payment_method_sepa_debit.rs +++ b/generated/async-stripe-shared/src/payment_method_sepa_debit.rs @@ -29,6 +29,7 @@ pub struct PaymentMethodSepaDebitBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_sofort.rs b/generated/async-stripe-shared/src/payment_method_sofort.rs index 8364fe4a5..4a7d7579f 100644 --- a/generated/async-stripe-shared/src/payment_method_sofort.rs +++ b/generated/async-stripe-shared/src/payment_method_sofort.rs @@ -13,6 +13,7 @@ pub struct PaymentMethodSofortBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_swish.rs b/generated/async-stripe-shared/src/payment_method_swish.rs index b5ff18ac8..5fe81d3de 100644 --- a/generated/async-stripe-shared/src/payment_method_swish.rs +++ b/generated/async-stripe-shared/src/payment_method_swish.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodSwishBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_us_bank_account.rs b/generated/async-stripe-shared/src/payment_method_us_bank_account.rs index c4a357552..342a7f2b7 100644 --- a/generated/async-stripe-shared/src/payment_method_us_bank_account.rs +++ b/generated/async-stripe-shared/src/payment_method_us_bank_account.rs @@ -38,6 +38,7 @@ pub struct PaymentMethodUsBankAccountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_us_bank_account_blocked.rs b/generated/async-stripe-shared/src/payment_method_us_bank_account_blocked.rs index 45ddfb738..6ea2ee14c 100644 --- a/generated/async-stripe-shared/src/payment_method_us_bank_account_blocked.rs +++ b/generated/async-stripe-shared/src/payment_method_us_bank_account_blocked.rs @@ -16,6 +16,7 @@ pub struct PaymentMethodUsBankAccountBlockedBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_us_bank_account_status_details.rs b/generated/async-stripe-shared/src/payment_method_us_bank_account_status_details.rs index c4cd90ecf..77cac2543 100644 --- a/generated/async-stripe-shared/src/payment_method_us_bank_account_status_details.rs +++ b/generated/async-stripe-shared/src/payment_method_us_bank_account_status_details.rs @@ -12,6 +12,7 @@ pub struct PaymentMethodUsBankAccountStatusDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_wechat_pay.rs b/generated/async-stripe-shared/src/payment_method_wechat_pay.rs index 0a0a6d6cc..43769d3d0 100644 --- a/generated/async-stripe-shared/src/payment_method_wechat_pay.rs +++ b/generated/async-stripe-shared/src/payment_method_wechat_pay.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodWechatPayBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payment_method_zip.rs b/generated/async-stripe-shared/src/payment_method_zip.rs index 23b97c98a..769a3b040 100644 --- a/generated/async-stripe-shared/src/payment_method_zip.rs +++ b/generated/async-stripe-shared/src/payment_method_zip.rs @@ -8,6 +8,7 @@ pub struct PaymentMethodZipBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/payout.rs b/generated/async-stripe-shared/src/payout.rs index 4b2f194e6..714ec1a00 100644 --- a/generated/async-stripe-shared/src/payout.rs +++ b/generated/async-stripe-shared/src/payout.rs @@ -98,6 +98,7 @@ pub struct PayoutBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/paypal_seller_protection.rs b/generated/async-stripe-shared/src/paypal_seller_protection.rs index 5bb79779d..a02c4824d 100644 --- a/generated/async-stripe-shared/src/paypal_seller_protection.rs +++ b/generated/async-stripe-shared/src/paypal_seller_protection.rs @@ -16,6 +16,7 @@ pub struct PaypalSellerProtectionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/period.rs b/generated/async-stripe-shared/src/period.rs index d3c8d29f7..8b863a365 100644 --- a/generated/async-stripe-shared/src/period.rs +++ b/generated/async-stripe-shared/src/period.rs @@ -16,6 +16,7 @@ pub struct PeriodBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/person.rs b/generated/async-stripe-shared/src/person.rs index 8b47bb69f..5583e2d3f 100644 --- a/generated/async-stripe-shared/src/person.rs +++ b/generated/async-stripe-shared/src/person.rs @@ -104,6 +104,7 @@ pub struct PersonBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/person_additional_tos_acceptance.rs b/generated/async-stripe-shared/src/person_additional_tos_acceptance.rs index eee588cfa..c20464fc5 100644 --- a/generated/async-stripe-shared/src/person_additional_tos_acceptance.rs +++ b/generated/async-stripe-shared/src/person_additional_tos_acceptance.rs @@ -19,6 +19,7 @@ pub struct PersonAdditionalTosAcceptanceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/person_additional_tos_acceptances.rs b/generated/async-stripe-shared/src/person_additional_tos_acceptances.rs index 7be82418e..7341c8cd4 100644 --- a/generated/async-stripe-shared/src/person_additional_tos_acceptances.rs +++ b/generated/async-stripe-shared/src/person_additional_tos_acceptances.rs @@ -12,6 +12,7 @@ pub struct PersonAdditionalTosAcceptancesBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/person_future_requirements.rs b/generated/async-stripe-shared/src/person_future_requirements.rs index 0b35d2739..8fa084cf2 100644 --- a/generated/async-stripe-shared/src/person_future_requirements.rs +++ b/generated/async-stripe-shared/src/person_future_requirements.rs @@ -35,6 +35,7 @@ pub struct PersonFutureRequirementsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/person_relationship.rs b/generated/async-stripe-shared/src/person_relationship.rs index f7b75fc71..76756ac3a 100644 --- a/generated/async-stripe-shared/src/person_relationship.rs +++ b/generated/async-stripe-shared/src/person_relationship.rs @@ -35,6 +35,7 @@ pub struct PersonRelationshipBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/person_requirements.rs b/generated/async-stripe-shared/src/person_requirements.rs index 719b21a58..c3876d3b1 100644 --- a/generated/async-stripe-shared/src/person_requirements.rs +++ b/generated/async-stripe-shared/src/person_requirements.rs @@ -34,6 +34,7 @@ pub struct PersonRequirementsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/plan.rs b/generated/async-stripe-shared/src/plan.rs index bb06dadfd..4df4aaebc 100644 --- a/generated/async-stripe-shared/src/plan.rs +++ b/generated/async-stripe-shared/src/plan.rs @@ -101,6 +101,7 @@ pub struct PlanBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/plan_tier.rs b/generated/async-stripe-shared/src/plan_tier.rs index 7bf5cf45a..280eb210b 100644 --- a/generated/async-stripe-shared/src/plan_tier.rs +++ b/generated/async-stripe-shared/src/plan_tier.rs @@ -25,6 +25,7 @@ pub struct PlanTierBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/platform_tax_fee.rs b/generated/async-stripe-shared/src/platform_tax_fee.rs index fc89e4969..2a583a2a7 100644 --- a/generated/async-stripe-shared/src/platform_tax_fee.rs +++ b/generated/async-stripe-shared/src/platform_tax_fee.rs @@ -22,6 +22,7 @@ pub struct PlatformTaxFeeBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/price.rs b/generated/async-stripe-shared/src/price.rs index 4204a950d..ce6bbd5ff 100644 --- a/generated/async-stripe-shared/src/price.rs +++ b/generated/async-stripe-shared/src/price.rs @@ -100,6 +100,7 @@ pub struct PriceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/price_tier.rs b/generated/async-stripe-shared/src/price_tier.rs index b51b598e8..430c4c140 100644 --- a/generated/async-stripe-shared/src/price_tier.rs +++ b/generated/async-stripe-shared/src/price_tier.rs @@ -25,6 +25,7 @@ pub struct PriceTierBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/product.rs b/generated/async-stripe-shared/src/product.rs index 6aae81439..f503a3058 100644 --- a/generated/async-stripe-shared/src/product.rs +++ b/generated/async-stripe-shared/src/product.rs @@ -80,6 +80,7 @@ pub struct ProductBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/product_marketing_feature.rs b/generated/async-stripe-shared/src/product_marketing_feature.rs index 40b3afc4e..99314a730 100644 --- a/generated/async-stripe-shared/src/product_marketing_feature.rs +++ b/generated/async-stripe-shared/src/product_marketing_feature.rs @@ -13,6 +13,7 @@ pub struct ProductMarketingFeatureBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/promotion_code.rs b/generated/async-stripe-shared/src/promotion_code.rs index 816c8308a..88979314a 100644 --- a/generated/async-stripe-shared/src/promotion_code.rs +++ b/generated/async-stripe-shared/src/promotion_code.rs @@ -51,6 +51,7 @@ pub struct PromotionCodeBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/promotion_code_currency_option.rs b/generated/async-stripe-shared/src/promotion_code_currency_option.rs index 4c089daa1..9c30519e4 100644 --- a/generated/async-stripe-shared/src/promotion_code_currency_option.rs +++ b/generated/async-stripe-shared/src/promotion_code_currency_option.rs @@ -13,6 +13,7 @@ pub struct PromotionCodeCurrencyOptionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/promotion_codes_resource_restrictions.rs b/generated/async-stripe-shared/src/promotion_codes_resource_restrictions.rs index 0ab654311..a59da1b64 100644 --- a/generated/async-stripe-shared/src/promotion_codes_resource_restrictions.rs +++ b/generated/async-stripe-shared/src/promotion_codes_resource_restrictions.rs @@ -35,6 +35,7 @@ pub struct PromotionCodesResourceRestrictionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/quote.rs b/generated/async-stripe-shared/src/quote.rs index 069f34a00..8a73bcde7 100644 --- a/generated/async-stripe-shared/src/quote.rs +++ b/generated/async-stripe-shared/src/quote.rs @@ -125,6 +125,7 @@ pub struct QuoteBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/quotes_resource_automatic_tax.rs b/generated/async-stripe-shared/src/quotes_resource_automatic_tax.rs index 4f1b17da7..35cc0e773 100644 --- a/generated/async-stripe-shared/src/quotes_resource_automatic_tax.rs +++ b/generated/async-stripe-shared/src/quotes_resource_automatic_tax.rs @@ -21,6 +21,7 @@ pub struct QuotesResourceAutomaticTaxBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/quotes_resource_computed.rs b/generated/async-stripe-shared/src/quotes_resource_computed.rs index 4494571bb..ca3405050 100644 --- a/generated/async-stripe-shared/src/quotes_resource_computed.rs +++ b/generated/async-stripe-shared/src/quotes_resource_computed.rs @@ -17,6 +17,7 @@ pub struct QuotesResourceComputedBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/quotes_resource_from_quote.rs b/generated/async-stripe-shared/src/quotes_resource_from_quote.rs index 220e32355..376476c43 100644 --- a/generated/async-stripe-shared/src/quotes_resource_from_quote.rs +++ b/generated/async-stripe-shared/src/quotes_resource_from_quote.rs @@ -16,6 +16,7 @@ pub struct QuotesResourceFromQuoteBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/quotes_resource_recurring.rs b/generated/async-stripe-shared/src/quotes_resource_recurring.rs index 15d0de0db..b588b3e73 100644 --- a/generated/async-stripe-shared/src/quotes_resource_recurring.rs +++ b/generated/async-stripe-shared/src/quotes_resource_recurring.rs @@ -25,6 +25,7 @@ pub struct QuotesResourceRecurringBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/quotes_resource_status_transitions.rs b/generated/async-stripe-shared/src/quotes_resource_status_transitions.rs index 30f54a1c3..a8e3cf17d 100644 --- a/generated/async-stripe-shared/src/quotes_resource_status_transitions.rs +++ b/generated/async-stripe-shared/src/quotes_resource_status_transitions.rs @@ -19,6 +19,7 @@ pub struct QuotesResourceStatusTransitionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/quotes_resource_subscription_data_subscription_data.rs b/generated/async-stripe-shared/src/quotes_resource_subscription_data_subscription_data.rs index 42cdafd97..e5fb134ce 100644 --- a/generated/async-stripe-shared/src/quotes_resource_subscription_data_subscription_data.rs +++ b/generated/async-stripe-shared/src/quotes_resource_subscription_data_subscription_data.rs @@ -29,6 +29,7 @@ pub struct QuotesResourceSubscriptionDataSubscriptionDataBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/quotes_resource_total_details.rs b/generated/async-stripe-shared/src/quotes_resource_total_details.rs index 3d57e1e9c..c4d6130db 100644 --- a/generated/async-stripe-shared/src/quotes_resource_total_details.rs +++ b/generated/async-stripe-shared/src/quotes_resource_total_details.rs @@ -21,6 +21,7 @@ pub struct QuotesResourceTotalDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/quotes_resource_total_details_resource_breakdown.rs b/generated/async-stripe-shared/src/quotes_resource_total_details_resource_breakdown.rs index 60b84ed73..67600350c 100644 --- a/generated/async-stripe-shared/src/quotes_resource_total_details_resource_breakdown.rs +++ b/generated/async-stripe-shared/src/quotes_resource_total_details_resource_breakdown.rs @@ -16,6 +16,7 @@ pub struct QuotesResourceTotalDetailsResourceBreakdownBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/quotes_resource_transfer_data.rs b/generated/async-stripe-shared/src/quotes_resource_transfer_data.rs index 00b70ca2d..2f7678d54 100644 --- a/generated/async-stripe-shared/src/quotes_resource_transfer_data.rs +++ b/generated/async-stripe-shared/src/quotes_resource_transfer_data.rs @@ -22,6 +22,7 @@ pub struct QuotesResourceTransferDataBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/quotes_resource_upfront.rs b/generated/async-stripe-shared/src/quotes_resource_upfront.rs index e89048a42..3517c92d1 100644 --- a/generated/async-stripe-shared/src/quotes_resource_upfront.rs +++ b/generated/async-stripe-shared/src/quotes_resource_upfront.rs @@ -22,6 +22,7 @@ pub struct QuotesResourceUpfrontBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/radar_radar_options.rs b/generated/async-stripe-shared/src/radar_radar_options.rs index 43a99e6ac..42c5d2275 100644 --- a/generated/async-stripe-shared/src/radar_radar_options.rs +++ b/generated/async-stripe-shared/src/radar_radar_options.rs @@ -15,6 +15,7 @@ pub struct RadarRadarOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/radar_review_resource_location.rs b/generated/async-stripe-shared/src/radar_review_resource_location.rs index 0cd27bdbb..b4b52166e 100644 --- a/generated/async-stripe-shared/src/radar_review_resource_location.rs +++ b/generated/async-stripe-shared/src/radar_review_resource_location.rs @@ -25,6 +25,7 @@ pub struct RadarReviewResourceLocationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/radar_review_resource_session.rs b/generated/async-stripe-shared/src/radar_review_resource_session.rs index 887c7f542..191d3a76d 100644 --- a/generated/async-stripe-shared/src/radar_review_resource_session.rs +++ b/generated/async-stripe-shared/src/radar_review_resource_session.rs @@ -22,6 +22,7 @@ pub struct RadarReviewResourceSessionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/recurring.rs b/generated/async-stripe-shared/src/recurring.rs index b8abb4575..998fba8bf 100644 --- a/generated/async-stripe-shared/src/recurring.rs +++ b/generated/async-stripe-shared/src/recurring.rs @@ -33,6 +33,7 @@ pub struct RecurringBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/refund.rs b/generated/async-stripe-shared/src/refund.rs index 28143e8cd..ebb284aa9 100644 --- a/generated/async-stripe-shared/src/refund.rs +++ b/generated/async-stripe-shared/src/refund.rs @@ -83,6 +83,7 @@ pub struct RefundBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/refund_destination_details.rs b/generated/async-stripe-shared/src/refund_destination_details.rs index 903afe6ba..cacab0f1f 100644 --- a/generated/async-stripe-shared/src/refund_destination_details.rs +++ b/generated/async-stripe-shared/src/refund_destination_details.rs @@ -74,6 +74,7 @@ pub struct RefundDestinationDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/refund_destination_details_card.rs b/generated/async-stripe-shared/src/refund_destination_details_card.rs index 63f4364f7..dd1acc2a9 100644 --- a/generated/async-stripe-shared/src/refund_destination_details_card.rs +++ b/generated/async-stripe-shared/src/refund_destination_details_card.rs @@ -23,6 +23,7 @@ pub struct RefundDestinationDetailsCardBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/refund_destination_details_generic.rs b/generated/async-stripe-shared/src/refund_destination_details_generic.rs index 2867ab936..49cc7c07a 100644 --- a/generated/async-stripe-shared/src/refund_destination_details_generic.rs +++ b/generated/async-stripe-shared/src/refund_destination_details_generic.rs @@ -16,6 +16,7 @@ pub struct RefundDestinationDetailsGenericBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/refund_next_action.rs b/generated/async-stripe-shared/src/refund_next_action.rs index 6d7b15fc7..02f2e7cec 100644 --- a/generated/async-stripe-shared/src/refund_next_action.rs +++ b/generated/async-stripe-shared/src/refund_next_action.rs @@ -17,6 +17,7 @@ pub struct RefundNextActionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/refund_next_action_display_details.rs b/generated/async-stripe-shared/src/refund_next_action_display_details.rs index 0e07dc0d2..92426ce6b 100644 --- a/generated/async-stripe-shared/src/refund_next_action_display_details.rs +++ b/generated/async-stripe-shared/src/refund_next_action_display_details.rs @@ -15,6 +15,7 @@ pub struct RefundNextActionDisplayDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/reserve_transaction.rs b/generated/async-stripe-shared/src/reserve_transaction.rs index 94b7ba276..ee81aa724 100644 --- a/generated/async-stripe-shared/src/reserve_transaction.rs +++ b/generated/async-stripe-shared/src/reserve_transaction.rs @@ -21,6 +21,7 @@ pub struct ReserveTransactionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/review.rs b/generated/async-stripe-shared/src/review.rs index 99247175c..3b4e65411 100644 --- a/generated/async-stripe-shared/src/review.rs +++ b/generated/async-stripe-shared/src/review.rs @@ -57,6 +57,7 @@ pub struct ReviewBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/rule.rs b/generated/async-stripe-shared/src/rule.rs index 8ca08a843..2b112c810 100644 --- a/generated/async-stripe-shared/src/rule.rs +++ b/generated/async-stripe-shared/src/rule.rs @@ -19,6 +19,7 @@ pub struct RuleBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/schedules_phase_automatic_tax.rs b/generated/async-stripe-shared/src/schedules_phase_automatic_tax.rs index f1f2e5074..53581e0bb 100644 --- a/generated/async-stripe-shared/src/schedules_phase_automatic_tax.rs +++ b/generated/async-stripe-shared/src/schedules_phase_automatic_tax.rs @@ -18,6 +18,7 @@ pub struct SchedulesPhaseAutomaticTaxBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/sepa_debit_generated_from.rs b/generated/async-stripe-shared/src/sepa_debit_generated_from.rs index b5f3f1f52..43161d59b 100644 --- a/generated/async-stripe-shared/src/sepa_debit_generated_from.rs +++ b/generated/async-stripe-shared/src/sepa_debit_generated_from.rs @@ -16,6 +16,7 @@ pub struct SepaDebitGeneratedFromBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt.rs b/generated/async-stripe-shared/src/setup_attempt.rs index c49314168..21ed69b39 100644 --- a/generated/async-stripe-shared/src/setup_attempt.rs +++ b/generated/async-stripe-shared/src/setup_attempt.rs @@ -63,6 +63,7 @@ pub struct SetupAttemptBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details.rs index 56ddfef32..9753aa3fb 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details.rs @@ -50,6 +50,7 @@ pub struct SetupAttemptPaymentMethodDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_acss_debit.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_acss_debit.rs index 5c1096166..a7b96f80b 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_acss_debit.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_acss_debit.rs @@ -8,6 +8,7 @@ pub struct SetupAttemptPaymentMethodDetailsAcssDebitBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_amazon_pay.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_amazon_pay.rs index 18e44a5e9..f5c49c9d9 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_amazon_pay.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_amazon_pay.rs @@ -8,6 +8,7 @@ pub struct SetupAttemptPaymentMethodDetailsAmazonPayBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_au_becs_debit.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_au_becs_debit.rs index 9597b4812..9744f3ad6 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_au_becs_debit.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_au_becs_debit.rs @@ -8,6 +8,7 @@ pub struct SetupAttemptPaymentMethodDetailsAuBecsDebitBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bacs_debit.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bacs_debit.rs index 23a3f960f..c4de5e433 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bacs_debit.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bacs_debit.rs @@ -8,6 +8,7 @@ pub struct SetupAttemptPaymentMethodDetailsBacsDebitBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bancontact.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bancontact.rs index 299246068..39ae2c6c5 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bancontact.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_bancontact.rs @@ -36,6 +36,7 @@ pub struct SetupAttemptPaymentMethodDetailsBancontactBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_boleto.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_boleto.rs index 5b5c3c524..65dc3c33a 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_boleto.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_boleto.rs @@ -8,6 +8,7 @@ pub struct SetupAttemptPaymentMethodDetailsBoletoBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card.rs index 939003487..17479bf24 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card.rs @@ -62,6 +62,7 @@ pub struct SetupAttemptPaymentMethodDetailsCardBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_checks.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_checks.rs index d0e7ac40c..52169f07f 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_checks.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_checks.rs @@ -19,6 +19,7 @@ pub struct SetupAttemptPaymentMethodDetailsCardChecksBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_present.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_present.rs index f16ec1552..5e6751841 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_present.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_present.rs @@ -16,6 +16,7 @@ pub struct SetupAttemptPaymentMethodDetailsCardPresentBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_wallet.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_wallet.rs index d71f00730..c3995e6d8 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_wallet.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_card_wallet.rs @@ -20,6 +20,7 @@ pub struct SetupAttemptPaymentMethodDetailsCardWalletBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_cashapp.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_cashapp.rs index 4a60669db..2d6eac472 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_cashapp.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_cashapp.rs @@ -8,6 +8,7 @@ pub struct SetupAttemptPaymentMethodDetailsCashappBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_ideal.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_ideal.rs index 90dd58b9d..a838d4ad5 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_ideal.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_ideal.rs @@ -30,6 +30,7 @@ pub struct SetupAttemptPaymentMethodDetailsIdealBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_klarna.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_klarna.rs index 658142737..1ea4181d1 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_klarna.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_klarna.rs @@ -8,6 +8,7 @@ pub struct SetupAttemptPaymentMethodDetailsKlarnaBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_link.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_link.rs index a8740ec85..e3ff15010 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_link.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_link.rs @@ -8,6 +8,7 @@ pub struct SetupAttemptPaymentMethodDetailsLinkBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_paypal.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_paypal.rs index be1bf6752..072fd7d94 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_paypal.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_paypal.rs @@ -8,6 +8,7 @@ pub struct SetupAttemptPaymentMethodDetailsPaypalBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_revolut_pay.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_revolut_pay.rs index 731c6821c..e8a980b94 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_revolut_pay.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_revolut_pay.rs @@ -8,6 +8,7 @@ pub struct SetupAttemptPaymentMethodDetailsRevolutPayBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sepa_debit.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sepa_debit.rs index 55c47b6b2..16dc82f12 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sepa_debit.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sepa_debit.rs @@ -8,6 +8,7 @@ pub struct SetupAttemptPaymentMethodDetailsSepaDebitBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sofort.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sofort.rs index 419320483..37f48cb76 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sofort.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_sofort.rs @@ -36,6 +36,7 @@ pub struct SetupAttemptPaymentMethodDetailsSofortBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_us_bank_account.rs b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_us_bank_account.rs index 7ab8d7c5b..0032d5304 100644 --- a/generated/async-stripe-shared/src/setup_attempt_payment_method_details_us_bank_account.rs +++ b/generated/async-stripe-shared/src/setup_attempt_payment_method_details_us_bank_account.rs @@ -8,6 +8,7 @@ pub struct SetupAttemptPaymentMethodDetailsUsBankAccountBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent.rs b/generated/async-stripe-shared/src/setup_intent.rs index b46ac7794..44c006fae 100644 --- a/generated/async-stripe-shared/src/setup_intent.rs +++ b/generated/async-stripe-shared/src/setup_intent.rs @@ -127,6 +127,7 @@ pub struct SetupIntentBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent_next_action.rs b/generated/async-stripe-shared/src/setup_intent_next_action.rs index 12e2b510b..e9fc9b710 100644 --- a/generated/async-stripe-shared/src/setup_intent_next_action.rs +++ b/generated/async-stripe-shared/src/setup_intent_next_action.rs @@ -32,6 +32,7 @@ pub struct SetupIntentNextActionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent_next_action_redirect_to_url.rs b/generated/async-stripe-shared/src/setup_intent_next_action_redirect_to_url.rs index 395f64e61..ab5fa1b59 100644 --- a/generated/async-stripe-shared/src/setup_intent_next_action_redirect_to_url.rs +++ b/generated/async-stripe-shared/src/setup_intent_next_action_redirect_to_url.rs @@ -16,6 +16,7 @@ pub struct SetupIntentNextActionRedirectToUrlBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent_next_action_verify_with_microdeposits.rs b/generated/async-stripe-shared/src/setup_intent_next_action_verify_with_microdeposits.rs index df84465b7..ec141f952 100644 --- a/generated/async-stripe-shared/src/setup_intent_next_action_verify_with_microdeposits.rs +++ b/generated/async-stripe-shared/src/setup_intent_next_action_verify_with_microdeposits.rs @@ -20,6 +20,7 @@ pub struct SetupIntentNextActionVerifyWithMicrodepositsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options.rs index 9a3a10a08..270654544 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options.rs @@ -26,6 +26,7 @@ pub struct SetupIntentPaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_acss_debit.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_acss_debit.rs index 300ecfe70..d2f6fe624 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_acss_debit.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_acss_debit.rs @@ -20,6 +20,7 @@ pub struct SetupIntentPaymentMethodOptionsAcssDebitBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_amazon_pay.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_amazon_pay.rs index 564d08450..598853234 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_amazon_pay.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_amazon_pay.rs @@ -8,6 +8,7 @@ pub struct SetupIntentPaymentMethodOptionsAmazonPayBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_card.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_card.rs index 93c253557..07a3b175a 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_card.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_card.rs @@ -25,6 +25,7 @@ pub struct SetupIntentPaymentMethodOptionsCardBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_mandate_options.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_mandate_options.rs index f661ce490..ec493fac0 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_mandate_options.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_mandate_options.rs @@ -50,6 +50,7 @@ pub struct SetupIntentPaymentMethodOptionsCardMandateOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_present.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_present.rs index 0a4f7fcb6..2009ed1c5 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_present.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_card_present.rs @@ -8,6 +8,7 @@ pub struct SetupIntentPaymentMethodOptionsCardPresentBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_link.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_link.rs index 44b4ff227..9807e16ab 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_link.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_link.rs @@ -13,6 +13,7 @@ pub struct SetupIntentPaymentMethodOptionsLinkBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_acss_debit.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_acss_debit.rs index 3b6a1329b..3ab1353ed 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_acss_debit.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_acss_debit.rs @@ -31,6 +31,7 @@ pub struct SetupIntentPaymentMethodOptionsMandateOptionsAcssDebitBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_sepa_debit.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_sepa_debit.rs index ce4f1f1f2..0be6853c3 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_sepa_debit.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_mandate_options_sepa_debit.rs @@ -8,6 +8,7 @@ pub struct SetupIntentPaymentMethodOptionsMandateOptionsSepaDebitBuilder {} #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_paypal.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_paypal.rs index cd500f93c..64e0ba260 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_paypal.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_paypal.rs @@ -14,6 +14,7 @@ pub struct SetupIntentPaymentMethodOptionsPaypalBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_sepa_debit.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_sepa_debit.rs index dd88366d8..ce3ab4349 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_sepa_debit.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_sepa_debit.rs @@ -14,6 +14,7 @@ pub struct SetupIntentPaymentMethodOptionsSepaDebitBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/setup_intent_payment_method_options_us_bank_account.rs b/generated/async-stripe-shared/src/setup_intent_payment_method_options_us_bank_account.rs index e9c80a48a..6064f7e97 100644 --- a/generated/async-stripe-shared/src/setup_intent_payment_method_options_us_bank_account.rs +++ b/generated/async-stripe-shared/src/setup_intent_payment_method_options_us_bank_account.rs @@ -18,6 +18,7 @@ pub struct SetupIntentPaymentMethodOptionsUsBankAccountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/shipping.rs b/generated/async-stripe-shared/src/shipping.rs index a0bfb83cd..5ca5c9b12 100644 --- a/generated/async-stripe-shared/src/shipping.rs +++ b/generated/async-stripe-shared/src/shipping.rs @@ -25,6 +25,7 @@ pub struct ShippingBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/shipping_rate.rs b/generated/async-stripe-shared/src/shipping_rate.rs index c32170b76..a0eeba267 100644 --- a/generated/async-stripe-shared/src/shipping_rate.rs +++ b/generated/async-stripe-shared/src/shipping_rate.rs @@ -52,6 +52,7 @@ pub struct ShippingRateBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/shipping_rate_currency_option.rs b/generated/async-stripe-shared/src/shipping_rate_currency_option.rs index 037e1f8b5..5a5b780ea 100644 --- a/generated/async-stripe-shared/src/shipping_rate_currency_option.rs +++ b/generated/async-stripe-shared/src/shipping_rate_currency_option.rs @@ -17,6 +17,7 @@ pub struct ShippingRateCurrencyOptionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/shipping_rate_delivery_estimate.rs b/generated/async-stripe-shared/src/shipping_rate_delivery_estimate.rs index 5bccbb5c9..a9a5c00c0 100644 --- a/generated/async-stripe-shared/src/shipping_rate_delivery_estimate.rs +++ b/generated/async-stripe-shared/src/shipping_rate_delivery_estimate.rs @@ -16,6 +16,7 @@ pub struct ShippingRateDeliveryEstimateBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/shipping_rate_delivery_estimate_bound.rs b/generated/async-stripe-shared/src/shipping_rate_delivery_estimate_bound.rs index 3ff24e3be..badfb19a9 100644 --- a/generated/async-stripe-shared/src/shipping_rate_delivery_estimate_bound.rs +++ b/generated/async-stripe-shared/src/shipping_rate_delivery_estimate_bound.rs @@ -16,6 +16,7 @@ pub struct ShippingRateDeliveryEstimateBoundBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/shipping_rate_fixed_amount.rs b/generated/async-stripe-shared/src/shipping_rate_fixed_amount.rs index cbe929319..ef5787230 100644 --- a/generated/async-stripe-shared/src/shipping_rate_fixed_amount.rs +++ b/generated/async-stripe-shared/src/shipping_rate_fixed_amount.rs @@ -33,6 +33,7 @@ pub struct ShippingRateFixedAmountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source.rs b/generated/async-stripe-shared/src/source.rs index 5f6e05ac4..cf6b48fbc 100644 --- a/generated/async-stripe-shared/src/source.rs +++ b/generated/async-stripe-shared/src/source.rs @@ -125,6 +125,7 @@ pub struct SourceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_code_verification_flow.rs b/generated/async-stripe-shared/src/source_code_verification_flow.rs index 40d2489c4..72ad38409 100644 --- a/generated/async-stripe-shared/src/source_code_verification_flow.rs +++ b/generated/async-stripe-shared/src/source_code_verification_flow.rs @@ -16,6 +16,7 @@ pub struct SourceCodeVerificationFlowBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_order.rs b/generated/async-stripe-shared/src/source_order.rs index e5f927622..9aed8a07f 100644 --- a/generated/async-stripe-shared/src/source_order.rs +++ b/generated/async-stripe-shared/src/source_order.rs @@ -25,6 +25,7 @@ pub struct SourceOrderBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_order_item.rs b/generated/async-stripe-shared/src/source_order_item.rs index 73e84afbd..400402479 100644 --- a/generated/async-stripe-shared/src/source_order_item.rs +++ b/generated/async-stripe-shared/src/source_order_item.rs @@ -31,6 +31,7 @@ pub struct SourceOrderItemBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_owner.rs b/generated/async-stripe-shared/src/source_owner.rs index 31de2a188..4c7bc95ed 100644 --- a/generated/async-stripe-shared/src/source_owner.rs +++ b/generated/async-stripe-shared/src/source_owner.rs @@ -42,6 +42,7 @@ pub struct SourceOwnerBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_receiver_flow.rs b/generated/async-stripe-shared/src/source_receiver_flow.rs index 25629cd43..be2c5e664 100644 --- a/generated/async-stripe-shared/src/source_receiver_flow.rs +++ b/generated/async-stripe-shared/src/source_receiver_flow.rs @@ -35,6 +35,7 @@ pub struct SourceReceiverFlowBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_redirect_flow.rs b/generated/async-stripe-shared/src/source_redirect_flow.rs index f632fa771..beb819bde 100644 --- a/generated/async-stripe-shared/src/source_redirect_flow.rs +++ b/generated/async-stripe-shared/src/source_redirect_flow.rs @@ -23,6 +23,7 @@ pub struct SourceRedirectFlowBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_transaction.rs b/generated/async-stripe-shared/src/source_transaction.rs index 76a5a97b2..8e777abcf 100644 --- a/generated/async-stripe-shared/src/source_transaction.rs +++ b/generated/async-stripe-shared/src/source_transaction.rs @@ -49,6 +49,7 @@ pub struct SourceTransactionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_transaction_ach_credit_transfer_data.rs b/generated/async-stripe-shared/src/source_transaction_ach_credit_transfer_data.rs index 3c1bd0176..71ac9ce9b 100644 --- a/generated/async-stripe-shared/src/source_transaction_ach_credit_transfer_data.rs +++ b/generated/async-stripe-shared/src/source_transaction_ach_credit_transfer_data.rs @@ -22,6 +22,7 @@ pub struct SourceTransactionAchCreditTransferDataBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_transaction_chf_credit_transfer_data.rs b/generated/async-stripe-shared/src/source_transaction_chf_credit_transfer_data.rs index 16b69e5e0..b1b44d951 100644 --- a/generated/async-stripe-shared/src/source_transaction_chf_credit_transfer_data.rs +++ b/generated/async-stripe-shared/src/source_transaction_chf_credit_transfer_data.rs @@ -25,6 +25,7 @@ pub struct SourceTransactionChfCreditTransferDataBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_transaction_gbp_credit_transfer_data.rs b/generated/async-stripe-shared/src/source_transaction_gbp_credit_transfer_data.rs index c9b24ac3f..8dcfbae65 100644 --- a/generated/async-stripe-shared/src/source_transaction_gbp_credit_transfer_data.rs +++ b/generated/async-stripe-shared/src/source_transaction_gbp_credit_transfer_data.rs @@ -33,6 +33,7 @@ pub struct SourceTransactionGbpCreditTransferDataBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_transaction_paper_check_data.rs b/generated/async-stripe-shared/src/source_transaction_paper_check_data.rs index f144f7f4b..71be81f25 100644 --- a/generated/async-stripe-shared/src/source_transaction_paper_check_data.rs +++ b/generated/async-stripe-shared/src/source_transaction_paper_check_data.rs @@ -17,6 +17,7 @@ pub struct SourceTransactionPaperCheckDataBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_transaction_sepa_credit_transfer_data.rs b/generated/async-stripe-shared/src/source_transaction_sepa_credit_transfer_data.rs index 795761ed8..e7f13427f 100644 --- a/generated/async-stripe-shared/src/source_transaction_sepa_credit_transfer_data.rs +++ b/generated/async-stripe-shared/src/source_transaction_sepa_credit_transfer_data.rs @@ -19,6 +19,7 @@ pub struct SourceTransactionSepaCreditTransferDataBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_ach_credit_transfer.rs b/generated/async-stripe-shared/src/source_type_ach_credit_transfer.rs index 598a00f22..29695c659 100644 --- a/generated/async-stripe-shared/src/source_type_ach_credit_transfer.rs +++ b/generated/async-stripe-shared/src/source_type_ach_credit_transfer.rs @@ -26,6 +26,7 @@ pub struct SourceTypeAchCreditTransferBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_ach_debit.rs b/generated/async-stripe-shared/src/source_type_ach_debit.rs index 040ea1af3..40fba2736 100644 --- a/generated/async-stripe-shared/src/source_type_ach_debit.rs +++ b/generated/async-stripe-shared/src/source_type_ach_debit.rs @@ -23,6 +23,7 @@ pub struct SourceTypeAchDebitBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_acss_debit.rs b/generated/async-stripe-shared/src/source_type_acss_debit.rs index 61281bb83..5b7c55c3b 100644 --- a/generated/async-stripe-shared/src/source_type_acss_debit.rs +++ b/generated/async-stripe-shared/src/source_type_acss_debit.rs @@ -30,6 +30,7 @@ pub struct SourceTypeAcssDebitBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_alipay.rs b/generated/async-stripe-shared/src/source_type_alipay.rs index 4e7f1821e..7827d67f8 100644 --- a/generated/async-stripe-shared/src/source_type_alipay.rs +++ b/generated/async-stripe-shared/src/source_type_alipay.rs @@ -16,6 +16,7 @@ pub struct SourceTypeAlipayBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_au_becs_debit.rs b/generated/async-stripe-shared/src/source_type_au_becs_debit.rs index 0a850b74a..77f7223c5 100644 --- a/generated/async-stripe-shared/src/source_type_au_becs_debit.rs +++ b/generated/async-stripe-shared/src/source_type_au_becs_debit.rs @@ -16,6 +16,7 @@ pub struct SourceTypeAuBecsDebitBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_bancontact.rs b/generated/async-stripe-shared/src/source_type_bancontact.rs index 4999b1126..d883e899e 100644 --- a/generated/async-stripe-shared/src/source_type_bancontact.rs +++ b/generated/async-stripe-shared/src/source_type_bancontact.rs @@ -22,6 +22,7 @@ pub struct SourceTypeBancontactBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_card.rs b/generated/async-stripe-shared/src/source_type_card.rs index 568347f0f..9b8a2500c 100644 --- a/generated/async-stripe-shared/src/source_type_card.rs +++ b/generated/async-stripe-shared/src/source_type_card.rs @@ -44,6 +44,7 @@ pub struct SourceTypeCardBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_card_present.rs b/generated/async-stripe-shared/src/source_type_card_present.rs index 2ca2aa5c6..0dded9011 100644 --- a/generated/async-stripe-shared/src/source_type_card_present.rs +++ b/generated/async-stripe-shared/src/source_type_card_present.rs @@ -62,6 +62,7 @@ pub struct SourceTypeCardPresentBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_eps.rs b/generated/async-stripe-shared/src/source_type_eps.rs index 6e7b99879..caf284f5d 100644 --- a/generated/async-stripe-shared/src/source_type_eps.rs +++ b/generated/async-stripe-shared/src/source_type_eps.rs @@ -14,6 +14,7 @@ pub struct SourceTypeEpsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_giropay.rs b/generated/async-stripe-shared/src/source_type_giropay.rs index a5b282c11..13012164e 100644 --- a/generated/async-stripe-shared/src/source_type_giropay.rs +++ b/generated/async-stripe-shared/src/source_type_giropay.rs @@ -18,6 +18,7 @@ pub struct SourceTypeGiropayBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_ideal.rs b/generated/async-stripe-shared/src/source_type_ideal.rs index 21c7291d8..70a44470e 100644 --- a/generated/async-stripe-shared/src/source_type_ideal.rs +++ b/generated/async-stripe-shared/src/source_type_ideal.rs @@ -18,6 +18,7 @@ pub struct SourceTypeIdealBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_klarna.rs b/generated/async-stripe-shared/src/source_type_klarna.rs index 53aaa6123..456b8c95f 100644 --- a/generated/async-stripe-shared/src/source_type_klarna.rs +++ b/generated/async-stripe-shared/src/source_type_klarna.rs @@ -62,6 +62,7 @@ pub struct SourceTypeKlarnaBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_multibanco.rs b/generated/async-stripe-shared/src/source_type_multibanco.rs index 20701c7bf..46bdccb57 100644 --- a/generated/async-stripe-shared/src/source_type_multibanco.rs +++ b/generated/async-stripe-shared/src/source_type_multibanco.rs @@ -30,6 +30,7 @@ pub struct SourceTypeMultibancoBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_p24.rs b/generated/async-stripe-shared/src/source_type_p24.rs index 947360017..731ad0b18 100644 --- a/generated/async-stripe-shared/src/source_type_p24.rs +++ b/generated/async-stripe-shared/src/source_type_p24.rs @@ -12,6 +12,7 @@ pub struct SourceTypeP24Builder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_sepa_credit_transfer.rs b/generated/async-stripe-shared/src/source_type_sepa_credit_transfer.rs index 9bb721130..1406598e4 100644 --- a/generated/async-stripe-shared/src/source_type_sepa_credit_transfer.rs +++ b/generated/async-stripe-shared/src/source_type_sepa_credit_transfer.rs @@ -32,6 +32,7 @@ pub struct SourceTypeSepaCreditTransferBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_sepa_debit.rs b/generated/async-stripe-shared/src/source_type_sepa_debit.rs index 1c154cf31..27fab1303 100644 --- a/generated/async-stripe-shared/src/source_type_sepa_debit.rs +++ b/generated/async-stripe-shared/src/source_type_sepa_debit.rs @@ -24,6 +24,7 @@ pub struct SourceTypeSepaDebitBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_sofort.rs b/generated/async-stripe-shared/src/source_type_sofort.rs index b07b8342a..f29b96a43 100644 --- a/generated/async-stripe-shared/src/source_type_sofort.rs +++ b/generated/async-stripe-shared/src/source_type_sofort.rs @@ -24,6 +24,7 @@ pub struct SourceTypeSofortBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_three_d_secure.rs b/generated/async-stripe-shared/src/source_type_three_d_secure.rs index 260b1ff58..7bf62586b 100644 --- a/generated/async-stripe-shared/src/source_type_three_d_secure.rs +++ b/generated/async-stripe-shared/src/source_type_three_d_secure.rs @@ -50,6 +50,7 @@ pub struct SourceTypeThreeDSecureBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/source_type_wechat.rs b/generated/async-stripe-shared/src/source_type_wechat.rs index 70dcc8667..93a580c6d 100644 --- a/generated/async-stripe-shared/src/source_type_wechat.rs +++ b/generated/async-stripe-shared/src/source_type_wechat.rs @@ -16,6 +16,7 @@ pub struct SourceTypeWechatBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription.rs b/generated/async-stripe-shared/src/subscription.rs index c7cd4c2a0..f308eed72 100644 --- a/generated/async-stripe-shared/src/subscription.rs +++ b/generated/async-stripe-shared/src/subscription.rs @@ -203,6 +203,7 @@ pub struct SubscriptionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription_automatic_tax.rs b/generated/async-stripe-shared/src/subscription_automatic_tax.rs index c957621ac..572669393 100644 --- a/generated/async-stripe-shared/src/subscription_automatic_tax.rs +++ b/generated/async-stripe-shared/src/subscription_automatic_tax.rs @@ -18,6 +18,7 @@ pub struct SubscriptionAutomaticTaxBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription_billing_thresholds.rs b/generated/async-stripe-shared/src/subscription_billing_thresholds.rs index ab8559fb6..102d64d26 100644 --- a/generated/async-stripe-shared/src/subscription_billing_thresholds.rs +++ b/generated/async-stripe-shared/src/subscription_billing_thresholds.rs @@ -18,6 +18,7 @@ pub struct SubscriptionBillingThresholdsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription_details_data.rs b/generated/async-stripe-shared/src/subscription_details_data.rs index dbc48d84c..0a85e4878 100644 --- a/generated/async-stripe-shared/src/subscription_details_data.rs +++ b/generated/async-stripe-shared/src/subscription_details_data.rs @@ -15,6 +15,7 @@ pub struct SubscriptionDetailsDataBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription_item.rs b/generated/async-stripe-shared/src/subscription_item.rs index 551271c14..48e3eadec 100644 --- a/generated/async-stripe-shared/src/subscription_item.rs +++ b/generated/async-stripe-shared/src/subscription_item.rs @@ -45,6 +45,7 @@ pub struct SubscriptionItemBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription_item_billing_thresholds.rs b/generated/async-stripe-shared/src/subscription_item_billing_thresholds.rs index 233a8565e..dfb3cc705 100644 --- a/generated/async-stripe-shared/src/subscription_item_billing_thresholds.rs +++ b/generated/async-stripe-shared/src/subscription_item_billing_thresholds.rs @@ -13,6 +13,7 @@ pub struct SubscriptionItemBillingThresholdsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription_payment_method_options_card.rs b/generated/async-stripe-shared/src/subscription_payment_method_options_card.rs index 5382b2ae6..220c615c4 100644 --- a/generated/async-stripe-shared/src/subscription_payment_method_options_card.rs +++ b/generated/async-stripe-shared/src/subscription_payment_method_options_card.rs @@ -22,6 +22,7 @@ pub struct SubscriptionPaymentMethodOptionsCardBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription_pending_invoice_item_interval.rs b/generated/async-stripe-shared/src/subscription_pending_invoice_item_interval.rs index 2bc3b6bad..f4fb6622e 100644 --- a/generated/async-stripe-shared/src/subscription_pending_invoice_item_interval.rs +++ b/generated/async-stripe-shared/src/subscription_pending_invoice_item_interval.rs @@ -18,6 +18,7 @@ pub struct SubscriptionPendingInvoiceItemIntervalBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription_schedule.rs b/generated/async-stripe-shared/src/subscription_schedule.rs index 047f8af9d..4a0e1d466 100644 --- a/generated/async-stripe-shared/src/subscription_schedule.rs +++ b/generated/async-stripe-shared/src/subscription_schedule.rs @@ -70,6 +70,7 @@ pub struct SubscriptionScheduleBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription_schedule_add_invoice_item.rs b/generated/async-stripe-shared/src/subscription_schedule_add_invoice_item.rs index 15d53399c..fde71d453 100644 --- a/generated/async-stripe-shared/src/subscription_schedule_add_invoice_item.rs +++ b/generated/async-stripe-shared/src/subscription_schedule_add_invoice_item.rs @@ -23,6 +23,7 @@ pub struct SubscriptionScheduleAddInvoiceItemBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription_schedule_configuration_item.rs b/generated/async-stripe-shared/src/subscription_schedule_configuration_item.rs index 9d6e3253a..137cdcc50 100644 --- a/generated/async-stripe-shared/src/subscription_schedule_configuration_item.rs +++ b/generated/async-stripe-shared/src/subscription_schedule_configuration_item.rs @@ -36,6 +36,7 @@ pub struct SubscriptionScheduleConfigurationItemBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription_schedule_current_phase.rs b/generated/async-stripe-shared/src/subscription_schedule_current_phase.rs index 61171c541..074857494 100644 --- a/generated/async-stripe-shared/src/subscription_schedule_current_phase.rs +++ b/generated/async-stripe-shared/src/subscription_schedule_current_phase.rs @@ -16,6 +16,7 @@ pub struct SubscriptionScheduleCurrentPhaseBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription_schedule_phase_configuration.rs b/generated/async-stripe-shared/src/subscription_schedule_phase_configuration.rs index 4079cfe2d..673e65997 100644 --- a/generated/async-stripe-shared/src/subscription_schedule_phase_configuration.rs +++ b/generated/async-stripe-shared/src/subscription_schedule_phase_configuration.rs @@ -88,6 +88,7 @@ pub struct SubscriptionSchedulePhaseConfigurationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings.rs b/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings.rs index d60dbc08b..689473bd8 100644 --- a/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings.rs +++ b/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings.rs @@ -49,6 +49,7 @@ pub struct SubscriptionSchedulesResourceDefaultSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings_automatic_tax.rs b/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings_automatic_tax.rs index aa4a17a36..56ee4624c 100644 --- a/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings_automatic_tax.rs +++ b/generated/async-stripe-shared/src/subscription_schedules_resource_default_settings_automatic_tax.rs @@ -18,6 +18,7 @@ pub struct SubscriptionSchedulesResourceDefaultSettingsAutomaticTaxBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscription_transfer_data.rs b/generated/async-stripe-shared/src/subscription_transfer_data.rs index a559f3553..334000559 100644 --- a/generated/async-stripe-shared/src/subscription_transfer_data.rs +++ b/generated/async-stripe-shared/src/subscription_transfer_data.rs @@ -18,6 +18,7 @@ pub struct SubscriptionTransferDataBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscriptions_resource_billing_cycle_anchor_config.rs b/generated/async-stripe-shared/src/subscriptions_resource_billing_cycle_anchor_config.rs index 4d2c21c51..9f17b8256 100644 --- a/generated/async-stripe-shared/src/subscriptions_resource_billing_cycle_anchor_config.rs +++ b/generated/async-stripe-shared/src/subscriptions_resource_billing_cycle_anchor_config.rs @@ -25,6 +25,7 @@ pub struct SubscriptionsResourceBillingCycleAnchorConfigBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscriptions_resource_pause_collection.rs b/generated/async-stripe-shared/src/subscriptions_resource_pause_collection.rs index ee678d0a3..91c5e228c 100644 --- a/generated/async-stripe-shared/src/subscriptions_resource_pause_collection.rs +++ b/generated/async-stripe-shared/src/subscriptions_resource_pause_collection.rs @@ -19,6 +19,7 @@ pub struct SubscriptionsResourcePauseCollectionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscriptions_resource_payment_method_options.rs b/generated/async-stripe-shared/src/subscriptions_resource_payment_method_options.rs index 1e874cd52..ca6e70883 100644 --- a/generated/async-stripe-shared/src/subscriptions_resource_payment_method_options.rs +++ b/generated/async-stripe-shared/src/subscriptions_resource_payment_method_options.rs @@ -31,6 +31,7 @@ pub struct SubscriptionsResourcePaymentMethodOptionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscriptions_resource_payment_settings.rs b/generated/async-stripe-shared/src/subscriptions_resource_payment_settings.rs index 5c69e16d4..bb90b9abd 100644 --- a/generated/async-stripe-shared/src/subscriptions_resource_payment_settings.rs +++ b/generated/async-stripe-shared/src/subscriptions_resource_payment_settings.rs @@ -25,6 +25,7 @@ pub struct SubscriptionsResourcePaymentSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscriptions_resource_pending_update.rs b/generated/async-stripe-shared/src/subscriptions_resource_pending_update.rs index 3ddddec00..a03f3e5ab 100644 --- a/generated/async-stripe-shared/src/subscriptions_resource_pending_update.rs +++ b/generated/async-stripe-shared/src/subscriptions_resource_pending_update.rs @@ -31,6 +31,7 @@ pub struct SubscriptionsResourcePendingUpdateBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscriptions_trials_resource_end_behavior.rs b/generated/async-stripe-shared/src/subscriptions_trials_resource_end_behavior.rs index 44b67839e..a73f5adf2 100644 --- a/generated/async-stripe-shared/src/subscriptions_trials_resource_end_behavior.rs +++ b/generated/async-stripe-shared/src/subscriptions_trials_resource_end_behavior.rs @@ -14,6 +14,7 @@ pub struct SubscriptionsTrialsResourceEndBehaviorBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/subscriptions_trials_resource_trial_settings.rs b/generated/async-stripe-shared/src/subscriptions_trials_resource_trial_settings.rs index 883a43022..ed9e62e68 100644 --- a/generated/async-stripe-shared/src/subscriptions_trials_resource_trial_settings.rs +++ b/generated/async-stripe-shared/src/subscriptions_trials_resource_trial_settings.rs @@ -13,6 +13,7 @@ pub struct SubscriptionsTrialsResourceTrialSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/tax_code.rs b/generated/async-stripe-shared/src/tax_code.rs index c6a106c1b..79ae48f29 100644 --- a/generated/async-stripe-shared/src/tax_code.rs +++ b/generated/async-stripe-shared/src/tax_code.rs @@ -21,6 +21,7 @@ pub struct TaxCodeBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 092666059..13b120486 100644 --- a/generated/async-stripe-shared/src/tax_deducted_at_source.rs +++ b/generated/async-stripe-shared/src/tax_deducted_at_source.rs @@ -23,6 +23,7 @@ pub struct TaxDeductedAtSourceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/tax_i_ds_owner.rs b/generated/async-stripe-shared/src/tax_i_ds_owner.rs index c91965762..3b58963ff 100644 --- a/generated/async-stripe-shared/src/tax_i_ds_owner.rs +++ b/generated/async-stripe-shared/src/tax_i_ds_owner.rs @@ -23,6 +23,7 @@ pub struct TaxIDsOwnerBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/tax_id.rs b/generated/async-stripe-shared/src/tax_id.rs index 9eb95982a..a69adeebe 100644 --- a/generated/async-stripe-shared/src/tax_id.rs +++ b/generated/async-stripe-shared/src/tax_id.rs @@ -44,6 +44,7 @@ pub struct TaxIdBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/tax_id_verification.rs b/generated/async-stripe-shared/src/tax_id_verification.rs index eace9a983..835e074fd 100644 --- a/generated/async-stripe-shared/src/tax_id_verification.rs +++ b/generated/async-stripe-shared/src/tax_id_verification.rs @@ -19,6 +19,7 @@ pub struct TaxIdVerificationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/tax_rate.rs b/generated/async-stripe-shared/src/tax_rate.rs index 0d2f8b1f5..ab57f0337 100644 --- a/generated/async-stripe-shared/src/tax_rate.rs +++ b/generated/async-stripe-shared/src/tax_rate.rs @@ -70,6 +70,7 @@ pub struct TaxRateBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 700fae9ac..491cad9a9 100644 --- a/generated/async-stripe-shared/src/test_helpers_test_clock.rs +++ b/generated/async-stripe-shared/src/test_helpers_test_clock.rs @@ -35,6 +35,7 @@ pub struct TestHelpersTestClockBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/three_d_secure_details.rs b/generated/async-stripe-shared/src/three_d_secure_details.rs index 63e304cdf..e8d6ec923 100644 --- a/generated/async-stripe-shared/src/three_d_secure_details.rs +++ b/generated/async-stripe-shared/src/three_d_secure_details.rs @@ -32,6 +32,7 @@ pub struct ThreeDSecureDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/three_d_secure_details_charge.rs b/generated/async-stripe-shared/src/three_d_secure_details_charge.rs index 2c8d73c85..fdbd88ebd 100644 --- a/generated/async-stripe-shared/src/three_d_secure_details_charge.rs +++ b/generated/async-stripe-shared/src/three_d_secure_details_charge.rs @@ -40,6 +40,7 @@ pub struct ThreeDSecureDetailsChargeBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/three_d_secure_usage.rs b/generated/async-stripe-shared/src/three_d_secure_usage.rs index 3a997d397..9ed496954 100644 --- a/generated/async-stripe-shared/src/three_d_secure_usage.rs +++ b/generated/async-stripe-shared/src/three_d_secure_usage.rs @@ -13,6 +13,7 @@ pub struct ThreeDSecureUsageBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/token_card_networks.rs b/generated/async-stripe-shared/src/token_card_networks.rs index 5faffce75..2dba05408 100644 --- a/generated/async-stripe-shared/src/token_card_networks.rs +++ b/generated/async-stripe-shared/src/token_card_networks.rs @@ -14,6 +14,7 @@ pub struct TokenCardNetworksBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/topup.rs b/generated/async-stripe-shared/src/topup.rs index 95712c8bb..46512a337 100644 --- a/generated/async-stripe-shared/src/topup.rs +++ b/generated/async-stripe-shared/src/topup.rs @@ -69,6 +69,7 @@ pub struct TopupBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/transfer.rs b/generated/async-stripe-shared/src/transfer.rs index 9d9eeefc1..f07d039a7 100644 --- a/generated/async-stripe-shared/src/transfer.rs +++ b/generated/async-stripe-shared/src/transfer.rs @@ -76,6 +76,7 @@ pub struct TransferBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/transfer_data.rs b/generated/async-stripe-shared/src/transfer_data.rs index 748b15753..ebc6314f2 100644 --- a/generated/async-stripe-shared/src/transfer_data.rs +++ b/generated/async-stripe-shared/src/transfer_data.rs @@ -21,6 +21,7 @@ pub struct TransferDataBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/transfer_reversal.rs b/generated/async-stripe-shared/src/transfer_reversal.rs index 8912d275b..6c935d27e 100644 --- a/generated/async-stripe-shared/src/transfer_reversal.rs +++ b/generated/async-stripe-shared/src/transfer_reversal.rs @@ -54,6 +54,7 @@ pub struct TransferReversalBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/transfer_schedule.rs b/generated/async-stripe-shared/src/transfer_schedule.rs index 5c017dd6e..7f42424ba 100644 --- a/generated/async-stripe-shared/src/transfer_schedule.rs +++ b/generated/async-stripe-shared/src/transfer_schedule.rs @@ -26,6 +26,7 @@ pub struct TransferScheduleBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/transform_quantity.rs b/generated/async-stripe-shared/src/transform_quantity.rs index c4617f9f5..f03457a24 100644 --- a/generated/async-stripe-shared/src/transform_quantity.rs +++ b/generated/async-stripe-shared/src/transform_quantity.rs @@ -16,6 +16,7 @@ pub struct TransformQuantityBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/transform_usage.rs b/generated/async-stripe-shared/src/transform_usage.rs index 60783c422..ca29cfd18 100644 --- a/generated/async-stripe-shared/src/transform_usage.rs +++ b/generated/async-stripe-shared/src/transform_usage.rs @@ -16,6 +16,7 @@ pub struct TransformUsageBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/us_bank_account_networks.rs b/generated/async-stripe-shared/src/us_bank_account_networks.rs index 5c7375a6e..9b8b2e4a7 100644 --- a/generated/async-stripe-shared/src/us_bank_account_networks.rs +++ b/generated/async-stripe-shared/src/us_bank_account_networks.rs @@ -16,6 +16,7 @@ pub struct UsBankAccountNetworksBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-shared/src/usage_record_summary.rs b/generated/async-stripe-shared/src/usage_record_summary.rs index 1b80d9b9d..6fbd13b46 100644 --- a/generated/async-stripe-shared/src/usage_record_summary.rs +++ b/generated/async-stripe-shared/src/usage_record_summary.rs @@ -26,6 +26,7 @@ pub struct UsageRecordSummaryBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/deleted_terminal_configuration.rs b/generated/async-stripe-terminal/src/deleted_terminal_configuration.rs index a72aba8f1..38732e147 100644 --- a/generated/async-stripe-terminal/src/deleted_terminal_configuration.rs +++ b/generated/async-stripe-terminal/src/deleted_terminal_configuration.rs @@ -15,6 +15,7 @@ pub struct DeletedTerminalConfigurationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/deleted_terminal_location.rs b/generated/async-stripe-terminal/src/deleted_terminal_location.rs index 9bd6de5b3..aa38cfc53 100644 --- a/generated/async-stripe-terminal/src/deleted_terminal_location.rs +++ b/generated/async-stripe-terminal/src/deleted_terminal_location.rs @@ -15,6 +15,7 @@ pub struct DeletedTerminalLocationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/deleted_terminal_reader.rs b/generated/async-stripe-terminal/src/deleted_terminal_reader.rs index 52aab6cc1..ee3034ac2 100644 --- a/generated/async-stripe-terminal/src/deleted_terminal_reader.rs +++ b/generated/async-stripe-terminal/src/deleted_terminal_reader.rs @@ -15,6 +15,7 @@ pub struct DeletedTerminalReaderBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_configuration/types.rs b/generated/async-stripe-terminal/src/terminal_configuration/types.rs index 61e7098cc..a86bbe8c4 100644 --- a/generated/async-stripe-terminal/src/terminal_configuration/types.rs +++ b/generated/async-stripe-terminal/src/terminal_configuration/types.rs @@ -39,6 +39,7 @@ pub struct TerminalConfigurationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_currency_specific_config.rs b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_currency_specific_config.rs index 5da10d4ec..c4987bcce 100644 --- a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_currency_specific_config.rs +++ b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_currency_specific_config.rs @@ -19,6 +19,7 @@ pub struct TerminalConfigurationConfigurationResourceCurrencySpecificConfigBuild #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_device_type_specific_config.rs b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_device_type_specific_config.rs index 2680209f9..a84f8d327 100644 --- a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_device_type_specific_config.rs +++ b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_device_type_specific_config.rs @@ -13,6 +13,7 @@ pub struct TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfigBui #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_offline_config.rs b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_offline_config.rs index 9a319cf51..5bbb35e24 100644 --- a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_offline_config.rs +++ b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_offline_config.rs @@ -14,6 +14,7 @@ pub struct TerminalConfigurationConfigurationResourceOfflineConfigBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_tipping.rs b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_tipping.rs index 68f864a6a..1963f9322 100644 --- a/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_tipping.rs +++ b/generated/async-stripe-terminal/src/terminal_configuration_configuration_resource_tipping.rs @@ -80,6 +80,7 @@ pub struct TerminalConfigurationConfigurationResourceTippingBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 019cf6b60..a07d1489c 100644 --- a/generated/async-stripe-terminal/src/terminal_connection_token/types.rs +++ b/generated/async-stripe-terminal/src/terminal_connection_token/types.rs @@ -22,6 +22,7 @@ pub struct TerminalConnectionTokenBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_location/types.rs b/generated/async-stripe-terminal/src/terminal_location/types.rs index d253e8cbc..4173fe9b8 100644 --- a/generated/async-stripe-terminal/src/terminal_location/types.rs +++ b/generated/async-stripe-terminal/src/terminal_location/types.rs @@ -32,6 +32,7 @@ pub struct TerminalLocationBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_reader/types.rs b/generated/async-stripe-terminal/src/terminal_reader/types.rs index fa5d2227a..4506306db 100644 --- a/generated/async-stripe-terminal/src/terminal_reader/types.rs +++ b/generated/async-stripe-terminal/src/terminal_reader/types.rs @@ -48,6 +48,7 @@ pub struct TerminalReaderBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_cart.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_cart.rs index 3035b0242..dcc71051b 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_cart.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_cart.rs @@ -26,6 +26,7 @@ pub struct TerminalReaderReaderResourceCartBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_line_item.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_line_item.rs index dc6521717..101a0ad80 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_line_item.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_line_item.rs @@ -21,6 +21,7 @@ pub struct TerminalReaderReaderResourceLineItemBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_config.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_config.rs index d8ea1ee2e..bf2bbd880 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_config.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_config.rs @@ -19,6 +19,7 @@ pub struct TerminalReaderReaderResourceProcessConfigBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_payment_intent_action.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_payment_intent_action.rs index ace4d252e..6aa822328 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_payment_intent_action.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_payment_intent_action.rs @@ -16,6 +16,7 @@ pub struct TerminalReaderReaderResourceProcessPaymentIntentActionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_config.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_config.rs index 619de4526..abf079eff 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_config.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_config.rs @@ -14,6 +14,7 @@ pub struct TerminalReaderReaderResourceProcessSetupConfigBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_intent_action.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_intent_action.rs index d3fbd488c..cf6080c25 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_intent_action.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_process_setup_intent_action.rs @@ -20,6 +20,7 @@ pub struct TerminalReaderReaderResourceProcessSetupIntentActionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_reader_action.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_reader_action.rs index 713b4e7aa..73c2f92ec 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_reader_action.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_reader_action.rs @@ -39,6 +39,7 @@ pub struct TerminalReaderReaderResourceReaderActionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_action.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_action.rs index e899a96ee..2ac9a1ab0 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_action.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_action.rs @@ -45,6 +45,7 @@ pub struct TerminalReaderReaderResourceRefundPaymentActionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_config.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_config.rs index ccc74e468..b98bca696 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_config.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_refund_payment_config.rs @@ -14,6 +14,7 @@ pub struct TerminalReaderReaderResourceRefundPaymentConfigBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_set_reader_display_action.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_set_reader_display_action.rs index 0acdde1da..8845f2752 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_set_reader_display_action.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_set_reader_display_action.rs @@ -18,6 +18,7 @@ pub struct TerminalReaderReaderResourceSetReaderDisplayActionBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_tipping_config.rs b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_tipping_config.rs index 37833aa10..97e175dde 100644 --- a/generated/async-stripe-terminal/src/terminal_reader_reader_resource_tipping_config.rs +++ b/generated/async-stripe-terminal/src/terminal_reader_reader_resource_tipping_config.rs @@ -15,6 +15,7 @@ pub struct TerminalReaderReaderResourceTippingConfigBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/inbound_transfers.rs b/generated/async-stripe-treasury/src/inbound_transfers.rs index 46be79d03..aebb0e05a 100644 --- a/generated/async-stripe-treasury/src/inbound_transfers.rs +++ b/generated/async-stripe-treasury/src/inbound_transfers.rs @@ -20,6 +20,7 @@ pub struct InboundTransfersBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/inbound_transfers_payment_method_details_us_bank_account.rs b/generated/async-stripe-treasury/src/inbound_transfers_payment_method_details_us_bank_account.rs index e0ae8474c..9df423a21 100644 --- a/generated/async-stripe-treasury/src/inbound_transfers_payment_method_details_us_bank_account.rs +++ b/generated/async-stripe-treasury/src/inbound_transfers_payment_method_details_us_bank_account.rs @@ -38,6 +38,7 @@ pub struct InboundTransfersPaymentMethodDetailsUsBankAccountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/outbound_payments_payment_method_details.rs b/generated/async-stripe-treasury/src/outbound_payments_payment_method_details.rs index ace03ebe2..a92cf7b45 100644 --- a/generated/async-stripe-treasury/src/outbound_payments_payment_method_details.rs +++ b/generated/async-stripe-treasury/src/outbound_payments_payment_method_details.rs @@ -23,6 +23,7 @@ pub struct OutboundPaymentsPaymentMethodDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_financial_account.rs b/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_financial_account.rs index 95009f162..4c06d71fe 100644 --- a/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_financial_account.rs +++ b/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_financial_account.rs @@ -16,6 +16,7 @@ pub struct OutboundPaymentsPaymentMethodDetailsFinancialAccountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_us_bank_account.rs b/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_us_bank_account.rs index ab11370db..2141ac81f 100644 --- a/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_us_bank_account.rs +++ b/generated/async-stripe-treasury/src/outbound_payments_payment_method_details_us_bank_account.rs @@ -38,6 +38,7 @@ pub struct OutboundPaymentsPaymentMethodDetailsUsBankAccountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details.rs b/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details.rs index fdb62dcee..aa51860e0 100644 --- a/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details.rs +++ b/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details.rs @@ -20,6 +20,7 @@ pub struct OutboundTransfersPaymentMethodDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details_us_bank_account.rs b/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details_us_bank_account.rs index e459b0f7f..858254227 100644 --- a/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details_us_bank_account.rs +++ b/generated/async-stripe-treasury/src/outbound_transfers_payment_method_details_us_bank_account.rs @@ -38,6 +38,7 @@ pub struct OutboundTransfersPaymentMethodDetailsUsBankAccountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/received_payment_method_details_financial_account.rs b/generated/async-stripe-treasury/src/received_payment_method_details_financial_account.rs index 7cc2236f1..9a229f389 100644 --- a/generated/async-stripe-treasury/src/received_payment_method_details_financial_account.rs +++ b/generated/async-stripe-treasury/src/received_payment_method_details_financial_account.rs @@ -16,6 +16,7 @@ pub struct ReceivedPaymentMethodDetailsFinancialAccountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 24c2f5c4e..e5bf3068b 100644 --- a/generated/async-stripe-treasury/src/treasury_credit_reversal/types.rs +++ b/generated/async-stripe-treasury/src/treasury_credit_reversal/types.rs @@ -51,6 +51,7 @@ pub struct TreasuryCreditReversalBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 d008348a2..04261e762 100644 --- a/generated/async-stripe-treasury/src/treasury_debit_reversal/types.rs +++ b/generated/async-stripe-treasury/src/treasury_debit_reversal/types.rs @@ -56,6 +56,7 @@ pub struct TreasuryDebitReversalBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 8a42dc53d..ceaf8894c 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_account/types.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_account/types.rs @@ -59,6 +59,7 @@ pub struct TreasuryFinancialAccountBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 2fe03a0e6..9a3f599cc 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_account_features.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_account_features.rs @@ -37,6 +37,7 @@ pub struct TreasuryFinancialAccountFeaturesBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_record.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_record.rs index 342b79056..73d5f6e31 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_record.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_record.rs @@ -26,6 +26,7 @@ pub struct TreasuryFinancialAccountsResourceAbaRecordBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_toggle_settings.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_toggle_settings.rs index 207da7e9f..9694665d4 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_toggle_settings.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_aba_toggle_settings.rs @@ -22,6 +22,7 @@ pub struct TreasuryFinancialAccountsResourceAbaToggleSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_ach_toggle_settings.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_ach_toggle_settings.rs index 173a282d7..8bff0c72d 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_ach_toggle_settings.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_ach_toggle_settings.rs @@ -22,6 +22,7 @@ pub struct TreasuryFinancialAccountsResourceAchToggleSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_balance.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_balance.rs index ade12af14..dd2bea3f0 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_balance.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_balance.rs @@ -20,6 +20,7 @@ pub struct TreasuryFinancialAccountsResourceBalanceBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_closed_status_details.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_closed_status_details.rs index 91c386b1e..63be36f1e 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_closed_status_details.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_closed_status_details.rs @@ -13,6 +13,7 @@ pub struct TreasuryFinancialAccountsResourceClosedStatusDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_address.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_address.rs index b6a45f20a..96fff5f28 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_address.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_address.rs @@ -22,6 +22,7 @@ pub struct TreasuryFinancialAccountsResourceFinancialAddressBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_addresses_features.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_addresses_features.rs index a6976e8cb..0941b0961 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_addresses_features.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_financial_addresses_features.rs @@ -13,6 +13,7 @@ pub struct TreasuryFinancialAccountsResourceFinancialAddressesFeaturesBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_inbound_transfers.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_inbound_transfers.rs index 09e5836bd..1fd3414b9 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_inbound_transfers.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_inbound_transfers.rs @@ -13,6 +13,7 @@ pub struct TreasuryFinancialAccountsResourceInboundTransfersBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_payments.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_payments.rs index 7b44fb2bc..eedfba78b 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_payments.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_payments.rs @@ -16,6 +16,7 @@ pub struct TreasuryFinancialAccountsResourceOutboundPaymentsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_transfers.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_transfers.rs index 2ff86d140..167150d28 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_transfers.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_outbound_transfers.rs @@ -16,6 +16,7 @@ pub struct TreasuryFinancialAccountsResourceOutboundTransfersBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_platform_restrictions.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_platform_restrictions.rs index 95055ba1c..5ae930d3d 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_platform_restrictions.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_platform_restrictions.rs @@ -19,6 +19,7 @@ pub struct TreasuryFinancialAccountsResourcePlatformRestrictionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_status_details.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_status_details.rs index a532e7645..358b07518 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_status_details.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_status_details.rs @@ -13,6 +13,7 @@ pub struct TreasuryFinancialAccountsResourceStatusDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggle_settings.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggle_settings.rs index 93e82e6e9..dcb5cfc8b 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggle_settings.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggle_settings.rs @@ -22,6 +22,7 @@ pub struct TreasuryFinancialAccountsResourceToggleSettingsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggles_setting_status_details.rs b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggles_setting_status_details.rs index 5bead4fe1..11585eb5a 100644 --- a/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggles_setting_status_details.rs +++ b/generated/async-stripe-treasury/src/treasury_financial_accounts_resource_toggles_setting_status_details.rs @@ -23,6 +23,7 @@ pub struct TreasuryFinancialAccountsResourceTogglesSettingStatusDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 4e363a951..09c7d6614 100644 --- a/generated/async-stripe-treasury/src/treasury_inbound_transfer/types.rs +++ b/generated/async-stripe-treasury/src/treasury_inbound_transfer/types.rs @@ -78,6 +78,7 @@ pub struct TreasuryInboundTransferBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_failure_details.rs b/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_failure_details.rs index 359c8f6c5..4884d4b31 100644 --- a/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_failure_details.rs +++ b/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_failure_details.rs @@ -13,6 +13,7 @@ pub struct TreasuryInboundTransfersResourceFailureDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows.rs b/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows.rs index be1eb9925..c3dd3f91a 100644 --- a/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows.rs +++ b/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows.rs @@ -13,6 +13,7 @@ pub struct TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlowsBui #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions.rs b/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions.rs index 84318b093..6836f55ad 100644 --- a/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions.rs +++ b/generated/async-stripe-treasury/src/treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions.rs @@ -19,6 +19,7 @@ pub struct TreasuryInboundTransfersResourceInboundTransferResourceStatusTransiti #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 110db9f84..6cec78eca 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_payment/types.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_payment/types.rs @@ -91,6 +91,7 @@ pub struct TreasuryOutboundPaymentBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_end_user_details.rs b/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_end_user_details.rs index 7d443a9ae..329f48e21 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_end_user_details.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_end_user_details.rs @@ -20,6 +20,7 @@ pub struct TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetails #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_status_transitions.rs b/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_status_transitions.rs index 76723adb8..5568d422f 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_status_transitions.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_outbound_payment_resource_status_transitions.rs @@ -22,6 +22,7 @@ pub struct TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransiti #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_returned_status.rs b/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_returned_status.rs index 5f1813f1d..79321bcf0 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_returned_status.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_payments_resource_returned_status.rs @@ -16,6 +16,7 @@ pub struct TreasuryOutboundPaymentsResourceReturnedStatusBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 2073cfe77..4f9183b99 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_transfer/types.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_transfer/types.rs @@ -74,6 +74,7 @@ pub struct TreasuryOutboundTransferBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_returned_details.rs b/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_returned_details.rs index c6b0d9a80..f945f72ce 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_returned_details.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_returned_details.rs @@ -16,6 +16,7 @@ pub struct TreasuryOutboundTransfersResourceReturnedDetailsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] diff --git a/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_status_transitions.rs b/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_status_transitions.rs index 937183c2e..a7f50fc45 100644 --- a/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_status_transitions.rs +++ b/generated/async-stripe-treasury/src/treasury_outbound_transfers_resource_status_transitions.rs @@ -22,6 +22,7 @@ pub struct TreasuryOutboundTransfersResourceStatusTransitionsBuilder { #[allow( unused_variables, irrefutable_let_patterns, + clippy::let_unit_value, clippy::match_single_binding, clippy::single_match )] 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 b5241708c..f4888493b 100644 --- a/generated/async-stripe-treasury/src/treasury_received_credit/types.rs +++ b/generated/async-stripe-treasury/src/treasury_received_credit/types.rs @@ -60,6 +60,7 @@ transaction: Option ObjectWriter<'a> { {builder_inner} }} - #[allow(unused_variables, irrefutable_let_patterns, clippy::match_single_binding, clippy::single_match)] + #[allow(unused_variables, irrefutable_let_patterns, clippy::let_unit_value, clippy::match_single_binding, clippy::single_match)] const _: () = {{ use miniserde::de::{{Map, Visitor}}; use miniserde::json::Value;